https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
11#include "MooseVariable.h"
12#include "THMIndicesVACE.h"
13
15
18{
20
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
37std::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
51std::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}
registerMooseObject("ThermalHydraulicsApp", ADBoundaryFlux3EqnBC)
Boundary conditions for the 1-D, 1-phase, variable-area Euler equations using a boundary flux user ob...
virtual std::vector< ADReal > fluxInputVector() const override
Returns the flux input vector.
ADBoundaryFlux3EqnBC(const InputParameters &parameters)
const ADMaterialProperty< std::vector< Real > > & _passives_times_area
Names of the passive transport solution variables, if any [amount/m].
static InputParameters validParams()
virtual std::map< unsigned int, unsigned int > getIndexMapping() const override
Creates the mapping of coupled variable index to index in Euler system.
const unsigned int _n_passives
Number of passive transport variables.
Boundary conditions base class for the 1-phase, variable-area Euler equations using a boundary flux u...
const ADVariableValue & _A_linear
Cross-sectional area, linear.
static InputParameters validParams()
const ADMaterialProperty< Real > & _rhouA
const ADMaterialProperty< Real > & _rhoA
const ADMaterialProperty< Real > & _rhoEA
virtual unsigned int coupled(const std::string &var_name, unsigned int comp=0) const
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
static const unsigned int N_FLUX_OUTPUTS
Number of numerical flux function outputs for 1D.
static const unsigned int N_FLUX_INPUTS
Number of numerical flux function inputs for 1D.