21 #include "libmesh/quadrature.h" 31 "This is the base class of all materials should use if you are trying to " 32 "use the Navier-Stokes Kernels.");
46 "The name of the user object for fluid properties");
52 _mesh_dimension(_mesh.dimension()),
54 _grad_v(_mesh_dimension >= 2 ? coupledGradient(
nms::
velocity_y) : _grad_zero),
55 _grad_w(_mesh_dimension == 3 ? coupledGradient(
nms::
velocity_z) : _grad_zero),
57 _viscous_stress_tensor(declareProperty<
RealTensorValue>(
"viscous_stress_tensor")),
58 _thermal_conductivity(declareProperty<
Real>(
"thermal_conductivity")),
62 _dynamic_viscosity(declareProperty<
Real>(
"dynamic_viscosity")),
77 _w_vel(_mesh.dimension() == 3 ? coupledValue(
nms::
velocity_z) : _zero),
85 _rho_v(_mesh.dimension() >= 2 ? coupledValue(
nms::
momentum_y) : _zero),
86 _rho_w(_mesh.dimension() == 3 ? coupledValue(
nms::
momentum_z) : _zero),
92 _drhov_dt(_mesh.dimension() >= 2 ? coupledDot(
nms::
momentum_y) : _zero),
93 _drhow_dt(_mesh.dimension() == 3 ? coupledDot(
nms::
momentum_z) : _zero),
99 _grad_rho_v(_mesh.dimension() >= 2 ? coupledGradient(
nms::
momentum_y) : _grad_zero),
100 _grad_rho_w(_mesh.dimension() == 3 ? coupledGradient(
nms::
momentum_z) : _grad_zero),
104 _hsupg(declareProperty<
Real>(
"hsupg")),
105 _tauc(declareProperty<
Real>(
"tauc")),
106 _taum(declareProperty<
Real>(
"taum")),
107 _taue(declareProperty<
Real>(
"taue")),
108 _strong_residuals(declareProperty<
std::vector<
Real>>(
"strong_residuals")),
119 for (
unsigned int qp = 0; qp <
_qrule->n_points(); ++qp)
126 grad_outer_u += grad_outer_u.transpose();
129 for (
unsigned int i = 0; i < 3; ++i)
133 for (
unsigned int i = 0; i < 3; ++i)
134 grad_outer_u(i, i) -= 2.0 / 3.0 * div_vel;
154 const Real Pr = 0.71;
339 Real sqrt_term = 4. /
_dt /
_dt + velmag * velmag / h2;
392 for (
unsigned int i = 0; i < 3; ++i)
419 0.5 * (
_fp.
gamma() - 1.0) * velmag2;
420 _calA[qp][0] -= calS;
422 for (
unsigned int m = 1; m <= 3; ++m)
425 unsigned int m_local = m - 1;
432 _calA[qp][m] +=
_calC[qp][m_local].transpose();
443 for (
unsigned int k = 0;
k < 3; ++
k)
456 for (
unsigned int m = 1; m <= 3; ++m)
459 unsigned int m_local = m - 1;
static const std::string total_energy_density
static const std::string momentum_x
MaterialProperty< Real > & _dynamic_viscosity
const QBase *const & _qrule
MaterialProperty< Real > & _hsupg
const unsigned int _mesh_dimension
void computeTau(unsigned int qp)
const VariableValue & _drhow_dt
MaterialProperty< std::vector< RealTensorValue > > & _calC
static const std::string velocity_z
void computeHSUPG(unsigned int qp)
const VariableGradient & _grad_rho_v
static const std::string density
virtual Real gamma() const
static const std::string velocity_x
const VariableValue & _u_vel
static const std::string temperature
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
MaterialProperty< Real > & _tauc
const VariableGradient & _grad_rho_w
virtual void resize(const std::size_t size) override final
MaterialProperty< Real > & _taue
void computeStrongResiduals(unsigned int qp)
MaterialProperty< std::vector< std::vector< RealTensorValue > > > & _calE
std::vector< const VariableGradient * > _vel_grads
TensorValue< Real > RealTensorValue
auto norm_sq() const -> decltype(std::norm(Real()))
MaterialProperty< std::vector< RealTensorValue > > & _calA
static InputParameters validParams()
const VariableValue & _v_vel
MaterialProperty< std::vector< Real > > & _strong_residuals
static const std::string velocity_y
const VariableGradient & _grad_rho_u
const VariableGradient & _grad_rho_et
NavierStokesMaterial(const InputParameters ¶meters)
const VariableValue & _specific_total_enthalpy
const VariableValue & _drhou_dt
static InputParameters validParams()
static const std::string momentum_y
const VariableGradient & _grad_rho
const VariableValue & _w_vel
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableGradient & _grad_u
static const std::string specific_total_enthalpy
MaterialProperty< RealTensorValue > & _viscous_stress_tensor
const VariableValue & _drhoE_dt
MaterialProperty< Real > & _thermal_conductivity
static const std::string momentum_z
const VariableGradient & _grad_v
Ideal gas fluid properties Default parameters are for air at atmospheric pressure and temperature...
virtual void computeProperties()
Must be called after the child class computes dynamic_viscocity.
static const std::string k
const VariableValue & _drhov_dt
const IdealGasFluidProperties & _fp
const VariableValue & _drho_dt
const Elem *const & _current_elem
const VariableGradient & _grad_w
const VariableValue & _rho
MaterialProperty< Real > & _taum