https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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.");
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
39
47
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
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
75
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", PCNSFVMomentumHLLC)
RealVectorValue _normal
const unsigned int _qp
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Base class for porous HLLC inter-cell flux kernels.
Definition PCNSFVHLLC.h:24
static InputParameters validParams()
Definition PCNSFVHLLC.C:17
const ADMaterialProperty< Real > & _pressure_neighbor
Definition PCNSFVHLLC.h:101
const ADMaterialProperty< Real > & _rho_neighbor
Definition PCNSFVHLLC.h:96
const ADMaterialProperty< RealVectorValue > & _vel_neighbor
Definition PCNSFVHLLC.h:86
const ADMaterialProperty< RealVectorValue > & _vel_elem
velocities left == elem, right == neighbor
Definition PCNSFVHLLC.h:85
ADReal _normal_speed_elem
speeds normal to the interface
Definition PCNSFVHLLC.h:67
const ADMaterialProperty< Real > & _rho_elem
densities left == elem, right == neighbor
Definition PCNSFVHLLC.h:95
const ADMaterialProperty< Real > & _pressure_elem
pressures left == elem, right == neighbor
Definition PCNSFVHLLC.h:100
ADReal _normal_speed_neighbor
Definition PCNSFVHLLC.h:68
const MaterialProperty< Real > & _eps_elem
porosities left == elem, right == neighbor
Definition PCNSFVHLLC.h:105
ADReal _SM
Definition PCNSFVHLLC.h:62
const MaterialProperty< Real > & _eps_neighbor
Definition PCNSFVHLLC.h:106
Implements the advective flux and the pressure terms in the porous conservation of momentum equation ...
virtual ADReal hllcNeighbor() override
virtual ADReal conservedVariableElem() override
const unsigned int _index
index x|y|z
virtual ADReal hllcElem() override
HLLC modifications to flux for elem & neighbor, see Toro.
virtual ADReal fluxNeighbor() override
virtual ADReal conservedVariableNeighbor() override
static InputParameters validParams()
PCNSFVMomentumHLLC(const InputParameters &params)
virtual ADReal fluxElem() override
flux functions on elem & neighbor, i.e. standard left/right values of F