Skip to content
Permalink
Browse files

Merge pull request #13001 from cpgr/pfpropaux

Add porosity and permeability to PorousFlowPropertyAux
  • Loading branch information...
permcody committed Mar 6, 2019
2 parents c50ba8c + ec9f1c7 commit 1411bc3e14154f741a382b1599f4b5473be6cd46
Showing with 210 additions and 199 deletions.
  1. +2 −0 modules/porous_flow/doc/content/source/auxkernels/PorousFlowPropertyAux.md
  2. +8 −8 modules/porous_flow/examples/coal_mining/coarse_with_fluid.i
  3. +8 −8 modules/porous_flow/examples/coal_mining/fine_with_fluid.i
  4. +4 −4 modules/porous_flow/examples/tutorial/07.i
  5. +2 −2 modules/porous_flow/examples/tutorial/11.i
  6. +2 −2 modules/porous_flow/examples/tutorial/11_2D.i
  7. +13 −1 modules/porous_flow/include/auxkernels/PorousFlowPropertyAux.h
  8. +24 −2 modules/porous_flow/src/auxkernels/PorousFlowPropertyAux.C
  9. +1 −0 modules/porous_flow/src/utils/PorousFlowDependencies.C
  10. +2 −2 modules/porous_flow/test/tests/chemistry/except19.i
  11. +2 −2 modules/porous_flow/test/tests/chemistry/except20.i
  12. +2 −2 modules/porous_flow/test/tests/chemistry/except22.i
  13. +2 −2 modules/porous_flow/test/tests/chemistry/precipitation_porosity_change.i
  14. +2 −14 modules/porous_flow/test/tests/energy_conservation/heat04.i
  15. +2 −2 modules/porous_flow/test/tests/energy_conservation/heat04_action.i
  16. +2 −16 modules/porous_flow/test/tests/energy_conservation/heat04_action_KT.i
  17. +2 −2 modules/porous_flow/test/tests/energy_conservation/heat04_fullysat_action.i
  18. +20 −20 modules/porous_flow/test/tests/heterogeneous_materials/constant_poroperm.i
  19. +20 −20 modules/porous_flow/test/tests/heterogeneous_materials/constant_poroperm2.i
  20. +8 −8 modules/porous_flow/test/tests/heterogeneous_materials/vol_expansion_poroperm.i
  21. +2 −2 modules/porous_flow/test/tests/poro_elasticity/pp_generation.i
  22. +2 −2 modules/porous_flow/test/tests/poro_elasticity/pp_generation_action.i
  23. +2 −2 modules/porous_flow/test/tests/poro_elasticity/pp_generation_fullysat_action.i
  24. +8 −8 modules/porous_flow/test/tests/poro_elasticity/vol_expansion_poroperm.i
  25. +8 −8 modules/porous_flow/test/tests/poroperm/PermFromPoro01.i
  26. +8 −8 modules/porous_flow/test/tests/poroperm/PermFromPoro02.i
  27. +8 −8 modules/porous_flow/test/tests/poroperm/PermFromPoro03.i
  28. +8 −8 modules/porous_flow/test/tests/poroperm/PermFromPoro04.i
  29. +8 −8 modules/porous_flow/test/tests/poroperm/PermFromPoro05.i
  30. +6 −6 modules/porous_flow/test/tests/poroperm/PermTensorFromVar01.i
  31. +6 −6 modules/porous_flow/test/tests/poroperm/PermTensorFromVar02.i
  32. +6 −6 modules/porous_flow/test/tests/poroperm/PermTensorFromVar03.i
  33. +2 −2 modules/porous_flow/test/tests/poroperm/except1.i
  34. +2 −2 modules/porous_flow/test/tests/poroperm/except2.i
  35. +2 −2 modules/porous_flow/test/tests/poroperm/poro_hm.i
  36. +2 −2 modules/porous_flow/test/tests/poroperm/poro_thm.i
  37. +2 −2 modules/porous_flow/test/tests/poroperm/poro_tm.i
@@ -18,6 +18,8 @@ following properties are available using the `property` input parameter:
- `secondary_concentration` (m$^{3}$(secondary species)/m$^{3}$(fluid))
- `mineral_concentration` (m$^{3}$(secondary species)/m$^{3}$(porous material))
- `mineral_reaction_rate` (m$^{3}$(secondary species).m$^{-3}$(porous material).s$^{-1}$))
- `porosity`
- `permeability`

The fluid phase and fluid component are specified in the `phase` and
`fluid_component` input parameters, respectively. For properties
@@ -410,8 +410,8 @@
component = z
[../]
[./porosity]
type = MaterialRealAux
property = PorousFlow_porosity_qp
type = PorousFlowPropertyAux
property = porosity
variable = porosity
execute_on = timestep_end
[../]
@@ -560,24 +560,24 @@
execute_on = timestep_end
[../]
[./perm_xx]
type = MaterialRealTensorValueAux
property = PorousFlow_permeability_qp
type = PorousFlowPropertyAux
property = permeability
variable = perm_xx
row = 0
column = 0
execute_on = timestep_end
[../]
[./perm_yy]
type = MaterialRealTensorValueAux
property = PorousFlow_permeability_qp
type = PorousFlowPropertyAux
property = permeability
variable = perm_yy
row = 1
column = 1
execute_on = timestep_end
[../]
[./perm_zz]
type = MaterialRealTensorValueAux
property = PorousFlow_permeability_qp
type = PorousFlowPropertyAux
property = permeability
variable = perm_zz
row = 2
column = 2
@@ -418,8 +418,8 @@
component = z
[../]
[./porosity]
type = MaterialRealAux
property = PorousFlow_porosity_qp
type = PorousFlowPropertyAux
property = porosity
variable = porosity
execute_on = timestep_end
[../]
@@ -568,24 +568,24 @@
execute_on = timestep_end
[../]
[./perm_xx]
type = MaterialRealTensorValueAux
property = PorousFlow_permeability_qp
type = PorousFlowPropertyAux
property = permeability
variable = perm_xx
row = 0
column = 0
execute_on = timestep_end
[../]
[./perm_yy]
type = MaterialRealTensorValueAux
property = PorousFlow_permeability_qp
type = PorousFlowPropertyAux
property = permeability
variable = perm_yy
row = 1
column = 1
execute_on = timestep_end
[../]
[./perm_zz]
type = MaterialRealTensorValueAux
property = PorousFlow_permeability_qp
type = PorousFlowPropertyAux
property = permeability
variable = perm_zz
row = 2
column = 2
@@ -97,13 +97,13 @@
variable = mineral_conc
[../]
[./porosity]
type = MaterialRealAux
property = PorousFlow_porosity_qp
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[./permeability]
type = MaterialRealTensorValueAux
property = PorousFlow_permeability_qp
type = PorousFlowPropertyAux
property = permeability
column = 0
row = 0
variable = permeability
@@ -261,9 +261,9 @@
execute_on = timestep_end
[../]
[./porosity]
type = MaterialRealAux
type = PorousFlowPropertyAux
variable = porosity
property = PorousFlow_porosity_qp
property = porosity
execute_on = timestep_end
[../]
[]
@@ -229,9 +229,9 @@
index_j = 1
[../]
[./porosity]
type = MaterialRealAux
type = PorousFlowPropertyAux
variable = porosity
property = PorousFlow_porosity_qp
property = porosity
execute_on = timestep_end
[../]
[]
@@ -69,6 +69,12 @@ class PorousFlowPropertyAux : public AuxKernel
/// Mineral-species reacion rate
const MaterialProperty<std::vector<Real>> * _mineral_reaction_rate;

/// Porosity of the media
const MaterialProperty<Real> * _porosity;

/// Permeability of the media
const MaterialProperty<RealTensorValue> * _permeability;

/// PorousFlowDictator UserObject
const PorousFlowDictator & _dictator;

@@ -86,7 +92,9 @@ class PorousFlowPropertyAux : public AuxKernel
INTERNAL_ENERGY,
SECONDARY_CONCENTRATION,
MINERAL_CONCENTRATION,
MINERAL_REACTION_RATE
MINERAL_REACTION_RATE,
POROSITY,
PERMEABILITY
} _property_enum;

/// Phase index
@@ -106,6 +114,10 @@ class PorousFlowPropertyAux : public AuxKernel

/// Mineral species number
const unsigned int _mineral_species;

/// Permeability tensor row and column
const unsigned int _k_row;
const unsigned int _k_col;
};

#endif // POROUSFLOWPROPERTYAUX_H
@@ -20,7 +20,7 @@ validParams<PorousFlowPropertyAux>()
"PorousFlowDictator", "The UserObject that holds the list of PorousFlow variable names");
MooseEnum property_enum("pressure saturation temperature density viscosity mass_fraction relperm "
"capillary_pressure enthalpy internal_energy secondary_concentration "
"mineral_concentration mineral_reaction_rate");
"mineral_concentration mineral_reaction_rate porosity permeability");
params.addRequiredParam<MooseEnum>(
"property", property_enum, "The fluid property that this auxillary kernel is to calculate");
params.addParam<unsigned int>("phase", 0, "The index of the phase this auxillary kernel acts on");
@@ -32,6 +32,10 @@ validParams<PorousFlowPropertyAux>()
"fluid_component", 0, "The index of the fluid component this auxillary kernel acts on");
params.addParam<unsigned int>("secondary_species", 0, "The secondary chemical species number");
params.addParam<unsigned int>("mineral_species", 0, "The mineral chemical species number");
params.addRangeCheckedParam<unsigned int>(
"row", 0, "row>=0 & row<=2", "Row of permeability tensor to output");
params.addRangeCheckedParam<unsigned int>(
"column", 0, "column>=0 & column<=2", "Column of permeability tensor to output");
params.addClassDescription("AuxKernel to provide access to properties evaluated at quadpoints. "
"Note that elemental AuxVariables must be used, so that these "
"properties are integrated over each element.");
@@ -47,7 +51,9 @@ PorousFlowPropertyAux::PorousFlowPropertyAux(const InputParameters & parameters)
_gas_phase(getParam<unsigned int>("gas_phase")),
_fluid_component(getParam<unsigned int>("fluid_component")),
_secondary_species(getParam<unsigned int>("secondary_species")),
_mineral_species(getParam<unsigned int>("mineral_species"))
_mineral_species(getParam<unsigned int>("mineral_species")),
_k_row(getParam<unsigned int>("row")),
_k_col(getParam<unsigned int>("column"))
{
// Check that the phase and fluid_component are valid
if (_phase >= _dictator.numPhases())
@@ -151,6 +157,14 @@ PorousFlowPropertyAux::PorousFlowPropertyAux(const InputParameters & parameters)
_mineral_reaction_rate =
&getMaterialProperty<std::vector<Real>>("PorousFlow_mineral_reaction_rate_qp");
break;

case PropertyEnum::POROSITY:
_porosity = &getMaterialProperty<Real>("PorousFlow_porosity_qp");
break;

case PropertyEnum::PERMEABILITY:
_permeability = &getMaterialProperty<RealTensorValue>("PorousFlow_permeability_qp");
break;
}
}

@@ -212,6 +226,14 @@ PorousFlowPropertyAux::computeValue()
case PropertyEnum::MINERAL_REACTION_RATE:
property = (*_mineral_reaction_rate)[_qp][_mineral_species];
break;

case PropertyEnum::POROSITY:
property = (*_porosity)[_qp];
break;

case PropertyEnum::PERMEABILITY:
property = (*_permeability)[_qp](_k_row, _k_col);
break;
}

return property;
@@ -54,6 +54,7 @@ PorousFlowDependencies::PorousFlowDependencies()
_deps.insertDependency("PorousFlowPropertyAux", "relative_permeability_qp");
_deps.insertDependency("PorousFlowPropertyAux", "chemistry_qp");
_deps.insertDependency("PorousFlowPropertyAux", "mineral_qp");
_deps.insertDependency("PorousFlowPropertyAux", "porosity_qp");

// BC dependencies
_deps.insertDependency("PorousFlowHalfCubicSink", "PorousFlowSink");
@@ -38,8 +38,8 @@
variable = mineral
[../]
[./porosity]
type = MaterialRealAux
property = PorousFlow_porosity_qp
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
@@ -38,8 +38,8 @@
variable = mineral
[../]
[./porosity]
type = MaterialRealAux
property = PorousFlow_porosity_qp
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
@@ -35,8 +35,8 @@
variable = mineral
[../]
[./porosity]
type = MaterialRealAux
property = PorousFlow_porosity_qp
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
@@ -80,8 +80,8 @@
variable = mineral
[../]
[./porosity]
type = MaterialRealAux
property = PorousFlow_porosity_qp
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
@@ -258,8 +258,8 @@
index_j = 2
[../]
[./porosity]
type = MaterialRealAux
property = PorousFlow_porosity_qp
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
@@ -314,18 +314,6 @@
thermal_expansion_coeff = 0.25
solid_bulk = 2
[../]
[./porosity_qp]
type = PorousFlowPorosity
at_nodes = false
thermal = true
fluid = true
mechanical = true
ensure_positive = false
biot_coefficient = 1.0
porosity_zero = 0.5
thermal_expansion_coeff = 0.25
solid_bulk = 2
[../]
[./rock_heat]
type = PorousFlowMatrixInternalEnergy
at_nodes = true
@@ -158,8 +158,8 @@

[AuxKernels]
[./porosity]
type = MaterialRealAux
property = PorousFlow_porosity_qp
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
@@ -117,8 +117,8 @@

[AuxKernels]
[./porosity]
type = MaterialRealAux
property = PorousFlow_porosity_qp
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
@@ -142,27 +142,13 @@
fluid = true
mechanical = true
ensure_positive = false
at_nodes = true
biot_coefficient = 1.0
porosity_zero = 0.5
thermal_expansion_coeff = 0.25
solid_bulk = 2
[../]
[./porosity_qp]
type = PorousFlowPorosity
at_nodes = false
thermal = true
fluid = true
mechanical = true
ensure_positive = false
porosity_zero = 0.5
biot_coefficient = 1.0
thermal_expansion_coeff = 0.25
solid_bulk = 2
[../]
[./rock_heat]
type = PorousFlowMatrixInternalEnergy
at_nodes = true
specific_heat_capacity = 0.2
density = 5.0
[../]
@@ -154,8 +154,8 @@

[AuxKernels]
[./porosity]
type = MaterialRealAux
property = PorousFlow_porosity_qp
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
Oops, something went wrong.

0 comments on commit 1411bc3

Please sign in to comment.
You can’t perform that action at this time.