https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CNSFVMomentumHLLC.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 "CNSFVMomentumHLLC.h"
11
12// Full specialization of the validParams function for this object
14
17{
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.");
25 "Implements the momentum flux portion of the free-flow HLLC discretization.");
26 return params;
27}
28
30 : CNSFVHLLC(params), _index(getParam<MooseEnum>("momentum_component"))
31{
32}
33
40
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
registerADMooseObject("NavierStokesApp", CNSFVMomentumHLLC)
const ADMaterialProperty< Real > & _pressure_elem
pressures left == elem, right == neighbor
ADReal _normal_speed_neighbor
const ADMaterialProperty< Real > & _rho_elem
densities left == elem, right == neighbor
const ADMaterialProperty< Real > & _rho_neighbor
const ADMaterialProperty< RealVectorValue > & _vel_elem
velocities left == elem, right == neighbor
ADReal _normal_speed_elem
speeds normal to the interface
const ADMaterialProperty< Real > & _pressure_neighbor
const ADMaterialProperty< RealVectorValue > & _vel_neighbor
Base class for HLLC inter-cell flux kernels.
Definition CNSFVHLLC.h:20
static InputParameters validParams()
Definition CNSFVHLLC.C:13
Implements the advective flux and the pressure terms in the conservation of momentum equation using a...
static InputParameters validParams()
virtual ADReal hllcNeighbor() override
virtual ADReal conservedVariableElem() override
unsigned int _index
index x|y|z
virtual ADReal fluxElem() override
flux functions on elem & neighbor, i.e. standard left/right values of F
CNSFVMomentumHLLC(const InputParameters &params)
virtual ADReal fluxNeighbor() override
virtual ADReal hllcElem() override
HLLC modifications to flux for elem & neighbor, see Toro.
virtual ADReal conservedVariableNeighbor() override
RealVectorValue _normal
const unsigned int _qp
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)