https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PorousFlowDictator.h
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#pragma once
11
12#include "GeneralUserObject.h"
13#include "Coupleable.h"
14
67{
68public:
70
72
73 virtual void initialize() override {};
74 virtual void execute() override {};
75 virtual void finalize() override {};
76
82 unsigned int numVariables() const;
83
85 unsigned int numPhases() const;
86
88 unsigned int numComponents() const;
89
91 unsigned int numAqueousEquilibrium() const;
92
94 unsigned int numAqueousKinetic() const;
95
97 unsigned int aqueousPhaseNumber() const;
98
106 unsigned int porousFlowVariableNum(unsigned int moose_var_num) const;
107
115 unsigned int mooseVariableNum(unsigned int porous_flow_var_num) const;
116
124 bool isPorousFlowVariable(unsigned int moose_var_num) const;
125
133 bool notPorousFlowVariable(unsigned int moose_var_num) const;
134
139 bool consistentFEType() const;
140
146 libMesh::FEType feType() const;
147
149 bool isFV() const;
150
156 bool usePermDerivs() const { return _perm_derivs; };
157
161 void usePermDerivs(bool flag) const { _perm_derivs = flag; };
162
163protected:
165 const unsigned int _num_variables;
166
168 const unsigned int _num_phases;
169
171 const unsigned int _num_components;
172
174 const unsigned int _num_aqueous_equilibrium;
175
177 const unsigned int _num_aqueous_kinetic;
178
180 const unsigned int _aqueous_phase_number;
181
183 mutable bool _perm_derivs;
184
185private:
188
191
193 bool _is_fv;
194
196 std::vector<unsigned int> _moose_var_num;
197
199 std::vector<unsigned int> _pf_var_num;
200};
const InputParameters & parameters() const
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.
bool usePermDerivs() const
Check if the simulation includes derivatives of permeability Note: when the permeability is constant,...
bool _consistent_fe_type
Whether the porous_flow_vars all have the same fe_type.
virtual void execute() override
unsigned int numVariables() const
The number of PorousFlow variables.
bool _is_fv
Whether the PorousFlow variables are finite-volume variables.
std::vector< unsigned int > _pf_var_num
_pf_var_num[i] = the porous flow variable corresponding to moose variable i
void usePermDerivs(bool flag) const
Set the _perm_derivs flag.
unsigned int numAqueousEquilibrium() const
The number of aqueous equilibrium secondary species.
unsigned int aqueousPhaseNumber() const
The aqueous phase number.
const unsigned int _num_aqueous_equilibrium
Number of aqueous-equilibrium secondary species.
virtual void finalize() override
unsigned int numComponents() const
The number of fluid components.
virtual void initialize() override
libMesh::FEType feType() const
The FEType of the first porous_flow_variable.
bool _perm_derivs
Indicates whether the simulation includes derivatives of permeability.
unsigned int porousFlowVariableNum(unsigned int moose_var_num) const
The PorousFlow variable number.
libMesh::FEType _fe_type
FE type used by the PorousFlow variables.
const unsigned int _aqueous_phase_number
Aqueous phase number.
unsigned int numAqueousKinetic() const
The number of aqueous kinetic secondary species.
const unsigned int _num_components
Number of fluid components.
bool isPorousFlowVariable(unsigned int moose_var_num) const
Returns true if moose_var_num is a porous flow variable.
const unsigned int _num_phases
Number of fluid phases.
bool notPorousFlowVariable(unsigned int moose_var_num) const
Returns true if moose_var_num is not a porous flow variabe.
bool isFV() const
Whether the PorousFlow variables are finite-volume variables.
bool consistentFEType() const
Whether the porous_flow_vars all have the same FEType or if no porous_flow_vars were provided.
unsigned int mooseVariableNum(unsigned int porous_flow_var_num) const
The Moose variable number.
std::vector< unsigned int > _moose_var_num
_moose_var_num[i] = the moose variable number corresponding to porous flow variable i
const unsigned int _num_aqueous_kinetic
Number of aqeuous-kinetic secondary species that are involved in mineralisation.
static InputParameters validParams()
const unsigned int _num_variables
Number of PorousFlow variables.