23 params.
addParam<MaterialPropertyName>(
25 "An optional parameter for specifying a porosity material property. If not specified "
26 "free-flow conditions will be assumed.");
28 "Computes free-flow wave speeds on internal sides, useful in HLLC contexts");
35 _face_info(_mesh.faceInfo()),
36 _vel_elem(getADMaterialProperty<RealVectorValue>(
NS::velocity)),
37 _vel_neighbor(getNeighborADMaterialProperty<RealVectorValue>(
NS::velocity)),
38 _speed_elem(getADMaterialProperty<Real>(
NS::speed)),
39 _speed_neighbor(getNeighborADMaterialProperty<Real>(
NS::speed)),
40 _pressure_elem(getADMaterialProperty<Real>(
NS::pressure)),
41 _pressure_neighbor(getNeighborADMaterialProperty<Real>(
NS::pressure)),
42 _rho_elem(getADMaterialProperty<Real>(
NS::density)),
43 _rho_neighbor(getNeighborADMaterialProperty<Real>(
NS::density)),
44 _specific_internal_energy_elem(getADMaterialProperty<Real>(
NS::specific_internal_energy)),
45 _specific_internal_energy_neighbor(
46 getNeighborADMaterialProperty<Real>(
NS::specific_internal_energy)),
47 _eps_elem(isParamValid(
NS::porosity) ? &getMaterialProperty<Real>(
NS::porosity) : nullptr),
48 _eps_neighbor(isParamValid(
NS::porosity) ? &getNeighborMaterialProperty<Real>(
NS::porosity)
61 for (
unsigned int j = 0; j <
_face_info.size(); ++j)
64 unsigned int side =
_face_info[j]->elemSideID();
73 using std::sqrt, std::min, std::max;
80 const ADReal v1 = 1.0 / rho1;
82 const ADReal E1 = e1 + 0.5 * u1 * u1;
84 const ADReal H1 = E1 + p1 / rho1;
91 const ADReal v2 = 1.0 / rho2;
93 const ADReal E2 = e2 + 0.5 * u2 * u2;
95 const ADReal H2 = E2 + p2 / rho2;
100 const ADReal sqrt_rho1 = sqrt(rho1);
101 const ADReal sqrt_rho2 = sqrt(rho2);
102 const ADReal u_roe = (sqrt_rho1 * u1 + sqrt_rho2 * u2) / (sqrt_rho1 + sqrt_rho2);
103 const ADReal q_roe = (sqrt_rho1 * q1 + sqrt_rho2 * q2) / (sqrt_rho1 + sqrt_rho2);
104 const ADReal H_roe = (sqrt_rho1 * H1 + sqrt_rho2 * H2) / (sqrt_rho1 + sqrt_rho2);
105 const ADReal h_roe = H_roe - 0.5 * u_roe * u_roe;
106 const ADReal rho_roe = sqrt(rho1 * rho2);
107 const ADReal v_roe = 1.0 / rho_roe;
112 const ADReal SL = min(q1 - c1, q_roe - c_roe);
113 const ADReal SR = max(q2 + c2, q_roe + c_roe);
115 (eps2 * rho2 * q2 * (SR - q2) - eps1 * rho1 * q1 * (SL - q1) + eps1 * p1 - eps2 * p2) /
116 (eps2 * rho2 * (SR - q2) - eps1 * rho1 * (SL - q1));
134 for (
auto & ws : pps._wave_speed)
140 for (
unsigned int j = 0; j < 3; ++j)
DualNumber< Real, DNDerivativeType, true > ADReal
const std::vector< double > y
registerMooseObject("NavierStokesApp", HLLCUserObject)
std::pair< const Elem *, unsigned int > side_type
const Point & normal() const
const MaterialProperty< Real > *const _eps_elem
std::vector< ADReal > waveSpeed(const Elem *elem, unsigned int side) const
accessor for the wave speed
const ADMaterialProperty< Real > & _speed_elem
const SinglePhaseFluidProperties & _fluid
fluid properties
const ADMaterialProperty< Real > & _specific_internal_energy_elem
const std::vector< const FaceInfo * > & _face_info
FV face info from MooseMesh.
virtual void threadJoin(const UserObject &y) override
const MaterialProperty< Real > *const _eps_neighbor
const ADMaterialProperty< Real > & _rho_elem
const ADMaterialProperty< Real > & _rho_neighbor
const ADMaterialProperty< Real > & _pressure_neighbor
const FaceInfo & faceInfoHelper(const Elem *elem, unsigned int side) const
helper function for returning the FaceInfo object for an elem/side pair
const ADMaterialProperty< Real > & _speed_neighbor
const ADMaterialProperty< RealVectorValue > & _vel_neighbor
std::map< side_type, std::vector< ADReal > > _wave_speed
data structure storing the wave speeds SL, SM, SR
std::map< side_type, unsigned int > _side_to_face_info
face info lookup allows searching for face info entry from elem/side pair
bool hasData(const Elem *elem, unsigned int side) const
Query whether this processor has data for the provided element and side.
const ADMaterialProperty< Real > & _pressure_elem
const ADMaterialProperty< Real > & _specific_internal_energy_neighbor
static InputParameters validParams()
const ADMaterialProperty< RealVectorValue > & _vel_elem
material properties computed by VarMat that Riemann solver needs
unsigned int _qp
quadrature point dummy
virtual void initialSetup() override
HLLCUserObject(const InputParameters ¶meters)
virtual void execute() override
static InputParameters validParams()
const unsigned int & _current_side
const Elem *const & _current_elem
void mooseError(Args &&... args) const
void setupFiniteVolumeMeshData() const
Common class for single phase fluid properties.
static const std::string porosity
static const std::string fluid