21 params.
set<
unsigned short>(
"ghost_layers") = 2;
29 _specific_internal_energy_neighbor(
35 _speed_elem(getADMaterialProperty<
Real>(
NS::
speed)),
36 _speed_neighbor(getNeighborADMaterialProperty<
Real>(
NS::
speed)),
38 _rho_neighbor(getNeighborADMaterialProperty<
Real>(
NS::
density)),
40 _pressure_neighbor(getNeighborADMaterialProperty<
Real>(
NS::
pressure)),
51 const ADReal & rho_neighbor,
54 const Real eps_neighbor,
58 using std::sqrt, std::min, std::max;
60 const auto & rho1 = rho_elem;
61 const auto u1 = vel_elem.
norm();
62 const auto q1 =
normal * vel_elem;
63 const auto v1 = 1.0 / rho1;
64 const auto & e1 = e_elem;
65 const auto et1 = e1 + 0.5 * u1 * u1;
66 const auto p1 =
fluid.p_from_v_e(v1, e1);
67 const auto ht1 = et1 + p1 / rho1;
68 const auto c1 =
fluid.c_from_v_e(v1, e1);
69 const auto eps1 = eps_elem;
71 const auto & rho2 = rho_neighbor;
72 const auto u2 = vel_neighbor.
norm();
73 const auto q2 =
normal * vel_neighbor;
74 const auto v2 = 1.0 / rho2;
75 const auto & e2 = e_neighbor;
76 const auto et2 = e2 + 0.5 * u2 * u2;
77 const auto p2 =
fluid.p_from_v_e(v2, e2);
78 const auto ht2 = et2 + p2 / rho2;
79 const auto c2 =
fluid.c_from_v_e(v2, e2);
80 const auto eps2 = eps_neighbor;
83 const auto sqrt_rho1 =
sqrt(rho1);
84 const auto sqrt_rho2 =
sqrt(rho2);
85 const auto u_roe = (sqrt_rho1 * u1 + sqrt_rho2 * u2) / (sqrt_rho1 + sqrt_rho2);
86 const auto q_roe = (sqrt_rho1 * q1 + sqrt_rho2 * q2) / (sqrt_rho1 + sqrt_rho2);
87 const auto e_roe = (sqrt_rho1 * e1 + sqrt_rho2 * e2) / (sqrt_rho1 + sqrt_rho2);
88 const auto rho_roe =
sqrt(rho1 * rho2);
89 const auto v_roe = 1.0 / rho_roe;
90 const auto c_roe =
fluid.c_from_v_e(v_roe, e_roe);
94 auto SL =
min(q1 - c1, q_roe - c_roe);
95 auto SR =
max(q2 + c2, q_roe + c_roe);
96 auto SM = (eps2 * rho2 * q2 * (SR - q2) - eps1 * rho1 * q1 * (SL - q1) + eps1 * p1 - eps2 * p2) /
97 (eps2 * rho2 * (SR - q2) - eps1 * rho1 * (SL - q1));
99 return {{std::move(SL), std::move(SM), std::move(SR)}};
117 _SL = std::move(wave_speeds[0]);
118 _SM = std::move(wave_speeds[1]);
119 _SR = std::move(wave_speeds[2]);
const MaterialProperty< Real > & _eps_elem
porosities left == elem, right == neighbor
static const std::string total_energy_density
const ADMaterialProperty< RealVectorValue > & _vel_neighbor
auto norm() const -> decltype(std::norm(T()))
static const std::string speed
const ADMaterialProperty< RealVectorValue > & _vel_elem
velocities left == elem, right == neighbor
const ADMaterialProperty< Real > & _specific_internal_energy_elem
internal energies left == elem, right == neighbor
const RealVectorValue & normal() const
static const std::string density
ADReal _SL
the wave speeds
static const std::string fluid
virtual ADReal fluxElem()=0
flux functions on elem & neighbor, i.e. standard left/right values of F
static const std::string specific_internal_energy
auto max(const L &left, const R &right)
ADReal _normal_speed_neighbor
virtual ADReal hllcElem()=0
HLLC modifications to flux for elem & neighbor, see Toro.
static const std::string porosity
const ADMaterialProperty< Real > & _specific_internal_energy_neighbor
static InputParameters validParams()
const ADMaterialProperty< Real > & _rho_elem
densities left == elem, right == neighbor
virtual ADReal fluxNeighbor()=0
Real f(Real x)
Test function for Brents method.
virtual ADReal computeQpResidual() override
Common class for single phase fluid properties.
static std::array< ADReal, 3 > waveSpeed(const ADReal &rho_elem, const ADRealVectorValue &vel_elem, const ADReal &e_elem, Real eps_elem, const ADReal &rho_neighbor, const ADRealVectorValue &vel_neighbor, const ADReal &e_neighbor, Real eps_neighbor, const SinglePhaseFluidProperties &fluid, const ADRealVectorValue &normal)
helper function for computing wave speed
virtual ADReal conservedVariableNeighbor()=0
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual ADReal hllcNeighbor()=0
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
static const std::string pressure
void mooseError(Args &&... args) const
static InputParameters validParams()
static const std::string velocity
virtual ADReal conservedVariableElem()=0
const ADMaterialProperty< Real > & _rho_neighbor
const MaterialProperty< Real > & _eps_neighbor
auto min(const L &left, const R &right)
PCNSFVHLLC(const InputParameters ¶ms)
ADReal _normal_speed_elem
speeds normal to the interface
const SinglePhaseFluidProperties & _fluid
fluid properties