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::ENTHALPY,
  PropertyEnum::INTERNAL_ENERGY, PropertyEnum::SECONDARY_CONCENTRATION, PropertyEnum::MINERAL_CONCENTRATION, PropertyEnum::MINERAL_REACTION_RATE
}
 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 PorousFlowDictator_dictator
 PorousFlowDictator UserObject. More...
 
enum PorousFlowPropertyAux::PropertyEnum _property_enum
 
const unsigned int _phase
 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...
 

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 
ENTHALPY 
INTERNAL_ENERGY 
SECONDARY_CONCENTRATION 
MINERAL_CONCENTRATION 
MINERAL_REACTION_RATE 

Definition at line 76 of file PorousFlowPropertyAux.h.

76  {
77  PRESSURE,
78  SATURATION,
79  TEMPERATURE,
80  DENSITY,
81  VISCOSITY,
82  MASS_FRACTION,
83  RELPERM,
84  ENTHALPY,
85  INTERNAL_ENERGY,
86  SECONDARY_CONCENTRATION,
87  MINERAL_CONCENTRATION,
88  MINERAL_REACTION_RATE
enum PorousFlowPropertyAux::PropertyEnum _property_enum

Constructor & Destructor Documentation

◆ PorousFlowPropertyAux()

PorousFlowPropertyAux::PorousFlowPropertyAux ( const InputParameters &  parameters)

Definition at line 37 of file PorousFlowPropertyAux.C.

38  : AuxKernel(parameters),
39  _dictator(getUserObject<PorousFlowDictator>("PorousFlowDictator")),
40  _property_enum(getParam<MooseEnum>("property").getEnum<PropertyEnum>()),
41  _phase(getParam<unsigned int>("phase")),
42  _fluid_component(getParam<unsigned int>("fluid_component")),
43  _secondary_species(getParam<unsigned int>("secondary_species")),
44  _mineral_species(getParam<unsigned int>("mineral_species"))
45 {
46  // Check that the phase and fluid_component are valid
47  if (_phase >= _dictator.numPhases())
48  paramError("phase",
49  "Phase number entered is greater than the number of phases specified in the "
50  "Dictator. Remember that indexing starts at 0");
51 
53  paramError("fluid_component",
54  "Fluid component number entered is greater than the number of fluid components "
55  "specified in the Dictator. Remember that indexing starts at 0");
56 
59  paramError("secondary_species",
60  "Secondary species number entered is greater than the number of aqueous equilibrium "
61  "chemical reactions specified in the Dictator. Remember that indexing starts at 0");
62 
66  paramError("mineral_species",
67  "Mineral species number entered is greater than the number of aqueous "
68  "precipitation-dissolution chemical reactions specified in the Dictator. Remember "
69  "that indexing starts at 0");
70 
71  // Only get material properties required by this instance of the AuxKernel
72  switch (_property_enum)
73  {
75  _pressure = &getMaterialProperty<std::vector<Real>>("PorousFlow_porepressure_qp");
76  break;
77 
79  _saturation = &getMaterialProperty<std::vector<Real>>("PorousFlow_saturation_qp");
80  break;
81 
83  _temperature = &getMaterialProperty<Real>("PorousFlow_temperature_qp");
84  break;
85 
87  _fluid_density = &getMaterialProperty<std::vector<Real>>("PorousFlow_fluid_phase_density_qp");
88  break;
89 
91  _fluid_viscosity = &getMaterialProperty<std::vector<Real>>("PorousFlow_viscosity_qp");
92  break;
93 
96  &getMaterialProperty<std::vector<std::vector<Real>>>("PorousFlow_mass_frac_qp");
97  break;
98 
101  &getMaterialProperty<std::vector<Real>>("PorousFlow_relative_permeability_qp");
102  break;
103 
105  _enthalpy = &getMaterialProperty<std::vector<Real>>("PorousFlow_fluid_phase_enthalpy_qp");
106  break;
107 
110  &getMaterialProperty<std::vector<Real>>("PorousFlow_fluid_phase_internal_energy_qp");
111  break;
112 
114  _sec_conc = &getMaterialProperty<std::vector<Real>>("PorousFlow_secondary_concentration_qp");
115  break;
116 
118  _mineral_conc =
119  &getMaterialProperty<std::vector<Real>>("PorousFlow_mineral_concentration_qp");
120  break;
121 
124  &getMaterialProperty<std::vector<Real>>("PorousFlow_mineral_reaction_rate_qp");
125  break;
126  }
127 }
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 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< std::vector< Real > > * _sec_conc
Secondary-species concentration.
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.

Member Function Documentation

◆ computeValue()

Real PorousFlowPropertyAux::computeValue ( )
overrideprotectedvirtual

Definition at line 130 of file PorousFlowPropertyAux.C.

131 {
132  Real property = 0.0;
133 
134  switch (_property_enum)
135  {
137  property = (*_pressure)[_qp][_phase];
138  break;
139 
141  property = (*_saturation)[_qp][_phase];
142  break;
143 
145  property = (*_temperature)[_qp];
146  break;
147 
149  property = (*_fluid_density)[_qp][_phase];
150  break;
151 
153  property = (*_fluid_viscosity)[_qp][_phase];
154  break;
155 
157  property = (*_mass_fractions)[_qp][_phase][_fluid_component];
158  break;
159 
161  property = (*_relative_permeability)[_qp][_phase];
162  break;
163 
165  property = (*_enthalpy)[_qp][_phase];
166  break;
167 
169  property = (*_internal_energy)[_qp][_phase];
170  break;
171 
173  property = (*_sec_conc)[_qp][_secondary_species];
174  break;
175 
177  property = (*_mineral_conc)[_qp][_mineral_species];
178  break;
179 
181  property = (*_mineral_reaction_rate)[_qp][_mineral_species];
182  break;
183  }
184 
185  return property;
186 }
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.

Member Data Documentation

◆ _dictator

const PorousFlowDictator& PorousFlowPropertyAux::_dictator
private

PorousFlowDictator UserObject.

Definition at line 73 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 95 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().

◆ _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().

◆ _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 101 of file PorousFlowPropertyAux.h.

Referenced by computeValue(), and PorousFlowPropertyAux().

◆ _phase

const unsigned int PorousFlowPropertyAux::_phase
private

Phase index.

Definition at line 92 of file PorousFlowPropertyAux.h.

Referenced by computeValue(), and 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 98 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: