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)),
53 _specific_volume(_use_mat_props ? nullptr : &coupledValue(
NS::specific_volume)),
54 _specific_internal_energy(_use_mat_props ? nullptr
55 : &coupledValue(
NS::specific_internal_energy)),
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),
registerMooseObject("NavierStokesApp", NSMachAux)
static InputParameters validParams()
Auxiliary kernel for computing the Mach number assuming an ideal gas.
const SinglePhaseFluidProperties & _fp
NSMachAux(const InputParameters ¶meters)
static InputParameters validParams()
const VariableValue *const _u_vel
const ADMaterialProperty< Real > *const _mat_speed
speed
const VariableValue *const _v_vel
virtual Real computeValue()
const ADMaterialProperty< Real > *const _mat_T_fluid
fluid temperature
const VariableValue *const _w_vel
const VariableValue *const _specific_volume
const VariableValue *const _specific_internal_energy
const ADMaterialProperty< Real > *const _mat_pressure
pressure
const bool _use_mat_props
Whether to use material properties instead of coupled variables to compute the Mach number.
Common class for single phase fluid properties.
static const std::string specific_volume
static const std::string velocity_y
static const std::string velocity_z
static const std::string velocity_x
static const std::string specific_internal_energy