https://mooseframework.inl.gov
BoundaryFluxGasMixBC.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 "BoundaryFluxGasMixBC.h"
11 #include "THMNames.h"
12 #include "THMIndicesGasMix.h"
13 
14 registerMooseObject("ThermalHydraulicsApp", BoundaryFluxGasMixBC);
15 
18 {
20 
21  params.addClassDescription(
22  "Boundary conditions for a FlowChannelGasMix using a boundary flux object.");
23 
24  params.addRequiredCoupledVar("xirhoA", "Conserved variable: x*rho*A");
25 
26  return params;
27 }
28 
30  : ADBoundaryFlux3EqnBC(parameters),
31  _xirhoA(getADMaterialProperty<Real>(THM::XIRHOA)),
32  _xirhoA_var(coupled("xirhoA"))
33 {
34 }
35 
36 std::vector<ADReal>
38 {
39  std::vector<ADReal> U(THMGasMix1D::N_FLUX_INPUTS, 0);
45 
46  return U;
47 }
48 
49 std::map<unsigned int, unsigned int>
51 {
52  std::map<unsigned int, unsigned int> jmap;
53  jmap.insert(std::pair<unsigned int, unsigned int>(_xirhoA_var, THMGasMix1D::SPECIES));
54  jmap.insert(std::pair<unsigned int, unsigned int>(_rhoA_var, THMGasMix1D::MASS));
55  jmap.insert(std::pair<unsigned int, unsigned int>(_rhouA_var, THMGasMix1D::MOMENTUM));
56  jmap.insert(std::pair<unsigned int, unsigned int>(_rhoEA_var, THMGasMix1D::ENERGY));
57 
58  return jmap;
59 }
const ADMaterialProperty< Real > & _xirhoA
x*rho*A
virtual std::map< unsigned int, unsigned int > getIndexMapping() const override
Creates the mapping of coupled variable index to index in Euler system.
unsigned int _qp
const unsigned int _xirhoA_var
Coupled variable index for x*rho*A.
const unsigned int _rhouA_var
const unsigned int _rhoEA_var
const ADMaterialProperty< Real > & _rhoA
static InputParameters validParams()
registerMooseObject("ThermalHydraulicsApp", BoundaryFluxGasMixBC)
Boundary conditions for the 1-D, 1-phase, variable-area Euler equations using a boundary flux user ob...
const ADMaterialProperty< Real > & _rhouA
const ADVariableValue & _A_linear
Cross-sectional area, linear.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
static const unsigned int N_FLUX_INPUTS
Number of numerical flux function inputs.
const unsigned int _rhoA_var
virtual std::vector< ADReal > fluxInputVector() const override
Returns the flux input vector.
Boundary conditions for a FlowChannelGasMix using a boundary flux object.
BoundaryFluxGasMixBC(const InputParameters &parameters)
const ADMaterialProperty< Real > & _rhoEA