22 params.
addClassDescription(
"Adds advection, diffusion, and heat source terms to energy equation, "
23 "potentially with stabilization");
24 params.
addParam<
bool>(
"conservative_form",
false,
"if conservative form is used");
25 params.
addCoupledVar(
"porosity_elem",
"Element averaged porosity");
26 params.
addCoupledVar(
"power_density",
"volumetric heat source");
27 params.
addCoupledVar(
"pke_power_var",
"Normalized power from PKE");
28 params.
addParam<FunctionName>(
"power_shape_function",
"Function that defines power profile");
35 _conservative_form(getParam<bool>(
"conservative_form")),
36 _k_elem(getMaterialProperty<Real>(
"k_fluid_elem")),
37 _cp(getMaterialProperty<Real>(
"cp_fluid")),
38 _has_porosity_elem(isParamValid(
"porosity_elem")),
39 _porosity_elem(_has_porosity_elem ? coupledValue(
"porosity_elem")
40 : (_has_porosity ? coupledValue(
"porosity") : _zero)),
41 _has_qv(isParamValid(
"power_density")),
42 _qv(_has_qv ? coupledValue(
"power_density") : _zero),
43 _has_pke(isParamValid(
"pke_power_var")),
44 _pke_qv(_has_pke ? coupledScalarValue(
"pke_power_var") : _zero),
45 _power_shape_function(
46 isParamValid(
"power_shape_function") ? &getFunction(
"power_shape_function") : NULL)
51 "'power_density' and 'pke_power_var' cannot be both provided in 'INSFEFluidEnergyKernel'.");
54 mooseError(
"'power_shape_function' is required if 'pke_power_var' is provided in "
55 "'INSFEFluidEnergyKernel'.");
82 Real heat_source_supg = -
_qv[
_qp];
89 Real normal_part = convective_part + heat_source_part + diffusion_part;
90 Real supg_part = (transient_supg + convection_supg + heat_source_supg + diffusion_supg) *
93 return normal_part + supg_part;
101 Real
rho, drho_dp, drho_dT;
117 Real normal_part = convection_part + diffusion_part;
120 Real transient_supg =
127 return normal_part + supg_part;
registerMooseObjectRenamed("NavierStokesApp", MDFluidEnergyKernel, "02/01/2024 00:00", INSFEFluidEnergyKernel)
registerMooseObject("NavierStokesApp", INSFEFluidEnergyKernel)
virtual Real value(Real t, const Point &p) const
The spatial part of the 3D energy conservation for fluid flow.
static InputParameters validParams()
const VariableValue & _qv
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
const VariableValue & _porosity_elem
virtual Real computeQpJacobian() override
virtual Real computeQpResidual() override
const Function * _power_shape_function
const MaterialProperty< Real > & _k_elem
bool _has_pke
volumetric heat source
const MaterialProperty< Real > & _cp
INSFEFluidEnergyKernel(const InputParameters ¶meters)
const VariableValue & _pke_qv
const VariableValue & _w_vel
const VariableValue & _u_vel
const VariableValue & _v_vel
const SinglePhaseFluidProperties & _eos
const VariableValue & _porosity
const MaterialProperty< Real > & _rho
const VariableSecond & _second_u
unsigned int mapVarNumber(unsigned int var) const
Helper function for mapping Moose variable numberings into the "canonical" numbering for the porous m...
const VariableValue & _pressure
Base class for stabilization kernels.
const VariableValue & _du_dot_du
static InputParameters validParams()
const MaterialProperty< Real > & _taue
const VariableValue & _u_dot
RealVectorValue _vel_elem
const MooseArray< Point > & _q_point
const VariableGradient & _grad_u
const VariablePhiValue & _phi
const VariableTestValue & _test
const VariablePhiGradient & _grad_phi
const VariableTestGradient & _grad_test
void mooseError(Args &&... args) const