21 params.addClassDescription(
"Diffusion term in the porous media incompressible Navier-Stokes "
22 "fluid energy equations : $-div(eps * k * grad(T))$");
23 params.addRequiredParam<MooseFunctorName>(
NS::porosity,
"Porosity");
24 params.addRequiredParam<MooseFunctorName>(
NS::k,
"Thermal conductivity");
25 params.addParam<
bool>(
26 "effective_diffusivity",
28 "Whether the conductivity should be multiplied by porosity, or whether the provided "
29 "conductivity is an effective conductivity taking porosity effects into account");
30 params.renameParam(
"effective_diffusivity",
"effective_conductivity",
"");
31 MooseEnum coeff_interp_method(
"average harmonic",
"harmonic");
33 "kappa_interp_method",
35 "Switch that can select face interpolation method for the thermal conductivity.");
39 params.addRelationshipManager(
40 "ElementSideNeighborLayers",
41 Moose::RelationshipManagerType::GEOMETRIC | Moose::RelationshipManagerType::ALGEBRAIC |
42 Moose::RelationshipManagerType::COUPLING,
46 params.set<
unsigned short>(
"ghost_layers") = 2;
54 _eps(getFunctor<
ADReal>(
NS::porosity)),
55 _porosity_factored_in(getParam<bool>(
"effective_conductivity")),
57 Moose::FV::selectInterpolationMethod(getParam<
MooseEnum>(
"kappa_interp_method")))
60 mooseError(
"PINSFVEnergyDiffusion may only be used with a fluid temperature variable, "
61 "of variable type INSFVEnergyVariable.");
78 const auto face_elem =
elemArg();
82 :
_k(face_elem, state) *
_eps(face_elem, state);
84 :
_k(face_neighbor, state) *
_eps(face_neighbor, state);
89 if (value1 <= 0 || value2 <= 0)
92 "Negative or null thermal conductivity value. If this is on purpose use arithmetic mean "
93 "interpolation instead of the default harmonic interpolation.");
95 k_interp_method = Moose::FV::InterpMethod::Average;
108 return -k_eps_face * dTdn;
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", PINSFVEnergyDiffusion)
const bool _correct_skewness
static InputParameters validParams()
Moose::ElemArg neighborArg(bool correct_skewness=false) const
Moose::ElemArg elemArg(bool correct_skewness=false) const
static InputParameters validParams()
bool onBoundary(const FaceInfo &fi) const
MooseVariableFV< Real > & _var
Moose::FaceArg singleSidedFaceArg(const FaceInfo *fi=nullptr, Moose::FV::LimiterType limiter_type=Moose::FV::LimiterType::CentralDifference, bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
virtual ADReal gradUDotNormal(const Moose::StateArg &time, const bool correct_skewness) const
const FaceInfo * _face_info
static void setRMParamsDiffusion(const InputParameters &obj_params, InputParameters &rm_params, const unsigned short conditional_extended_layers)
void mooseError(Args &&... args) const
A flux kernel for diffusing energy in porous media across cell faces, using a scalar isotropic diffus...
ADReal computeQpResidual() override
static InputParameters validParams()
const Moose::Functor< ADReal > & _k
the thermal conductivity
const Moose::Functor< ADReal > & _eps
the porosity
const bool _porosity_factored_in
whether the diffusivity should be multiplied by porosity
PINSFVEnergyDiffusion(const InputParameters ¶ms)
const Moose::FV::InterpMethod _k_interp_method
which interpolation method for the diffusivity on faces
Moose::StateArg determineState() const
void interpolate(InterpMethod m, T &result, const T2 &value1, const T3 &value2, const FaceInfo &fi, const bool one_is_elem)
static const std::string k
static const std::string porosity