https://mooseframework.inl.gov
NumericalFluxGasMixBase.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 
11 #include "THMIndicesGasMix.h"
12 
15 {
17  return params;
18 }
19 
21  : NumericalFlux1D(parameters)
22 {
23 }
24 
25 std::vector<ADReal>
26 NumericalFluxGasMixBase::convert1DInputTo3D(const std::vector<ADReal> & U_1d) const
27 {
28  std::vector<ADReal> U_3d(THMGasMix3D::N_FLUX_INPUTS);
32  U_3d[THMGasMix3D::RHOVA] = 0;
33  U_3d[THMGasMix3D::RHOWA] = 0;
36 
37  return U_3d;
38 }
39 
40 std::vector<ADReal>
41 NumericalFluxGasMixBase::convert3DFluxTo1D(const std::vector<ADReal> & F_3d) const
42 {
43  std::vector<ADReal> F_1d(THMGasMix1D::N_FLUX_OUTPUTS);
48 
49  return F_1d;
50 }
51 
52 void
53 NumericalFluxGasMixBase::transform3DFluxDirection(std::vector<ADReal> & F_3d, Real nLR_dot_d) const
54 {
55  F_3d[THMGasMix3D::SPECIES] *= nLR_dot_d;
56  F_3d[THMGasMix3D::MASS] *= nLR_dot_d;
57  F_3d[THMGasMix3D::ENERGY] *= nLR_dot_d;
58 }
static InputParameters validParams()
Abstract base class for computing and caching internal or boundary fluxes for 1D conservation law sys...
NumericalFluxGasMixBase(const InputParameters &parameters)
virtual void transform3DFluxDirection(std::vector< ADReal > &F_3d, Real nLR_dot_d) const override
Applies direction transformation to a 3D flux vector.
static const unsigned int N_FLUX_INPUTS
Number of numerical flux function inputs for 3D.
static InputParameters validParams()
virtual std::vector< ADReal > convert1DInputTo3D(const std::vector< ADReal > &U_1d) const override
Converts a 1D flux input vector to a 3D flux input vector.
static const unsigned int N_FLUX_OUTPUTS
Number of numerical flux function outputs.
virtual std::vector< ADReal > convert3DFluxTo1D(const std::vector< ADReal > &F_3d) const override
Converts a 3D flux vector to a 1D flux vector.