https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CNSFVHLLCBC.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 "CNSFVHLLCBC.h"
11#include "CNSFVHLLC.h"
12#include "NS.h"
14
20
21CNSFVHLLCBC::CNSFVHLLCBC(const InputParameters & parameters) : CNSFVHLLCBCBase(parameters) {}
22
25{
28
29 auto wave_speeds = CNSFVHLLCBase::waveSpeed(hllcData(), _normal);
30
31 _SL = std::move(wave_speeds[0]);
32 _SM = std::move(wave_speeds[1]);
33 _SR = std::move(wave_speeds[2]);
34
35 if (_SL >= 0)
36 return fluxElem();
37 else if (_SR <= 0)
38 return fluxBoundary();
39 else
40 {
41 if (_SM >= 0)
42 {
44 return fluxElem() + _SL * (f * hllcElem() - conservedVariableElem());
45 }
46 else
47 {
50 }
51 }
52 mooseError("Should never get here");
53 return 0;
54}
DualNumber< Real, DNDerivativeType, true > ADReal
Real f(Real x)
Test function for Brents method.
Base clase for HLLC boundary condition for Euler equation.
ADReal _normal_speed_elem
speeds normal to the interface on the element side
virtual void preComputeWaveSpeed()=0
this function is a call back for setting quantities for computing wave speed before calling the wave ...
HLLCData hllcData() const
const ADMaterialProperty< RealVectorValue > & _vel_elem
static InputParameters validParams()
ADReal _SL
the wave speeds
ADReal _normal_speed_boundary
these quantities must be computed in preComputeWaveSpeed
const ADMaterialProperty< Real > & _rho_elem
virtual ADReal fluxBoundary()=0
virtual ADReal hllcBoundary()=0
virtual ADReal fluxElem()=0
flux functions on elem & from boundary
virtual ADReal conservedVariableElem()=0
conserved variable of this equation from elem and boundary
static InputParameters validParams()
Definition CNSFVHLLCBC.C:16
CNSFVHLLCBC(const InputParameters &parameters)
Definition CNSFVHLLCBC.C:21
virtual ADReal conservedVariableBoundary()=0
virtual ADReal computeQpResidual() override
Definition CNSFVHLLCBC.C:24
virtual ADReal hllcElem()=0
HLLC modifications to flux for elem & boundary, see Toro.
static std::array< ADReal, 3 > waveSpeed(const HLLCData &hllc_data, const ADRealVectorValue &normal)
helper function for computing wave speed
ADRealVectorValue _normal
const unsigned int _qp
void mooseError(Args &&... args) const