20 params.addClassDescription(
21 "Anisotropic diffusion term in the porous media incompressible Navier-Stokes " 22 "equations : -div(kappa grad(T))");
23 params.addRequiredParam<MooseFunctorName>(
NS::kappa,
"Vector of effective thermal conductivity");
24 params.addRequiredParam<MooseFunctorName>(
NS::porosity,
"Porosity");
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.");
37 params.set<
unsigned short>(
"ghost_layers") = 2;
45 _porosity_factored_in(getParam<bool>(
"effective_conductivity")),
49 if (!dynamic_cast<INSFVEnergyVariable *>(&
_var))
51 "PINSFVEnergyAnisotropicDiffusion may only be used with a fluid temperature variable, " 52 "of variable type INSFVEnergyVariable.");
68 const auto face_elem =
elemArg();
72 :
_k(face_elem, state) *
_eps(face_elem, state);
74 ?
_k(face_neighbor, state)
75 :
_k(face_neighbor, state) *
_eps(face_neighbor, state);
83 for (std::size_t i = 0; i < LIBMESH_DIM; i++)
84 kappa_grad_T(i) = k_eps_face(i) * grad_T(i);
static InputParameters validParams()
Moose::ElemArg elemArg(bool correct_skewness=false) const
const FaceInfo * _face_info
Moose::StateArg determineState() const
DualNumber< Real, DNDerivativeType, true > ADReal
static const std::string porosity
bool onBoundary(const FaceInfo &fi) const
static InputParameters validParams()
const Moose::Functor< ADReal > & _eps
the porosity
registerMooseObject("NavierStokesApp", PINSFVEnergyAnisotropicDiffusion)
const bool _porosity_factored_in
whether the diffusivity should be multiplied by porosity
A flux kernel for diffusion of energy in porous media across cell faces using a vector diffusion coef...
static const std::string kappa
ADReal computeQpResidual() override
Moose::ElemArg neighborArg(bool correct_skewness=false) const
void mooseError(Args &&... args) const
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
InterpMethod selectInterpolationMethod(const std::string &interp_method)
MooseVariableFV< Real > & _var
const Moose::FV::InterpMethod _k_interp_method
The face interpolation method for the conductivity.
void interpolate(InterpMethod m, T &result, const T2 &value1, const T3 &value2, const FaceInfo &fi, const bool one_is_elem)
const Moose::Functor< ADRealVectorValue > & _k
the thermal conductivity
PINSFVEnergyAnisotropicDiffusion(const InputParameters ¶ms)
const ADTemplateVariableGradient< Real > & adGradSln() const override