21 "PorousFlowDictator",
"The UserObject that holds the list of PorousFlow variable names");
22 MooseEnum property_enum(
"pressure saturation temperature density viscosity mass_fraction relperm " 23 "capillary_pressure enthalpy internal_energy secondary_concentration " 24 "mineral_concentration mineral_reaction_rate porosity permeability " 25 "hysteresis_order hysteresis_saturation_turning_point hysteretic_info");
27 "property", property_enum,
"The fluid property that this auxillary kernel is to calculate");
28 params.
addParam<
unsigned int>(
"phase", 0,
"The index of the phase this auxillary kernel acts on");
30 "liquid_phase", 0,
"The index of the liquid phase (used for capillary pressure)");
32 "gas_phase", 1,
"The index of the gas phase (used for capillary pressure)");
34 "fluid_component", 0,
"The index of the fluid component this auxillary kernel acts on");
35 params.
addParam<
unsigned int>(
"secondary_species", 0,
"The secondary chemical species number");
36 params.
addParam<
unsigned int>(
"mineral_species", 0,
"The mineral chemical species number");
38 "hysteresis_turning_point", 0,
"The hysteresis turning point number");
40 "row", 0,
"row>=0 & row<=2",
"Row of permeability tensor to output");
42 "column", 0,
"column>=0 & column<=2",
"Column of permeability tensor to output");
43 params.
addClassDescription(
"AuxKernel to provide access to properties evaluated at quadpoints. " 44 "Note that elemental AuxVariables must be used, so that these " 45 "properties are integrated over each element.");
54 _phase(getParam<unsigned
int>(
"phase")),
55 _liquid_phase(getParam<unsigned
int>(
"liquid_phase")),
56 _gas_phase(getParam<unsigned
int>(
"gas_phase")),
57 _fluid_component(getParam<unsigned
int>(
"fluid_component")),
58 _secondary_species(getParam<unsigned
int>(
"secondary_species")),
59 _mineral_species(getParam<unsigned
int>(
"mineral_species")),
60 _hysteresis_turning_point(getParam<unsigned
int>(
"hysteresis_turning_point")),
61 _k_row(getParam<unsigned
int>(
"row")),
62 _k_col(getParam<unsigned
int>(
"column"))
67 "Phase number entered is greater than the number of phases specified in the " 68 "Dictator. Remember that indexing starts at 0");
72 "Fluid component number entered is greater than the number of fluid components " 73 "specified in the Dictator. Remember that indexing starts at 0");
81 "Liquid phase number entered is greater than the number of phases specified in the " 82 "Dictator. Remember that indexing starts at 0");
86 "Gas phase number entered is greater than the number of phases specified in the " 87 "Dictator. Remember that indexing starts at 0");
90 paramError(
"liquid_phase",
"Liquid phase number entered cannot be equal to gas_phase");
96 "Secondary species number entered is greater than the number of aqueous equilibrium " 97 "chemical reactions specified in the Dictator. Remember that indexing starts at 0");
103 "Mineral species number entered is greater than the number of aqueous " 104 "precipitation-dissolution chemical reactions specified in the Dictator. Remember " 105 "that indexing starts at 0");
109 "The maximum number of hysteresis turning points is ",
117 &getGenericMaterialProperty<std::vector<Real>, is_ad>(
"PorousFlow_porepressure_qp");
122 &getGenericMaterialProperty<std::vector<Real>, is_ad>(
"PorousFlow_saturation_qp");
126 _temperature = &getGenericMaterialProperty<Real, is_ad>(
"PorousFlow_temperature_qp");
130 _fluid_density = &getGenericMaterialProperty<std::vector<Real>, is_ad>(
131 "PorousFlow_fluid_phase_density_qp");
136 &getGenericMaterialProperty<std::vector<Real>, is_ad>(
"PorousFlow_viscosity_qp");
140 _mass_fractions = &getGenericMaterialProperty<std::vector<std::vector<Real>>, is_ad>(
141 "PorousFlow_mass_frac_qp");
146 "PorousFlow_relative_permeability_qp");
151 &getGenericMaterialProperty<std::vector<Real>, is_ad>(
"PorousFlow_porepressure_qp");
155 _enthalpy = &getGenericMaterialProperty<std::vector<Real>, is_ad>(
156 "PorousFlow_fluid_phase_enthalpy_qp");
161 "PorousFlow_fluid_phase_internal_energy_qp");
165 _sec_conc = &getGenericMaterialProperty<std::vector<Real>, is_ad>(
166 "PorousFlow_secondary_concentration_qp");
170 _mineral_conc = &getGenericMaterialProperty<std::vector<Real>, is_ad>(
171 "PorousFlow_mineral_concentration_qp");
176 "PorousFlow_mineral_reaction_rate_qp");
180 _porosity = &getGenericMaterialProperty<Real, is_ad>(
"PorousFlow_porosity_qp");
185 &getGenericMaterialProperty<RealTensorValue, is_ad>(
"PorousFlow_permeability_qp");
189 _hys_order = &getMaterialProperty<unsigned int>(
"PorousFlow_hysteresis_order_qp");
194 &getMaterialProperty<std::array<Real, PorousFlowConstants::MAX_HYSTERESIS_ORDER>>(
195 "PorousFlow_hysteresis_saturation_tps_qp");
199 _hys_info = &getMaterialProperty<Real>(
"PorousFlow_hysteretic_info_qp");
204 template <
bool is_ad>
210 switch (_property_enum)
212 case PropertyEnum::PRESSURE:
216 case PropertyEnum::SATURATION:
220 case PropertyEnum::TEMPERATURE:
224 case PropertyEnum::DENSITY:
228 case PropertyEnum::VISCOSITY:
232 case PropertyEnum::MASS_FRACTION:
236 case PropertyEnum::RELPERM:
240 case PropertyEnum::CAPILLARY_PRESSURE:
245 case PropertyEnum::ENTHALPY:
249 case PropertyEnum::INTERNAL_ENERGY:
253 case PropertyEnum::SECONDARY_CONCENTRATION:
257 case PropertyEnum::MINERAL_CONCENTRATION:
261 case PropertyEnum::MINERAL_REACTION_RATE:
265 case PropertyEnum::POROSITY:
269 case PropertyEnum::PERMEABILITY:
273 case PropertyEnum::HYSTERESIS_ORDER:
274 property = (*_hys_order)[_qp];
277 case PropertyEnum::HYSTERESIS_SATURATION_TURNING_POINT:
278 property = (*_hys_sat_tps)[_qp].at(_hysteresis_turning_point);
281 case PropertyEnum::HYSTERETIC_INFO:
282 property = (*_hys_info)[_qp];
const unsigned int _mineral_species
Mineral species number.
const MaterialProperty< Real > * _hys_info
Hysteresis info: what this physically represents depends on the PorousFlowHystereticInfo Material...
const GenericMaterialProperty< Real, is_ad > * _temperature
Temperature of the fluid.
const GenericMaterialProperty< std::vector< Real >, is_ad > * _internal_energy
Internal energy of each phase.
const GenericMaterialProperty< std::vector< Real >, is_ad > * _mineral_reaction_rate
Mineral-species reacion rate.
const MaterialProperty< std::array< Real, PorousFlowConstants::MAX_HYSTERESIS_ORDER > > * _hys_sat_tps
Hysteresis saturation turning points.
PorousFlowPropertyAuxTempl(const InputParameters ¶meters)
unsigned int numComponents() const
The number of fluid components.
virtual Real computeValue() override
const GenericMaterialProperty< std::vector< std::vector< Real > >, is_ad > * _mass_fractions
Mass fraction of each component in each phase.
const MaterialProperty< unsigned int > * _hys_order
Hysteresis order.
const GenericMaterialProperty< std::vector< Real >, is_ad > * _pressure
Pressure of each phase.
const unsigned int _gas_phase
Gas phase index.
constexpr unsigned MAX_HYSTERESIS_ORDER
const GenericMaterialProperty< std::vector< Real >, is_ad > * _saturation
Saturation of each phase.
const unsigned int _hysteresis_turning_point
Hysteresis turning point number.
const GenericMaterialProperty< RealTensorValue, is_ad > * _permeability
Permeability of the media.
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
const unsigned int _phase
Phase index.
void paramError(const std::string ¶m, Args... args) const
unsigned int numPhases() const
The number of fluid phases.
const GenericMaterialProperty< std::vector< Real >, is_ad > * _relative_permeability
Relative permeability of each phase.
unsigned int numAqueousKinetic() const
The number of aqueous kinetic secondary species.
enum PorousFlowPropertyAuxTempl::PropertyEnum _property_enum
Provides a simple interface to PorousFlow material properties.
static InputParameters validParams()
const GenericMaterialProperty< std::vector< Real >, is_ad > * _enthalpy
Enthalpy of each phase.
const unsigned int _secondary_species
Secondary species number.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const GenericMaterialProperty< std::vector< Real >, is_ad > * _mineral_conc
Mineral-species concentration.
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
const GenericMaterialProperty< std::vector< Real >, is_ad > * _fluid_viscosity
Viscosity of each phase.
const GenericMaterialProperty< Real, is_ad > * _porosity
Porosity of the media.
const GenericMaterialProperty< std::vector< Real >, is_ad > * _sec_conc
Secondary-species concentration.
const unsigned int _fluid_component
Fluid component index.
static InputParameters validParams()
const GenericMaterialProperty< std::vector< Real >, is_ad > * _fluid_density
Fluid density of each phase.
registerMooseObject("PorousFlowApp", PorousFlowPropertyAux)
unsigned int numAqueousEquilibrium() const
The number of aqueous equilibrium secondary species.
const unsigned int _liquid_phase
Liquid phase index.
void ErrorVector unsigned int
PropertyEnum
Enum of properties.