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 const auto & rho1 = rho_elem;
59 const auto u1 = vel_elem.
norm();
60 const auto q1 =
normal * vel_elem;
61 const auto v1 = 1.0 / rho1;
62 const auto & e1 = e_elem;
63 const auto et1 = e1 + 0.5 * u1 * u1;
64 const auto p1 =
fluid.p_from_v_e(v1, e1);
65 const auto ht1 = et1 + p1 / rho1;
66 const auto c1 =
fluid.c_from_v_e(v1, e1);
67 const auto eps1 = eps_elem;
69 const auto & rho2 = rho_neighbor;
70 const auto u2 = vel_neighbor.
norm();
71 const auto q2 =
normal * vel_neighbor;
72 const auto v2 = 1.0 / rho2;
73 const auto & e2 = e_neighbor;
74 const auto et2 = e2 + 0.5 * u2 * u2;
75 const auto p2 =
fluid.p_from_v_e(v2, e2);
76 const auto ht2 = et2 + p2 / rho2;
77 const auto c2 =
fluid.c_from_v_e(v2, e2);
78 const auto eps2 = eps_neighbor;
81 const auto sqrt_rho1 = std::sqrt(rho1);
82 const auto sqrt_rho2 = std::sqrt(rho2);
83 const auto u_roe = (sqrt_rho1 * u1 + sqrt_rho2 * u2) / (sqrt_rho1 + sqrt_rho2);
84 const auto q_roe = (sqrt_rho1 * q1 + sqrt_rho2 * q2) / (sqrt_rho1 + sqrt_rho2);
85 const auto e_roe = (sqrt_rho1 * e1 + sqrt_rho2 * e2) / (sqrt_rho1 + sqrt_rho2);
86 const auto rho_roe = std::sqrt(rho1 * rho2);
87 const auto v_roe = 1.0 / rho_roe;
88 const auto c_roe =
fluid.c_from_v_e(v_roe, e_roe);
92 auto SL = std::min(q1 - c1, q_roe - c_roe);
93 auto SR = std::max(q2 + c2, q_roe + c_roe);
94 auto SM = (eps2 * rho2 * q2 * (SR - q2) - eps1 * rho1 * q1 * (SL - q1) + eps1 * p1 - eps2 * p2) /
95 (eps2 * rho2 * (SR - q2) - eps1 * rho1 * (SL - q1));
97 return {{std::move(SL), std::move(SM), std::move(SR)}};
115 _SL = std::move(wave_speeds[0]);
116 _SM = std::move(wave_speeds[1]);
117 _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
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
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
PCNSFVHLLC(const InputParameters ¶ms)
ADReal _normal_speed_elem
speeds normal to the interface
const SinglePhaseFluidProperties & _fluid
fluid properties