https://mooseframework.inl.gov
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 
14 {
16 }
17 
19 
20 ADReal
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 }
static InputParameters validParams()
Definition: CNSFVHLLCBase.C:19
static std::array< ADReal, 3 > waveSpeed(const HLLCData &hllc_data, const ADRealVectorValue &normal)
helper function for computing wave speed
Definition: CNSFVHLLCBase.C:59
ADReal _SL
the wave speeds
Definition: CNSFVHLLCBase.h:64
virtual ADReal computeQpResidual() override
Definition: CNSFVHLLC.C:21
ADReal _normal_speed_neighbor
Definition: CNSFVHLLCBase.h:71
HLLCData hllcData() const
Definition: CNSFVHLLCBase.C:47
RealVectorValue _normal
static InputParameters validParams()
Definition: CNSFVHLLC.C:13
DualNumber< Real, DNDerivativeType, true > ADReal
CNSFVHLLC(const InputParameters &params)
Definition: CNSFVHLLC.C:18
virtual ADReal hllcElem()=0
HLLC modifications to flux for elem & neighbor, see Toro.
const ADMaterialProperty< Real > & _rho_neighbor
Definition: CNSFVHLLCBase.h:97
Real f(Real x)
Test function for Brents method.
const unsigned int _qp
virtual ADReal conservedVariableElem()=0
Base class for both HLLC inter-cell flux kernels and boundary conditions.
Definition: CNSFVHLLCBase.h:50
virtual ADReal fluxElem()=0
flux functions on elem & neighbor, i.e. standard left/right values of F
const ADMaterialProperty< RealVectorValue > & _vel_neighbor
Definition: CNSFVHLLCBase.h:87
ADReal _normal_speed_elem
speeds normal to the interface
Definition: CNSFVHLLCBase.h:70
void mooseError(Args &&... args) const
virtual ADReal conservedVariableNeighbor()=0
virtual ADReal hllcNeighbor()=0
const ADMaterialProperty< Real > & _rho_elem
densities left == elem, right == neighbor
Definition: CNSFVHLLCBase.h:96
virtual ADReal fluxNeighbor()=0
const ADMaterialProperty< RealVectorValue > & _vel_elem
velocities left == elem, right == neighbor
Definition: CNSFVHLLCBase.h:86