https://mooseframework.inl.gov
ADBoundaryFlux3EqnBC.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 "ADBoundaryFlux3EqnBC.h"
11 #include "MooseVariable.h"
12 #include "THMIndicesVACE.h"
13 
14 registerMooseObject("ThermalHydraulicsApp", ADBoundaryFlux3EqnBC);
15 
18 {
20 
21  params.addClassDescription(
22  "Boundary conditions for the 1-D, 1-phase, variable-area Euler equations");
23 
24  params.addRequiredCoupledVar("passives_times_area", "Passive transport solution variables");
25 
26  return params;
27 }
28 
30  : BoundaryFlux1PhaseBaseBC(parameters),
31 
32  _passives_times_area(getADMaterialProperty<std::vector<Real>>("passives_times_area")),
33  _n_passives(coupledComponents("passives_times_area"))
34 {
35 }
36 
37 std::vector<ADReal>
39 {
40  std::vector<ADReal> U(THMVACE1D::N_FLUX_INPUTS + _n_passives, 0);
45  for (const auto i : make_range(_n_passives))
47 
48  return U;
49 }
50 
51 std::map<unsigned int, unsigned int>
53 {
54  std::map<unsigned int, unsigned int> jmap;
55  jmap.insert(std::pair<unsigned int, unsigned int>(_rhoA_var, THMVACE1D::MASS));
56  jmap.insert(std::pair<unsigned int, unsigned int>(_rhouA_var, THMVACE1D::MOMENTUM));
57  jmap.insert(std::pair<unsigned int, unsigned int>(_rhoEA_var, THMVACE1D::ENERGY));
58  for (const auto i : make_range(_n_passives))
59  jmap.insert(std::pair<unsigned int, unsigned int>(coupled("passives_times_area", i),
61 
62  return jmap;
63 }
const ADMaterialProperty< Real > & _rhoEA
virtual unsigned int coupled(const std::string &var_name, unsigned int comp=0) const
static InputParameters validParams()
const ADMaterialProperty< std::vector< Real > > & _passives_times_area
Names of the passive transport solution variables, if any [amount/m].
ADBoundaryFlux3EqnBC(const InputParameters &parameters)
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 ADVariableValue & _A_linear
Cross-sectional area, linear.
const unsigned int _n_passives
Number of passive transport variables.
registerMooseObject("ThermalHydraulicsApp", ADBoundaryFlux3EqnBC)
static InputParameters validParams()
static const unsigned int N_FLUX_INPUTS
Number of numerical flux function inputs for 1D.
Boundary conditions for the 1-D, 1-phase, variable-area Euler equations using a boundary flux user ob...
static const unsigned int N_FLUX_OUTPUTS
Number of numerical flux function outputs for 1D.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
const ADMaterialProperty< Real > & _rhoA
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)
Boundary conditions base class for the 1-phase, variable-area Euler equations using a boundary flux u...
const ADMaterialProperty< Real > & _rhouA
void addClassDescription(const std::string &doc_string)
virtual std::vector< ADReal > fluxInputVector() const override
Returns the flux input vector.