<commit_before>/****************************************************************/
/*             DO NOT MODIFY OR REMOVE THIS HEADER              */
/*          FALCON - Fracturing And Liquid CONvection           */
/*                                                              */
/*       (c)     2012 Battelle Energy Alliance, LLC             */
/*                   ALL RIGHTS RESERVED                        */
/*                                                              */
/*          Prepared by Battelle Energy Alliance, LLC           */
/*            Under Contract No. DE-AC07-05ID14517              */
/*            With the U. S. Department of Energy               */
/*                                                              */
/*            See COPYRIGHT for full restrictions               */
/****************************************************************/

/*----------------------------------------------------------------

Contributors: <NAME> (INL)

Descriptions: compute the residual & Jacobian of
              P-T based single-phase energy balance equation

----------------------------------------------------------------*/

#include "PTEnergyResidual.h"

registerMooseObject("FalconApp", PTEnergyResidual);

template<>
InputParameters validParams<PTEnergyResidual>()
{
  InputParameters params = validParams<Kernel>();
  params.addCoupledVar("coupled_pressure",
  "This coupled variable will be used as pressure");
  return params;
}

/*******************************************************************************
Routine: PTEnergyResidual --- constructor
Authors: <NAME>
*******************************************************************************/
PTEnergyResidual::PTEnergyResidual(const InputParameters & parameters):
  Kernel(parameters),
  _has_coupled_pres(isCoupled("coupled_pressure")),
  _stab(getMaterialProperty<unsigned int>("stabilization_options")),
  _thco(getMaterialProperty<Real>("thermal_conductivity")),
  _wsph(getMaterialProperty<Real>("specific_heat_water")),
  _epor(getMaterialProperty<Real>("porous_media_energy")),
  _tau1(getMaterialProperty<Real>("supg_tau1")),
  _tau2(getMaterialProperty<Real>("supg_tau2")),
  _wdmfx(getMaterialProperty<RealGradient>("darcy_mass_flux_water")),
  _evelo(getMaterialProperty<RealGradient>("energy_convective_velocity")),
  _u_dot(dot()),
  _du_dot_du(dotDu()),
  _pres_var(_has_coupled_pres ? coupled("coupled_pressure") : zero)
{
  // In case this is the only Kernel present in a given simulation, it
  // is responsible for telling the FEProblem that it needs
  // u_dot. Technically any Kernel which uses u_dot should do this
  // now, but often it isn't needed because it is already handled by
  // the TimeIntegrator constructor.
  _fe_problem.setUDotRequested(true);
}


/*******************************************************************************
Routine: computeQpResidual
         --- compute residual terms on quadrature point
Authors: <NAME>
*******************************************************************************/
Real
PTEnergyResidual::<commit_msg>Only call dot() and _du_dot_du if solving a transient problem.<commit_after>/****************************************************************/
/*             DO NOT MODIFY OR REMOVE THIS HEADER              */
/*          FALCON - Fracturing And Liquid CONvection           */
/*                                                              */
/*       (c)     2012 Battelle Energy Alliance, LLC             */
/*                   ALL RIGHTS RESERVED                        */
/*                                                              */
/*          Prepared by Battelle Energy Alliance, LLC           */
/*            Under Contract No. DE-AC07-05ID14517              */
/*            With the U. S. Department of Energy               */
/*                                                              */
/*            See COPYRIGHT for full restrictions               */
/****************************************************************/

/*----------------------------------------------------------------

Contributors: <NAME> (INL)

Descriptions: compute the residual & Jacobian of
              P-T based single-phase energy balance equation

----------------------------------------------------------------*/

#include "PTEnergyResidual.h"

registerMooseObject("FalconApp", PTEnergyResidual);

template<>
InputParameters validParams<PTEnergyResidual>()
{
  InputParameters params = validParams<Kernel>();
  params.addCoupledVar("coupled_pressure",
  "This coupled variable will be used as pressure");
  return params;
}

/*******************************************************************************
Routine: PTEnergyResidual --- constructor
Authors: <NAME>
*******************************************************************************/
PTEnergyResidual::PTEnergyResidual(const InputParameters & parameters):
  Kernel(parameters),
  _has_coupled_pres(isCoupled("coupled_pressure")),
  _stab(getMaterialProperty<unsigned int>("stabilization_options")),
  _thco(getMaterialProperty<Real>("thermal_conductivity")),
  _wsph(getMaterialProperty<Real>("specific_heat_water")),
  _epor(getMaterialProperty<Real>("porous_media_energy")),
  _tau1(getMaterialProperty<Real>("supg_tau1")),
  _tau2(getMaterialProperty<Real>("supg_tau2")),
  _wdmfx(getMaterialProperty<RealGradient>("darcy_mass_flux_water")),
  _evelo(getMaterialProperty<RealGradient>("energy_convective_velocity")),
  _u_dot(_is_transient ? dot() : _zero),
  _du_dot_du(_is_transient ? dotDu() : _zero),
  _pres_var(_has_coupled_pres ? coupled("coupled_pressure") : zero)
{
}


/*******************************************************************************
Routine: computeQpResidual
         --- compute residual terms on quadrature point
Authors: <NAME>
*******************************************************************************/
Real
PTEnergyResidual::
{'fraction_non_alphanumeric': 0.2775054926483015, 'fraction_numerical': 0.005746155146188947, 'mean_word_length': 2.562913907284768, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4308352', 'n_tokens_mistral': 1447, 'n_tokens_neox': 1349, 'n_words': 292}