https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CNSFVHLLC.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 "CNSFVHLLC.h"
11
17
19
22{
25 auto wave_speeds = waveSpeed(hllcData(), _normal);
26 _SL = std::move(wave_speeds[0]);
27 _SM = std::move(wave_speeds[1]);
28 _SR = std::move(wave_speeds[2]);
29 if (_SL >= 0)
30 return fluxElem();
31 else if (_SR <= 0)
32 return fluxNeighbor();
33 else
34 {
35 if (_SM >= 0)
36 {
38 return fluxElem() + _SL * (f * hllcElem() - conservedVariableElem());
39 }
40 else
41 {
44 }
45 }
46 mooseError("Should never get here");
47}
DualNumber< Real, DNDerivativeType, true > ADReal
Real f(Real x)
Test function for Brents method.
Base class for both HLLC inter-cell flux kernels and boundary conditions.
ADReal _normal_speed_neighbor
const ADMaterialProperty< Real > & _rho_elem
densities left == elem, right == neighbor
const ADMaterialProperty< Real > & _rho_neighbor
static std::array< ADReal, 3 > waveSpeed(const HLLCData &hllc_data, const ADRealVectorValue &normal)
helper function for computing wave speed
HLLCData hllcData() const
const ADMaterialProperty< RealVectorValue > & _vel_elem
velocities left == elem, right == neighbor
ADReal _normal_speed_elem
speeds normal to the interface
static InputParameters validParams()
const ADMaterialProperty< RealVectorValue > & _vel_neighbor
ADReal _SL
the wave speeds
virtual ADReal hllcElem()=0
HLLC modifications to flux for elem & neighbor, see Toro.
virtual ADReal conservedVariableElem()=0
virtual ADReal computeQpResidual() override
Definition CNSFVHLLC.C:21
virtual ADReal fluxElem()=0
flux functions on elem & neighbor, i.e. standard left/right values of F
virtual ADReal conservedVariableNeighbor()=0
virtual ADReal hllcNeighbor()=0
static InputParameters validParams()
Definition CNSFVHLLC.C:13
CNSFVHLLC(const InputParameters &params)
Definition CNSFVHLLC.C:18
virtual ADReal fluxNeighbor()=0
RealVectorValue _normal
const unsigned int _qp
void mooseError(Args &&... args) const