Line data Source code
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 : #pragma once 11 : 12 : #include "ADNumericalFlux3EqnBase.h" 13 : #include "SinglePhaseFluidProperties.h" 14 : #include "NaNInterface.h" 15 : 16 : /** 17 : * Computes internal side flux for the 1-D, 1-phase, variable-area Euler equations using 18 : * the HLLC approximate Riemann solver. 19 : * 20 : * The approach in the following reference for the 3-D Euler equations was 21 : * extended to the 1-D, variable-area Euler equations: 22 : * 23 : * Batten, P., Leschziner, M. A., & Goldberg, U. C. (1997). 24 : * Average-state Jacobians and implicit methods for compressible viscous and turbulent flows. 25 : * Journal of computational physics, 137(1), 38-78. 26 : */ 27 : class ADNumericalFlux3EqnHLLC : public ADNumericalFlux3EqnBase, public NaNInterface 28 : { 29 : public: 30 : ADNumericalFlux3EqnHLLC(const InputParameters & parameters); 31 : 32 : virtual void calcFlux(const std::vector<ADReal> & UL, 33 : const std::vector<ADReal> & UR, 34 : const RealVectorValue & nLR, 35 : const RealVectorValue & t1, 36 : const RealVectorValue & t2, 37 : std::vector<ADReal> & FL, 38 : std::vector<ADReal> & FR) const override; 39 : 40 1 : virtual unsigned int getNumberOfRegions() const override { return 4; } 41 : 42 : protected: 43 : /// Type for how to compute left and right wave speeds 44 : enum class WaveSpeedFormulation 45 : { 46 : EINFELDT, 47 : DAVIS 48 : }; 49 : 50 : /** 51 : * Computes the flow area that is used in the numerical flux 52 : */ 53 : virtual ADReal computeFlowArea(const std::vector<ADReal> & UL, 54 : const std::vector<ADReal> & UR) const; 55 : 56 : /// fluid properties user object 57 : const SinglePhaseFluidProperties & _fp; 58 : 59 : /// How to compute left and right wave speeds 60 : const WaveSpeedFormulation _wave_speed_formulation; 61 : 62 : public: 63 : static InputParameters validParams(); 64 : };