20 #include "metaphysicl/raw_type.h" 30 "Auxiliary kernel for computing the Mach number assuming an ideal gas.");
31 params.
addParam<
bool>(
"use_material_properties",
33 "Whether to use material properties to compute the Mach number");
40 "The name of the user object for fluid properties");
47 _use_mat_props(getParam<bool>(
"use_material_properties")),
48 _u_vel(_use_mat_props ? nullptr : &coupledValue(
NS::
velocity_x)),
49 _v_vel(_use_mat_props ? nullptr
50 : (_mesh.dimension() >= 2 ? &coupledValue(
NS::
velocity_y) : &_zero)),
51 _w_vel(_use_mat_props ? nullptr
52 : (_mesh.dimension() == 3 ? &coupledValue(
NS::
velocity_z) : &_zero)),
54 _specific_internal_energy(_use_mat_props ? nullptr
56 _mat_speed(_use_mat_props ? &getADMaterialProperty<
Real>(
NS::
speed) : nullptr),
57 _mat_pressure(_use_mat_props ? &getADMaterialProperty<
Real>(
NS::
pressure) : nullptr),
58 _mat_T_fluid(_use_mat_props ? &getADMaterialProperty<
Real>(
NS::
T_fluid) : nullptr),
auto norm() const -> decltype(std::norm(Real()))
Auxiliary kernel for computing the Mach number assuming an ideal gas.
static const std::string speed
const VariableValue *const _u_vel
const VariableValue *const _specific_internal_energy
static const std::string velocity_z
static InputParameters validParams()
static const std::string velocity_x
static const std::string specific_internal_energy
const SinglePhaseFluidProperties & _fp
static const std::string T_fluid
static const std::string specific_volume
const VariableValue *const _specific_volume
Common class for single phase fluid properties.
const VariableValue *const _w_vel
static const std::string velocity_y
const VariableValue *const _v_vel
const ADMaterialProperty< Real > *const _mat_speed
speed
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
NSMachAux(const InputParameters ¶meters)
static const std::string pressure
const ADMaterialProperty< Real > *const _mat_T_fluid
fluid temperature
const bool _use_mat_props
Whether to use material properties instead of coupled variables to compute the Mach number...
static InputParameters validParams()
registerMooseObject("NavierStokesApp", NSMachAux)
const ADMaterialProperty< Real > *const _mat_pressure
pressure
virtual Real computeValue()