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 27 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 82 of file PorousFlowPropertyAux.h.

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

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 }
const unsigned int _k_row
Permeability tensor row and column.
const MaterialProperty< std::vector< Real > > * _fluid_viscosity
Viscosity of each phase.
const MaterialProperty< std::vector< std::vector< Real > > > * _mass_fractions
Mass fraction of each component in each phase.
const unsigned int _liquid_phase
Liquid phase index.
const MaterialProperty< std::vector< Real > > * _mineral_conc
Mineral-species concentration.
const unsigned int _mineral_species
Mineral species number.
unsigned int numComponents() const
The number of fluid components.
const MaterialProperty< std::vector< Real > > * _mineral_reaction_rate
Mineral-species reacion rate.
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
const MaterialProperty< std::vector< Real > > * _internal_energy
Internal energy of each phase.
const MaterialProperty< std::vector< Real > > * _enthalpy
Enthalpy of each phase.
const MaterialProperty< std::vector< Real > > * _saturation
Saturation of each phase.
const unsigned int _secondary_species
Secondary species number.
const unsigned int _phase
Phase index.
const MaterialProperty< Real > * _temperature
Temperature of the fluid.
const MaterialProperty< std::vector< Real > > * _fluid_density
Fluid density of each phase.
unsigned int numPhases() const
The number of fluid phases.
unsigned int numAqueousKinetic() const
The number of aqueous kinetic secondary species.
const MaterialProperty< RealTensorValue > * _permeability
Permeability of the media.
const MaterialProperty< std::vector< Real > > * _sec_conc
Secondary-species concentration.
const MaterialProperty< Real > * _porosity
Porosity of the media.
enum PorousFlowPropertyAux::PropertyEnum _property_enum
const MaterialProperty< std::vector< Real > > * _relative_permeability
Relative permeability of each phase.
const unsigned int _fluid_component
Fluid component index.
unsigned int numAqueousEquilibrium() const
The number of aqueous equilibrium secondary species.
const MaterialProperty< std::vector< Real > > * _pressure
Pressure of each phase.
const unsigned int _gas_phase
Gas phase index.

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 }
const unsigned int _k_row
Permeability tensor row and column.
const unsigned int _liquid_phase
Liquid phase index.
const unsigned int _mineral_species
Mineral species number.
const unsigned int _secondary_species
Secondary species number.
const unsigned int _phase
Phase index.
enum PorousFlowPropertyAux::PropertyEnum _property_enum
const unsigned int _fluid_component
Fluid component index.
const unsigned int _gas_phase
Gas phase index.

Member Data Documentation

◆ _dictator

const PorousFlowDictator& PorousFlowPropertyAux::_dictator
private

PorousFlowDictator UserObject.

Definition at line 79 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _enthalpy

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

Enthalpy of each phase.

Definition at line 58 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _fluid_component

const unsigned int PorousFlowPropertyAux::_fluid_component
private

Fluid component index.

Definition at line 110 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 46 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 49 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _gas_phase

const unsigned int PorousFlowPropertyAux::_gas_phase
private

Gas phase index.

Definition at line 107 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 61 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _k_col

const unsigned int PorousFlowPropertyAux::_k_col
private

Definition at line 120 of file PorousFlowPropertyAux.h.

Referenced by computeValue().

◆ _k_row

const unsigned int PorousFlowPropertyAux::_k_row
private

Permeability tensor row and column.

Definition at line 119 of file PorousFlowPropertyAux.h.

Referenced by computeValue().

◆ _liquid_phase

const unsigned int PorousFlowPropertyAux::_liquid_phase
private

Liquid phase index.

Definition at line 104 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 52 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _mineral_conc

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

Mineral-species concentration.

Definition at line 67 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 70 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _mineral_species

const unsigned int PorousFlowPropertyAux::_mineral_species
private

Mineral species number.

Definition at line 116 of file PorousFlowPropertyAux.h.

Referenced by computeValue(), and PorousFlowPropertyAux().

◆ _permeability

const MaterialProperty<RealTensorValue>* PorousFlowPropertyAux::_permeability
private

Permeability of the media.

Definition at line 76 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _phase

const unsigned int PorousFlowPropertyAux::_phase
private

Phase index.

Definition at line 101 of file PorousFlowPropertyAux.h.

Referenced by computeValue(), and PorousFlowPropertyAux().

◆ _porosity

const MaterialProperty<Real>* PorousFlowPropertyAux::_porosity
private

Porosity of the media.

Definition at line 73 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _pressure

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

Pressure of each phase.

Definition at line 37 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 55 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _saturation

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

Saturation of each phase.

Definition at line 40 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _sec_conc

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

Secondary-species concentration.

Definition at line 64 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().

◆ _secondary_species

const unsigned int PorousFlowPropertyAux::_secondary_species
private

Secondary species number.

Definition at line 113 of file PorousFlowPropertyAux.h.

Referenced by computeValue(), and PorousFlowPropertyAux().

◆ _temperature

const MaterialProperty<Real>* PorousFlowPropertyAux::_temperature
private

Temperature of the fluid.

Definition at line 43 of file PorousFlowPropertyAux.h.

Referenced by PorousFlowPropertyAux().


The documentation for this class was generated from the following files: