https://mooseframework.inl.gov
CNSFVHLLCMomentumStagnationInletBC.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
12 // Full specialization of the validParams function for this object
14 
17 {
19  MooseEnum momentum_component("x=0 y=1 z=2", "x");
20  params.addParam<MooseEnum>("momentum_component",
21  momentum_component,
22  "The component of the momentum equation that this kernel applies to.");
23  params.addClassDescription(
24  "Adds the boundary momentum flux for HLLC when provided stagnation temperature and pressure");
25  return params;
26 }
27 
29  const InputParameters & parameters)
30  : CNSFVHLLCStagnationInletBC(parameters), _index(getParam<MooseEnum>("momentum_component"))
31 {
32 }
33 
34 ADReal
36 {
39 }
40 
41 ADReal
43 {
46 }
47 
48 ADReal
50 {
51  const auto vel_nonnormal = _vel_elem[_qp] - _normal_speed_elem * _normal;
52  return _normal(_index) * _SM + vel_nonnormal(_index);
53 }
54 
55 ADReal
57 {
58  const auto vel_nonnormal = _vel_boundary - _normal_speed_boundary * _normal;
59  return _normal(_index) * _SM + vel_nonnormal(_index);
60 }
61 
62 ADReal
64 {
65  return _rho_elem[_qp] * _vel_elem[_qp](_index);
66 }
67 
68 ADReal
70 {
72 }
Base class for the HLLC stagnation inlet boundary conditions.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
ADReal _p_boundary
pressure on the boundary side
DualNumber< Real, DNDerivativeType, true > ADReal
const ADMaterialProperty< RealVectorValue > & _vel_elem
CNSFVHLLCMomentumStagnationInletBC(const InputParameters &parameters)
const ADMaterialProperty< Real > & _rho_elem
virtual ADReal conservedVariableElem() override
conserved variable of this equation from elem and boundary
const unsigned int _qp
registerADMooseObject("NavierStokesApp", CNSFVHLLCMomentumStagnationInletBC)
virtual ADReal hllcElem() override
HLLC modifications to flux for elem & boundary, see Toro.
ADRealVectorValue _normal
HLLC stagnation inlet boundary conditions for the momentum conservation equation. ...
ADReal _normal_speed_boundary
these quantities must be computed in preComputeWaveSpeed
const ADMaterialProperty< Real > & _pressure_elem
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
virtual ADReal fluxElem() override
flux functions on elem & from boundary
ADReal _normal_speed_elem
speeds normal to the interface on the element side
ADRealVectorValue _vel_boundary