www.mooseframework.org
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
PorousFlowPropertyAux Class Reference

Provides a simple interface to PorousFlow material properties. More...

#include <PorousFlowPropertyAux.h>

Inheritance diagram for PorousFlowPropertyAux:
[legend]

Public Member Functions

 PorousFlowPropertyAux (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeValue () override
 

Private Types

enum  PropertyEnum {
  PropertyEnum::PRESSURE, PropertyEnum::SATURATION, PropertyEnum::TEMPERATURE, PropertyEnum::DENSITY,
  PropertyEnum::VISCOSITY, PropertyEnum::MASS_FRACTION, PropertyEnum::RELPERM, PropertyEnum::CAPILLARY_PRESSURE,
  PropertyEnum::ENTHALPY, PropertyEnum::INTERNAL_ENERGY, PropertyEnum::SECONDARY_CONCENTRATION, PropertyEnum::MINERAL_CONCENTRATION,
  PropertyEnum::MINERAL_REACTION_RATE, PropertyEnum::POROSITY, PropertyEnum::PERMEABILITY
}
 Enum of properties. More...
 

Private Attributes

const MaterialProperty< std::vector< Real > > * _pressure
 Pressure of each phase. More...
 
const MaterialProperty< std::vector< Real > > * _saturation
 Saturation of each phase. More...
 
const MaterialProperty< Real > * _temperature
 Temperature of the fluid. More...
 
const MaterialProperty< std::vector< Real > > * _fluid_density
 Fluid density of each phase. More...
 
const MaterialProperty< std::vector< Real > > * _fluid_viscosity
 Viscosity of each phase. More...
 
const MaterialProperty< std::vector< std::vector< Real > > > * _mass_fractions
 Mass fraction of each component in each phase. More...
 
const MaterialProperty< std::vector< Real > > * _relative_permeability
 Relative permeability of each phase. More...
 
const MaterialProperty< std::vector< Real > > * _enthalpy
 Enthalpy of each phase. More...
 
const MaterialProperty< std::vector< Real > > * _internal_energy
 Internal energy of each phase. More...
 
const MaterialProperty< std::vector< Real > > * _sec_conc
 Secondary-species concentration. More...
 
const MaterialProperty< std::vector< Real > > * _mineral_conc
 Mineral-species concentration. More...
 
const MaterialProperty< std::vector< Real > > * _mineral_reaction_rate
 Mineral-species reacion rate. More...
 
const MaterialProperty< Real > * _porosity
 Porosity of the media. More...
 
const MaterialProperty< RealTensorValue > * _permeability
 Permeability of the media. More...
 
const PorousFlowDictator_dictator
 PorousFlowDictator UserObject. More...
 
enum PorousFlowPropertyAux::PropertyEnum _property_enum
 
const unsigned int _phase
 Phase index. More...
 
const unsigned int _liquid_phase
 Liquid phase index. More...
 
const unsigned int _gas_phase
 Gas phase index. More...
 
const unsigned int _fluid_component
 Fluid component index. More...
 
const unsigned int _secondary_species
 Secondary species number. More...
 
const unsigned int _mineral_species
 Mineral species number. More...
 
const unsigned int _k_row
 Permeability tensor row and column. More...
 
const unsigned int _k_col
 

Detailed Description

Provides a simple interface to PorousFlow material properties.

Note that as all properties are in materials, only elemental AuxVariables can be used and as such, all properties are evaluated at the qps only

Definition at line 26 of file PorousFlowPropertyAux.h.

Member Enumeration Documentation

◆ PropertyEnum

Enum of properties.

Enumerator
PRESSURE 
SATURATION 
TEMPERATURE 
DENSITY 
VISCOSITY 
MASS_FRACTION 
RELPERM 
CAPILLARY_PRESSURE 
ENTHALPY 
INTERNAL_ENERGY 
SECONDARY_CONCENTRATION 
MINERAL_CONCENTRATION 
MINERAL_REACTION_RATE 
POROSITY 
PERMEABILITY 

Definition at line 81 of file PorousFlowPropertyAux.h.

81  {
82  PRESSURE,
83  SATURATION,
84  TEMPERATURE,
85  DENSITY,
86  VISCOSITY,
87  MASS_FRACTION,
88  RELPERM,
89  CAPILLARY_PRESSURE,
90  ENTHALPY,
91  INTERNAL_ENERGY,
92  SECONDARY_CONCENTRATION,
93  MINERAL_CONCENTRATION,
94  MINERAL_REACTION_RATE,
95  POROSITY,
96  PERMEABILITY

Constructor & Destructor Documentation

◆ PorousFlowPropertyAux()

PorousFlowPropertyAux::PorousFlowPropertyAux ( const InputParameters &  parameters)

Definition at line 45 of file PorousFlowPropertyAux.C.

46  : AuxKernel(parameters),
47  _dictator(getUserObject<PorousFlowDictator>("PorousFlowDictator")),
48  _property_enum(getParam<MooseEnum>("property").getEnum<PropertyEnum>()),
49  _phase(getParam<unsigned int>("phase")),
50  _liquid_phase(getParam<unsigned int>("liquid_phase")),
51  _gas_phase(getParam<unsigned int>("gas_phase")),
52  _fluid_component(getParam<unsigned int>("fluid_component")),
53  _secondary_species(getParam<unsigned int>("secondary_species")),
54  _mineral_species(getParam<unsigned int>("mineral_species")),
55  _k_row(getParam<unsigned int>("row")),
56  _k_col(getParam<unsigned int>("column"))
57 {
58  // Check that the phase and fluid_component are valid
59  if (_phase >= _dictator.numPhases())
60  paramError("phase",
61  "Phase number entered is greater than the number of phases specified in the "
62  "Dictator. Remember that indexing starts at 0");
63 
65  paramError("fluid_component",
66  "Fluid component number entered is greater than the number of fluid components "
67  "specified in the Dictator. Remember that indexing starts at 0");
68 
69  // Check the parameters used to calculate capillary pressure
71  {
73  paramError(
74  "liquid_phase",
75  "Liquid phase number entered is greater than the number of phases specified in the "
76  "Dictator. Remember that indexing starts at 0");
77 
79  paramError("gas_phase",
80  "Gas phase number entered is greater than the number of phases specified in the "
81  "Dictator. Remember that indexing starts at 0");
82 
84  paramError("liquid_phase", "Liquid phase number entered cannot be equal to gas_phase");
85  }
86 
89  paramError("secondary_species",
90  "Secondary species number entered is greater than the number of aqueous equilibrium "
91  "chemical reactions specified in the Dictator. Remember that indexing starts at 0");
92 
96  paramError("mineral_species",
97  "Mineral species number entered is greater than the number of aqueous "
98  "precipitation-dissolution chemical reactions specified in the Dictator. Remember "
99  "that indexing starts at 0");
100 
101  // Only get material properties required by this instance of the AuxKernel
102  switch (_property_enum)
103  {
105  _pressure = &getMaterialProperty<std::vector<Real>>("PorousFlow_porepressure_qp");
106  break;
107 
109  _saturation = &getMaterialProperty<std::vector<Real>>("PorousFlow_saturation_qp");
110  break;
111 
113  _temperature = &getMaterialProperty<Real>("PorousFlow_temperature_qp");
114  break;
115 
117  _fluid_density = &getMaterialProperty<std::vector<Real>>("PorousFlow_fluid_phase_density_qp");
118  break;
119 
121  _fluid_viscosity = &getMaterialProperty<std::vector<Real>>("PorousFlow_viscosity_qp");
122  break;
123 
126  &getMaterialProperty<std::vector<std::vector<Real>>>("PorousFlow_mass_frac_qp");
127  break;
128 
131  &getMaterialProperty<std::vector<Real>>("PorousFlow_relative_permeability_qp");
132  break;
133 
135  _pressure = &getMaterialProperty<std::vector<Real>>("PorousFlow_porepressure_qp");
136  break;
137 
139  _enthalpy = &getMaterialProperty<std::vector<Real>>("PorousFlow_fluid_phase_enthalpy_qp");
140  break;
141 
144  &getMaterialProperty<std::vector<Real>>("PorousFlow_fluid_phase_internal_energy_qp");
145  break;
146 
148  _sec_conc = &getMaterialProperty<std::vector<Real>>("PorousFlow_secondary_concentration_qp");
149  break;
150 
152  _mineral_conc =
153  &getMaterialProperty<std::vector<Real>>("PorousFlow_mineral_concentration_qp");
154  break;
155 
158  &getMaterialProperty<std::vector<Real>>("PorousFlow_mineral_reaction_rate_qp");
159  break;
160 
162  _porosity = &getMaterialProperty<Real>("PorousFlow_porosity_qp");
163  break;
164 
166  _permeability = &getMaterialProperty<RealTensorValue>("PorousFlow_permeability_qp");
167  break;
168  }
169 }

Member Function Documentation

◆ computeValue()

Real PorousFlowPropertyAux::computeValue ( )
overrideprotectedvirtual

Definition at line 172 of file PorousFlowPropertyAux.C.

173 {
174  Real property = 0.0;
175 
176  switch (_property_enum)
177  {
179  property = (*_pressure)[_qp][_phase];
180  break;
181 
183  property = (*_saturation)[_qp][_phase];
184  break;
185 
187  property = (*_temperature)[_qp];
188  break;
189 
191  property = (*_fluid_density)[_qp][_phase];
192  break;
193 
195  property = (*_fluid_viscosity)[_qp][_phase];
196  break;
197 
199  property = (*_mass_fractions)[_qp][_phase][_fluid_component];
200  break;
201 
203  property = (*_relative_permeability)[_qp][_phase];
204  break;
205 
207  property = (*_pressure)[_qp][_gas_phase] - (*_pressure)[_qp][_liquid_phase];
208  break;
209 
211  property = (*_enthalpy)[_qp][_phase];
212  break;
213 
215  property = (*_internal_energy)[_qp][_phase];
216  break;
217 
219  property = (*_sec_conc)[_qp][_secondary_species];
220  break;
221 
223  property = (*_mineral_conc)[_qp][_mineral_species];
224  break;
225 
227  property = (*_mineral_reaction_rate)[_qp][_mineral_species];
228  break;
229 
231  property = (*_porosity)[_qp];
232  break;
233 
235  property = (*_permeability)[_qp](_k_row, _k_col);
236  break;
237  }
238 
239  return property;
240 }

Member Data Documentation

◆ _dictator

const PorousFlowDictator& PorousFlowPropertyAux::_dictator
private

PorousFlowDictator UserObject.

Definition at line 78 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _enthalpy

const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_enthalpy
private

Enthalpy of each phase.

Definition at line 57 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _fluid_component

const unsigned int PorousFlowPropertyAux::_fluid_component
private

Fluid component index.

Definition at line 109 of file PorousFlowPropertyAux.h.

Referenced by computeValue(), and PorousFlowPropertyAux().

◆ _fluid_density

const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_fluid_density
private

Fluid density of each phase.

Definition at line 45 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _fluid_viscosity

const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_fluid_viscosity
private

Viscosity of each phase.

Definition at line 48 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _gas_phase

const unsigned int PorousFlowPropertyAux::_gas_phase
private

Gas phase index.

Definition at line 106 of file PorousFlowPropertyAux.h.

Referenced by computeValue(), and PorousFlowPropertyAux().

◆ _internal_energy

const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_internal_energy
private

Internal energy of each phase.

Definition at line 60 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _k_col

const unsigned int PorousFlowPropertyAux::_k_col
private

Definition at line 119 of file PorousFlowPropertyAux.h.

Referenced by computeValue().

◆ _k_row

const unsigned int PorousFlowPropertyAux::_k_row
private

Permeability tensor row and column.

Definition at line 118 of file PorousFlowPropertyAux.h.

Referenced by computeValue().

◆ _liquid_phase

const unsigned int PorousFlowPropertyAux::_liquid_phase
private

Liquid phase index.

Definition at line 103 of file PorousFlowPropertyAux.h.

Referenced by computeValue(), and PorousFlowPropertyAux().

◆ _mass_fractions

const MaterialProperty<std::vector<std::vector<Real> > >* PorousFlowPropertyAux::_mass_fractions
private

Mass fraction of each component in each phase.

Definition at line 51 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _mineral_conc

const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_mineral_conc
private

Mineral-species concentration.

Definition at line 66 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _mineral_reaction_rate

const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_mineral_reaction_rate
private

Mineral-species reacion rate.

Definition at line 69 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _mineral_species

const unsigned int PorousFlowPropertyAux::_mineral_species
private

Mineral species number.

Definition at line 115 of file PorousFlowPropertyAux.h.

Referenced by computeValue(), and PorousFlowPropertyAux().

◆ _permeability

const MaterialProperty<RealTensorValue>* PorousFlowPropertyAux::_permeability
private

Permeability of the media.

Definition at line 75 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _phase

const unsigned int PorousFlowPropertyAux::_phase
private

Phase index.

Definition at line 100 of file PorousFlowPropertyAux.h.

Referenced by computeValue(), and PorousFlowPropertyAux().

◆ _porosity

const MaterialProperty<Real>* PorousFlowPropertyAux::_porosity
private

Porosity of the media.

Definition at line 72 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _pressure

const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_pressure
private

Pressure of each phase.

Definition at line 36 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _property_enum

enum PorousFlowPropertyAux::PropertyEnum PorousFlowPropertyAux::_property_enum
private

◆ _relative_permeability

const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_relative_permeability
private

Relative permeability of each phase.

Definition at line 54 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _saturation

const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_saturation
private

Saturation of each phase.

Definition at line 39 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _sec_conc

const MaterialProperty<std::vector<Real> >* PorousFlowPropertyAux::_sec_conc
private

Secondary-species concentration.

Definition at line 63 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _secondary_species

const unsigned int PorousFlowPropertyAux::_secondary_species
private

Secondary species number.

Definition at line 112 of file PorousFlowPropertyAux.h.

Referenced by computeValue(), and PorousFlowPropertyAux().

◆ _temperature

const MaterialProperty<Real>* PorousFlowPropertyAux::_temperature
private

Temperature of the fluid.

Definition at line 42 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().


The documentation for this class was generated from the following files:
PorousFlowPropertyAux::_secondary_species
const unsigned int _secondary_species
Secondary species number.
Definition: PorousFlowPropertyAux.h:112
PorousFlowPropertyAux::_fluid_density
const MaterialProperty< std::vector< Real > > * _fluid_density
Fluid density of each phase.
Definition: PorousFlowPropertyAux.h:45
PorousFlowPropertyAux::_fluid_viscosity
const MaterialProperty< std::vector< Real > > * _fluid_viscosity
Viscosity of each phase.
Definition: PorousFlowPropertyAux.h:48
PorousFlowPropertyAux::PropertyEnum::SATURATION
PorousFlowPropertyAux::_permeability
const MaterialProperty< RealTensorValue > * _permeability
Permeability of the media.
Definition: PorousFlowPropertyAux.h:75
PorousFlowPropertyAux::_gas_phase
const unsigned int _gas_phase
Gas phase index.
Definition: PorousFlowPropertyAux.h:106
PorousFlowPropertyAux::_dictator
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
Definition: PorousFlowPropertyAux.h:78
PorousFlowPropertyAux::_temperature
const MaterialProperty< Real > * _temperature
Temperature of the fluid.
Definition: PorousFlowPropertyAux.h:42
PorousFlowDictator::numAqueousKinetic
unsigned int numAqueousKinetic() const
The number of aqueous kinetic secondary species.
Definition: PorousFlowDictator.C:123
PorousFlowPropertyAux::PropertyEnum::DENSITY
PorousFlowPropertyAux::_mass_fractions
const MaterialProperty< std::vector< std::vector< Real > > > * _mass_fractions
Mass fraction of each component in each phase.
Definition: PorousFlowPropertyAux.h:51
PorousFlowPropertyAux::_property_enum
enum PorousFlowPropertyAux::PropertyEnum _property_enum
PorousFlowPropertyAux::_pressure
const MaterialProperty< std::vector< Real > > * _pressure
Pressure of each phase.
Definition: PorousFlowPropertyAux.h:36
PorousFlowPropertyAux::PropertyEnum::POROSITY
PorousFlowPropertyAux::PropertyEnum::PERMEABILITY
PorousFlowPropertyAux::PropertyEnum::TEMPERATURE
PorousFlowPropertyAux::_sec_conc
const MaterialProperty< std::vector< Real > > * _sec_conc
Secondary-species concentration.
Definition: PorousFlowPropertyAux.h:63
PorousFlowPropertyAux::PropertyEnum::MASS_FRACTION
PorousFlowPropertyAux::_saturation
const MaterialProperty< std::vector< Real > > * _saturation
Saturation of each phase.
Definition: PorousFlowPropertyAux.h:39
PorousFlowPropertyAux::PropertyEnum::SECONDARY_CONCENTRATION
PorousFlowPropertyAux::_fluid_component
const unsigned int _fluid_component
Fluid component index.
Definition: PorousFlowPropertyAux.h:109
PorousFlowDictator::numAqueousEquilibrium
unsigned int numAqueousEquilibrium() const
The number of aqueous equilibrium secondary species.
Definition: PorousFlowDictator.C:117
PorousFlowPropertyAux::_k_col
const unsigned int _k_col
Definition: PorousFlowPropertyAux.h:119
PorousFlowPropertyAux::_k_row
const unsigned int _k_row
Permeability tensor row and column.
Definition: PorousFlowPropertyAux.h:118
PorousFlowPropertyAux::PropertyEnum::VISCOSITY
PorousFlowPropertyAux::_mineral_species
const unsigned int _mineral_species
Mineral species number.
Definition: PorousFlowPropertyAux.h:115
PorousFlowDictator::numPhases
unsigned int numPhases() const
The number of fluid phases.
Definition: PorousFlowDictator.C:105
PorousFlowPropertyAux::PropertyEnum::ENTHALPY
PorousFlowPropertyAux::_relative_permeability
const MaterialProperty< std::vector< Real > > * _relative_permeability
Relative permeability of each phase.
Definition: PorousFlowPropertyAux.h:54
PorousFlowPropertyAux::_porosity
const MaterialProperty< Real > * _porosity
Porosity of the media.
Definition: PorousFlowPropertyAux.h:72
PorousFlowPropertyAux::_mineral_conc
const MaterialProperty< std::vector< Real > > * _mineral_conc
Mineral-species concentration.
Definition: PorousFlowPropertyAux.h:66
PorousFlowPropertyAux::PropertyEnum::MINERAL_CONCENTRATION
PorousFlowDictator::numComponents
unsigned int numComponents() const
The number of fluid components.
Definition: PorousFlowDictator.C:111
PorousFlowPropertyAux::PropertyEnum::INTERNAL_ENERGY
PorousFlowPropertyAux::_enthalpy
const MaterialProperty< std::vector< Real > > * _enthalpy
Enthalpy of each phase.
Definition: PorousFlowPropertyAux.h:57
PorousFlowPropertyAux::PropertyEnum::PRESSURE
PorousFlowPropertyAux::PropertyEnum::MINERAL_REACTION_RATE
PorousFlowPropertyAux::PropertyEnum::RELPERM
PorousFlowPropertyAux::PropertyEnum::CAPILLARY_PRESSURE
PorousFlowPropertyAux::_phase
const unsigned int _phase
Phase index.
Definition: PorousFlowPropertyAux.h:100
PorousFlowPropertyAux::_mineral_reaction_rate
const MaterialProperty< std::vector< Real > > * _mineral_reaction_rate
Mineral-species reacion rate.
Definition: PorousFlowPropertyAux.h:69
PorousFlowPropertyAux::_internal_energy
const MaterialProperty< std::vector< Real > > * _internal_energy
Internal energy of each phase.
Definition: PorousFlowPropertyAux.h:60
PorousFlowPropertyAux::_liquid_phase
const unsigned int _liquid_phase
Liquid phase index.
Definition: PorousFlowPropertyAux.h:103