This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable number used internally by MOOSE, as well as the number of fluid phases and the number of fluid components. More...
#include <PorousFlowDictator.h>
Public Member Functions | |
PorousFlowDictator (const InputParameters ¶meters) | |
virtual void | initialize () override |
virtual void | execute () override |
virtual void | finalize () override |
unsigned int | numVariables () const |
The number of PorousFlow variables. More... | |
unsigned int | numPhases () const |
The number of fluid phases. More... | |
unsigned int | numComponents () const |
The number of fluid components. More... | |
unsigned int | numAqueousEquilibrium () const |
The number of aqueous equilibrium secondary species. More... | |
unsigned int | numAqueousKinetic () const |
The number of aqueous kinetic secondary species. More... | |
unsigned int | aqueousPhaseNumber () const |
The aqueous phase number. More... | |
unsigned int | porousFlowVariableNum (unsigned int moose_var_num) const |
The PorousFlow variable number. More... | |
unsigned int | mooseVariableNum (unsigned int porous_flow_var_num) const |
The Moose variable number. More... | |
bool | isPorousFlowVariable (unsigned int moose_var_num) const |
Returns true if moose_var_num is a porous flow variable. More... | |
bool | notPorousFlowVariable (unsigned int moose_var_num) const |
Returns true if moose_var_num is not a porous flow variabe. More... | |
bool | consistentFEType () const |
Whether the porous_flow_vars all have the same FEType or if no porous_flow_vars were provided. More... | |
FEType | feType () const |
The FEType of the first porous_flow_variable. More... | |
bool | usePermDerivs () const |
Check if the simulation includes derivatives of permeability Note: when the permeability is constant, expensive tensor calculations can be ignored in Jacobian calculations. More... | |
void | usePermDerivs (bool flag) const |
Set the _perm_derivs flag. More... | |
Protected Attributes | |
const unsigned int | _num_variables |
Number of PorousFlow variables. More... | |
const unsigned int | _num_phases |
Number of fluid phases. More... | |
const unsigned int | _num_components |
Number of fluid components. More... | |
const unsigned int | _num_aqueous_equilibrium |
Number of aqueous-equilibrium secondary species. More... | |
const unsigned int | _num_aqueous_kinetic |
Number of aqeuous-kinetic secondary species that are involved in mineralisation. More... | |
const unsigned int | _aqueous_phase_number |
Aqueous phase number. More... | |
bool | _perm_derivs |
Indicates whether the simulation includes derivatives of permeability. More... | |
Private Attributes | |
bool | _consistent_fe_type |
Whether the porous_flow_vars all have the same fe_type. More... | |
FEType | _fe_type |
FE type used by the PorousFlow variables. More... | |
std::vector< unsigned int > | _moose_var_num |
_moose_var_num[i] = the moose variable number corresponding to porous flow variable i More... | |
std::vector< unsigned int > | _pf_var_num |
_pf_var_num[i] = the porous flow variable corresponding to moose variable i More... | |
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable number used internally by MOOSE, as well as the number of fluid phases and the number of fluid components.
The Dictator performs sanity checks on all PorousFlow simulations and helps users rectify errors (for instance if parts of the input file suggest it is a 2-phase simulation, while other parts suggest it is 1-phase).
All PorousFlow Materials and Kernels calculate and use derivatives with respect to all the variables mentioned in this Object, at least in principal (in practice they may be lazy and not compute all derivatives).
` `:;@;:.:::#@@@'.` ` ,@;@@@@@@@@@@@@@@@@@@@@'';''`` ,;@@@@@@@@@@@@T@@@@@H@@@@@E@@@@@@@@++@@@+:.:.` '@@'@@@@@@@D@@@@@I@@@@@C@@@@@T@@@@@A@@@@@T@@@@@O@@@@@R@@@@@@..` `..,;@@@@@@@@@@@@@@@@@@@@@@@@@@@@I@@@@@S@@@@@@@@@@@@@@@@@@@@@@@@@@@;.
.:@@@@@@@@@@W@@@A@@@T@@@C@@@H@@@I@@@N@@@G@@@@#;:. .:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:,@@@@@@@@@@+
,@@@@@@@@@@@';'@@@@@@@@@@:@@@@+@+:;@@@@@@@;:#';::'@@@@@@. `::;,..`::+:,;@@@@@@:.
‘’@@@'...,,....
` ..:;@@@@@@@@+. @;;;;@;,,
`:@@@@@@:` @@++';:,.
;+@#:,. @@@@#+:.
‘,@@@@@@@@@@@@@@’@@+:. ‘.:’::, @@@:,...
,@@@@@, +@@@@@@@@@@@@;'@@# .,,,, @@@':::@@@@.@@@@@@@@@@@@@@@@. ,@@@` `.::, @@@@@@#@@@@@';. `@@@@@@@@;,@`@@@@@@@@@@@@@@@@@@@@@@@@@@@@@` .,@@@@
.., @@@@@:.. @@@, ;@@@@@@@@@ ,@@@:@@@ ‘,’@@ . @@@@@':,,` @@@@:` @@@@@@@@@@@@@@@@@@ ,@@: `:@@@@@; ..:@@@`
@@;:‘ @@@.. ’@@@@@@@@@ @@
.@@@,‘:’@. @@@@;:.
@@@, `‘ @@@@@@@@@@@@@ ,@@@.’@@,‘ @+’:'';@@@@@@,,
@@@@@@@@@@@' ‘.:@#@:@@’:. :;;;:@,,.@+, +. @@@@@@@@@@@@@@@@@@@@
. @@:';,,,.` .,,,,,,;;+;:.`..;,., ,,` @@@@@@@@@@@@@@@@`
,@, ` `......,,;+++#';@@@@@@. '@@@@@@;
.;@@. ```,;'+@+;:'@@'@@@:. ‘ ,#@@+, .:+’@';::'+':,;,#@@@@@@@@@: .@@@@: :,,::,.
...,,..,,,,...,,,,,...
:;@@@@; .....
`,.
..,,,,,.....
Definition at line 71 of file PorousFlowDictator.h.
PorousFlowDictator::PorousFlowDictator | ( | const InputParameters & | parameters | ) |
Definition at line 50 of file PorousFlowDictator.C.
unsigned int PorousFlowDictator::aqueousPhaseNumber | ( | ) | const |
The aqueous phase number.
Definition at line 129 of file PorousFlowDictator.C.
bool PorousFlowDictator::consistentFEType | ( | ) | const |
Whether the porous_flow_vars all have the same FEType or if no porous_flow_vars were provided.
Definition at line 167 of file PorousFlowDictator.C.
Referenced by PorousFlowAdvectiveFluxCalculatorBase::PorousFlowAdvectiveFluxCalculatorBase().
|
inlineoverridevirtual |
Definition at line 77 of file PorousFlowDictator.h.
FEType PorousFlowDictator::feType | ( | ) | const |
The FEType of the first porous_flow_variable.
Note, this is meaningless if there are no named porous_flow_variables: consistentFEType() should be used to check this
Definition at line 173 of file PorousFlowDictator.C.
Referenced by PorousFlowDictator().
|
inlineoverridevirtual |
Definition at line 78 of file PorousFlowDictator.h.
|
inlineoverridevirtual |
Definition at line 76 of file PorousFlowDictator.h.
bool PorousFlowDictator::isPorousFlowVariable | ( | unsigned int | moose_var_num | ) | const |
Returns true if moose_var_num is a porous flow variable.
moose_var_num | the MOOSE variable number eg if porous_flow_vars = 'pwater pgas', and the variables in the simulation are 'energy pwater pgas shape' then isPorousFlowVariable(0) = false, isPorousFlowVariable(1) = true |
Definition at line 155 of file PorousFlowDictator.C.
unsigned int PorousFlowDictator::mooseVariableNum | ( | unsigned int | porous_flow_var_num | ) | const |
The Moose variable number.
porous_flow_var_num | the PorousFlow variable number eg if porous_flow_vars = 'pwater pgas', and the variables in the simulation are 'energy pwater pgas shape' then mooseVariableNum(1) = 2 |
Definition at line 145 of file PorousFlowDictator.C.
Referenced by PorousFlowFluxLimitedTVDAdvection::computeJacobian().
bool PorousFlowDictator::notPorousFlowVariable | ( | unsigned int | moose_var_num | ) | const |
Returns true if moose_var_num is not a porous flow variabe.
moose_var_num | the MOOSE variable number eg if porous_flow_vars = 'pwater pgas', and the variables in the simulation are 'energy pwater pgas shape' then notPorousFlowVariable(0) = true, notPorousFlowVariable(1) = false |
Definition at line 161 of file PorousFlowDictator.C.
Referenced by PorousFlowHeatVolumetricExpansion::computedEnergyQpJac(), PorousFlowMassVolumetricExpansion::computedMassQpJac(), PorousFlowHeatVolumetricExpansion::computedVolQpJac(), PorousFlowMassVolumetricExpansion::computedVolQpJac(), PorousFlowPolyLineSink::computeQpBaseOutflowJacobian(), PorousFlowPeacemanBorehole::computeQpBaseOutflowJacobian(), PorousFlowDispersiveFlux::computeQpJac(), PorousFlowDesorpedMassTimeDerivative::computeQpJac(), PorousFlowDesorpedMassVolumetricExpansion::computeQpJac(), PorousFlowPreDis::computeQpJacobian(), PorousFlowEffectiveStressCoupling::computeQpJacobian(), PorousFlowHeatConduction::computeQpOffDiagJacobian(), PorousFlowBasicAdvection::computeQpOffDiagJacobian(), PorousFlowPlasticHeatEnergy::computeQpOffDiagJacobian(), PorousFlowEnergyTimeDerivative::computeQpOffDiagJacobian(), PorousFlowFullySaturatedMassTimeDerivative::computeQpOffDiagJacobian(), PorousFlowPreDis::computeQpOffDiagJacobian(), PorousFlowFullySaturatedDarcyBase::computeQpOffDiagJacobian(), PorousFlowMassTimeDerivative::computeQpOffDiagJacobian(), PorousFlowEffectiveStressCoupling::computeQpOffDiagJacobian(), PorousFlowMassRadioactiveDecay::computeQpOffDiagJacobian(), PorousFlowDarcyBase::computeResidualAndJacobian(), PorousFlowDarcyBase::darcyQpJacobian(), isPorousFlowVariable(), PorousFlowLineSink::jac(), and PorousFlowSink::jac().
unsigned int PorousFlowDictator::numAqueousEquilibrium | ( | ) | const |
The number of aqueous equilibrium secondary species.
Definition at line 117 of file PorousFlowDictator.C.
Referenced by PorousFlowPropertyAux::PorousFlowPropertyAux().
unsigned int PorousFlowDictator::numAqueousKinetic | ( | ) | const |
The number of aqueous kinetic secondary species.
Definition at line 123 of file PorousFlowDictator.C.
Referenced by PorousFlowPreDis::computeQpJac(), PorousFlowPreDis::computeQpResidual(), PorousFlowPreDis::PorousFlowPreDis(), and PorousFlowPropertyAux::PorousFlowPropertyAux().
unsigned int PorousFlowDictator::numComponents | ( | ) | const |
The number of fluid components.
Definition at line 111 of file PorousFlowDictator.C.
Referenced by PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent::PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent(), PorousFlowFluidMass::PorousFlowFluidMass(), PorousFlowFullySaturatedDarcyFlow::PorousFlowFullySaturatedDarcyFlow(), PorousFlowFullySaturatedMassTimeDerivative::PorousFlowFullySaturatedMassTimeDerivative(), PorousFlowLineSink::PorousFlowLineSink(), PorousFlowMassRadioactiveDecay::PorousFlowMassRadioactiveDecay(), PorousFlowMassTimeDerivative::PorousFlowMassTimeDerivative(), PorousFlowMassVolumetricExpansion::PorousFlowMassVolumetricExpansion(), PorousFlowPropertyAux::PorousFlowPropertyAux(), and PorousFlowSink::PorousFlowSink().
unsigned int PorousFlowDictator::numPhases | ( | ) | const |
The number of fluid phases.
Definition at line 105 of file PorousFlowDictator.C.
Referenced by PorousFlowAdvectiveFluxCalculatorBase::PorousFlowAdvectiveFluxCalculatorBase(), PorousFlowBasicAdvection::PorousFlowBasicAdvection(), PorousFlowDarcyVelocityComponent::PorousFlowDarcyVelocityComponent(), PorousFlowFluidMass::PorousFlowFluidMass(), PorousFlowFullySaturatedDarcyBase::PorousFlowFullySaturatedDarcyBase(), PorousFlowFullySaturatedMassTimeDerivative::PorousFlowFullySaturatedMassTimeDerivative(), PorousFlowLineSink::PorousFlowLineSink(), PorousFlowPropertyAux::PorousFlowPropertyAux(), and PorousFlowSink::PorousFlowSink().
unsigned int PorousFlowDictator::numVariables | ( | ) | const |
The number of PorousFlow variables.
Materials and Kernels will calculate and use derivatives with respect to these variables in the Jacobian
Definition at line 99 of file PorousFlowDictator.C.
Referenced by PorousFlowFluxLimitedTVDAdvection::computeJacobian(), PorousFlowFluidMass::PorousFlowFluidMass(), and PorousFlowHeatEnergy::PorousFlowHeatEnergy().
unsigned int PorousFlowDictator::porousFlowVariableNum | ( | unsigned int | moose_var_num | ) | const |
The PorousFlow variable number.
moose_var_num | the MOOSE variable number eg if porous_flow_vars = 'pwater pgas', and the variables in the simulation are 'energy pwater pgas shape' then porousFlowVariableNum(2) = 1 |
Definition at line 135 of file PorousFlowDictator.C.
Referenced by PorousFlowHeatVolumetricExpansion::computedEnergyQpJac(), PorousFlowMassVolumetricExpansion::computedMassQpJac(), PorousFlowHeatVolumetricExpansion::computedVolQpJac(), PorousFlowMassVolumetricExpansion::computedVolQpJac(), PorousFlowPolyLineSink::computeQpBaseOutflowJacobian(), PorousFlowPeacemanBorehole::computeQpBaseOutflowJacobian(), PorousFlowDispersiveFlux::computeQpJac(), PorousFlowDesorpedMassTimeDerivative::computeQpJac(), PorousFlowDesorpedMassVolumetricExpansion::computeQpJac(), PorousFlowEnergyTimeDerivative::computeQpJacobian(), PorousFlowFullySaturatedMassTimeDerivative::computeQpJacobian(), PorousFlowPreDis::computeQpJacobian(), PorousFlowMassTimeDerivative::computeQpJacobian(), PorousFlowMassRadioactiveDecay::computeQpJacobian(), PorousFlowEffectiveStressCoupling::computeQpJacobian(), PorousFlowHeatConduction::computeQpOffDiagJacobian(), PorousFlowBasicAdvection::computeQpOffDiagJacobian(), PorousFlowPlasticHeatEnergy::computeQpOffDiagJacobian(), PorousFlowEnergyTimeDerivative::computeQpOffDiagJacobian(), PorousFlowFullySaturatedMassTimeDerivative::computeQpOffDiagJacobian(), PorousFlowFullySaturatedDarcyBase::computeQpOffDiagJacobian(), PorousFlowPreDis::computeQpOffDiagJacobian(), PorousFlowMassTimeDerivative::computeQpOffDiagJacobian(), PorousFlowMassRadioactiveDecay::computeQpOffDiagJacobian(), PorousFlowEffectiveStressCoupling::computeQpOffDiagJacobian(), PorousFlowDarcyBase::computeResidualAndJacobian(), PorousFlowDarcyBase::darcyQpJacobian(), PorousFlowLineSink::jac(), and PorousFlowSink::jac().
|
inline |
Check if the simulation includes derivatives of permeability Note: when the permeability is constant, expensive tensor calculations can be ignored in Jacobian calculations.
Definition at line 156 of file PorousFlowDictator.h.
|
inline |
|
protected |
Aqueous phase number.
Definition at line 180 of file PorousFlowDictator.h.
Referenced by aqueousPhaseNumber(), and PorousFlowDictator().
|
private |
Whether the porous_flow_vars all have the same fe_type.
Definition at line 187 of file PorousFlowDictator.h.
Referenced by consistentFEType(), and PorousFlowDictator().
|
private |
FE type used by the PorousFlow variables.
Definition at line 190 of file PorousFlowDictator.h.
Referenced by feType(), and PorousFlowDictator().
|
private |
_moose_var_num[i] = the moose variable number corresponding to porous flow variable i
Definition at line 193 of file PorousFlowDictator.h.
Referenced by mooseVariableNum(), and PorousFlowDictator().
|
protected |
Number of aqueous-equilibrium secondary species.
Definition at line 174 of file PorousFlowDictator.h.
Referenced by numAqueousEquilibrium().
|
protected |
Number of aqeuous-kinetic secondary species that are involved in mineralisation.
Definition at line 177 of file PorousFlowDictator.h.
Referenced by numAqueousKinetic().
|
protected |
Number of fluid components.
Definition at line 171 of file PorousFlowDictator.h.
Referenced by numComponents().
|
protected |
Number of fluid phases.
Definition at line 168 of file PorousFlowDictator.h.
Referenced by numPhases(), and PorousFlowDictator().
|
protected |
Number of PorousFlow variables.
Definition at line 161 of file PorousFlowDictator.h.
Referenced by mooseVariableNum(), notPorousFlowVariable(), numVariables(), PorousFlowDictator(), and porousFlowVariableNum().
|
mutableprotected |
Indicates whether the simulation includes derivatives of permeability.
Definition at line 183 of file PorousFlowDictator.h.
Referenced by PorousFlowDictator(), and usePermDerivs().
|
private |
_pf_var_num[i] = the porous flow variable corresponding to moose variable i
Definition at line 196 of file PorousFlowDictator.h.
Referenced by notPorousFlowVariable(), PorousFlowDictator(), and porousFlowVariableNum().