73 _is_implicit(this->
template getParam<bool>(
"is_implicit")),
75 _fp(this->
template getUserObject<SinglePhaseFluidProperties>(
"fp")),
76 _n_segments(this->
template getParam<std::vector<MooseFunctorName>>(
"areas").size()),
77 _areas(this->
template getParam<std::vector<MooseFunctorName>>(
"areas").size()),
78 _perimeters(this->
template getParam<std::vector<MooseFunctorName>>(
"perimeters").size()),
79 _lengths(this->
template getParam<std::vector<MooseFunctorName>>(
"lengths").size()),
80 _alphas(this->
template getParam<std::vector<MooseFunctorName>>(
"alphas").size()),
81 _forms_losses(this->
template getParam<std::vector<MooseFunctorName>>(
"forms_losses").size()),
82 _dPps(this->
template getParam<std::vector<MooseFunctorName>>(
"pump_pressures").size()),
83 _roughnesses(this->
template getParam<std::vector<MooseFunctorName>>(
"roughnesses").size()),
85{
86 const auto & area_names = MooseBase::getParam<std::vector<MooseFunctorName>>("areas");
87 const auto & perimeter_names = MooseBase::getParam<std::vector<MooseFunctorName>>("perimeters");
88 const auto & length_names = MooseBase::getParam<std::vector<MooseFunctorName>>("lengths");
89 const auto & alpha_names = MooseBase::getParam<std::vector<MooseFunctorName>>("alphas");
90 const auto & forms_loss_names =
91 MooseBase::getParam<std::vector<MooseFunctorName>>("forms_losses");
92 const auto & dPp_names = MooseBase::getParam<std::vector<MooseFunctorName>>("pump_pressures");
93 const auto & roughness_names = MooseBase::getParam<std::vector<MooseFunctorName>>("roughnesses");
98 {
100 "Must provide consistent number of segments for each parameter! Including temperatures!");
101 }
103 {
104 _T[j] = &(ScalarCoupleable::coupledGenericScalarValue<is_ad>(
"temperatures", j));
105 _areas[j] = &(this->
template getFunctor<GenericReal<is_ad>>(area_names[j]));
106 _perimeters[j] = &(this->
template getFunctor<GenericReal<is_ad>>(perimeter_names[j]));
107 _lengths[j] = &(this->
template getFunctor<GenericReal<is_ad>>(length_names[j]));
108 _alphas[j] = &(this->
template getFunctor<GenericReal<is_ad>>(alpha_names[j]));
109 _forms_losses[j] = &(this->
template getFunctor<GenericReal<is_ad>>(forms_loss_names[j]));
110 _dPps[j] = &(this->
template getFunctor<GenericReal<is_ad>>(dPp_names[j]));
111 _roughnesses[j] = &(this->
template getFunctor<GenericReal<is_ad>>(roughness_names[j]));
112 }
113}
void mooseError(Args &&... args)
Moose::GenericType< Real, is_ad > GenericReal
typename std::conditional< is_ad, ADScalarKernel, ScalarKernel >::type Base
std::vector< const Moose::Functor< GenericReal< is_ad > > * > _forms_losses
Forms loss coefficients of each segment.
std::vector< const Moose::Functor< GenericReal< is_ad > > * > _alphas
Angle with respect to the horizontal of each segment.
const size_t _n_temps
Number of coupled temperature variables.
std::vector< const Moose::Functor< GenericReal< is_ad > > * > _roughnesses
Wall roughness of each segment.
const Moose::Functor< GenericReal< is_ad > > & _Pref
System reference pressure.
const bool _is_implicit
Property state integration flag.
std::vector< const GenericVariableValue< is_ad > * > _T
Coupled temperature variables.
std::vector< const Moose::Functor< GenericReal< is_ad > > * > _dPps
Pump pressure gains of each segment.
std::vector< const Moose::Functor< GenericReal< is_ad > > * > _lengths
Length of each segment.
const Moose::Functor< GenericReal< is_ad > > & _gravity
Gravitational acceleration in the vertical downward direction.
std::vector< const Moose::Functor< GenericReal< is_ad > > * > _perimeters
Wetted perimeter of each segment.
const size_t _n_segments
Number of geometrically/thermally unique segments.
std::vector< const Moose::Functor< GenericReal< is_ad > > * > _areas
Flow area of each segment.
const SinglePhaseFluidProperties & _fp
Fluid properties object.
unsigned int coupledScalarComponents(const std::string &var_name) const
IntRange< T > make_range(T beg, T end)