Go to the documentation of this file.
13 #include "NonlinearSystem.h"
21 InputParameters params = validParams<GeneralUserObject>();
22 params.addClassDescription(
"Holds information on the PorousFlow variable names");
23 params.addRequiredCoupledVar(
"porous_flow_vars",
24 "List of primary variables that are used in the PorousFlow "
25 "simulation. Jacobian entries involving derivatives wrt these "
26 "variables will be computed. In single-phase models you will just "
27 "have one (eg \'pressure\'), in two-phase models you will have two "
28 "(eg \'p_water p_gas\', or \'p_water s_water\'), etc.");
29 params.addRequiredParam<
unsigned int>(
"number_fluid_phases",
30 "The number of fluid phases in the simulation");
31 params.addRequiredParam<
unsigned int>(
"number_fluid_components",
32 "The number of fluid components in the simulation");
33 params.addParam<
unsigned int>(
"number_aqueous_equilibrium",
35 "The number of secondary species in the aqueous-equilibrium "
36 "reaction system. (Leave as zero if the simulation does not "
37 "involve chemistry)");
38 params.addParam<
unsigned int>(
"number_aqueous_kinetic",
40 "The number of secondary species in the aqueous-kinetic reaction "
41 "system involved in precipitation and dissolution. (Leave as zero "
42 "if the simulation does not involve chemistry)");
43 params.addParam<
unsigned int>(
"aqueous_phase_number",
45 "The fluid phase number of the aqueous phase in which the "
46 "equilibrium and kinetic chemical reactions occur");
51 : GeneralUserObject(parameters),
52 Coupleable(this, false),
53 _num_variables(coupledComponents(
"porous_flow_vars")),
54 _num_phases(getParam<unsigned int>(
"number_fluid_phases")),
55 _num_components(getParam<unsigned int>(
"number_fluid_components")),
56 _num_aqueous_equilibrium(getParam<unsigned int>(
"number_aqueous_equilibrium")),
57 _num_aqueous_kinetic(getParam<unsigned int>(
"number_aqueous_kinetic")),
58 _aqueous_phase_number(getParam<unsigned int>(
"aqueous_phase_number")),
59 _consistent_fe_type(false),
75 _pf_var_num.assign(_fe_problem.getNonlinearSystemBase().nVariables(),
84 mooseError(
"PorousFlowDictator: AuxVariables variables must not be coupled into the Dictator "
85 "for this is against specification #1984. Variable number ",
87 " is an AuxVariable.");
90 mooseError(
"PorousflowDictator: The aqueous phase number must be less than the number of fluid "
91 "phases. The Dictator does not appreciate jokes.");
138 mooseError(
"The Dictator proclaims that the moose variable with number ",
140 " is not a PorousFlow variable. Exiting with error code 1984.");
148 mooseError(
"The Dictator proclaims that there is no such PorousFlow variable with number ",
150 ". Exiting with error code 1984.");
unsigned int mooseVariableNum(unsigned int porous_flow_var_num) const
The Moose variable number.
std::vector< unsigned int > _pf_var_num
_pf_var_num[i] = the porous flow variable corresponding to moose variable i
unsigned int numAqueousKinetic() const
The number of aqueous kinetic secondary species.
const unsigned int _num_phases
Number of fluid phases.
const unsigned int _num_aqueous_equilibrium
Number of aqueous-equilibrium secondary species.
const unsigned int _num_aqueous_kinetic
Number of aqeuous-kinetic secondary species that are involved in mineralisation.
InputParameters validParams< PorousFlowDictator >()
bool isPorousFlowVariable(unsigned int moose_var_num) const
Returns true if moose_var_num is a porous flow variable.
bool notPorousFlowVariable(unsigned int moose_var_num) const
Returns true if moose_var_num is not a porous flow variabe.
const unsigned int _num_variables
Number of PorousFlow variables.
FEType _fe_type
FE type used by the PorousFlow variables.
unsigned int numAqueousEquilibrium() const
The number of aqueous equilibrium secondary species.
std::vector< unsigned int > _moose_var_num
_moose_var_num[i] = the moose variable number corresponding to porous flow variable i
unsigned int porousFlowVariableNum(unsigned int moose_var_num) const
The PorousFlow variable number.
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
unsigned int numPhases() const
The number of fluid phases.
FEType feType() const
The FEType of the first porous_flow_variable.
bool _consistent_fe_type
Whether the porous_flow_vars all have the same fe_type.
unsigned int numVariables() const
The number of PorousFlow variables.
const unsigned int _aqueous_phase_number
Aqueous phase number.
const unsigned int _num_components
Number of fluid components.
unsigned int numComponents() const
The number of fluid components.
PorousFlowDictator(const InputParameters ¶meters)
unsigned int aqueousPhaseNumber() const
The aqueous phase number.
registerMooseObject("PorousFlowApp", PorousFlowDictator)
bool _perm_derivs
Indicates whether the simulation includes derivatives of permeability.
bool consistentFEType() const
Whether the porous_flow_vars all have the same FEType or if no porous_flow_vars were provided.