23 params.addRequiredParam<UserObjectName>(
NS::fluid,
"fluid userobject");
24 params.addClassDescription(
25 "Computes the density from coupled pressure and temperature functors (variables, "
26 "functions, functor material properties");
27 params.addRequiredParam<MooseFunctorName>(
NS::temperature,
"temperature functor");
28 params.addRequiredParam<MooseFunctorName>(
NS::pressure,
"pressure functor");
29 params.addParam<MooseFunctorName>(
30 "density_name",
NS::density,
"name to use to declare the density functor");
31 params.addParam<
bool>(
"neglect_derivatives_of_density_time_derivative",
33 "Whether to neglect the derivatives with regards to nonlinear variables "
34 "of the density time derivatives");
40 _pressure(getFunctor<
ADReal>(
NS::pressure)),
41 _temperature(getFunctor<
ADReal>(
NS::temperature)),
43 _density_name(getParam<MooseFunctorName>(
"density_name"))
46 [
this](
const auto & r,
const auto & t) ->
ADReal
48 if (getParam<bool>(
"neglect_derivatives_of_density_time_derivative"))
49 addFunctorProperty<ADReal>(
51 [
this](
const auto & r,
const auto & t) ->
ADReal
53 Real
rho, drho_dp, drho_dT;
59 addFunctorProperty<ADReal>(
61 [
this](
const auto & r,
const auto & t) ->
ADReal
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", RhoFromPTFunctorMaterial)
static InputParameters validParams()
Computes the density using the fluid properties at a specified location.
const Moose::Functor< ADReal > & _pressure
pressure
const SinglePhaseFluidProperties & _fluid
fluid properties user object
const MooseFunctorName _density_name
name of the density functor declared
const Moose::Functor< ADReal > & _temperature
temperature
RhoFromPTFunctorMaterial(const InputParameters ¶meters)
static InputParameters validParams()
Common class for single phase fluid properties.
static const std::string density
static const std::string temperature
std::string time_deriv(const std::string &var)
static const std::string fluid
static const std::string pressure