29 "The name of the pressure variable",
30 "pressure_variable_name is deprecated, use variable_type");
49 "Specifies what this variable is in the Navier Stokes namespace of variables");
50 params.
addRequiredParam<FunctionName>(
"initial_pressure",
"The initial pressure");
51 params.
addRequiredParam<FunctionName>(
"initial_temperature",
"The initial temperature");
52 params.
addRequiredParam<std::vector<FunctionName>>(
"initial_velocity",
"The initial velocity");
54 "The name of the user object for fluid properties");
61 _variable_type(isParamValid(
"variable_type") ? getParam<
MooseEnum>(
"variable_type")
63 _initial_pressure(getFunction(
"initial_pressure")),
64 _initial_temperature(getFunction(
"initial_temperature")),
66 _pressure_variable_name(getParam<
std::string>(
"pressure_variable_name"))
85 const Real e_initial =
_fp.
cv() * initial_temperature;
86 const Real et_initial = e_initial + 0.5 * initial_velocity.
norm_sq();
87 const Real v_initial = 1. / rho_initial;
90 return et_initial + initial_pressure / rho_initial;
99 return initial_pressure;
105 return rho_initial * initial_velocity(0);
108 return rho_initial * initial_velocity(1);
111 return rho_initial * initial_velocity(2);
114 return rho_initial * et_initial;
120 return initial_temperature;
123 return initial_velocity(0);
126 return initial_velocity(1);
129 return initial_velocity(2);
static const std::string total_energy_density
static const std::string momentum_x
std::string join(Iterator begin, Iterator end, const std::string &delimiter)
const std::string _variable_type
Used to map the variable to one of the expected types.
auto norm() const -> decltype(std::norm(Real()))
std::vector< const Function * > _initial_velocity
Initial constant value of the velocity.
virtual Real rho_from_p_T(Real p, Real T) const override
static const std::string mach_number
static const std::string velocity_z
static const std::string density
static constexpr std::size_t dim
static InputParameters validParams()
const std::string _pressure_variable_name
pressure variable name
static const std::string velocity_x
static const std::string temperature
static const std::string specific_internal_energy
const Function & _initial_temperature
Initial constant value of the fluid temperature.
NSFunctionInitialCondition(const InputParameters ¶meters)
virtual Real value(const Point &p)
The value of the variable at a point.
registerMooseObject("NavierStokesApp", NSFunctionInitialCondition)
auto norm_sq() const -> decltype(std::norm(Real()))
static const std::string specific_volume
const T & getParam(const std::string &name) const
static const std::string velocity_y
const IdealGasFluidProperties & _fp
Fluid properties.
static InputParameters validParams()
static const std::string momentum_y
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Function & getFunctionByName(const FunctionName &name) const
static const std::string specific_total_enthalpy
static const std::string pressure
IntRange< T > make_range(T beg, T end)
void mooseError(Args &&... args) const
virtual Real c_from_v_e(Real v, Real e) const override
static const std::string momentum_z
Ideal gas fluid properties Default parameters are for air at atmospheric pressure and temperature...
virtual Real value(Real t, const Point &p) const
NSFunctionInitialCondition sets intial constant values for all variables given the: ...
const Function & _initial_pressure
Initial constant value of the pressure.