Go to the documentation of this file.
18 InputParameters params = validParams<AuxKernel>();
19 params.addRequiredParam<UserObjectName>(
20 "PorousFlowDictator",
"The UserObject that holds the list of PorousFlow variable names");
21 MooseEnum property_enum(
"pressure saturation temperature density viscosity mass_fraction relperm "
22 "capillary_pressure enthalpy internal_energy secondary_concentration "
23 "mineral_concentration mineral_reaction_rate porosity permeability");
24 params.addRequiredParam<MooseEnum>(
25 "property", property_enum,
"The fluid property that this auxillary kernel is to calculate");
26 params.addParam<
unsigned int>(
"phase", 0,
"The index of the phase this auxillary kernel acts on");
27 params.addParam<
unsigned int>(
28 "liquid_phase", 0,
"The index of the liquid phase (used for capillary pressure)");
29 params.addParam<
unsigned int>(
30 "gas_phase", 1,
"The index of the gas phase (used for capillary pressure)");
31 params.addParam<
unsigned int>(
32 "fluid_component", 0,
"The index of the fluid component this auxillary kernel acts on");
33 params.addParam<
unsigned int>(
"secondary_species", 0,
"The secondary chemical species number");
34 params.addParam<
unsigned int>(
"mineral_species", 0,
"The mineral chemical species number");
35 params.addRangeCheckedParam<
unsigned int>(
36 "row", 0,
"row>=0 & row<=2",
"Row of permeability tensor to output");
37 params.addRangeCheckedParam<
unsigned int>(
38 "column", 0,
"column>=0 & column<=2",
"Column of permeability tensor to output");
39 params.addClassDescription(
"AuxKernel to provide access to properties evaluated at quadpoints. "
40 "Note that elemental AuxVariables must be used, so that these "
41 "properties are integrated over each element.");
46 : AuxKernel(parameters),
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"))
61 "Phase number entered is greater than the number of phases specified in the "
62 "Dictator. Remember that indexing starts at 0");
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");
75 "Liquid phase number entered is greater than the number of phases specified in the "
76 "Dictator. Remember that indexing starts at 0");
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");
84 paramError(
"liquid_phase",
"Liquid phase number entered cannot be equal to gas_phase");
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");
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");
105 _pressure = &getMaterialProperty<std::vector<Real>>(
"PorousFlow_porepressure_qp");
109 _saturation = &getMaterialProperty<std::vector<Real>>(
"PorousFlow_saturation_qp");
113 _temperature = &getMaterialProperty<Real>(
"PorousFlow_temperature_qp");
117 _fluid_density = &getMaterialProperty<std::vector<Real>>(
"PorousFlow_fluid_phase_density_qp");
121 _fluid_viscosity = &getMaterialProperty<std::vector<Real>>(
"PorousFlow_viscosity_qp");
126 &getMaterialProperty<std::vector<std::vector<Real>>>(
"PorousFlow_mass_frac_qp");
131 &getMaterialProperty<std::vector<Real>>(
"PorousFlow_relative_permeability_qp");
135 _pressure = &getMaterialProperty<std::vector<Real>>(
"PorousFlow_porepressure_qp");
139 _enthalpy = &getMaterialProperty<std::vector<Real>>(
"PorousFlow_fluid_phase_enthalpy_qp");
144 &getMaterialProperty<std::vector<Real>>(
"PorousFlow_fluid_phase_internal_energy_qp");
148 _sec_conc = &getMaterialProperty<std::vector<Real>>(
"PorousFlow_secondary_concentration_qp");
153 &getMaterialProperty<std::vector<Real>>(
"PorousFlow_mineral_concentration_qp");
158 &getMaterialProperty<std::vector<Real>>(
"PorousFlow_mineral_reaction_rate_qp");
162 _porosity = &getMaterialProperty<Real>(
"PorousFlow_porosity_qp");
166 _permeability = &getMaterialProperty<RealTensorValue>(
"PorousFlow_permeability_qp");
179 property = (*_pressure)[_qp][
_phase];
183 property = (*_saturation)[_qp][
_phase];
187 property = (*_temperature)[_qp];
191 property = (*_fluid_density)[_qp][
_phase];
195 property = (*_fluid_viscosity)[_qp][
_phase];
203 property = (*_relative_permeability)[_qp][
_phase];
211 property = (*_enthalpy)[_qp][
_phase];
215 property = (*_internal_energy)[_qp][
_phase];
231 property = (*_porosity)[_qp];
const unsigned int _secondary_species
Secondary species number.
const MaterialProperty< std::vector< Real > > * _fluid_density
Fluid density of each phase.
const MaterialProperty< std::vector< Real > > * _fluid_viscosity
Viscosity of each phase.
const MaterialProperty< RealTensorValue > * _permeability
Permeability of the media.
const unsigned int _gas_phase
Gas phase index.
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
const MaterialProperty< Real > * _temperature
Temperature of the fluid.
unsigned int numAqueousKinetic() const
The number of aqueous kinetic secondary species.
const MaterialProperty< std::vector< std::vector< Real > > > * _mass_fractions
Mass fraction of each component in each phase.
enum PorousFlowPropertyAux::PropertyEnum _property_enum
const MaterialProperty< std::vector< Real > > * _pressure
Pressure of each phase.
const MaterialProperty< std::vector< Real > > * _sec_conc
Secondary-species concentration.
const MaterialProperty< std::vector< Real > > * _saturation
Saturation of each phase.
const unsigned int _fluid_component
Fluid component index.
unsigned int numAqueousEquilibrium() const
The number of aqueous equilibrium secondary species.
const unsigned int _k_col
PorousFlowPropertyAux(const InputParameters ¶meters)
const unsigned int _k_row
Permeability tensor row and column.
const unsigned int _mineral_species
Mineral species number.
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.
const MaterialProperty< std::vector< Real > > * _relative_permeability
Relative permeability of each phase.
const MaterialProperty< Real > * _porosity
Porosity of the media.
const MaterialProperty< std::vector< Real > > * _mineral_conc
Mineral-species concentration.
registerMooseObject("PorousFlowApp", PorousFlowPropertyAux)
InputParameters validParams< PorousFlowPropertyAux >()
unsigned int numComponents() const
The number of fluid components.
PropertyEnum
Enum of properties.
Provides a simple interface to PorousFlow material properties.
const MaterialProperty< std::vector< Real > > * _enthalpy
Enthalpy of each phase.
virtual Real computeValue() override
const unsigned int _phase
Phase index.
const MaterialProperty< std::vector< Real > > * _mineral_reaction_rate
Mineral-species reacion rate.
const MaterialProperty< std::vector< Real > > * _internal_energy
Internal energy of each phase.
const unsigned int _liquid_phase
Liquid phase index.