https://mooseframework.inl.gov
PCNSFVMomentumHLLC.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 
10 #include "PCNSFVMomentumHLLC.h"
11 
12 registerMooseObject("NavierStokesApp", PCNSFVMomentumHLLC);
13 
16 {
18  MooseEnum momentum_component("x=0 y=1 z=2");
20  "momentum_component",
21  momentum_component,
22  "The component of the momentum equation that this kernel applies to.");
23  params.addClassDescription(
24  "Implements the momentum flux portion of the porous HLLC discretization.");
25  return params;
26 }
27 
29  : PCNSFVHLLC(params), _index(getParam<MooseEnum>("momentum_component"))
30 {
31 }
32 
33 ADReal
35 {
38 }
39 
40 ADReal
42 {
46 }
47 
48 ADReal
50 {
51  auto vel_nonnormal = _vel_elem[_qp] - _normal_speed_elem * _normal;
52  return _normal(_index) * _SM + vel_nonnormal(_index);
53 
54  // For some reason, the below expression doesn't give as good results as the
55  // above one.
56  // return _normal(_index) * (_SM - _normal_speed_elem) + _vel_elem[_qp](_index);
57 }
58 
59 ADReal
61 {
62  auto vel_nonnormal = _vel_neighbor[_qp] - _normal_speed_neighbor * _normal;
63  return _normal(_index) * _SM + vel_nonnormal(_index);
64 
65  // For some reason, the below expression doesn't give as good results as the
66  // above one.
67  // return _normal(_index) * (_SM - _normal_speed_neighbor) + _vel_elem[_qp](_index);
68 }
69 
70 ADReal
72 {
73  return _eps_elem[_qp] * _rho_elem[_qp] * _vel_elem[_qp](_index);
74 }
75 
76 ADReal
78 {
80 }
const MaterialProperty< Real > & _eps_elem
porosities left == elem, right == neighbor
Definition: PCNSFVHLLC.h:105
const ADMaterialProperty< RealVectorValue > & _vel_neighbor
Definition: PCNSFVHLLC.h:86
virtual ADReal conservedVariableElem() override
virtual ADReal hllcNeighbor() override
const ADMaterialProperty< RealVectorValue > & _vel_elem
velocities left == elem, right == neighbor
Definition: PCNSFVHLLC.h:85
Implements the advective flux and the pressure terms in the porous conservation of momentum equation ...
ADReal _SM
Definition: PCNSFVHLLC.h:62
registerMooseObject("NavierStokesApp", PCNSFVMomentumHLLC)
virtual ADReal fluxNeighbor() override
const ADMaterialProperty< Real > & _pressure_neighbor
Definition: PCNSFVHLLC.h:101
RealVectorValue _normal
DualNumber< Real, DNDerivativeType, true > ADReal
void addRequiredParam(const std::string &name, const std::string &doc_string)
ADReal _normal_speed_neighbor
Definition: PCNSFVHLLC.h:68
PCNSFVMomentumHLLC(const InputParameters &params)
const ADMaterialProperty< Real > & _rho_elem
densities left == elem, right == neighbor
Definition: PCNSFVHLLC.h:95
const unsigned int _index
index x|y|z
Base class for porous HLLC inter-cell flux kernels.
Definition: PCNSFVHLLC.h:23
const unsigned int _qp
static InputParameters validParams()
virtual ADReal hllcElem() override
HLLC modifications to flux for elem & neighbor, see Toro.
virtual ADReal fluxElem() override
flux functions on elem & neighbor, i.e. standard left/right values of F
static InputParameters validParams()
Definition: PCNSFVHLLC.C:17
void addClassDescription(const std::string &doc_string)
const ADMaterialProperty< Real > & _rho_neighbor
Definition: PCNSFVHLLC.h:96
const MaterialProperty< Real > & _eps_neighbor
Definition: PCNSFVHLLC.h:106
const ADMaterialProperty< Real > & _pressure_elem
pressures left == elem, right == neighbor
Definition: PCNSFVHLLC.h:100
ADReal _normal_speed_elem
speeds normal to the interface
Definition: PCNSFVHLLC.h:67
virtual ADReal conservedVariableNeighbor() override