https://mooseframework.inl.gov
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
CNSFVHLLCMomentumBC< T > Class Template Reference

Template class for implementing the advective flux plus pressure terms in the conservation of momentum equation at boundaries when using a HLLC discretization. More...

#include <CNSFVHLLCMomentumBC.h>

Inheritance diagram for CNSFVHLLCMomentumBC< T >:
[legend]

Public Member Functions

 CNSFVHLLCMomentumBC (const InputParameters &params)
 
template<>
InputParameters validParams ()
 
template<>
InputParameters validParams ()
 

Static Public Member Functions

static InputParameters validParams ()
 
static void addCommonParams (InputParameters &params)
 

Protected Member Functions

virtual ADReal fluxElem () override
 flux functions on elem & boundary, i.e. standard left/right values of F More...
 
virtual ADReal fluxBoundary () override
 
virtual ADReal hllcElem () override
 HLLC modifications to flux for elem & boundary, see Toro. More...
 
virtual ADReal hllcBoundary () override
 
virtual ADReal conservedVariableElem () override
 
virtual ADReal conservedVariableBoundary () override
 

Protected Attributes

const unsigned int _index
 

Detailed Description

template<typename T>
class CNSFVHLLCMomentumBC< T >

Template class for implementing the advective flux plus pressure terms in the conservation of momentum equation at boundaries when using a HLLC discretization.

Definition at line 20 of file CNSFVHLLCMomentumBC.h.

Constructor & Destructor Documentation

◆ CNSFVHLLCMomentumBC()

template<typename T >
CNSFVHLLCMomentumBC< T >::CNSFVHLLCMomentumBC ( const InputParameters params)

Definition at line 49 of file CNSFVHLLCMomentumBC.C.

50  : T(params), _index(this->template getParam<MooseEnum>("momentum_component"))
51 {
52 }
const unsigned int _index

Member Function Documentation

◆ addCommonParams()

template<typename T >
void CNSFVHLLCMomentumBC< T >::addCommonParams ( InputParameters params)
static

Definition at line 17 of file CNSFVHLLCMomentumBC.C.

18 {
19  MooseEnum momentum_component("x=0 y=1 z=2");
21  "momentum_component",
22  momentum_component,
23  "The component of the momentum equation that this kernel applies to.");
24 }
void addRequiredParam(const std::string &name, const std::string &doc_string)

◆ conservedVariableBoundary()

template<typename T >
ADReal CNSFVHLLCMomentumBC< T >::conservedVariableBoundary ( )
overrideprotectedvirtual

Definition at line 106 of file CNSFVHLLCMomentumBC.C.

107 {
108  return this->_rho_boundary * this->_vel_boundary(_index);
109 }
const unsigned int _index

◆ conservedVariableElem()

template<typename T >
ADReal CNSFVHLLCMomentumBC< T >::conservedVariableElem ( )
overrideprotectedvirtual

conserved variable of this equation This is not just _u_elem/_u_boundary to allow using different sets of variables in the future

Definition at line 99 of file CNSFVHLLCMomentumBC.C.

100 {
101  return this->_rho_elem[this->_qp] * this->_vel_elem[this->_qp](_index);
102 }
const unsigned int _index

◆ fluxBoundary()

template<typename T >
ADReal CNSFVHLLCMomentumBC< T >::fluxBoundary ( )
overrideprotectedvirtual

Definition at line 65 of file CNSFVHLLCMomentumBC.C.

66 {
67  return this->_normal_speed_boundary * this->_rho_boundary * this->_vel_boundary(_index) +
68  this->_normal(_index) * this->_pressure_boundary;
69 }
const unsigned int _index

◆ fluxElem()

template<typename T >
ADReal CNSFVHLLCMomentumBC< T >::fluxElem ( )
overrideprotectedvirtual

flux functions on elem & boundary, i.e. standard left/right values of F

Definition at line 56 of file CNSFVHLLCMomentumBC.C.

57 {
58  return this->_normal_speed_elem * this->_rho_elem[this->_qp] *
59  this->_vel_elem[this->_qp](_index) +
60  this->_normal(_index) * this->_pressure_elem[this->_qp];
61 }
const unsigned int _index

◆ hllcBoundary()

template<typename T >
ADReal CNSFVHLLCMomentumBC< T >::hllcBoundary ( )
overrideprotectedvirtual

Definition at line 86 of file CNSFVHLLCMomentumBC.C.

87 {
88  auto vel_nonnormal = this->_vel_boundary - this->_normal_speed_boundary * this->_normal;
89  return this->_normal(_index) * this->_SM + vel_nonnormal(_index);
90 
91  // For some reason, the below expression doesn't give as good results as the
92  // above one.
93  // return this->_normal(_index) * (_SM - this->_normal_speed_boundary) +
94  // this->_vel_elem[this->_qp](_index);
95 }
const unsigned int _index

◆ hllcElem()

template<typename T >
ADReal CNSFVHLLCMomentumBC< T >::hllcElem ( )
overrideprotectedvirtual

HLLC modifications to flux for elem & boundary, see Toro.

Definition at line 73 of file CNSFVHLLCMomentumBC.C.

74 {
75  auto vel_nonnormal = this->_vel_elem[this->_qp] - this->_normal_speed_elem * this->_normal;
76  return this->_normal(_index) * this->_SM + vel_nonnormal(_index);
77 
78  // For some reason, the below expression doesn't give as good results as the
79  // above one.
80  // return this->_normal(_index) * (_SM - this->_normal_speed_elem) +
81  // this->_vel_elem[this->_qp](_index);
82 }
const unsigned int _index

◆ validParams() [1/3]

template<typename T >
InputParameters CNSFVHLLCMomentumBC< T >::validParams ( )
static

Definition at line 28 of file CNSFVHLLCMomentumBC.C.

29 {
31  addCommonParams(params);
32  params.addClassDescription("Implements the momentum boundary flux portion of the free-flow HLLC "
33  "discretization given specified mass fluxes and fluid temperature");
34  return params;
35 }
InputParameters validParams()
static void addCommonParams(InputParameters &params)
void addClassDescription(const std::string &doc_string)

◆ validParams() [2/3]

Definition at line 39 of file CNSFVHLLCMomentumBC.C.

40 {
42  addCommonParams(params);
43  params.addClassDescription("Implements the momentum boundary flux portion of the free-flow HLLC "
44  "discretization given specified pressure");
45  return params;
46 }
static void addCommonParams(InputParameters &params)
void addClassDescription(const std::string &doc_string)

◆ validParams() [3/3]

Member Data Documentation

◆ _index

template<typename T >
const unsigned int CNSFVHLLCMomentumBC< T >::_index
protected

Definition at line 44 of file CNSFVHLLCMomentumBC.h.


The documentation for this class was generated from the following files: