27 params.
addParam<PostprocessorName>(
"energy_pp",
"Postprocessor with the inlet energy flow rate");
28 params.
addParam<PostprocessorName>(
"temperature_pp",
"Postprocessor with the inlet temperature");
29 params.
addParam<MooseFunctorName>(
NS::cp,
"specific heat capacity functor");
35 "Fluid specific enthalpy functor. This can be specified to "
36 "avoid using cp * T as the enthalpy");
43 _temperature_pp(isParamValid(
"temperature_pp") ? &getPostprocessorValue(
"temperature_pp")
45 _energy_pp(isParamValid(
"energy_pp") ? &getPostprocessorValue(
"energy_pp") : nullptr),
46 _cp(isParamValid(
NS::cp) ? &getFunctor<
ADReal>(
NS::cp) : nullptr),
47 _temperature(getFunctor<
ADReal>(
NS::T_fluid)),
48 _pressure(isParamValid(
NS::pressure) ? &getFunctor<
ADReal>(
NS::pressure) : nullptr),
49 _h_fluid(isParamValid(
NS::specific_enthalpy) ? &getFunctor<
ADReal>(
NS::specific_enthalpy)
51 _fluid(isParamValid(
NS::fluid)
57 "The variable argument to WCNSFVEnergyFluxBC must be of type INSFVEnergyVariable");
61 mooseWarning(
"If setting the energy flow rate directly, "
62 "no need for inlet velocity (magnitude or direction), mass flow or temperature");
68 mooseError(
"If not providing the energy flow rate, "
69 "the inlet temperature should be provided");
71 mooseError(
"If not providing the inlet energy flow rate, the inlet velocity or mass flow "
72 "should be provided");
74 mooseError(
"If providing the inlet mass flow rate, the flow"
75 " area should be provided as well");
79 "If supplying the energy flow rate, the flow area should be provided as well");
111 "Either mdot_pp or velocity_pp or energy_pp need to be provided OR this function must be "
112 "overridden in derived classes if other input parameter combinations are valid. "
113 "Neither mdot_pp nor velocity_pp are provided.");
121 const bool inflow)
const
144 mooseError(
"Should not reach here, constructor checks required functor inputs to flux BC");
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", WCNSFVEnergyFluxBC)
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
ADRealVectorValue _normal
void paramError(const std::string ¶m, Args... args) const
void mooseError(Args &&... args) const
void mooseWarning(Args &&... args) const
Common class for single phase fluid properties.
Moose::StateArg determineState() const
Flux boundary condition for the weakly compressible energy equation.
ADReal enthalpy(const T &loc_arg, const Moose::StateArg &state, const bool inflow) const
Computes the enthalpy using what the user has specified.
const Moose::Functor< ADReal > * _cp
Fluid specific heat capacity functor.
static InputParameters validParams()
const Moose::Functor< ADReal > & _temperature
Fluid temperature functor.
virtual bool isInflow() const override
override because energy_pp is not considered in base class
const Moose::Functor< ADReal > *const _h_fluid
Pointer to the specific enthalpy functor.
const Moose::Functor< ADReal > *const _pressure
Fluid pressure functor.
const PostprocessorValue *const _energy_pp
Postprocessor with the inlet energy flow rate.
const PostprocessorValue *const _temperature_pp
Postprocessor with the inlet temperature.
WCNSFVEnergyFluxBC(const InputParameters ¶ms)
const SinglePhaseFluidProperties *const _fluid
Fluid properties object.
ADReal computeQpResidual() override
Base class for weakly compressible flux boundary conditions.
const Moose::Functor< ADReal > & _rho
Fluid density functor.
const bool _direction_specified_by_user
Flag to store if the flow direction is specified by the user.
ADReal inflowMassFlux(const Moose::StateArg &state) const
computes the inflow massflux
static InputParameters validParams()
const PostprocessorValue *const _mdot_pp
Postprocessor with the inlet mass flow rate.
const Real _scaling_factor
Scaling factor.
const PostprocessorValue *const _velocity_pp
Postprocessor with the inlet velocity.
const PostprocessorValue *const _area_pp
Postprocessor with the inlet area.
ADRealVectorValue varVelocity(const Moose::StateArg &state) const
returns the velocity vector (vel_x, vel_y, vel_z)
static const std::string T_fluid
static const std::string cp
static const std::string specific_enthalpy
static const std::string fluid
static const std::string pressure