- PorousFlowDictatorThe UserObject that holds the list of PorousFlow variable names
C++ Type:UserObjectName
Description:The UserObject that holds the list of PorousFlow variable names
- porosity_zeroThe porosity at zero volumetric strain and reference temperature and reference effective porepressure and reference chemistry. This must be a real number or a constant monomial variable (not a linear lagrange or other type of variable)
C++ Type:std::vector
Description:The porosity at zero volumetric strain and reference temperature and reference effective porepressure and reference chemistry. This must be a real number or a constant monomial variable (not a linear lagrange or other type of variable)
PorousFlowPorosity
This Material calculates the porosity PorousFlow simulations
This Material computes porosity (at the nodes or quadpoints, depending on the at_nodes
flag): (1) A full description is provided in the porosity documentation
Flags provided to PorousFlowPorosity
control its evolution.
If
mechanical = true
then the porosity will depend on . Otherwise that term in Eq. (1) is ignored.If
fluid = true
then the porosity will depend on . Otherwise that term in Eq. (1) is ignored.If
thermal = true
then the porosity will depend on . Otherwise that term in Eq. (1) is ignored.If
chemical = true
then porosity will depend on . Otherwise that term in Eq. (1) is ignored.
Input Parameters
- at_nodesFalseEvaluate Material properties at nodes instead of quadpoints
Default:False
C++ Type:bool
Options:
Description:Evaluate Material properties at nodes instead of quadpoints
- biot_coefficient1Biot coefficient
Default:1
C++ Type:double
Options:
Description:Biot coefficient
- blockThe list of block ids (SubdomainID) that this object will be applied
C++ Type:std::vector
Options:
Description:The list of block ids (SubdomainID) that this object will be applied
- boundaryThe list of boundary IDs from the mesh where this boundary condition applies
C++ Type:std::vector
Options:
Description:The list of boundary IDs from the mesh where this boundary condition applies
- chemicalFalseIf true, porosity will be a function of precipitate
Default:False
C++ Type:bool
Options:
Description:If true, porosity will be a function of precipitate
- chemical_weightsWhen chemical=true, porosity is a linear combination of the solid mineral concentrations multiplied by these weights. Default=1 for all minerals.
C++ Type:std::vector
Options:
Description:When chemical=true, porosity is a linear combination of the solid mineral concentrations multiplied by these weights. Default=1 for all minerals.
- computeTrueWhen false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the MaterialBase via MaterialBasePropertyInterface::getMaterialBase(). Non-computed MaterialBases are not sorted for dependencies.
Default:True
C++ Type:bool
Options:
Description:When false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the MaterialBase via MaterialBasePropertyInterface::getMaterialBase(). Non-computed MaterialBases are not sorted for dependencies.
- constant_onNONEWhen ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeSubdomainProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped
Default:NONE
C++ Type:MooseEnum
Options:NONE ELEMENT SUBDOMAIN
Description:When ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeSubdomainProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped
- ensure_positiveTrueModify the usual exponential relationships that governs porosity so that porosity is always positive
Default:True
C++ Type:bool
Options:
Description:Modify the usual exponential relationships that governs porosity so that porosity is always positive
- fluidFalseIf true, porosity will be a function of effective porepressure
Default:False
C++ Type:bool
Options:
Description:If true, porosity will be a function of effective porepressure
- initial_mineral_concentrationsInitial mineral concentrations (m^3(precipitate)/m^3(porous material)), entered as a vector (one value per mineral). (Only used if chemical=true)
C++ Type:std::vector
Options:
Description:Initial mineral concentrations (m^3(precipitate)/m^3(porous material)), entered as a vector (one value per mineral). (Only used if chemical=true)
- mechanicalFalseIf true, porosity will be a function of total volumetric strain
Default:False
C++ Type:bool
Options:
Description:If true, porosity will be a function of total volumetric strain
- reference_chemistryReference values of the solid mineral concentrations (m^3(precipitate)/m^3(porous material)), entered as a vector (one value per mineral). (Only used if chemical=true)
C++ Type:std::vector
Options:
Description:Reference values of the solid mineral concentrations (m^3(precipitate)/m^3(porous material)), entered as a vector (one value per mineral). (Only used if chemical=true)
- reference_porepressureReference porepressure (only used if fluid=true)
C++ Type:std::vector
Options:
Description:Reference porepressure (only used if fluid=true)
- reference_temperatureReference temperature (only used if thermal=true)
C++ Type:std::vector
Options:
Description:Reference temperature (only used if thermal=true)
- solid_bulkBulk modulus of the drained porous solid skeleton (only used if fluid=true)
C++ Type:double
Options:
Description:Bulk modulus of the drained porous solid skeleton (only used if fluid=true)
- strain_at_nearest_qpFalseWhen calculating nodal porosity that depends on strain, use the strain at the nearest quadpoint. This adds a small extra computational burden, and is not necessary for simulations involving only linear lagrange elements. If you set this to true, you will also want to set the same parameter to true for related Kernels and Materials
Default:False
C++ Type:bool
Options:
Description:When calculating nodal porosity that depends on strain, use the strain at the nearest quadpoint. This adds a small extra computational burden, and is not necessary for simulations involving only linear lagrange elements. If you set this to true, you will also want to set the same parameter to true for related Kernels and Materials
- thermalFalseIf true, porosity will be a function of temperature
Default:False
C++ Type:bool
Options:
Description:If true, porosity will be a function of temperature
- thermal_expansion_coeffVolumetric thermal expansion coefficient of the drained porous solid skeleton (only used if thermal=true)
C++ Type:double
Options:
Description:Volumetric thermal expansion coefficient of the drained porous solid skeleton (only used if thermal=true)
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector
Options:
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Options:
Description:Set the enabled status of the MooseObject.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Options:
Description:Determines whether this object is calculated using an implicit or explicit form
- seed0The seed for the master random number generator
Default:0
C++ Type:unsigned int
Options:
Description:The seed for the master random number generator
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Options:
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
- output_propertiesList of material properties, from this material, to output (outputs must also be defined to an output type)
C++ Type:std::vector
Options:
Description:List of material properties, from this material, to output (outputs must also be defined to an output type)
- outputsnone Vector of output names were you would like to restrict the output of variables(s) associated with this object
Default:none
C++ Type:std::vector
Options:
Description:Vector of output names were you would like to restrict the output of variables(s) associated with this object
Outputs Parameters
Input Files
- modules/porous_flow/test/tests/poroperm/PermFromPoro04.i
- modules/porous_flow/test/tests/jacobian/chem11.i
- modules/porous_flow/test/tests/chemistry/except12.i
- modules/porous_flow/test/tests/actions/basicthm_hm.i
- modules/porous_flow/test/tests/jacobian/chem10.i
- modules/porous_flow/test/tests/chemistry/except19.i
- modules/porous_flow/test/tests/poroperm/PermTensorFromVar01.i
- modules/porous_flow/test/tests/jacobian/denergy04.i
- modules/porous_flow/test/tests/poroperm/PermFromPoro01.i
- modules/porous_flow/examples/tutorial/06_KT.i
- modules/porous_flow/examples/tutorial/05.i
- modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D_trimesh.i
- modules/porous_flow/test/tests/actions/basicthm_th.i
- modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D.i
- modules/porous_flow/test/tests/jacobian/basic_advection5.i
- modules/porous_flow/test/tests/poroperm/except1.i
- modules/porous_flow/examples/coal_mining/fine_with_fluid.i
- modules/porous_flow/examples/tutorial/11_2D.i
- modules/porous_flow/test/tests/jacobian/mass10.i
- modules/porous_flow/test/tests/jacobian/mass08.i
- modules/porous_flow/test/tests/numerical_diffusion/pffltvd.i
- modules/porous_flow/test/tests/energy_conservation/heat04_fullysat_action.i
- modules/porous_flow/test/tests/energy_conservation/heat02.i
- modules/porous_flow/test/tests/jacobian/mass_vol_exp02.i
- modules/porous_flow/test/tests/jacobian/denergy02.i
- modules/porous_flow/test/tests/jacobian/basic_advection6.i
- modules/porous_flow/test/tests/energy_conservation/heat04_action_KT.i
- modules/porous_flow/test/tests/dirackernels/strain_at_nearest_qp.i
- modules/porous_flow/test/tests/chemistry/except15.i
- modules/porous_flow/test/tests/energy_conservation/heat04_action.i
- modules/porous_flow/test/tests/energy_conservation/except01.i
- modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_1D.i
- modules/porous_flow/test/tests/energy_conservation/heat04.i
- modules/porous_flow/test/tests/chemistry/except10.i
- modules/porous_flow/test/tests/energy_conservation/heat05.i
- modules/porous_flow/examples/tutorial/01.i
- modules/porous_flow/test/tests/dirackernels/injection_with_plasticity.i
- modules/porous_flow/examples/tutorial/11.i
- modules/porous_flow/test/tests/actions/basicthm_h.i
- modules/porous_flow/test/tests/heterogeneous_materials/vol_expansion_poroperm.i
- modules/porous_flow/test/tests/jacobian/chem14.i
- modules/porous_flow/test/tests/jacobian/chem02.i
- modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_3D.i
- modules/porous_flow/test/tests/energy_conservation/heat01.i
- modules/porous_flow/test/tests/chemistry/except22.i
- modules/porous_flow/test/tests/jacobian/chem12.i
- modules/porous_flow/test/tests/numerical_diffusion/fully_saturated_action.i
- modules/porous_flow/examples/tutorial/10.i
- modules/porous_flow/test/tests/sinks/PorousFlowPiecewiseLinearSink_BC_eg1.i
- modules/porous_flow/test/tests/poroperm/PermFromPoro02.i
- modules/porous_flow/examples/tutorial/07.i
- modules/porous_flow/test/tests/jacobian/phe01.i
- modules/porous_flow/test/tests/energy_conservation/except02.i
- modules/porous_flow/test/tests/poroperm/PermFromPoro03.i
- modules/porous_flow/test/tests/chemistry/except14.i
- modules/porous_flow/test/tests/poroperm/PermFromPoro05.i
- modules/porous_flow/test/tests/poro_elasticity/pp_generation_action.i
- modules/porous_flow/examples/tutorial/03.i
- modules/porous_flow/test/tests/jacobian/chem13.i
- modules/porous_flow/test/tests/jacobian/denergy05.i
- modules/porous_flow/test/tests/jacobian/heat_vol_exp01.i
- modules/porous_flow/test/tests/jacobian/chem09.i
- modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_1D_adaptivity.i
- modules/porous_flow/test/tests/numerical_diffusion/no_action.i
- modules/porous_flow/test/tests/chemistry/except9.i
- modules/porous_flow/examples/tutorial/06.i
- modules/porous_flow/test/tests/jacobian/fflux08.i
- modules/porous_flow/examples/coal_mining/coarse_with_fluid.i
- modules/porous_flow/examples/tutorial/05_tabulated.i
- modules/porous_flow/test/tests/poroperm/poro_hm.i
- modules/porous_flow/test/tests/chemistry/except8.i
- modules/porous_flow/test/tests/chemistry/precipitation_porosity_change.i
- modules/porous_flow/test/tests/jacobian/chem07.i
- modules/porous_flow/test/tests/poro_elasticity/mandel.i
- modules/porous_flow/test/tests/chemistry/except11.i
- modules/porous_flow/test/tests/poroperm/poro_thm.i
- modules/porous_flow/test/tests/recover/pffltvd.i
- modules/porous_flow/test/tests/chemistry/except18.i
- modules/porous_flow/test/tests/chemistry/except20.i
- modules/porous_flow/test/tests/poroperm/except2.i
- modules/porous_flow/test/tests/poro_elasticity/terzaghi.i
- modules/porous_flow/test/tests/jacobian/chem04.i
- modules/porous_flow/test/tests/jacobian/chem03.i
- modules/porous_flow/test/tests/pressure_pulse/pressure_pulse_1d_adaptivity.i
- modules/porous_flow/test/tests/jacobian/denergy03.i
- modules/porous_flow/test/tests/poroperm/poro_tm.i
- modules/porous_flow/test/tests/jacobian/desorped_mass_vol_exp01.i
- modules/porous_flow/examples/tutorial/04.i
- modules/porous_flow/test/tests/poroperm/PermTensorFromVar03.i
- modules/porous_flow/test/tests/energy_conservation/heat03.i
- modules/porous_flow/examples/tutorial/08.i
- modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined.i
- modules/porous_flow/test/tests/actions/basicthm_thm.i
- modules/porous_flow/test/tests/jacobian/desorped_mass01.i
- modules/porous_flow/test/tests/poroperm/PermTensorFromVar02.i
- modules/porous_flow/test/tests/jacobian/chem15.i
- modules/porous_flow/test/tests/jacobian/chem01.i
- modules/porous_flow/test/tests/chemistry/except13.i
- modules/porous_flow/test/tests/jacobian/chem06.i
- modules/porous_flow/test/tests/jacobian/chem05.i
- modules/porous_flow/test/tests/chemistry/except16.i
- modules/porous_flow/test/tests/poro_elasticity/pp_generation.i
- modules/porous_flow/test/tests/poro_elasticity/vol_expansion_poroperm.i
- modules/porous_flow/examples/tutorial/08_KT.i
- modules/porous_flow/test/tests/jacobian/chem08.i
- modules/porous_flow/test/tests/numerical_diffusion/pffltvd_action.i
- modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D_angle.i
- modules/porous_flow/test/tests/poro_elasticity/pp_generation_fullysat_action.i
modules/porous_flow/test/tests/poroperm/PermFromPoro04.i
# Testing permeability from porosity
# Trivial test, checking calculated permeability is correct
# k = k_anisotropic * k
# with log k = A * phi + B
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Kernels]
[./flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[../]
[]
[BCs]
[./ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[../]
[./pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[../]
[]
[AuxVariables]
[./poro]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_x]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_y]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_z]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./poro]
type = PorousFlowPropertyAux
property = porosity
variable = poro
[../]
[./perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[../]
[./perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[../]
[./perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[../]
[]
[Postprocessors]
[./perm_x_bottom]
type = PointValue
variable = perm_x
point = '0 0 0'
[../]
[./perm_y_bottom]
type = PointValue
variable = perm_y
point = '0 0 0'
[../]
[./perm_z_bottom]
type = PointValue
variable = perm_z
point = '0 0 0'
[../]
[./perm_x_top]
type = PointValue
variable = perm_x
point = '3 0 0'
[../]
[./perm_y_top]
type = PointValue
variable = perm_y
point = '3 0 0'
[../]
[./perm_z_top]
type = PointValue
variable = perm_z
point = '3 0 0'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2.2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[../]
[./permeability]
type = PorousFlowPermeabilityExponential
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
poroperm_function = log_k
A = 4.342945
B = -8
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
modules/porous_flow/test/tests/jacobian/chem11.i
# PorousFlowPreDis, which is essentially checking the derivatives of the secondary concentrations in PorousFlowMassFractionAqueousPreDisChemistry
# Dissolution with temperature, with three primary variables and four reactions
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
initial_condition = 0.05
[../]
[./b]
initial_condition = 0.1
[../]
[./c]
initial_condition = 0.15
[../]
[./temp]
initial_condition = 0.5
[../]
[]
[AuxVariables]
[./eqm_k0]
initial_condition = 0.1
[../]
[./eqm_k1]
initial_condition = 0.2
[../]
[./eqm_k2]
initial_condition = -0.2
[../]
[./eqm_k3]
initial_condition = 0.0
[../]
[./ini_sec_conc0]
initial_condition = 0.02
[../]
[./ini_sec_conc1]
initial_condition = 0.04
[../]
[./ini_sec_conc2]
initial_condition = 0.06
[../]
[./ini_sec_conc3]
initial_condition = 0.08
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowPreDis
variable = a
mineral_density = '1E10 2E10 3E10 4E10'
stoichiometry = '1 1 2 0.1'
[../]
[./b]
type = PorousFlowPreDis
variable = b
mineral_density = '1.1E10 2.2E10 3.3E10 4.4E10'
stoichiometry = '2 2 0.1 0.5'
[../]
[./c]
type = PorousFlowPreDis
variable = c
mineral_density = '0.1E10 0.2E10 0.3E10 0.4E10'
stoichiometry = '3 3 0.1 1'
[../]
[./temp]
type = Diffusion
variable = temp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b c temp'
number_fluid_phases = 1
number_fluid_components = 4
number_aqueous_kinetic = 4
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.9
[../]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b c'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b c'
num_reactions = 4
equilibrium_constants_as_log10 = true
equilibrium_constants = 'eqm_k0 eqm_k1 eqm_k2 eqm_k3'
primary_activity_coefficients = '0.5 0.8 0.9'
reactions = '1 2 3
1 -2 -3
2 0.1 0.1
0.1 0.5 1'
specific_reactive_surface_area = '-44.4E-2 22.1E-2 32.1E-1 -50E-2'
kinetic_rate_constant = '0.678 0.999 1.23 0.3'
activation_energy = '4.4 3.3 4.5 4.0'
molar_volume = '3.3 4.4 5.5 6.6'
reference_temperature = 1
gas_constant = 7.4
theta_exponent = '1.0 1.1 1.2 0.9'
eta_exponent = '1.2 1.01 1.1 1.2'
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = 'ini_sec_conc0 ini_sec_conc1 ini_sec_conc2 ini_sec_conc3'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 0.1
[]
[Preconditioning]
[./check]
type = SMP
full = true
petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
modules/porous_flow/test/tests/chemistry/except12.i
# Exception test.
# Incorrect number of theta exponents
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = Diffusion
variable = a
[../]
[./b]
type = Diffusion
variable = b
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1E-6
[../]
[./pressure]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '1 1'
reactions = '1 1'
specific_reactive_surface_area = 1.0
kinetic_rate_constant = 1.0e-8
activation_energy = 1.5e4
molar_volume = 1
theta_exponent = '1 1'
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[]
modules/porous_flow/test/tests/actions/basicthm_hm.i
# PorousFlowBasicTHM action with coupling_type = HydroMechanicalGenerator
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 3
xmax = 10
ymax = 3
[]
[./aquifer]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 1 0'
top_right = '10 2 0'
[../]
[./injection_area]
type = SideSetsAroundSubdomainGenerator
block = 1
new_boundary = 'injection_area'
normal = '-1 0 0'
input = 'aquifer'
[../]
[./outflow_area]
type = SideSetsAroundSubdomainGenerator
block = 1
new_boundary = 'outflow_area'
normal = '1 0 0'
input = 'injection_area'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caprock aquifer'
input = 'outflow_area'
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y'
biot_coefficient = 1.0
[]
[Variables]
[./porepressure]
initial_condition = 1e6
[../]
[./disp_x]
scaling = 1e-10
[../]
[./disp_y]
scaling = 1e-10
[../]
[]
[AuxVariables]
[./temperature]
initial_condition = 293
[../]
[]
[PorousFlowBasicTHM]
porepressure = porepressure
temperature = temperature
coupling_type = HydroMechanical
gravity = '0 0 0'
fp = simple_fluid
use_displaced_mesh = false
add_stress_aux = false
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1.5e6
boundary = injection_area
[../]
[./constant_outflow_porepressure]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = outflow_area
pt_vals = '0 1e9'
multipliers = '0 1e9'
flux_function = 1e-6
PT_shift = 1e6
[../]
[./top_bottom]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'top bottom'
[../]
[./right]
type = DirichletBC
variable = disp_x
value = 0
boundary = right
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./biot_modulus]
type = PorousFlowConstantBiotModulus
solid_bulk_compliance = 2e-7
fluid_bulk_modulus = 1e7
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1e-13 0 0 0 1e-13 0 0 0 1e-13'
[../]
[./permeability_caprock]
type = PorousFlowPermeabilityConst
block = caprock
permeability = '1e-15 0 0 0 1e-15 0 0 0 1e-15'
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 5e9
poissons_ratio = 0.0
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Preconditioning]
[./basic]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1e4
dt = 1e3
nl_abs_tol = 1e-14
nl_rel_tol = 1e-14
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/jacobian/chem10.i
# PorousFlowPreDis, which is essentially checking the derivatives of the secondary concentrations in PorousFlowMassFractionAqueousPreDisChemistry
# Dissolution with temperature, with two primary variables = 0
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
initial_condition = 0.0
[../]
[./b]
initial_condition = 0.0
[../]
[./temp]
initial_condition = 0.5
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1.234
[../]
[./ini_sec_conc]
initial_condition = 0.222
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowPreDis
variable = a
mineral_density = 1E5
stoichiometry = 2
[../]
[./b]
type = PorousFlowPreDis
variable = b
mineral_density = 2.2E5
stoichiometry = 3
[../]
[./temp]
type = Diffusion
variable = temp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b temp'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.9
[../]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '0.5 0.8'
reactions = '1 3'
specific_reactive_surface_area = -44.4E-2
kinetic_rate_constant = 0.678
activation_energy = 4.4
molar_volume = 3.3
reference_temperature = 1
gas_constant = 7.4
theta_exponent = 1.0
eta_exponent = 1.2
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = ini_sec_conc
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 0.1
[]
[Preconditioning]
[./check]
type = SMP
full = true
petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
modules/porous_flow/test/tests/chemistry/except19.i
# Exception test
# No initial_mineral_concentrations
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 0.5
[../]
[./a]
initial_condition = 0.5
[../]
[./ini_mineral_conc]
initial_condition = 0.2
[../]
[./mineral]
family = MONOMIAL
order = CONSTANT
[../]
[./porosity]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./mineral]
type = PorousFlowPropertyAux
property = mineral_concentration
mineral_species = 0
variable = mineral
[../]
[./porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./dummy]
type = Diffusion
variable = dummy
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = dummy
number_fluid_phases = 1
number_fluid_components = 2
number_aqueous_kinetic = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[Materials]
[./temperature_qp]
type = PorousFlowTemperature
temperature = 1
[../]
[./predis_qp]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = a
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = 2
reactions = 1
specific_reactive_surface_area = 0.5
kinetic_rate_constant = 0.6065306597126334
activation_energy = 3
molar_volume = 2
gas_constant = 6
reference_temperature = 0.5
[../]
[./mineral_conc_qp]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = ini_mineral_conc
[../]
[./porosity]
type = PorousFlowPorosity
chemical = true
porosity_zero = 0.6
reference_chemistry = ini_mineral_conc
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
nl_abs_tol = 1E-10
dt = 0.1
end_time = 0.4
[]
[Postprocessors]
[./porosity]
type = PointValue
point = '0 0 0'
variable = porosity
[../]
[./c]
type = PointValue
point = '0 0 0'
variable = mineral
[../]
[]
[Outputs]
csv = true
perf_graph = true
[]
modules/porous_flow/test/tests/poroperm/PermTensorFromVar01.i
# Testing permeability calculated from scalar and tensor
# Trivial test, checking calculated permeability is correct
# k = k_anisotropy * perm
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Kernels]
[./flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[../]
[]
[BCs]
[./ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[../]
[./pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[../]
[]
[AuxVariables]
[./perm_var]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_x]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_y]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_z]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./perm_var]
type = ConstantAux
value = 2
variable = perm_var
[../]
[./perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[../]
[./perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[../]
[./perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[../]
[]
[Postprocessors]
[./perm_x_left]
type = PointValue
variable = perm_x
point = '0.5 0 0'
[../]
[./perm_y_left]
type = PointValue
variable = perm_y
point = '0.5 0 0'
[../]
[./perm_z_left]
type = PointValue
variable = perm_z
point = '0.5 0 0'
[../]
[./perm_x_right]
type = PointValue
variable = perm_x
point = '2.5 0 0'
[../]
[./perm_y_right]
type = PointValue
variable = perm_y
point = '2.5 0 0'
[../]
[./perm_z_right]
type = PointValue
variable = perm_z
point = '2.5 0 0'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[Materials]
[./permeability]
type = PorousFlowPermeabilityTensorFromVar
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
perm = perm_var
[../]
[./temperature]
type = PorousFlowTemperature
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
modules/porous_flow/test/tests/jacobian/denergy04.i
# 2phase, 1 component, with solid displacements, time derivative of energy-density, THM porosity
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./pgas]
[../]
[./pwater]
[../]
[./temp]
[../]
[]
[ICs]
[./disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[../]
[./disp_y]
type = RandomIC
variable = disp_y
min = -0.1
max = 0.1
[../]
[./disp_z]
type = RandomIC
variable = disp_z
min = -0.1
max = 0.1
[../]
[./pgas]
type = RandomIC
variable = pgas
max = 1.0
min = 0.0
[../]
[./pwater]
type = RandomIC
variable = pwater
max = 0.0
min = -1.0
[../]
[./temp]
type = RandomIC
variable = temp
max = 1.0
min = 0.0
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./dummy_pgas]
type = Diffusion
variable = pgas
[../]
[./dummy_pwater]
type = Diffusion
variable = pwater
[../]
[./energy_dot]
type = PorousFlowEnergyTimeDerivative
variable = temp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas temp pwater disp_x disp_y disp_z'
number_fluid_phases = 2
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
cv = 1.3
[../]
[./simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
cv = 0.7
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5 0.75'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*0.75/3 = 1
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
thermal = true
ensure_positive = false
porosity_zero = 0.7
thermal_expansion_coeff = 0.7
biot_coefficient = 0.9
solid_bulk = 1
[../]
[./p_eff]
type = PorousFlowEffectiveFluidPressure
[../]
[./rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1.1
density = 0.5
[../]
[./ppss]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = pgas
capillary_pressure = pc
[../]
[./simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[../]
[./simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[../]
[]
[Preconditioning]
active = check
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[../]
[./check]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
modules/porous_flow/test/tests/poroperm/PermFromPoro01.i
# Testing permeability from porosity
# Trivial test, checking calculated permeability is correct
# k = k_anisotropic * f * d^2 * phi^n / (1-phi)^m
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Kernels]
[./flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[../]
[]
[BCs]
[./ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[../]
[./pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[../]
[]
[AuxVariables]
[./poro]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_x]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_y]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_z]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./poro]
type = PorousFlowPropertyAux
property = porosity
variable = poro
[../]
[./perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[../]
[./perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[../]
[./perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[../]
[]
[Postprocessors]
[./perm_x_bottom]
type = PointValue
variable = perm_x
point = '0 0 0'
[../]
[./perm_y_bottom]
type = PointValue
variable = perm_y
point = '0 0 0'
[../]
[./perm_z_bottom]
type = PointValue
variable = perm_z
point = '0 0 0'
[../]
[./perm_x_top]
type = PointValue
variable = perm_x
point = '3 0 0'
[../]
[./perm_y_top]
type = PointValue
variable = perm_y
point = '3 0 0'
[../]
[./perm_z_top]
type = PointValue
variable = perm_z
point = '3 0 0'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2.2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[../]
[../]
[]
[Materials]
[./permeability]
type = PorousFlowPermeabilityKozenyCarman
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
poroperm_function = kozeny_carman_fd2
f = 0.1
d = 5
m = 2
n = 7
[../]
[./temperature]
type = PorousFlowTemperature
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
modules/porous_flow/examples/tutorial/06_KT.i
# Darcy flow with a tracer
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[./make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[../]
[./shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[../]
[./aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[../]
[./injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomain_ids = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caps aquifer'
input = 'injection_area'
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./porepressure]
[../]
[./tracer_concentration]
[../]
[]
[ICs]
[./tracer_concentration]
type = FunctionIC
function = '0.5*if(x*x+y*y<1.01,1,0)'
variable = tracer_concentration
[../]
[]
[PorousFlowFullySaturated]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
mass_fraction_vars = tracer_concentration
stabilization = KT
flux_limiter_type = superbee
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1E6
boundary = injection_area
[../]
[./constant_outer_porepressure]
type = DirichletBC
variable = porepressure
value = 0
boundary = rmax
[../]
[./injected_tracer]
type = DirichletBC
variable = tracer_concentration
value = 0.5
boundary = injection_area
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[../]
[./permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_rel_tol = 1E-14
[]
[Outputs]
exodus = true
[]
modules/porous_flow/examples/tutorial/05.i
# Darcy flow with heat advection and conduction, using Water97 properties
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[./make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[../]
[./shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[../]
[./aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[../]
[./injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomain_ids = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caps aquifer'
input = 'injection_area'
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./porepressure]
initial_condition = 1E6
[../]
[./temperature]
initial_condition = 313
scaling = 1E-8
[../]
[]
[PorousFlowBasicTHM]
porepressure = porepressure
temperature = temperature
coupling_type = ThermoHydro
gravity = '0 0 0'
fp = the_simple_fluid
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 2E6
boundary = injection_area
[../]
[./constant_injection_temperature]
type = DirichletBC
variable = temperature
value = 333
boundary = injection_area
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = Water97FluidProperties
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.8
solid_bulk_compliance = 2E-7
fluid_bulk_modulus = 1E7
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[../]
[./permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[../]
[./thermal_expansion]
type = PorousFlowConstantThermalExpansionCoefficient
biot_coefficient = 0.8
drained_coefficient = 0.003
fluid_coefficient = 0.0002
[../]
[./rock_internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[../]
[./thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '10 0 0 0 10 0 0 0 10'
block = 'caps aquifer'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-10
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D_trimesh.i
# Using flux-limited TVD advection ala Kuzmin and Turek, mploying PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 2D version
[Mesh]
type = FileMesh
file = trimesh.msh
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
block = '50'
[]
[Variables]
[./porepressure]
[../]
[./tracer]
[../]
[]
[ICs]
[./porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[../]
[./tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.305,0,1))'
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[../]
[./flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[../]
[./mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[../]
[./flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[../]
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[../]
[./no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[../]
[./remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[../]
[./remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[../]
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[../]
[./pc]
type = PorousFlowCapillaryPressureConst
[../]
[./advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[../]
[./advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[../]
[./relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[VectorPostprocessors]
[./tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0.04 0'
num_points = 101
sort_by = x
variable = tracer
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
print_linear_residuals = false
[./out]
type = CSV
execute_on = final
[../]
[]
modules/porous_flow/test/tests/actions/basicthm_th.i
# PorousFlowBasicTHM action with coupling_type = ThermoHydroGenerator
# (no mechanical effects)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 3
xmax = 10
ymax = 3
[]
[./aquifer]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 1 0'
top_right = '10 2 0'
[../]
[./injection_area]
type = SideSetsAroundSubdomainGenerator
block = 1
new_boundary = 'injection_area'
normal = '-1 0 0'
input = 'aquifer'
[../]
[./outflow_area]
type = SideSetsAroundSubdomainGenerator
block = 1
new_boundary = 'outflow_area'
normal = '1 0 0'
input = 'injection_area'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caprock aquifer'
input = 'outflow_area'
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./porepressure]
initial_condition = 1e6
[../]
[./temperature]
initial_condition = 293
scaling = 1e-6
[../]
[]
[PorousFlowBasicTHM]
porepressure = porepressure
temperature = temperature
coupling_type = ThermoHydro
gravity = '0 0 0'
fp = simple_fluid
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1.5e6
boundary = injection_area
[../]
[./constant_injection_temperature]
type = DirichletBC
variable = temperature
value = 313
boundary = injection_area
[../]
[./constant_outflow_porepressure]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = outflow_area
pt_vals = '0 1e9'
multipliers = '0 1e9'
flux_function = 1e-6
PT_shift = 1e6
[../]
[./constant_outflow_temperature]
type = DirichletBC
variable = temperature
value = 293
boundary = outflow_area
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.8
solid_bulk_compliance = 2e-7
fluid_bulk_modulus = 1e7
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1e-13 0 0 0 1e-13 0 0 0 1e-13'
[../]
[./permeability_caprock]
type = PorousFlowPermeabilityConst
block = caprock
permeability = '1e-15 0 0 0 1e-15 0 0 0 1e-15'
[../]
[./thermal_expansion]
type = PorousFlowConstantThermalExpansionCoefficient
biot_coefficient = 0.8
drained_coefficient = 0.003
fluid_coefficient = 0.0002
[../]
[./rock_internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[../]
[./thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '10 0 0 0 10 0 0 0 10'
block = 'caprock aquifer'
[../]
[]
[Preconditioning]
[./basic]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1e4
dt = 1e3
nl_abs_tol = 1e-15
nl_rel_tol = 1e-14
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D.i
# Using flux-limited TVD advection ala Kuzmin and Turek, employing PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 3D version
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
xmin = 0
xmax = 1
ny = 4
ymin = 0
ymax = 0.5
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[./porepressure]
[../]
[./tracer]
[../]
[]
[ICs]
[./porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[../]
[./tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[../]
[./flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[../]
[./mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[../]
[./flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[../]
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[../]
[./no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[../]
[./remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[../]
[./remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[../]
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[../]
[./pc]
type = PorousFlowCapillaryPressureConst
[../]
[./advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[../]
[./advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[../]
[./relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[VectorPostprocessors]
[./tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0.5 0'
num_points = 11
sort_by = x
variable = tracer
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[./out]
type = CSV
execute_on = final
[../]
[]
modules/porous_flow/test/tests/jacobian/basic_advection5.i
# Basic advection with 1 porepressure as a PorousFlow variable
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./u]
[../]
[./P]
[../]
[]
[ICs]
[./P]
type = RandomIC
variable = P
min = -1
max = 1
[../]
[./u]
type = RandomIC
variable = u
[../]
[]
[Kernels]
[./dummy_P]
type = NullKernel
variable = P
[../]
[./u_advection]
type = PorousFlowBasicAdvection
variable = u
phase = 0
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = P
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
alpha = 1
m = 0.6
sat_lr = 0.1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 3
density0 = 4
thermal_expansion = 0
viscosity = 150.0
[../]
[../]
[]
[Materials]
[./temperature_qp]
type = PorousFlowTemperature
[../]
[./ppss_qp]
type = PorousFlow1PhaseP
porepressure = P
capillary_pressure = pc
[../]
[./simple_fluid_qp]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./effective_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
fluid = true
biot_coefficient = 0.5
solid_bulk = 1
[../]
[./permeability]
type = PorousFlowPermeabilityKozenyCarman
poroperm_function = kozeny_carman_phi0
k0 = 5
m = 2
n = 2
phi0 = 0.1
[../]
[./relperm_qp]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[./darcy_velocity_qp]
type = PorousFlowDarcyVelocityMaterial
gravity = '0.25 0 0'
[../]
[]
[Preconditioning]
[./check]
type = SMP
full = true
#petsc_options = '-snes_test_display'
petsc_options_iname = '-snes_type'
petsc_options_value = ' test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[]
modules/porous_flow/test/tests/poroperm/except1.i
# Exception test: thermal=true but no thermal_expansion_coeff provided
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
biot_coefficient = 0.7
[]
[Variables]
[./porepressure]
initial_condition = 2
[../]
[./temperature]
initial_condition = 4
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[ICs]
[./disp_x]
type = FunctionIC
function = '0.5 * x'
variable = disp_x
[../]
[]
[Kernels]
[./dummy_p]
type = TimeDerivative
variable = porepressure
[../]
[./dummy_t]
type = TimeDerivative
variable = temperature
[../]
[./dummy_x]
type = TimeDerivative
variable = disp_x
[../]
[./dummy_y]
type = TimeDerivative
variable = disp_y
[../]
[./dummy_z]
type = TimeDerivative
variable = disp_z
[../]
[]
[AuxVariables]
[./porosity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
[Postprocessors]
[./porosity]
type = PointValue
variable = porosity
point = '0 0 0'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure temperature'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureConst
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temperature
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./porosity]
type = PorousFlowPorosity
mechanical = true
fluid = true
thermal = true
ensure_positive = false
porosity_zero = 0.5
solid_bulk = 0.3
reference_porepressure = 3
reference_temperature = 3.5
[../]
[]
[Executioner]
solve_type = Newton
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
[]
modules/porous_flow/examples/coal_mining/fine_with_fluid.i
#################################################################
#
# NOTE:
# The mesh for this model is too large for the MOOSE repository
# so is kept in the the large_media submodule
#
#################################################################
#
# Strata deformation and fluid flow aaround a coal mine - 3D model
#
# A "half model" is used. The mine is 400m deep and
# just the roof is studied (-400<=z<=0). The mining panel
# sits between 0<=x<=150, and 0<=y<=1000, so this simulates
# a coal panel that is 300m wide and 1000m long. The outer boundaries
# are 1km from the excavation boundaries.
#
# The excavation takes 0.5 years.
#
# The boundary conditions for this simulation are:
# - disp_x = 0 at x=0 and x=1150
# - disp_y = 0 at y=-1000 and y=1000
# - disp_z = 0 at z=-400, but there is a time-dependent
# Young modulus that simulates excavation
# - wc_x = 0 at y=-1000 and y=1000
# - wc_y = 0 at x=0 and x=1150
# - no flow at x=0, z=-400 and z=0
# - fixed porepressure at y=-1000, y=1000 and x=1150
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# A single-phase unsaturated fluid is used.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa, and time units are measured in years.
#
# The initial porepressure is hydrostatic with P=0 at z=0, so
# Porepressure ~ - 0.01*z MPa, where the fluid has density 1E3 kg/m^3 and
# gravity = = 10 m.s^-2 = 1E-5 MPa m^2/kg.
# To be more accurate, i use
# Porepressure = -bulk * log(1 + g*rho0*z/bulk)
# where bulk=2E3 MPa and rho0=1Ee kg/m^3.
# The initial stress is consistent with the weight force from undrained
# density 2500 kg/m^3, and fluid porepressure, and a Biot coefficient of 0.7, ie,
# stress_zz^effective = 0.025*z + 0.7 * initial_porepressure
# The maximum and minimum principal horizontal effective stresses are
# assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 2 MPa
# MC friction angle = 35 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa
# WeakPlane cohesion = 0.1 MPa
# WeakPlane friction angle = 30 deg
# WeakPlane dilation angle = 10 deg
# WeakPlane tensile strength = 0.1 MPa
# WeakPlane compressive strength = 100 MPa softening to 1 MPa at strain = 1
# Fluid density at zero porepressure = 1E3 kg/m^3
# Fluid bulk modulus = 2E3 MPa
# Fluid viscosity = 1.1E-3 Pa.s = 1.1E-9 MPa.s = 3.5E-17 MPa.year
#
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
PorousFlowDictator = dictator
biot_coefficient = 0.7
[]
[Mesh]
[file]
type = FileMeshGenerator
file = fine.e
[]
[./xmin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = xmin
normal = '-1 0 0'
input = file
[../]
[./xmax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = xmax
normal = '1 0 0'
input = xmin
[../]
[./ymin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = ymin
normal = '0 -1 0'
input = xmax
[../]
[./ymax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = ymax
normal = '0 1 0'
input = ymin
[../]
[./zmax]
type = SideSetsAroundSubdomainGenerator
block = 30
new_boundary = zmax
normal = '0 0 1'
input = ymax
[../]
[./zmin]
type = SideSetsAroundSubdomainGenerator
block = 2
new_boundary = zmin
normal = '0 0 -1'
input = zmax
[../]
[./excav]
type = SubdomainBoundingBoxGenerator
input = zmin
block_id = 1
bottom_left = '0 0 -400'
top_right = '150 1000 -397'
[../]
[./roof]
type = SideSetsBetweenSubdomainsGenerator
master_block = 3
paired_block = 1
input = excav
new_boundary = roof
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[./wc_y]
[../]
[./porepressure]
scaling = 1E-5
[../]
[]
[ICs]
[./porepressure]
type = FunctionIC
variable = porepressure
function = ini_pp
[../]
[]
[Kernels]
[./cx_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_x
component = 0
[../]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./y_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_y
displacements = 'wc_x wc_y wc_z'
component = 1
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./y_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_y
component = 1
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[../]
[./poro_x]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_x
component = 0
[../]
[./poro_y]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./poro_z]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
component = 2
variable = disp_z
[../]
[./poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
use_displaced_mesh = false
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
variable = porepressure
fluid_component = 0
[../]
[./mass0]
type = PorousFlowMassTimeDerivative
use_displaced_mesh = false
fluid_component = 0
variable = porepressure
[../]
[./flux]
type = PorousFlowAdvectiveFlux
use_displaced_mesh = false
variable = porepressure
gravity = '0 0 -10E-6'
fluid_component = 0
[../]
[]
[AuxVariables]
[./saturation]
order = CONSTANT
family = MONOMIAL
[../]
[./darcy_x]
order = CONSTANT
family = MONOMIAL
[../]
[./darcy_y]
order = CONSTANT
family = MONOMIAL
[../]
[./darcy_z]
order = CONSTANT
family = MONOMIAL
[../]
[./porosity]
order = CONSTANT
family = MONOMIAL
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_yx]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_zy]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./saturation_water]
type = PorousFlowPropertyAux
variable = saturation
property = saturation
phase = 0
execute_on = timestep_end
[../]
[./darcy_x]
type = PorousFlowDarcyVelocityComponent
variable = darcy_x
gravity = '0 0 -10E-6'
component = x
[../]
[./darcy_y]
type = PorousFlowDarcyVelocityComponent
variable = darcy_y
gravity = '0 0 -10E-6'
component = y
[../]
[./darcy_z]
type = PorousFlowDarcyVelocityComponent
variable = darcy_z
gravity = '0 0 -10E-6'
component = z
[../]
[./porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
execute_on = timestep_end
[../]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[../]
[./stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
execute_on = timestep_end
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[../]
[./stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[../]
[./total_strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./total_strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[../]
[./total_strain_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[../]
[./total_strain_yx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yx
index_i = 1
index_j = 0
execute_on = timestep_end
[../]
[./total_strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[./total_strain_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[../]
[./total_strain_zx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[../]
[./total_strain_zy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[../]
[./total_strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[../]
[./perm_xx]
type = PorousFlowPropertyAux
property = permeability
variable = perm_xx
row = 0
column = 0
execute_on = timestep_end
[../]
[./perm_yy]
type = PorousFlowPropertyAux
property = permeability
variable = perm_yy
row = 1
column = 1
execute_on = timestep_end
[../]
[./perm_zz]
type = PorousFlowPropertyAux
property = permeability
variable = perm_zz
row = 2
column = 2
execute_on = timestep_end
[../]
[./mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
execute_on = timestep_end
[../]
[./mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
execute_on = timestep_end
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
execute_on = timestep_end
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
execute_on = timestep_end
[../]
[./mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
execute_on = timestep_end
[../]
[./mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
execute_on = timestep_end
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
execute_on = timestep_end
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
execute_on = timestep_end
[../]
[]
[BCs]
[./no_x]
type = DirichletBC
variable = disp_x
boundary = 'xmin xmax'
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = 'ymin ymax'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = zmin
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = 'ymin ymax'
value = 0.0
[../]
[./no_wc_y]
type = DirichletBC
variable = wc_y
boundary = 'xmin xmax'
value = 0.0
[../]
[./fix_porepressure]
type = FunctionDirichletBC
variable = porepressure
boundary = 'ymin ymax xmax'
function = ini_pp
[../]
[./roof_porepressure]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
pt_vals = '-1E3 1E3'
multipliers = '-1 1'
fluid_phase = 0
flux_function = roof_conductance
boundary = roof
[../]
[./roof]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = roof
[../]
[]
[Functions]
[./ini_pp]
type = ParsedFunction
vars = 'bulk p0 g rho0'
vals = '2E3 0.0 1E-5 1E3'
value = '-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)'
[../]
[./ini_xx]
type = ParsedFunction
vars = 'bulk p0 g rho0 biot'
vals = '2E3 0.0 1E-5 1E3 0.7'
value = '0.8*(2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)))'
[../]
[./ini_zz]
type = ParsedFunction
vars = 'bulk p0 g rho0 biot'
vals = '2E3 0.0 1E-5 1E3 0.7'
value = '2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk))'
[../]
[./excav_sideways]
type = ParsedFunction
vars = 'end_t ymin ymax minval maxval slope'
vals = '0.5 0 1000.0 1E-9 1 10'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
value = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[../]
[./density_sideways]
type = ParsedFunction
vars = 'end_t ymin ymax minval maxval'
vals = '0.5 0 1000.0 0 2500'
value = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[../]
[./roof_conductance]
type = ParsedFunction
vars = 'end_t ymin ymax maxval minval'
vals = '0.5 0 1000.0 1E7 0'
value = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),maxval,minval)'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1 # MPa^-1
[../]
[./mc_coh_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.99 # MPa
value_residual = 2.01 # MPa
rate = 1.0
[../]
[./mc_fric]
type = TensorMechanicsHardeningConstant
value = 0.61 # 35deg
[../]
[./mc_dil]
type = TensorMechanicsHardeningConstant
value = 0.15 # 8deg
[../]
[./mc_tensile_str_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[../]
[./mc_compressive_str]
type = TensorMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[../]
[./wp_coh_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[../]
[./wp_tan_fric]
type = TensorMechanicsHardeningConstant
value = 0.26 # 15deg
[../]
[./wp_tan_dil]
type = TensorMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = TensorMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E3
density0 = 1000
thermal_expansion = 0
viscosity = 3.5E-17
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity_for_aux]
type = PorousFlowPorosity
at_nodes = false
fluid = true
mechanical = true
ensure_positive = true
porosity_zero = 0.02
solid_bulk = 5.3333E3
[../]
[./porosity_bulk]
type = PorousFlowPorosity
fluid = true
mechanical = true
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
ensure_positive = true
porosity_zero = 0.02
solid_bulk = 5.3333E3
[../]
[./porosity_excav]
type = PorousFlowPorosityConst
block = 1
porosity = 1.0
[../]
[./permeability_bulk]
type = PorousFlowPermeabilityKozenyCarman
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
poroperm_function = kozeny_carman_phi0
k0 = 1E-15
phi0 = 0.02
n = 2
m = 2
[../]
[./permeability_excav]
type = PorousFlowPermeabilityConst
block = 1
permeability = '0 0 0 0 0 0 0 0 0'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 4
s_res = 0.4
sum_s_res = 0.4
phase = 0
[../]
[./elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[../]
[./elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[../]
[./stress_0]
type = ComputeMultipleInelasticCosseratStress
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./stress_1]
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./mc]
type = CappedMohrCoulombCosseratStressUpdate
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.05
smoothing_tol = 0.05 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./undrained_density_0]
type = GenericConstantMaterial
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
prop_names = density
prop_values = 2500
[../]
[./undrained_density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Postprocessors]
[./min_roof_disp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = disp_z
[../]
[./min_roof_pp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = porepressure
[../]
[./min_surface_disp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = disp_z
[../]
[./min_surface_pp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = porepressure
[../]
[./max_perm_zz]
type = ElementExtremeValue
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
variable = perm_zz
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
# best overall
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
# best if you don't have mumps:
#petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' asm 2 lu gmres 200'
# very basic:
#petsc_options_iname = '-pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' bjacobi gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 200
nl_max_its = 30
start_time = 0.0
dt = 0.0025
end_time = 0.5
[]
[Outputs]
interval = 1
print_linear_residuals = true
exodus = true
csv = true
console = true
[]
modules/porous_flow/examples/tutorial/11_2D.i
# Two-phase borehole injection problem in RZ coordinates
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
xmin = 1.0
xmax = 10
bias_x = 1.4
ny = 3
ymin = -6
ymax = 6
[]
[./aquifer]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 -2 0'
top_right = '10 2 0'
[../]
[./injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x<1.0001'
included_subdomain_ids = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caps aquifer'
input = 'injection_area'
[../]
[]
[Problem]
coord_type = RZ
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pwater pgas T disp_r'
number_fluid_phases = 2
number_fluid_components = 2
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
alpha = 1E-6
m = 0.6
[../]
[]
[GlobalParams]
displacements = 'disp_r disp_z'
gravity = '0 0 0'
biot_coefficient = 1.0
PorousFlowDictator = dictator
[]
[Variables]
[./pwater]
initial_condition = 20E6
[../]
[./pgas]
initial_condition = 20.1E6
[../]
[./T]
initial_condition = 330
scaling = 1E-5
[../]
[./disp_r]
scaling = 1E-5
[../]
[]
[Kernels]
[./mass_water_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 0
use_displaced_mesh = false
variable = pwater
[../]
[./flux_water]
type = PorousFlowAdvectiveFlux
fluid_component = 0
use_displaced_mesh = false
variable = pwater
[../]
[./vol_strain_rate_water]
type = PorousFlowMassVolumetricExpansion
fluid_component = 0
use_displaced_mesh = false
variable = pwater
[../]
[./mass_co2_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 1
use_displaced_mesh = false
variable = pgas
[../]
[./flux_co2]
type = PorousFlowAdvectiveFlux
fluid_component = 1
use_displaced_mesh = false
variable = pgas
[../]
[./vol_strain_rate_co2]
type = PorousFlowMassVolumetricExpansion
fluid_component = 1
use_displaced_mesh = false
variable = pgas
[../]
[./energy_dot]
type = PorousFlowEnergyTimeDerivative
use_displaced_mesh = false
variable = T
[../]
[./advection]
type = PorousFlowHeatAdvection
use_displaced_mesh = false
variable = T
[../]
[./conduction]
type = PorousFlowHeatConduction
use_displaced_mesh = false
variable = T
[../]
[./vol_strain_rate_heat]
type = PorousFlowHeatVolumetricExpansion
use_displaced_mesh = false
variable = T
[../]
[./grad_stress_r]
type = StressDivergenceRZTensors
temperature = T
variable = disp_r
thermal_eigenstrain_name = thermal_contribution
use_displaced_mesh = false
component = 0
[../]
[./poro_r]
type = PorousFlowEffectiveStressCoupling
variable = disp_r
use_displaced_mesh = false
component = 0
[../]
[]
[AuxVariables]
[./disp_z]
[../]
[./effective_fluid_pressure]
family = MONOMIAL
order = CONSTANT
[../]
[./mass_frac_phase0_species0]
initial_condition = 1 # all water in phase=0
[../]
[./mass_frac_phase1_species0]
initial_condition = 0 # no water in phase=1
[../]
[./sgas]
family = MONOMIAL
order = CONSTANT
[../]
[./swater]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_rr]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_tt]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_zz]
family = MONOMIAL
order = CONSTANT
[../]
[./porosity]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./effective_fluid_pressure]
type = ParsedAux
args = 'pwater pgas swater sgas'
function = 'pwater * swater + pgas * sgas'
variable = effective_fluid_pressure
[../]
[./swater]
type = PorousFlowPropertyAux
variable = swater
property = saturation
phase = 0
execute_on = timestep_end
[../]
[./sgas]
type = PorousFlowPropertyAux
variable = sgas
property = saturation
phase = 1
execute_on = timestep_end
[../]
[./stress_rr_aux]
type = RankTwoAux
variable = stress_rr
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./stress_tt]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_tt
index_i = 2
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 1
index_j = 1
[../]
[./porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
execute_on = timestep_end
[../]
[]
[BCs]
[./pinned_top_bottom_r]
type = DirichletBC
variable = disp_r
value = 0
boundary = 'top bottom'
[../]
[./cavity_pressure_r]
type = Pressure
boundary = injection_area
variable = disp_r
component = 0
postprocessor = constrained_effective_fluid_pressure_at_wellbore
use_displaced_mesh = false
[../]
[./cold_co2]
type = DirichletBC
boundary = injection_area
variable = T
value = 290 # injection temperature
use_displaced_mesh = false
[../]
[./constant_co2_injection]
type = PorousFlowSink
boundary = injection_area
variable = pgas
fluid_phase = 1
flux_function = -1E-4
use_displaced_mesh = false
[../]
[./outer_water_removal]
type = PorousFlowPiecewiseLinearSink
boundary = right
variable = pwater
fluid_phase = 0
pt_vals = '0 1E9'
multipliers = '0 1E8'
PT_shift = 20E6
use_mobility = true
use_relperm = true
use_displaced_mesh = false
[../]
[./outer_co2_removal]
type = PorousFlowPiecewiseLinearSink
boundary = right
variable = pgas
fluid_phase = 1
pt_vals = '0 1E9'
multipliers = '0 1E8'
PT_shift = 20.1E6
use_mobility = true
use_relperm = true
use_displaced_mesh = false
[../]
[]
[Modules]
[./FluidProperties]
[./true_water]
type = Water97FluidProperties
[../]
[./tabulated_water]
type = TabulatedFluidProperties
fp = true_water
temperature_min = 275
pressure_max = 1E8
fluid_property_file = water97_tabulated_11.csv
[../]
[./true_co2]
type = CO2FluidProperties
[../]
[./tabulated_co2]
type = TabulatedFluidProperties
fp = true_co2
temperature_min = 275
pressure_max = 1E8
fluid_property_file = co2_tabulated_11.csv
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = T
[../]
[./saturation_calculator]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = pgas
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'mass_frac_phase0_species0 mass_frac_phase1_species0'
[../]
[./water]
type = PorousFlowSingleComponentFluid
fp = tabulated_water
phase = 0
[../]
[./co2]
type = PorousFlowSingleComponentFluid
fp = tabulated_co2
phase = 1
[../]
[./relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 4
s_res = 0.1
sum_s_res = 0.2
phase = 0
[../]
[./relperm_co2]
type = PorousFlowRelativePermeabilityBC
nw_phase = true
lambda = 2
s_res = 0.1
sum_s_res = 0.2
phase = 1
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
thermal = true
porosity_zero = 0.1
reference_temperature = 330
reference_porepressure = 20E6
thermal_expansion_coeff = 15E-6 # volumetric
solid_bulk = 8E9 # unimportant since biot = 1
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityKozenyCarman
block = aquifer
poroperm_function = kozeny_carman_phi0
phi0 = 0.1
n = 2
m = 2
k0 = 1E-12
[../]
[./permeability_caps]
type = PorousFlowPermeabilityKozenyCarman
block = caps
poroperm_function = kozeny_carman_phi0
phi0 = 0.1
n = 2
m = 2
k0 = 1E-15
k_anisotropy = '1 0 0 0 1 0 0 0 0.1'
[../]
[./rock_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '2 0 0 0 2 0 0 0 2'
[../]
[./rock_internal_energy]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1100
density = 2300
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 5E9
poissons_ratio = 0.0
[../]
[./strain]
type = ComputeAxisymmetricRZSmallStrain
eigenstrain_names = 'thermal_contribution initial_stress'
[../]
[./thermal_contribution]
type = ComputeThermalExpansionEigenstrain
temperature = T
thermal_expansion_coeff = 5E-6 # this is the linear thermal expansion coefficient
eigenstrain_name = thermal_contribution
stress_free_temperature = 330
[../]
[./initial_strain]
type = ComputeEigenstrainFromInitialStress
initial_stress = '20E6 0 0 0 20E6 0 0 0 20E6'
eigenstrain_name = initial_stress
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./effective_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./volumetric_strain]
type = PorousFlowVolumetricStrain
[../]
[]
[Postprocessors]
[./effective_fluid_pressure_at_wellbore]
type = PointValue
variable = effective_fluid_pressure
point = '1 0 0'
execute_on = timestep_begin
use_displaced_mesh = false
[../]
[./constrained_effective_fluid_pressure_at_wellbore]
type = FunctionValuePostprocessor
function = constrain_effective_fluid_pressure
execute_on = timestep_begin
[../]
[]
[Functions]
[./constrain_effective_fluid_pressure]
type = ParsedFunction
vars = effective_fluid_pressure_at_wellbore
vals = effective_fluid_pressure_at_wellbore
value = 'max(effective_fluid_pressure_at_wellbore, 20E6)'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E3
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1E3
growth_factor = 1.2
optimal_iterations = 10
[../]
nl_abs_tol = 1E-7
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/jacobian/mass10.i
# 1phase
# vanGenuchten, constant-bulk density, HM porosity, 1component, unsaturated
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./pp]
[../]
[]
[ICs]
[./disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[../]
[./disp_y]
type = RandomIC
variable = disp_y
min = -0.1
max = 0.1
[../]
[./disp_z]
type = RandomIC
variable = disp_z
min = -0.1
max = 0.1
[../]
[./pp]
type = RandomIC
variable = pp
min = -1
max = 1
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
strain_at_nearest_qp = true
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5 0.75'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*0.75/3 = 1
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.5
solid_bulk = 1
strain_at_nearest_qp = true
[../]
[./nearest_qp]
type = PorousFlowNearestQp
[../]
[./p_eff]
type = PorousFlowEffectiveFluidPressure
[../]
[]
[Preconditioning]
active = check
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[../]
[./check]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
modules/porous_flow/test/tests/jacobian/mass08.i
# 1phase
# vanGenuchten, constant-bulk density, HM porosity, 1component, unsaturated
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./pp]
[../]
[]
[ICs]
[./disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[../]
[./disp_y]
type = RandomIC
variable = disp_y
min = -0.1
max = 0.1
[../]
[./disp_z]
type = RandomIC
variable = disp_z
min = -0.1
max = 0.1
[../]
[./pp]
type = RandomIC
variable = pp
min = -1
max = 1
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5 0.75'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*0.75/3 = 1
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.5
solid_bulk = 1
[../]
[./p_eff]
type = PorousFlowEffectiveFluidPressure
[../]
[]
[Preconditioning]
active = check
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[../]
[./check]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
modules/porous_flow/test/tests/numerical_diffusion/pffltvd.i
# Using flux-limited TVD advection ala Kuzmin and Turek, employing PorousFlow Kernels and UserObjects, with superbee flux-limiter
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[./porepressure]
[../]
[./tracer]
[../]
[]
[ICs]
[./porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[../]
[./tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[../]
[./flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[../]
[./mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[../]
[./flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[../]
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[../]
[./no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[../]
[./remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[../]
[./remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[../]
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[../]
[./pc]
type = PorousFlowCapillaryPressureConst
[../]
[./advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[../]
[./advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[../]
[./relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[VectorPostprocessors]
[./tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 101
sort_by = x
variable = tracer
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[./out]
type = CSV
execute_on = final
[../]
[]
modules/porous_flow/test/tests/energy_conservation/heat04_fullysat_action.i
# heat04, but using an action
#
# The sample is a single unit element, with fixed displacements on
# all sides. A heat source of strength S (J/m^3/s) is applied into
# the element. There is no fluid flow or heat flow. The rise
# in temperature, porepressure and stress, and the change in porosity is
# matched with theory.
#
# In this case, fluid mass must be conserved, and there is no
# volumetric strain, so
# porosity * fluid_density = constant
# Also, the energy-density in the rock-fluid system increases with S:
# d/dt [(1 - porosity) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T] = S
# Also, the porosity evolves according to THM as
# porosity = biot + (porosity0 - biot) * exp( (biot - 1) * P / fluid_bulk + rock_thermal_exp * T)
# Finally, the effective stress must be exactly zero (as there is
# no strain).
#
# Let us assume that
# fluid_density = dens0 * exp(P / fluid_bulk - fluid_thermal_exp * T)
# Then the conservation of fluid mass means
# porosity = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T)
# where dens0 * por0 = the initial fluid mass.
# The last expression for porosity, combined with the THM one,
# and assuming that biot = 1 for simplicity, gives
# porosity = 1 + (porosity0 - 1) * exp(rock_thermal_exp * T) = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T) .... (A)
#
# This stuff may be substituted into the heat energy-density equation:
# S = d/dt [(1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T]
#
# If S is constant then
# S * t = (1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T
# with T(t=0) = 0 then Eqn(A) implies that por0 = porosity0 and
# P / fluid_bulk = fluid_thermal_exp * T - log(1 + (por0 - 1) * exp(rock_thermal_exp * T)) + log(por0)
#
# Parameters:
# A = 2
# fluid_bulk = 2.0
# dens0 = 3.0
# fluid_thermal_exp = 0.5
# fluid_heat_cap = 2
# por0 = 0.5
# rock_thermal_exp = 0.25
# rock_density = 5
# rock_heat_capacity = 0.2
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.5
cv = 2
cp = 2
bulk_modulus = 2.0
density0 = 3.0
[../]
[../]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = pp
temperature = temp
dictator_name = Sir
biot_coefficient = 1.0
gravity = '0 0 0'
fp = the_simple_fluid
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = Sir
block = 0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./pp]
[../]
[./temp]
[../]
[]
[BCs]
[./confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[../]
[./confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[../]
[]
[Kernels]
[./heat_source]
type = BodyForce
function = 1
variable = temp
[../]
[]
[Functions]
[./err_T_fcn]
type = ParsedFunction
vars = 'por0 rte temp rd rhc m0 fhc source'
vals = '0.5 0.25 t0 5 0.2 1.5 2 1'
value = '((1-por0)*exp(rte*temp)*rd*rhc*temp+m0*fhc*temp-source*t)/(source*t)'
[../]
[./err_pp_fcn]
type = ParsedFunction
vars = 'por0 rte temp rd rhc m0 fhc source bulk pp fte'
vals = '0.5 0.25 t0 5 0.2 1.5 2 1 2 p0 0.5'
value = '(bulk*(fte*temp-log(1+(por0-1)*exp(rte*temp))+log(por0))-pp)/pp'
[../]
[]
[AuxVariables]
[./porosity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./porosity]
type = PorousFlowPorosity
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
specific_heat_capacity = 0.2
density = 5.0
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[../]
[./thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[../]
[]
[Postprocessors]
[./p0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = pp
[../]
[./t0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = temp
[../]
[./porosity]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = porosity
[../]
[./stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[../]
[./stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[../]
[./stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[../]
[./fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'timestep_end'
use_displaced_mesh = true
outputs = 'console csv'
[../]
[./total_heat]
type = PorousFlowHeatEnergy
phase = 0
execute_on = 'timestep_end'
use_displaced_mesh = true
outputs = 'console csv'
[../]
[./err_T]
type = FunctionValuePostprocessor
function = err_T_fcn
[../]
[./err_P]
type = FunctionValuePostprocessor
function = err_pp_fcn
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-12 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
execute_on = 'initial timestep_end'
file_base = heat04_fullysat_action
csv = true
[]
modules/porous_flow/test/tests/energy_conservation/heat02.i
# checking that the heat-energy postprocessor correctly calculates the energy
# 1phase, constant porosity
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./temp]
[../]
[./pp]
[../]
[]
[ICs]
[./tinit]
type = FunctionIC
function = '100*x'
variable = temp
[../]
[./pinit]
type = FunctionIC
function = 'x'
variable = pp
[../]
[]
[Kernels]
[./dummyt]
type = TimeDerivative
variable = temp
[../]
[./dummyp]
type = TimeDerivative
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 1
viscosity = 0.001
thermal_expansion = 0
cv = 1.3
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 2.2
density = 0.5
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[]
[Postprocessors]
[./total_heat]
type = PorousFlowHeatEnergy
phase = 0
[../]
[./rock_heat]
type = PorousFlowHeatEnergy
[../]
[./fluid_heat]
type = PorousFlowHeatEnergy
include_porous_skeleton = false
phase = 0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1 1 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = heat02
csv = true
[]
modules/porous_flow/test/tests/jacobian/mass_vol_exp02.i
# Tests the PorousFlowMassVolumetricExpansion kernel
# Fluid with constant bulk modulus, van-Genuchten capillary, HM porosity
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./porepressure]
[../]
[]
[ICs]
[./disp_x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./disp_y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./disp_z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[./p]
type = RandomIC
min = -1
max = 1
variable = porepressure
[../]
[]
[BCs]
# necessary otherwise volumetric strain rate will be zero
[./disp_x]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./disp_y]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'left right'
[../]
[./disp_z]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'left right'
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
displacements = 'disp_x disp_y disp_z'
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
displacements = 'disp_x disp_y disp_z'
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
displacements = 'disp_x disp_y disp_z'
component = 2
[../]
[./poro]
type = PorousFlowMassVolumetricExpansion
fluid_component = 0
variable = porepressure
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '2 3'
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.5
solid_bulk = 1
[../]
[./p_eff]
type = PorousFlowEffectiveFluidPressure
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-5
[]
[Outputs]
execute_on = 'timestep_end'
file_base = jacobian2
exodus = false
[]
modules/porous_flow/test/tests/jacobian/denergy02.i
# 2phase, 1 component, with solid displacements, time derivative of energy-density
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./pgas]
[../]
[./pwater]
[../]
[./temp]
[../]
[]
[ICs]
[./disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[../]
[./disp_y]
type = RandomIC
variable = disp_y
min = -0.1
max = 0.1
[../]
[./disp_z]
type = RandomIC
variable = disp_z
min = -0.1
max = 0.1
[../]
[./pgas]
type = RandomIC
variable = pgas
max = 1.0
min = 0.0
[../]
[./pwater]
type = RandomIC
variable = pwater
max = 0.0
min = -1.0
[../]
[./temp]
type = RandomIC
variable = temp
max = 1.0
min = 0.0
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./dummy_pgas]
type = Diffusion
variable = pgas
[../]
[./dummy_pwater]
type = Diffusion
variable = pwater
[../]
[./energy_dot]
type = PorousFlowEnergyTimeDerivative
variable = temp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas temp pwater disp_x disp_y disp_z'
number_fluid_phases = 2
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
cv = 1.3
[../]
[./simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
cv = 0.7
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5 0.75'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*0.75/3 = 1
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.7
biot_coefficient = 0.9
solid_bulk = 1
[../]
[./p_eff]
type = PorousFlowEffectiveFluidPressure
[../]
[./rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1.1
density = 0.5
[../]
[./ppss]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = pgas
capillary_pressure = pc
[../]
[./simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[../]
[./simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[../]
[]
[Preconditioning]
active = check
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[../]
[./check]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
modules/porous_flow/test/tests/jacobian/basic_advection6.i
# Basic advection with 2 porepressure as PorousFlow variables
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./u]
[../]
[./P0]
[../]
[./P1]
[../]
[]
[ICs]
[./P0]
type = RandomIC
variable = P0
min = -1
max = 0
[../]
[./P1]
type = RandomIC
variable = P1
min = 0
max = 1
[../]
[./u]
type = RandomIC
variable = u
[../]
[]
[Kernels]
[./dummy_P0]
type = NullKernel
variable = P0
[../]
[./dummy_P1]
type = NullKernel
variable = P1
[../]
[./u_advection]
type = PorousFlowBasicAdvection
variable = u
phase = 0
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'P0 P1'
number_fluid_phases = 2
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
alpha = 1
m = 0.6
sat_lr = 0.1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 3
density0 = 4
thermal_expansion = 0
viscosity = 150.0
[../]
[./simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 4
density0 = 3
thermal_expansion = 0
viscosity = 130.0
[../]
[../]
[]
[Materials]
[./temperature_qp]
type = PorousFlowTemperature
[../]
[./ppss_qp]
type = PorousFlow2PhasePP
phase0_porepressure = P0
phase1_porepressure = P1
capillary_pressure = pc
[../]
[./simple_fluid0_qp]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[../]
[./simple_fluid1_qp]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[../]
[./effective_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
fluid = true
biot_coefficient = 0.5
solid_bulk = 1
[../]
[./permeability]
type = PorousFlowPermeabilityKozenyCarman
poroperm_function = kozeny_carman_phi0
k0 = 5
m = 2
n = 2
phi0 = 0.1
[../]
[./relperm0_qp]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
s_res = 0.1
sum_s_res = 0.1
[../]
[./relperm1_qp]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
s_res = 0.0
sum_s_res = 0.1
[../]
[./darcy_velocity_qp]
type = PorousFlowDarcyVelocityMaterial
gravity = '0.25 0 0'
[../]
[]
[Preconditioning]
[./check]
type = SMP
full = true
petsc_options = '-snes_test_display'
petsc_options_iname = '-snes_type'
petsc_options_value = ' test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[]
modules/porous_flow/test/tests/energy_conservation/heat04_action_KT.i
# heat04, but using an action with KT stabilization.
# See heat04.i for a full discussion of the results.
# The KT stabilization should have no impact as there is no flow, but this input file checks that MOOSE runs.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.5
cv = 2
cp = 2
bulk_modulus = 2.0
density0 = 3.0
[../]
[../]
[]
[PorousFlowUnsaturated]
coupling_type = ThermoHydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = pp
temperature = temp
dictator_name = Sir
biot_coefficient = 1.0
gravity = '0 0 0'
fp = the_simple_fluid
van_genuchten_alpha = 1.0E-12
van_genuchten_m = 0.5
relative_permeability_type = Corey
relative_permeability_exponent = 0.0
stabilization = KT
flux_limiter_type = superbee
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = Sir
block = 0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./pp]
[../]
[./temp]
[../]
[]
[BCs]
[./confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[../]
[./confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[../]
[]
[Kernels]
[./heat_source]
type = BodyForce
function = 1
variable = temp
[../]
[]
[Functions]
[./err_T_fcn]
type = ParsedFunction
vars = 'por0 rte temp rd rhc m0 fhc source'
vals = '0.5 0.25 t0 5 0.2 1.5 2 1'
value = '((1-por0)*exp(rte*temp)*rd*rhc*temp+m0*fhc*temp-source*t)/(source*t)'
[../]
[./err_pp_fcn]
type = ParsedFunction
vars = 'por0 rte temp rd rhc m0 fhc source bulk pp fte'
vals = '0.5 0.25 t0 5 0.2 1.5 2 1 2 p0 0.5'
value = '(bulk*(fte*temp-log(1+(por0-1)*exp(rte*temp))+log(por0))-pp)/pp'
[../]
[]
[AuxVariables]
[./porosity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./porosity]
type = PorousFlowPorosity
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
specific_heat_capacity = 0.2
density = 5.0
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[../]
[./thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[../]
[]
[Postprocessors]
[./p0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = pp
[../]
[./t0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = temp
[../]
[./porosity]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = porosity
[../]
[./stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[../]
[./stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[../]
[./stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[../]
[./fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'timestep_end'
use_displaced_mesh = true
outputs = 'console csv'
[../]
[./total_heat]
type = PorousFlowHeatEnergy
phase = 0
execute_on = 'timestep_end'
use_displaced_mesh = true
outputs = 'console csv'
[../]
[./err_T]
type = FunctionValuePostprocessor
function = err_T_fcn
[../]
[./err_P]
type = FunctionValuePostprocessor
function = err_pp_fcn
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-12 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
execute_on = 'initial timestep_end'
file_base = heat04_action
csv = true
[]
modules/porous_flow/test/tests/dirackernels/strain_at_nearest_qp.i
# Demonstrates the correct usage of strain_at_nearest_qp when using a nodal PorousFlowPorosity
# For the PorousFlowPorosity Material to require the strain_at_nearest_qp=true flag, it must:
# - be a nodal Material
# - be coupled to solid mechanics (mechanical=true)
# - be part of a simulation with DiracKernels
# The reason for this requirement is that the volumetric strain is a standard Material (at_nodes=false)
# so that it is evaluated at the single Dirac quadpoint, and has size = 1 (assuming just one Dirac point).
# However, the PorousFlowPorosity Material will have size = 2 (number of nodes in the element containing the Dirac point).
# So when the PorousFlowPorosity Material is evaluated, it will use _vol_strain at 2 points.
# If strain_at_nearest_qp=false, then _vol_strain will be evaluated at two quadpoints, but it only has size=1, leading to a segfault
# If strain_at_nearest_qp=true, then _vol_strain will be evaluated correctly just at the single quadpoint
#
# This input file solves no useful physics: it is just illustrating the above point
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
strain_at_nearest_qp = true
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'disp_x'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./dummy_sum]
type = PorousFlowSumQuantity
[../]
[]
[Variables]
[./disp_x]
[../]
[]
[Kernels]
[./dummy]
type = Diffusion
variable = disp_x
[../]
[]
[DiracKernels]
[./line_sink]
type = PorousFlowPolyLineSink
function_of = temperature
SumQuantityUO = dummy_sum
point_file = strain_at_nearest_qp.bh
p_or_t_vals = '0'
fluxes = '0'
variable = disp_x
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature # needed because of the PorousFlowPolyLineSink
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
displacements = disp_x
[../]
[./porosity_at_nodes]
type = PorousFlowPorosity
mechanical = true # to ensure coupling with volumetric strain
at_nodes = true # to ensure evaluation at nodes
porosity_zero = 0
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
end_time = 1
dt = 1
solve_type = NEWTON
[]
modules/porous_flow/test/tests/chemistry/except15.i
# Exception test
# Incorrect number of secondary densities
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowPreDis
variable = a
mineral_density = '1 1'
stoichiometry = 2
[../]
[./b]
type = PorousFlowPreDis
variable = b
mineral_density = 1
stoichiometry = 3
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1E-6
[../]
[./pressure]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '1 1'
reactions = '2 3'
specific_reactive_surface_area = 1.0
kinetic_rate_constant = 1.0e-8
activation_energy = 1.5e4
molar_volume = 1
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[]
modules/porous_flow/test/tests/energy_conservation/heat04_action.i
# heat04, but using an action
#
# The sample is a single unit element, with fixed displacements on
# all sides. A heat source of strength S (J/m^3/s) is applied into
# the element. There is no fluid flow or heat flow. The rise
# in temperature, porepressure and stress, and the change in porosity is
# matched with theory.
#
# In this case, fluid mass must be conserved, and there is no
# volumetric strain, so
# porosity * fluid_density = constant
# Also, the energy-density in the rock-fluid system increases with S:
# d/dt [(1 - porosity) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T] = S
# Also, the porosity evolves according to THM as
# porosity = biot + (porosity0 - biot) * exp( (biot - 1) * P / fluid_bulk + rock_thermal_exp * T)
# Finally, the effective stress must be exactly zero (as there is
# no strain).
#
# Let us assume that
# fluid_density = dens0 * exp(P / fluid_bulk - fluid_thermal_exp * T)
# Then the conservation of fluid mass means
# porosity = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T)
# where dens0 * por0 = the initial fluid mass.
# The last expression for porosity, combined with the THM one,
# and assuming that biot = 1 for simplicity, gives
# porosity = 1 + (porosity0 - 1) * exp(rock_thermal_exp * T) = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T) .... (A)
#
# This stuff may be substituted into the heat energy-density equation:
# S = d/dt [(1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T]
#
# If S is constant then
# S * t = (1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T
# with T(t=0) = 0 then Eqn(A) implies that por0 = porosity0 and
# P / fluid_bulk = fluid_thermal_exp * T - log(1 + (por0 - 1) * exp(rock_thermal_exp * T)) + log(por0)
#
# Parameters:
# A = 2
# fluid_bulk = 2.0
# dens0 = 3.0
# fluid_thermal_exp = 0.5
# fluid_heat_cap = 2
# por0 = 0.5
# rock_thermal_exp = 0.25
# rock_density = 5
# rock_heat_capacity = 0.2
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.5
cv = 2
cp = 2
bulk_modulus = 2.0
density0 = 3.0
[../]
[../]
[]
[PorousFlowUnsaturated]
coupling_type = ThermoHydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = pp
temperature = temp
dictator_name = Sir
biot_coefficient = 1.0
gravity = '0 0 0'
fp = the_simple_fluid
van_genuchten_alpha = 1.0E-12
van_genuchten_m = 0.5
relative_permeability_type = Corey
relative_permeability_exponent = 0.0
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = Sir
block = 0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./pp]
[../]
[./temp]
[../]
[]
[BCs]
[./confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[../]
[./confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[../]
[]
[Kernels]
[./heat_source]
type = BodyForce
function = 1
variable = temp
[../]
[]
[Functions]
[./err_T_fcn]
type = ParsedFunction
vars = 'por0 rte temp rd rhc m0 fhc source'
vals = '0.5 0.25 t0 5 0.2 1.5 2 1'
value = '((1-por0)*exp(rte*temp)*rd*rhc*temp+m0*fhc*temp-source*t)/(source*t)'
[../]
[./err_pp_fcn]
type = ParsedFunction
vars = 'por0 rte temp rd rhc m0 fhc source bulk pp fte'
vals = '0.5 0.25 t0 5 0.2 1.5 2 1 2 p0 0.5'
value = '(bulk*(fte*temp-log(1+(por0-1)*exp(rte*temp))+log(por0))-pp)/pp'
[../]
[]
[AuxVariables]
[./porosity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./porosity]
type = PorousFlowPorosity
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
specific_heat_capacity = 0.2
density = 5.0
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[../]
[./thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[../]
[]
[Postprocessors]
[./p0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = pp
[../]
[./t0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = temp
[../]
[./porosity]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = porosity
[../]
[./stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[../]
[./stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[../]
[./stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[../]
[./fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'timestep_end'
use_displaced_mesh = true
outputs = 'console csv'
[../]
[./total_heat]
type = PorousFlowHeatEnergy
phase = 0
execute_on = 'timestep_end'
use_displaced_mesh = true
outputs = 'console csv'
[../]
[./err_T]
type = FunctionValuePostprocessor
function = err_T_fcn
[../]
[./err_P]
type = FunctionValuePostprocessor
function = err_pp_fcn
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-12 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
execute_on = 'initial timestep_end'
file_base = heat04_action
csv = true
[]
modules/porous_flow/test/tests/energy_conservation/except01.i
# checking that the heat-energy postprocessor throws the correct error if the phase number is entered incorrectly
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
[../]
[./temp]
[../]
[]
[ICs]
[./tinit]
type = FunctionIC
function = '100*x'
variable = temp
[../]
[./pinit]
type = FunctionIC
function = x
variable = pp
[../]
[]
[Kernels]
[./dummyt]
type = TimeDerivative
variable = temp
[../]
[./dummyp]
type = TimeDerivative
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 1
viscosity = 0.001
thermal_expansion = 0
cv = 1.3
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 2.2
density = 0.5
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[]
[Postprocessors]
[./total_heat]
type = PorousFlowHeatEnergy
phase = 1
[../]
[./rock_heat]
type = PorousFlowHeatEnergy
[../]
[./fluid_heat]
type = PorousFlowHeatEnergy
include_porous_skeleton = false
phase = 0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1 1 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = except01
csv = true
[]
modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_1D.i
# Using flux-limited TVD advection ala Kuzmin and Turek, mploying PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 1D version
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[./porepressure]
[../]
[./tracer]
[../]
[]
[ICs]
[./porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[../]
[./tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[../]
[./flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[../]
[./mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[../]
[./flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[../]
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[../]
[./no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[../]
[./remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[../]
[./remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[../]
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[../]
[./pc]
type = PorousFlowCapillaryPressureConst
[../]
[./advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[../]
[./advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[../]
[./relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[VectorPostprocessors]
[./tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 11
sort_by = x
variable = tracer
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[./out]
type = CSV
execute_on = final
[../]
[]
modules/porous_flow/test/tests/energy_conservation/heat04.i
# The sample is a single unit element, with fixed displacements on
# all sides. A heat source of strength S (J/m^3/s) is applied into
# the element. There is no fluid flow or heat flow. The rise
# in temperature, porepressure and stress, and the change in porosity is
# matched with theory.
#
# In this case, fluid mass must be conserved, and there is no
# volumetric strain, so
# porosity * fluid_density = constant
# Also, the energy-density in the rock-fluid system increases with S:
# d/dt [(1 - porosity) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T] = S
# Also, the porosity evolves according to THM as
# porosity = biot + (porosity0 - biot) * exp( (biot - 1) * P / fluid_bulk + rock_thermal_exp * T)
# Finally, the effective stress must be exactly zero (as there is
# no strain).
#
# Let us assume that
# fluid_density = dens0 * exp(P / fluid_bulk - fluid_thermal_exp * T)
# Then the conservation of fluid mass means
# porosity = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T)
# where dens0 * por0 = the initial fluid mass.
# The last expression for porosity, combined with the THM one,
# and assuming that biot = 1 for simplicity, gives
# porosity = 1 + (porosity0 - 1) * exp(rock_thermal_exp * T) = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T) .... (A)
#
# This stuff may be substituted into the heat energy-density equation:
# S = d/dt [(1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T]
#
# If S is constant then
# S * t = (1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T
# with T(t=0) = 0 then Eqn(A) implies that por0 = porosity0 and
# P / fluid_bulk = fluid_thermal_exp * T - log(1 + (por0 - 1) * exp(rock_thermal_exp * T)) + log(por0)
#
# Parameters:
# A = 2
# fluid_bulk = 2.0
# dens0 = 3.0
# fluid_thermal_exp = 0.5
# fluid_heat_cap = 2
# por0 = 0.5
# rock_thermal_exp = 0.25
# rock_density = 5
# rock_heat_capacity = 0.2
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.5
cv = 2
cp = 2
bulk_modulus = 2.0
density0 = 3.0
[../]
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./pp]
[../]
[./temp]
[../]
[]
[BCs]
[./confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[../]
[./confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./poro_x]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 1.0
variable = disp_x
component = 0
[../]
[./poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 1.0
variable = disp_y
component = 1
[../]
[./poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 1.0
component = 2
variable = disp_z
[../]
[./poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = pp
fluid_component = 0
[../]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[../]
[./temp]
type = PorousFlowEnergyTimeDerivative
variable = temp
[../]
[./poro_vol_exp_temp]
type = PorousFlowHeatVolumetricExpansion
variable = temp
[../]
[./heat_source]
type = BodyForce
function = 1
variable = temp
[../]
[]
[Functions]
[./err_T_fcn]
type = ParsedFunction
vars = 'por0 rte temp rd rhc m0 fhc source'
vals = '0.5 0.25 t0 5 0.2 1.5 2 1'
value = '((1-por0)*exp(rte*temp)*rd*rhc*temp+m0*fhc*temp-source*t)/(source*t)'
[../]
[./err_pp_fcn]
type = ParsedFunction
vars = 'por0 rte temp rd rhc m0 fhc source bulk pp fte'
vals = '0.5 0.25 t0 5 0.2 1.5 2 1 2 p0 0.5'
value = '(bulk*(fte*temp-log(1+(por0-1)*exp(rte*temp))+log(por0))-pp)/pp'
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./porosity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp pp disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./porosity]
type = PorousFlowPorosity
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
specific_heat_capacity = 0.2
density = 5.0
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
temperature_unit = Kelvin
fp = the_simple_fluid
phase = 0
[../]
[]
[Postprocessors]
[./p0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = pp
[../]
[./t0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = temp
[../]
[./porosity]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = porosity
[../]
[./stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[../]
[./stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[../]
[./stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[../]
[./fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'timestep_end'
use_displaced_mesh = true
outputs = 'console csv'
[../]
[./total_heat]
type = PorousFlowHeatEnergy
phase = 0
execute_on = 'timestep_end'
use_displaced_mesh = true
outputs = 'console csv'
[../]
[./err_T]
type = FunctionValuePostprocessor
function = err_T_fcn
[../]
[./err_P]
type = FunctionValuePostprocessor
function = err_pp_fcn
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-12 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
execute_on = 'initial timestep_end'
file_base = heat04
exodus = true
[./csv]
type = CSV
[../]
[]
modules/porous_flow/test/tests/chemistry/except10.i
# Exception test.
# Incorrect number of activation energies
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = Diffusion
variable = a
[../]
[./b]
type = Diffusion
variable = b
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1E-6
[../]
[./pressure]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '1 1'
reactions = '1 1'
specific_reactive_surface_area = 1.0
kinetic_rate_constant = 1.0e-8
activation_energy = '1.5e4 1'
molar_volume = 1
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[]
modules/porous_flow/test/tests/energy_conservation/heat05.i
# Demonstrates that porosity is correctly initialised,
# since the residual should be zero in this example.
# If initQpStatefulProperties of the Porosity calculator
# is incorrect then the residual will be nonzero.
[Mesh]
type = GeneratedMesh
dim = 3
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.5
cv = 2
cp = 2
bulk_modulus = 2.0
density0 = 3.0
[../]
[../]
[]
[GlobalParams]
biot_coefficient = 0.7
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./pp]
initial_condition = 0.5
[../]
[./temp]
initial_condition = 1.0
[../]
[]
[BCs]
[./confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[../]
[./confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./poro_x]
type = PorousFlowEffectiveStressCoupling
variable = disp_x
component = 0
[../]
[./poro_y]
type = PorousFlowEffectiveStressCoupling
variable = disp_y
component = 1
[../]
[./poro_z]
type = PorousFlowEffectiveStressCoupling
component = 2
variable = disp_z
[../]
[./poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = pp
fluid_component = 0
[../]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[../]
[./temp]
type = PorousFlowEnergyTimeDerivative
variable = temp
[../]
[./poro_vol_exp_temp]
type = PorousFlowHeatVolumetricExpansion
variable = temp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp pp disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./porosity]
type = PorousFlowPorosity
thermal = true
fluid = true
mechanical = true
ensure_positive = false
porosity_zero = 0.5
thermal_expansion_coeff = 0.25
solid_bulk = 2
[../]
[./rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 0.2
density = 5.0
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
temperature_unit = Kelvin
fp = the_simple_fluid
phase = 0
[../]
[]
[Postprocessors]
[./should_be_zero]
type = NumNonlinearIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-16
[]
[Outputs]
file_base = heat05
csv = true
[]
modules/porous_flow/examples/tutorial/01.i
# Darcy flow
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[./make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[../]
[./shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[../]
[./aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[../]
[./injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomain_ids = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caps aquifer'
input = 'injection_area'
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./porepressure]
[../]
[]
[PorousFlowBasicTHM]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1E6
boundary = injection_area
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.8
solid_bulk_compliance = 2E-7
fluid_bulk_modulus = 1E7
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[../]
[./permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-13
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/dirackernels/injection_with_plasticity.i
# Example: Injection into a uniform aquifer 10 x 10 x 5 km
# Drucker-Prager deformation
# Darcy flow
gravity = -9.81
solid_density = 2350
fluid_density = 1000
porosity0 = 0.1
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0
xmax = 1e4
ymin = 0
ymax = 1e4
zmax = 0
zmin = -5e3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 ${gravity}'
displacements = 'disp_x disp_y disp_z'
strain_at_nearest_qp = true
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0 # Not doing a thermal simulation
bulk_modulus = 2E9
density0 = ${fluid_density}
viscosity = 5E-4
[../]
[../]
[]
[PorousFlowFullySaturated]
coupling_type = HydroMechanical
porepressure = pp
dictator_name = dictator
fp = simple_fluid
add_darcy_aux = false
add_stress_aux = false
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./pp]
scaling = 1E6
[./InitialCondition]
type = FunctionIC
function = ini_pp
[../]
[../]
[]
[Functions]
[./ini_stress]
type = ParsedFunction
value = '-${gravity} * z * (${solid_density} - ${fluid_density}) * (1.0 - ${porosity0})' # initial effective stress that should result from weight force
[../]
[./ini_pp]
type = ParsedFunction
value = '${gravity} * z * ${fluid_density} + 1E5'
[../]
[]
[BCs]
[./p_top]
type = FunctionDirichletBC
variable = pp
boundary = front
function = ini_pp
[../]
[./x_roller]
type = DirichletBC
variable = disp_x
boundary = 'left right'
value = 0
[../]
[./y_roller]
type = DirichletBC
variable = disp_y
boundary = 'top bottom'
value = 0
[../]
[./z_confined]
type = DirichletBC
variable = disp_z
boundary = 'back front'
value = 0
[../]
[]
[UserObjects]
[./pls_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
# Cohesion
[./mc_coh]
type = TensorMechanicsHardeningConstant
value = 6.0E6
[../]
# Friction angle
[./mc_phi]
type = TensorMechanicsHardeningConstant
value = 35.0
convert_to_radians = true
[../]
# Dilation angle
[./mc_psi]
type = TensorMechanicsHardeningConstant
value = 2
convert_to_radians = true
[../]
# Drucker-Prager objects
[./dp]
type = TensorMechanicsPlasticDruckerPragerHyperbolic
mc_cohesion = mc_coh
mc_friction_angle = mc_phi
mc_dilation_angle = mc_psi
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-6
[../]
# Tensile strength
[./tens]
type = TensorMechanicsHardeningConstant
value = 3.0E6
[../]
# Compressive strength (cap on yield envelope)
[./compr_all]
type = TensorMechanicsHardeningConstant
value = 1E10
[../]
[]
[Materials]
[./strain]
type = ComputeIncrementalSmallStrain
eigenstrain_names = eigenstrain_all
[../]
[./eigenstrain_all]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'ini_stress 0 0 0 ini_stress 0 0 0 ini_stress'
eigenstrain_name = eigenstrain_all
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
bulk_modulus = 3.3333E9
shear_modulus = 2.5E9
[../]
[./dp_mat]
type = CappedDruckerPragerStressUpdate
DP_model = dp
tensile_strength = tens
compressive_strength = compr_all
smoothing_tol = 1E5
yield_function_tol = 1E-3
tip_smoother = 0
[../]
[./stress]
type = ComputeMultipleInelasticStress
inelastic_models = dp_mat
[../]
# Permeability
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-13 0 0 0 1E-13 0 0 0 1E-13'
[../]
# Porosity
[./porosity]
type = PorousFlowPorosity
porosity_zero = ${porosity0}
biot_coefficient = 1.0
solid_bulk = 1.0 # Required but irrelevant when biot_coefficient is unity
mechanical = true
fluid = true
[../]
# Density of saturated rock
[./density]
type = PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity
rho_s = ${solid_density}
[../]
[]
[DiracKernels]
[./pls]
type = PorousFlowPolyLineSink
variable = pp
SumQuantityUO = pls_total_outflow_mass
point_file = two_nodes.bh
function_of = pressure
fluid_phase = 0
p_or_t_vals = '0 1E7'
fluxes = '-1.59 -1.59'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = Newton
type = Transient
dt = 1E6
end_time = 1E6
nl_rel_tol = 1E-7
[]
[Outputs]
exodus = true
[]
modules/porous_flow/examples/tutorial/11.i
# Two-phase borehole injection problem
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[./make3D]
input = annular
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
[../]
[./shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[../]
[./aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[../]
[./injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomain_ids = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caps aquifer'
input = 'injection_area'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pwater pgas T disp_x disp_y'
number_fluid_phases = 2
number_fluid_components = 2
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
alpha = 1E-6
m = 0.6
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
gravity = '0 0 0'
biot_coefficient = 1.0
PorousFlowDictator = dictator
[]
[Variables]
[./pwater]
initial_condition = 20E6
[../]
[./pgas]
initial_condition = 20.1E6
[../]
[./T]
initial_condition = 330
scaling = 1E-5
[../]
[./disp_x]
scaling = 1E-5
[../]
[./disp_y]
scaling = 1E-5
[../]
[]
[Kernels]
[./mass_water_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 0
use_displaced_mesh = false
variable = pwater
[../]
[./flux_water]
type = PorousFlowAdvectiveFlux
fluid_component = 0
use_displaced_mesh = false
variable = pwater
[../]
[./vol_strain_rate_water]
type = PorousFlowMassVolumetricExpansion
fluid_component = 0
use_displaced_mesh = false
variable = pwater
[../]
[./mass_co2_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 1
use_displaced_mesh = false
variable = pgas
[../]
[./flux_co2]
type = PorousFlowAdvectiveFlux
fluid_component = 1
use_displaced_mesh = false
variable = pgas
[../]
[./vol_strain_rate_co2]
type = PorousFlowMassVolumetricExpansion
fluid_component = 1
use_displaced_mesh = false
variable = pgas
[../]
[./energy_dot]
type = PorousFlowEnergyTimeDerivative
use_displaced_mesh = false
variable = T
[../]
[./advection]
type = PorousFlowHeatAdvection
use_displaced_mesh = false
variable = T
[../]
[./conduction]
type = PorousFlowHeatConduction
use_displaced_mesh = false
variable = T
[../]
[./vol_strain_rate_heat]
type = PorousFlowHeatVolumetricExpansion
use_displaced_mesh = false
variable = T
[../]
[./grad_stress_x]
type = StressDivergenceTensors
temperature = T
variable = disp_x
thermal_eigenstrain_name = thermal_contribution
use_displaced_mesh = false
component = 0
[../]
[./poro_x]
type = PorousFlowEffectiveStressCoupling
variable = disp_x
use_displaced_mesh = false
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
temperature = T
variable = disp_y
thermal_eigenstrain_name = thermal_contribution
use_displaced_mesh = false
component = 1
[../]
[./poro_y]
type = PorousFlowEffectiveStressCoupling
variable = disp_y
use_displaced_mesh = false
component = 1
[../]
[]
[AuxVariables]
[./disp_z]
[../]
[./effective_fluid_pressure]
family = MONOMIAL
order = CONSTANT
[../]
[./mass_frac_phase0_species0]
initial_condition = 1 # all water in phase=0
[../]
[./mass_frac_phase1_species0]
initial_condition = 0 # no water in phase=1
[../]
[./sgas]
family = MONOMIAL
order = CONSTANT
[../]
[./swater]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_rr]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_tt]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_zz]
family = MONOMIAL
order = CONSTANT
[../]
[./porosity]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./effective_fluid_pressure]
type = ParsedAux
args = 'pwater pgas swater sgas'
function = 'pwater * swater + pgas * sgas'
variable = effective_fluid_pressure
[../]
[./swater]
type = PorousFlowPropertyAux
variable = swater
property = saturation
phase = 0
execute_on = timestep_end
[../]
[./sgas]
type = PorousFlowPropertyAux
variable = sgas
property = saturation
phase = 1
execute_on = timestep_end
[../]
[./stress_rr]
type = RankTwoScalarAux
variable = stress_rr
rank_two_tensor = stress
scalar_type = RadialStress
point1 = '0 0 0'
point2 = '0 0 1'
execute_on = timestep_end
[../]
[./stress_tt]
type = RankTwoScalarAux
variable = stress_tt
rank_two_tensor = stress
scalar_type = HoopStress
point1 = '0 0 0'
point2 = '0 0 1'
execute_on = timestep_end
[../]
[./stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_i = 2
index_j = 2
execute_on = timestep_end
[../]
[./porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
execute_on = timestep_end
[../]
[]
[BCs]
[./roller_tmax]
type = DirichletBC
variable = disp_x
value = 0
boundary = dmax
[../]
[./roller_tmin]
type = DirichletBC
variable = disp_y
value = 0
boundary = dmin
[../]
[./pinned_top_bottom_x]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'top bottom'
[../]
[./pinned_top_bottom_y]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'top bottom'
[../]
[./cavity_pressure_x]
type = Pressure
boundary = injection_area
variable = disp_x
component = 0
postprocessor = constrained_effective_fluid_pressure_at_wellbore
use_displaced_mesh = false
[../]
[./cavity_pressure_y]
type = Pressure
boundary = injection_area
variable = disp_y
component = 1
postprocessor = constrained_effective_fluid_pressure_at_wellbore
use_displaced_mesh = false
[../]
[./cold_co2]
type = DirichletBC
boundary = injection_area
variable = T
value = 290 # injection temperature
use_displaced_mesh = false
[../]
[./constant_co2_injection]
type = PorousFlowSink
boundary = injection_area
variable = pgas
fluid_phase = 1
flux_function = -1E-4
use_displaced_mesh = false
[../]
[./outer_water_removal]
type = PorousFlowPiecewiseLinearSink
boundary = rmax
variable = pwater
fluid_phase = 0
pt_vals = '0 1E9'
multipliers = '0 1E8'
PT_shift = 20E6
use_mobility = true
use_relperm = true
use_displaced_mesh = false
[../]
[./outer_co2_removal]
type = PorousFlowPiecewiseLinearSink
boundary = rmax
variable = pgas
fluid_phase = 1
pt_vals = '0 1E9'
multipliers = '0 1E8'
PT_shift = 20.1E6
use_mobility = true
use_relperm = true
use_displaced_mesh = false
[../]
[]
[Modules]
[./FluidProperties]
[./true_water]
type = Water97FluidProperties
[../]
[./tabulated_water]
type = TabulatedFluidProperties
fp = true_water
temperature_min = 275
pressure_max = 1E8
interpolated_properties = 'density viscosity enthalpy internal_energy'
fluid_property_file = water97_tabulated_11.csv
[../]
[./true_co2]
type = CO2FluidProperties
[../]
[./tabulated_co2]
type = TabulatedFluidProperties
fp = true_co2
temperature_min = 275
pressure_max = 1E8
interpolated_properties = 'density viscosity enthalpy internal_energy'
fluid_property_file = co2_tabulated_11.csv
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = T
[../]
[./saturation_calculator]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = pgas
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'mass_frac_phase0_species0 mass_frac_phase1_species0'
[../]
[./water]
type = PorousFlowSingleComponentFluid
fp = tabulated_water
phase = 0
[../]
[./co2]
type = PorousFlowSingleComponentFluid
fp = tabulated_co2
phase = 1
[../]
[./relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 4
s_res = 0.1
sum_s_res = 0.2
phase = 0
[../]
[./relperm_co2]
type = PorousFlowRelativePermeabilityBC
nw_phase = true
lambda = 2
s_res = 0.1
sum_s_res = 0.2
phase = 1
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
thermal = true
porosity_zero = 0.1
reference_temperature = 330
reference_porepressure = 20E6
thermal_expansion_coeff = 15E-6 # volumetric
solid_bulk = 8E9 # unimportant since biot = 1
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityKozenyCarman
block = aquifer
poroperm_function = kozeny_carman_phi0
phi0 = 0.1
n = 2
m = 2
k0 = 1E-12
[../]
[./permeability_caps]
type = PorousFlowPermeabilityKozenyCarman
block = caps
poroperm_function = kozeny_carman_phi0
phi0 = 0.1
n = 2
m = 2
k0 = 1E-15
k_anisotropy = '1 0 0 0 1 0 0 0 0.1'
[../]
[./rock_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '2 0 0 0 2 0 0 0 2'
[../]
[./rock_internal_energy]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1100
density = 2300
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 5E9
poissons_ratio = 0.0
[../]
[./strain]
type = ComputeSmallStrain
eigenstrain_names = 'thermal_contribution initial_stress'
[../]
[./thermal_contribution]
type = ComputeThermalExpansionEigenstrain
temperature = T
thermal_expansion_coeff = 5E-6 # this is the linear thermal expansion coefficient
eigenstrain_name = thermal_contribution
stress_free_temperature = 330
[../]
[./initial_strain]
type = ComputeEigenstrainFromInitialStress
initial_stress = '20E6 0 0 0 20E6 0 0 0 20E6'
eigenstrain_name = initial_stress
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./effective_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./volumetric_strain]
type = PorousFlowVolumetricStrain
[../]
[]
[Postprocessors]
[./effective_fluid_pressure_at_wellbore]
type = PointValue
variable = effective_fluid_pressure
point = '1 0 0'
execute_on = timestep_begin
use_displaced_mesh = false
[../]
[./constrained_effective_fluid_pressure_at_wellbore]
type = FunctionValuePostprocessor
function = constrain_effective_fluid_pressure
execute_on = timestep_begin
[../]
[]
[Functions]
[./constrain_effective_fluid_pressure]
type = ParsedFunction
vars = effective_fluid_pressure_at_wellbore
vals = effective_fluid_pressure_at_wellbore
value = 'max(effective_fluid_pressure_at_wellbore, 20E6)'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E3
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1E3
growth_factor = 1.2
optimal_iterations = 10
[../]
nl_abs_tol = 1E-7
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/actions/basicthm_h.i
# PorousFlowBasicTHM action with coupling_type = HydroGenerator
# (no thermal or mechanical effects)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 3
xmax = 10
ymax = 3
[]
[./aquifer]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 1 0'
top_right = '10 2 0'
[../]
[./injection_area]
type = SideSetsAroundSubdomainGenerator
block = 1
new_boundary = 'injection_area'
normal = '-1 0 0'
input = 'aquifer'
[../]
[./outflow_area]
type = SideSetsAroundSubdomainGenerator
block = 1
new_boundary = 'outflow_area'
normal = '1 0 0'
input = 'injection_area'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caprock aquifer'
input = 'outflow_area'
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./porepressure]
initial_condition = 1e6
[../]
[]
[AuxVariables]
[./temperature]
initial_condition = 293
[../]
[]
[PorousFlowBasicTHM]
porepressure = porepressure
temperature = temperature
coupling_type = Hydro
gravity = '0 0 0'
fp = simple_fluid
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1.5e6
boundary = injection_area
[../]
[./constant_outflow_porepressure]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = outflow_area
pt_vals = '0 1e9'
multipliers = '0 1e9'
flux_function = 1e-6
PT_shift = 1e6
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.8
solid_bulk_compliance = 2e-7
fluid_bulk_modulus = 1e7
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1e-13 0 0 0 1e-13 0 0 0 1e-13'
[../]
[./permeability_caprock]
type = PorousFlowPermeabilityConst
block = caprock
permeability = '1e-15 0 0 0 1e-15 0 0 0 1e-15'
[../]
[]
[Preconditioning]
[./basic]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1e4
dt = 1e3
nl_abs_tol = 1e-15
nl_rel_tol = 1E-14
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/heterogeneous_materials/vol_expansion_poroperm.i
# Apply an increasing porepressure, with zero mechanical forces,
# and observe the corresponding volumetric expansion and porosity increase.
# Check that permeability is calculated correctly from porosity.
#
# P = t
# With the Biot coefficient being 1, the effective stresses should be
# stress_xx = stress_yy = stress_zz = t
# With bulk modulus = 1 then should have
# vol_strain = strain_xx + strain_yy + strain_zz = t.
#
# With the biot coefficient being 1, the porosity (phi) # at time t is:
# phi = 1 - (1 - phi0) / exp(vol_strain)
# where phi0 is the porosity at t = 0 and P = 0.
#
# The permeability (k) is
# k = k_anisotropic * f * d^2 * phi^n / (1-phi)^m
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./p]
[../]
[]
[BCs]
[./p]
type = FunctionDirichletBC
boundary = 'bottom top'
variable = p
function = t
[../]
[./xmin]
type = DirichletBC
boundary = left
variable = disp_x
value = 0
[../]
[./ymin]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0
[../]
[./zmin]
type = DirichletBC
boundary = back
variable = disp_z
value = 0
[../]
[]
[Kernels]
[./p_does_not_really_diffuse]
type = Diffusion
variable = p
[../]
[./TensorMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[./poro_x]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 1
variable = disp_x
component = 0
[../]
[./poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 1
variable = disp_y
component = 1
[../]
[./poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 1
variable = disp_z
component = 2
[../]
[]
[AuxVariables]
[./poro0]
order = CONSTANT
family = MONOMIAL
[../]
[./poro]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_x]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_y]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_z]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./poro0]
type = RandomIC
seed = 0
variable = poro0
max = 0.15
min = 0.05
[../]
[]
[AuxKernels]
[./poromat]
type = PorousFlowPropertyAux
property = porosity
variable = poro
[../]
[./perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[../]
[./perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[../]
[./perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'p'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
bulk_modulus = 1
shear_modulus = 1
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = p
capillary_pressure = pc
[../]
[./p_eff]
type = PorousFlowEffectiveFluidPressure
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = poro0
solid_bulk = 1
biot_coefficient = 1
[../]
[./permeability]
type = PorousFlowPermeabilityKozenyCarman
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
poroperm_function = kozeny_carman_fd2
f = 0.1
d = 5
m = 2
n = 7
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_atol -ksp_rtol'
petsc_options_value = 'gmres bjacobi 1E-10 1E-10 10 1E-15 1E-10'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
dt = 0.1
end_time = 1
[]
[Outputs]
exodus = true
execute_on = 'timestep_end'
[]
modules/porous_flow/test/tests/jacobian/chem14.i
# Check derivatives of PorousFlowPorosity with chemical=true
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
initial_condition = 0.1
[../]
[]
[AuxVariables]
[./eqm_k0]
initial_condition = 1.234
[../]
[./eqm_k1]
initial_condition = 0.987
[../]
[./temp]
initial_condition = 0.5
[../]
[./ini_sec_conc0]
initial_condition = 0.111
[../]
[./ini_sec_conc1]
initial_condition = 0.222
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowMassTimeDerivative # this is rather irrelevant: we just want something with Porosity in it
variable = a
fluid_component = 0
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = a
number_fluid_phases = 1
number_fluid_components = 2
number_aqueous_kinetic = 2
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temp
at_nodes = true
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
at_nodes = true
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = a
at_nodes = true
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = a
num_reactions = 2
equilibrium_constants = 'eqm_k0 eqm_k1'
primary_activity_coefficients = 1
reactions = '1E-10
2E-10' # so that mass_frac = a
specific_reactive_surface_area = '-44.4E-2 -12E-2'
kinetic_rate_constant = '0.678 0.7'
activation_energy = '4.4 3.3'
molar_volume = '3.3 2.2'
reference_temperature = 1
gas_constant = 7.4
at_nodes = true
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = 'ini_sec_conc0 ini_sec_conc1'
at_nodes = true
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
at_nodes = true
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
chemical = true
porosity_zero = 0.1
reference_chemistry = 'ini_sec_conc0 ini_sec_conc1'
initial_mineral_concentrations = 'ini_sec_conc0 ini_sec_conc1'
chemical_weights = '1.111 0.888' # so derivatives of porosity are big
at_nodes = true
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 0.1
[]
[Preconditioning]
[./check]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
modules/porous_flow/test/tests/jacobian/chem02.i
# PorousFlowPreDis, which is essentially checking the derivatives of the secondary concentrations in PorousFlowMassFractionAqueousPreDisChemistry
# Precipitation with temperature
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
initial_condition = 0.6
[../]
[./b]
initial_condition = 0.4
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1.234
[../]
[./temp]
initial_condition = 0.5
[../]
[./ini_sec_conc]
initial_condition = 0.222
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowPreDis
variable = a
mineral_density = 1E5
stoichiometry = 2
[../]
[./b]
type = PorousFlowPreDis
variable = b
mineral_density = 2.2E5
stoichiometry = 3
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.9
[../]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '2.5 3.8'
reactions = '1.1 1.2'
specific_reactive_surface_area = -44.4E-2
kinetic_rate_constant = 0.678
activation_energy = 4.4
molar_volume = 3.3
reference_temperature = 1
gas_constant = 7.4
theta_exponent = 1.1
eta_exponent = 1.2
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = ini_sec_conc
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 0.1
[]
[Preconditioning]
[./check]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_3D.i
# Using flux-limited TVD advection ala Kuzmin and Turek, employing PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 3D version
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
xmin = 0
xmax = 1
ny = 4
ymin = 0
ymax = 0.5
nz = 3
zmin = 0
zmax = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[./porepressure]
[../]
[./tracer]
[../]
[]
[ICs]
[./porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[../]
[./tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[../]
[./flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[../]
[./mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[../]
[./flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[../]
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[../]
[./no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[../]
[./remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[../]
[./remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[../]
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[../]
[./pc]
type = PorousFlowCapillaryPressureConst
[../]
[./advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[../]
[./advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[../]
[./relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[VectorPostprocessors]
[./tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0.5 2'
num_points = 11
sort_by = x
variable = tracer
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 0.3
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
print_linear_residuals = false
[./out]
type = CSV
execute_on = final
[../]
[]
modules/porous_flow/test/tests/energy_conservation/heat01.i
# checking that the heat-energy postprocessor correctly calculates the energy
# 0phase, constant porosity
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./temp]
[../]
[]
[ICs]
[./tinit]
type = FunctionIC
function = '100*x'
variable = temp
[../]
[]
[Kernels]
[./dummy]
type = TimeDerivative
variable = temp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp'
number_fluid_phases = 0
number_fluid_components = 0
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 2.2
density = 0.5
[../]
[]
[Postprocessors]
[./total_heat]
type = PorousFlowHeatEnergy
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1 1 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = heat01
csv = true
[]
modules/porous_flow/test/tests/chemistry/except22.i
# Exception test
# Zero fluid phases
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./a]
initial_condition = 0.5
[../]
[./ini_mineral_conc]
initial_condition = 0.2
[../]
[./mineral]
family = MONOMIAL
order = CONSTANT
[../]
[./porosity]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./mineral]
type = PorousFlowPropertyAux
property = mineral_concentration
mineral_species = 0
variable = mineral
[../]
[./porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./dummy]
type = Diffusion
variable = dummy
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = dummy
number_fluid_phases = 0
number_fluid_components = 2
number_aqueous_kinetic = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[Materials]
[./temperature_qp]
type = PorousFlowTemperature
temperature = 1
[../]
[./predis_qp]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = a
num_reactions = 1
equilibrium_constants = 0.5
primary_activity_coefficients = 2
reactions = 1
specific_reactive_surface_area = 0.5
kinetic_rate_constant = 0.6065306597126334
activation_energy = 3
molar_volume = 2
gas_constant = 6
reference_temperature = 0.5
[../]
[./mineral_conc_qp]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = ini_mineral_conc
[../]
[./porosity]
type = PorousFlowPorosity
chemical = true
porosity_zero = 0.6
reference_chemistry = ini_mineral_conc
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
nl_abs_tol = 1E-10
dt = 0.1
end_time = 0.4
[]
[Postprocessors]
[./porosity]
type = PointValue
point = '0 0 0'
variable = porosity
[../]
[./c]
type = PointValue
point = '0 0 0'
variable = mineral
[../]
[]
[Outputs]
csv = true
perf_graph = true
[]
modules/porous_flow/test/tests/jacobian/chem12.i
# PorousFlowPreDis, which is essentially checking the derivatives of the secondary concentrations in PorousFlowMassFractionAqueousPreDisChemistry
# Dissolution with temperature, with three primary variables and four reactions
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
initial_condition = 0.05
[../]
[./b]
initial_condition = 0.1
[../]
[./c]
initial_condition = 0.15
[../]
[./temp]
initial_condition = 0.5
[../]
[]
[AuxVariables]
[./eqm_k0]
initial_condition = 1.234
[../]
[./eqm_k1]
initial_condition = 1.999
[../]
[./eqm_k2]
initial_condition = 0.789
[../]
[./eqm_k3]
initial_condition = 1.111
[../]
[./ini_sec_conc0]
initial_condition = 0.02
[../]
[./ini_sec_conc1]
initial_condition = 0.04
[../]
[./ini_sec_conc2]
initial_condition = 0.06
[../]
[./ini_sec_conc3]
initial_condition = 0.08
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowPreDis
variable = a
mineral_density = '1E10 2E10 3E10 4E10'
stoichiometry = '1 1 2 0'
[../]
[./b]
type = PorousFlowPreDis
variable = b
mineral_density = '1.1E10 2.2E10 3.3E10 4.4E10'
stoichiometry = '2 -2 0 0.5'
[../]
[./c]
type = PorousFlowPreDis
variable = c
mineral_density = '0.1E10 0.2E10 0.3E10 0.4E10'
stoichiometry = '3 -3 0 1'
[../]
[./temp]
type = Diffusion
variable = temp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b c temp'
number_fluid_phases = 1
number_fluid_components = 4
number_aqueous_kinetic = 4
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.9
[../]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b c'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b c'
num_reactions = 4
equilibrium_constants = 'eqm_k0 eqm_k1 eqm_k2 eqm_k3'
primary_activity_coefficients = '0.5 0.8 0.9'
reactions = '1 2 3
1 -2 -3
2 0 0
0 0.5 1'
specific_reactive_surface_area = '-44.4E-2 22.1E-2 32.1E-1 -50E-2'
kinetic_rate_constant = '0.678 0.999 1.23 0.3'
activation_energy = '4.4 3.3 4.5 4.0'
molar_volume = '3.3 4.4 5.5 6.6'
reference_temperature = 1
gas_constant = 7.4
theta_exponent = '1.0 1.1 1.2 0.9'
eta_exponent = '1.2 1.01 1.1 1.2'
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = 'ini_sec_conc0 ini_sec_conc1 ini_sec_conc2 ini_sec_conc3'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 0.1
[]
[Preconditioning]
[./check]
type = SMP
full = true
petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
modules/porous_flow/test/tests/numerical_diffusion/fully_saturated_action.i
# Using the fully-saturated action, which does mass lumping but no upwinding
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./porepressure]
[../]
[./tracer]
[../]
[]
[ICs]
[./porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[../]
[./tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[../]
[]
[PorousFlowFullySaturated]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
mass_fraction_vars = tracer
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[../]
[./no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[../]
[./remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[../]
[./remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0
density0 = 1000.0
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[VectorPostprocessors]
[./tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 101
sort_by = x
variable = tracer
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-1
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[./out]
type = CSV
execute_on = final
[../]
[]
modules/porous_flow/examples/tutorial/10.i
# Unsaturated Darcy-Richards flow without using an Action
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[./make3D]
input = annular
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
[../]
[./shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[../]
[./aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[../]
[./injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomain_ids = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caps aquifer'
input = 'injection_area'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = pp
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
alpha = 1E-6
m = 0.6
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
[../]
[]
[Kernels]
[./time_derivative]
type = PorousFlowMassTimeDerivative
variable = pp
[../]
[./flux]
type = PorousFlowAdvectiveFlux
variable = pp
gravity = '0 0 0'
[../]
[]
[AuxVariables]
[./sat]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./saturation]
type = PorousFlowPropertyAux
variable = sat
property = saturation
[../]
[]
[BCs]
[./production]
type = PorousFlowSink
variable = pp
fluid_phase = 0
flux_function = 1E-2
use_relperm = true
boundary = injection_area
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[../]
[./permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[../]
[./saturation_calculator]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./temperature]
type = PorousFlowTemperature
temperature = 293
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 3
s_res = 0.1
sum_s_res = 0.1
phase = 0
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-7
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/sinks/PorousFlowPiecewiseLinearSink_BC_eg1.i
## This is an example input file showing how to set a Type I (Dirichlet) BC with PorousFlowPiecewiseLinearSink
##
## Problem setup:
## - The boundaries are set to P(x = 0) = 2e6 Pa, P(x = 1) = 1e6 and run to steady state.
## - The 2d domain is 1 m x 1 m
## - The permeability is set to 1E-15 m2, fluid viscosity = 1E-3 Pa-s
## - The steady state flux is calculated q = -k/mu*grad(P) = 1e-6 m/s
##
## Problem verification (in csv output):
## - The flux in and out of the domain are 1e-6 m/s (matching steady state solution)
## - The pressure at the left and right boundaries are set to 2e6 and 1e6 Pa, respectively
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
xmin = 0
xmax = 1
ny = 2
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./porepressure]
initial_condition = 1.5e6 # initial pressure in domain
[../]
[]
[PorousFlowBasicTHM]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
[]
[AuxVariables]
[./fluxes_out]
[../]
[./fluxes_in]
[../]
[]
[BCs]
[./in_left]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = 'left'
pt_vals = '-1e9 1e9' # x coordinates defining g
multipliers = '-1e9 1e9' # y coordinates defining g
PT_shift = 2.E6 # BC pressure
flux_function = 1E-5 # Variable C
fluid_phase = 0
save_in = fluxes_out
[../]
[./out_right]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = 'right'
pt_vals = '-1e9 1e9' # x coordinates defining g
multipliers = '-1e9 1e9' # y coordinates defining g
PT_shift = 1.E6 # BC pressure
flux_function = 1E-6 # Variable C
fluid_phase = 0
save_in = fluxes_in
[../]
[]
[Postprocessors]
[./left_flux]
type = NodalSum
boundary = 'left'
variable = fluxes_out
execute_on = 'timestep_end'
[../]
[./right_flux]
type = NodalSum
boundary = 'right'
variable = fluxes_in
execute_on = 'timestep_end'
[../]
[./left_pressure]
type = SideAverageValue
boundary = 'left'
variable = porepressure
execute_on = 'timestep_end'
[../]
[./right_pressure]
type = SideAverageValue
boundary = 'right'
variable = porepressure
execute_on = 'timestep_end'
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0
viscosity = 1.0E-3
density0 = 1000.0
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.8
solid_bulk_compliance = 2E-7
fluid_bulk_modulus = 1E7
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityConst
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-10
[]
[Outputs]
csv = true
[]
modules/porous_flow/test/tests/poroperm/PermFromPoro02.i
# Testing permeability from porosity
# Trivial test, checking calculated permeability is correct
# k = k_anisotropic * k0 * (1-phi0)^m/phi0^n * phi^n/(1-phi)^m
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Kernels]
[./flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[../]
[]
[BCs]
[./ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[../]
[./pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[../]
[]
[AuxVariables]
[./poro]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_x]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_y]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_z]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./poro]
type = PorousFlowPropertyAux
property = porosity
variable = poro
[../]
[./perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[../]
[./perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[../]
[./perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[../]
[]
[Postprocessors]
[./perm_x_bottom]
type = PointValue
variable = perm_x
point = '0 0 0'
[../]
[./perm_y_bottom]
type = PointValue
variable = perm_y
point = '0 0 0'
[../]
[./perm_z_bottom]
type = PointValue
variable = perm_z
point = '0 0 0'
[../]
[./perm_x_top]
type = PointValue
variable = perm_x
point = '3 0 0'
[../]
[./perm_y_top]
type = PointValue
variable = perm_y
point = '3 0 0'
[../]
[./perm_z_top]
type = PointValue
variable = perm_z
point = '3 0 0'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2.2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[../]
[../]
[]
[Materials]
[./permeability]
type = PorousFlowPermeabilityKozenyCarman
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
poroperm_function = kozeny_carman_phi0
k0 = 1e-10
phi0 = 0.05
m = 2
n = 7
[../]
[./temperature]
type = PorousFlowTemperature
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
modules/porous_flow/examples/tutorial/07.i
# Darcy flow with a tracer that precipitates causing mineralisation and porosity changes and permeability changes
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[./make3D]
input = annular
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
[../]
[./shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[../]
[./aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[../]
[./injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomain_ids = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caps aquifer'
input = 'injection_area'
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./porepressure]
[../]
[./tracer_concentration]
[../]
[]
[PorousFlowFullySaturated]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
mass_fraction_vars = tracer_concentration
number_aqueous_kinetic = 1
temperature = 283.0
[]
[AuxVariables]
[./eqm_k]
initial_condition = 0.1
[../]
[./mineral_conc]
family = MONOMIAL
order = CONSTANT
[../]
[./initial_and_reference_conc]
initial_condition = 0
[../]
[./porosity]
family = MONOMIAL
order = CONSTANT
[../]
[./permeability]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./mineral_conc]
type = PorousFlowPropertyAux
property = mineral_concentration
mineral_species = 0
variable = mineral_conc
[../]
[./porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[./permeability]
type = PorousFlowPropertyAux
property = permeability
column = 0
row = 0
variable = permeability
[../]
[]
[Kernels]
[./precipitation_dissolution]
type = PorousFlowPreDis
mineral_density = 1000.0
stoichiometry = 1
variable = tracer_concentration
[../]
[]
[BCs]
[./constant_injection_of_tracer]
type = PorousFlowSink
variable = tracer_concentration
flux_function = -5E-3
boundary = injection_area
[../]
[./constant_outer_porepressure]
type = DirichletBC
variable = porepressure
value = 0
boundary = rmax
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
chemical = true
initial_mineral_concentrations = initial_and_reference_conc
reference_chemistry = initial_and_reference_conc
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityKozenyCarman
block = aquifer
k0 = 1E-14
m = 2
n = 3
phi0 = 0.1
poroperm_function = kozeny_carman_phi0
[../]
[./permeability_caps]
type = PorousFlowPermeabilityKozenyCarman
block = caps
k0 = 1E-15
k_anisotropy = '1 0 0 0 1 0 0 0 0.1'
m = 2
n = 3
phi0 = 0.1
poroperm_function = kozeny_carman_phi0
[../]
[./precipitation_dissolution]
type = PorousFlowAqueousPreDisChemistry
reference_temperature = 283.0
activation_energy = 1 # irrelevant because T=Tref
equilibrium_constants = eqm_k # equilibrium tracer concentration
kinetic_rate_constant = 1E-8
molar_volume = 1
num_reactions = 1
primary_activity_coefficients = 1
primary_concentrations = tracer_concentration
reactions = 1
specific_reactive_surface_area = 1
[../]
[./mineral_concentration]
type = PorousFlowAqueousPreDisMineral
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-10
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/jacobian/phe01.i
# Capped weak-plane plasticity, Kernel = PorousFlowPlasticHeatEnergy
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./temperature]
[../]
[]
[ICs]
[./disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[../]
[./disp_y]
type = RandomIC
variable = disp_y
min = -0.1
max = 0.1
[../]
[./disp_z]
type = RandomIC
variable = disp_z
min = -0.1
max = 0.1
[../]
[./temp]
type = RandomIC
variable = temperature
min = 0.1
max = 0.2
[../]
[]
[Kernels]
[./phe]
type = PorousFlowPlasticHeatEnergy
variable = temperature
[../]
[./dummy_disp_x]
type = PorousFlowPlasticHeatEnergy
coeff = -1.3
variable = disp_x
[../]
[./dummy_disp_y]
type = PorousFlowPlasticHeatEnergy
coeff = 1.1
variable = disp_y
[../]
[./dummy_disp_z]
type = PorousFlowPlasticHeatEnergy
coeff = 0.2
variable = disp_z
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'temperature disp_x disp_y disp_z'
number_fluid_phases = 0
number_fluid_components = 0
[../]
[./coh]
type = TensorMechanicsHardeningExponential
value_0 = 1
value_residual = 2
rate = 1
[../]
[./tanphi]
type = TensorMechanicsHardeningExponential
value_0 = 1.0
value_residual = 0.5
rate = 2
[../]
[./tanpsi]
type = TensorMechanicsHardeningExponential
value_0 = 0.1
value_residual = 0.05
rate = 3
[../]
[./t_strength]
type = TensorMechanicsHardeningExponential
value_0 = 100
value_residual = 100
rate = 1
[../]
[./c_strength]
type = TensorMechanicsHardeningCubic
value_0 = 1
value_residual = 0
internal_0 = -2
internal_limit = 0
[../]
[]
[Materials]
[./temp]
type = PorousFlowTemperature
temperature = temperature
[../]
[./porosity]
type = PorousFlowPorosity
thermal = true
mechanical = true
porosity_zero = 0.3
thermal_expansion_coeff = 1.3
[../]
[./volstrain]
type = PorousFlowVolumetricStrain
[../]
[./phe]
type = ComputePlasticHeatEnergy
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
lambda = 1.0
shear_modulus = 2.0
[../]
[./strain]
type = ComputeIncrementalSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = '0 0 0 0 0 1 0 1 -1.5'
eigenstrain_name = ini_stress
[../]
[./admissible]
type = ComputeMultipleInelasticStress
inelastic_models = mc
tangent_operator = nonlinear
[../]
[./mc]
type = CappedWeakPlaneStressUpdate
cohesion = coh
tan_friction_angle = tanphi
tan_dilation_angle = tanpsi
tensile_strength = t_strength
compressive_strength = c_strength
max_NR_iterations = 20
tip_smoother = 0
smoothing_tol = 1
yield_function_tol = 1E-10
perfect_guess = false
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
[]
modules/porous_flow/test/tests/energy_conservation/except02.i
# checking that the heat-energy postprocessor throws the correct error if the kernel_variable_number is illegal
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
[../]
[./temp]
[../]
[]
[ICs]
[./tinit]
type = FunctionIC
function = '100*x'
variable = temp
[../]
[./pinit]
type = FunctionIC
function = x
variable = pp
[../]
[]
[Kernels]
[./dummyt]
type = TimeDerivative
variable = temp
[../]
[./dummyp]
type = TimeDerivative
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 1
viscosity = 0.001
thermal_expansion = 0
cv = 1.3
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 2.2
density = 0.5
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[]
[Postprocessors]
[./total_heat]
type = PorousFlowHeatEnergy
kernel_variable_number = 2
[../]
[./rock_heat]
type = PorousFlowHeatEnergy
[../]
[./fluid_heat]
type = PorousFlowHeatEnergy
include_porous_skeleton = false
phase = 0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1 1 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = except01
csv = true
[]
modules/porous_flow/test/tests/poroperm/PermFromPoro03.i
# Testing permeability from porosity
# Trivial test, checking calculated permeability is correct
# k = k_anisotropic * B * exp(A * phi)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Kernels]
[./flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[../]
[]
[BCs]
[./ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[../]
[./pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[../]
[]
[AuxVariables]
[./poro]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_x]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_y]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_z]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./poro]
type = PorousFlowPropertyAux
property = porosity
variable = poro
[../]
[./perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[../]
[./perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[../]
[./perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[../]
[]
[Postprocessors]
[./perm_x_bottom]
type = PointValue
variable = perm_x
point = '0 0 0'
[../]
[./perm_y_bottom]
type = PointValue
variable = perm_y
point = '0 0 0'
[../]
[./perm_z_bottom]
type = PointValue
variable = perm_z
point = '0 0 0'
[../]
[./perm_x_top]
type = PointValue
variable = perm_x
point = '3 0 0'
[../]
[./perm_y_top]
type = PointValue
variable = perm_y
point = '3 0 0'
[../]
[./perm_z_top]
type = PointValue
variable = perm_z
point = '3 0 0'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2.2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[../]
[../]
[]
[Materials]
[./permeability]
type = PorousFlowPermeabilityExponential
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
poroperm_function = exp_k
A = 10
B = 1e-8
[../]
[./temperature]
type = PorousFlowTemperature
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
modules/porous_flow/test/tests/chemistry/except14.i
# Exception test.
# Incorrect number of initial concentrations
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = Diffusion
variable = a
[../]
[./b]
type = Diffusion
variable = b
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1E-6
[../]
[./ini_conc_0]
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '1 1'
reactions = '1 1'
specific_reactive_surface_area = 1.0
kinetic_rate_constant = 1.0e-8
activation_energy = 1.5e4
molar_volume = 1
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = 'ini_conc_0 ini_conc_0'
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[]
modules/porous_flow/test/tests/poroperm/PermFromPoro05.i
# Testing permeability from porosity
# Trivial test, checking calculated permeability is correct
# k = k_anisotropic * k
# with ln k = A * phi + B
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Kernels]
[./flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[../]
[]
[BCs]
[./ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[../]
[./pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[../]
[]
[AuxVariables]
[./poro]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_x]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_y]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_z]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./poro]
type = PorousFlowPropertyAux
property = porosity
variable = poro
[../]
[./perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[../]
[./perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[../]
[./perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[../]
[]
[Postprocessors]
[./perm_x_bottom]
type = PointValue
variable = perm_x
point = '0 0 0'
[../]
[./perm_y_bottom]
type = PointValue
variable = perm_y
point = '0 0 0'
[../]
[./perm_z_bottom]
type = PointValue
variable = perm_z
point = '0 0 0'
[../]
[./perm_x_top]
type = PointValue
variable = perm_x
point = '3 0 0'
[../]
[./perm_y_top]
type = PointValue
variable = perm_y
point = '3 0 0'
[../]
[./perm_z_top]
type = PointValue
variable = perm_z
point = '3 0 0'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2.2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityExponential
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
poroperm_function = ln_k
A = 10.0
B = -18.420681
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
modules/porous_flow/test/tests/poro_elasticity/pp_generation_action.i
# Same as pp_generation.i, but using an Action
#
# A sample is constrained on all sides and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie kg/second per cubic meter), and the
# rise in porepressure is observed.
#
# Source = s (units = kg/m^3/second)
#
# Expect:
# fluid_mass = mass0 + s*t
# stress = 0 (remember this is effective stress)
# Porepressure = fluid_bulk*log(fluid_mass_density/density_P0), where fluid_mass_density = fluid_mass*porosity
# porosity = biot+(phi0-biot)*exp(pp(biot-1)/solid_bulk)
#
# Parameters:
# Biot coefficient = 0.3
# Phi0 = 0.1
# Solid Bulk modulus = 2
# fluid_bulk = 13
# density_P0 = 1
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./porepressure]
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 13.0
viscosity = 1.0
density0 = 1.0
[../]
[../]
[]
[PorousFlowUnsaturated]
coupling_type = HydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
biot_coefficient = 0.3
gravity = '0 0 0'
fp = the_simple_fluid
van_genuchten_alpha = 1.0
van_genuchten_m = 0.8
relative_permeability_type = Corey
relative_permeability_exponent = 0.0
[]
[BCs]
[./confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[../]
[./confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[../]
[]
[Kernels]
[./source]
type = BodyForce
function = 0.1
variable = porepressure
[../]
[]
[AuxVariables]
[./porosity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.3
solid_bulk = 2
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 1 0 0 0 1' # unimportant
[../]
[]
[Functions]
[./porosity_analytic]
type = ParsedFunction
value = 'biot+(phi0-biot)*exp(pp*(biot-1)/bulk)'
vars = 'biot phi0 pp bulk'
vals = '0.3 0.1 p0 2'
[../]
[]
[Postprocessors]
[./fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
use_displaced_mesh = true
[../]
[./porosity]
type = PointValue
outputs = 'console csv'
point = '0 0 0'
variable = porosity
[../]
[./p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[../]
[./porosity_analytic]
type = FunctionValuePostprocessor
function = porosity_analytic
[../]
[./zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[../]
[./stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[../]
[./stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[../]
[./stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-14 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_action
csv = true
[]
modules/porous_flow/examples/tutorial/03.i
# Darcy flow with heat advection and conduction
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[./make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[../]
[./shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[../]
[./aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[../]
[./injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomain_ids = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caps aquifer'
input = 'injection_area'
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./porepressure]
[../]
[./temperature]
initial_condition = 293
scaling = 1E-8
[../]
[]
[PorousFlowBasicTHM]
porepressure = porepressure
temperature = temperature
coupling_type = ThermoHydro
gravity = '0 0 0'
fp = the_simple_fluid
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1E6
boundary = injection_area
[../]
[./constant_injection_temperature]
type = DirichletBC
variable = temperature
value = 313
boundary = injection_area
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
thermal_expansion = 0.0002
cp = 4194
cv = 4186
porepressure_coefficient = 0
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.8
solid_bulk_compliance = 2E-7
fluid_bulk_modulus = 1E7
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[../]
[./permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[../]
[./thermal_expansion]
type = PorousFlowConstantThermalExpansionCoefficient
biot_coefficient = 0.8
drained_coefficient = 0.003
fluid_coefficient = 0.0002
[../]
[./rock_internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[../]
[./thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '10 0 0 0 10 0 0 0 10'
block = 'caps aquifer'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-10
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/jacobian/chem13.i
# PorousFlowPreDis, which is essentially checking the derivatives of the secondary concentrations in PorousFlowMassFractionAqueousPreDisChemistry
# Dissolution with temperature, with three primary variables and four reactions, and some zero concnetrations
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
initial_condition = 0
[../]
[./b]
initial_condition = 0
[../]
[./c]
initial_condition = 0
[../]
[./temp]
initial_condition = 0.5
[../]
[]
[AuxVariables]
[./eqm_k0]
initial_condition = 1.234
[../]
[./eqm_k1]
initial_condition = 1.999
[../]
[./eqm_k2]
initial_condition = 0.789
[../]
[./eqm_k3]
initial_condition = 1.111
[../]
[./ini_sec_conc0]
initial_condition = 0.02
[../]
[./ini_sec_conc1]
initial_condition = 0.04
[../]
[./ini_sec_conc2]
initial_condition = 0.06
[../]
[./ini_sec_conc3]
initial_condition = 0.08
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowPreDis
variable = a
mineral_density = '1E10 2E10 3E10 4E10'
stoichiometry = '1 1 2 0'
[../]
[./b]
type = PorousFlowPreDis
variable = b
mineral_density = '1.1E10 2.2E10 3.3E10 4.4E10'
stoichiometry = '2 -2 0 0.5'
[../]
[./c]
type = PorousFlowPreDis
variable = c
mineral_density = '0.1E10 0.2E10 0.3E10 0.4E10'
stoichiometry = '3 -3 0 1'
[../]
[./temp]
type = Diffusion
variable = temp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b c temp'
number_fluid_phases = 1
number_fluid_components = 4
number_aqueous_kinetic = 4
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.9
[../]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b c'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b c'
num_reactions = 4
equilibrium_constants = 'eqm_k0 eqm_k1 eqm_k2 eqm_k3'
primary_activity_coefficients = '0.5 0.8 0.9'
reactions = '0.5 2 3
1.5 -2 3
2 0 0
0 0.5 1'
specific_reactive_surface_area = '-44.4E-2 22.1E-2 32.1E-1 -50E-2'
kinetic_rate_constant = '0.678 0.999 1.23 0.3'
activation_energy = '4.4 3.3 4.5 4.0'
molar_volume = '3.3 4.4 5.5 6.6'
reference_temperature = 1
gas_constant = 7.4
theta_exponent = '1.0 1.1 1.2 0.9'
eta_exponent = '1.2 1.01 1.1 1.2'
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = 'ini_sec_conc0 ini_sec_conc1 ini_sec_conc2 ini_sec_conc3'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 0.1
[]
[Preconditioning]
[./check]
type = SMP
full = true
petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
modules/porous_flow/test/tests/jacobian/denergy05.i
# 2phase, 1 component, with solid displacements, time derivative of energy-density, THM porosity wth _ensure_positive = true, and compressive strains
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./pgas]
[../]
[./pwater]
[../]
[./temp]
[../]
[]
[ICs]
[./disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.0
[../]
[./disp_y]
type = RandomIC
variable = disp_y
min = -0.1
max = 0.0
[../]
[./disp_z]
type = RandomIC
variable = disp_z
min = -0.1
max = 0.0
[../]
[./pgas]
type = RandomIC
variable = pgas
max = 0.01
min = 0.0
[../]
[./pwater]
type = RandomIC
variable = pwater
max = 0.0
min = -0.01
[../]
[./temp]
type = RandomIC
variable = temp
max = 1.0
min = 0.0
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./dummy_pgas]
type = Diffusion
variable = pgas
[../]
[./dummy_pwater]
type = Diffusion
variable = pwater
[../]
[./energy_dot]
type = PorousFlowEnergyTimeDerivative
variable = temp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas temp pwater disp_x disp_y disp_z'
number_fluid_phases = 2
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
cv = 1.3
[../]
[./simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
cv = 0.7
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5 0.75'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*0.75/3 = 1
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
thermal = true
porosity_zero = 0.7
thermal_expansion_coeff = 0.7
biot_coefficient = 0.9
solid_bulk = 10
[../]
[./p_eff]
type = PorousFlowEffectiveFluidPressure
[../]
[./rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1.1
density = 0.5
[../]
[./ppss]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = pgas
capillary_pressure = pc
[../]
[./simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[../]
[./simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[../]
[]
[Preconditioning]
active = check
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[../]
[./check]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
modules/porous_flow/test/tests/jacobian/heat_vol_exp01.i
# Tests the PorousFlowHeatVolumetricExpansion kernel
# Fluid with constant bulk modulus, van-Genuchten capillary, THM porosity
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./porepressure]
[../]
[./temperature]
[../]
[]
[ICs]
[./disp_x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./disp_y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./disp_z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[./p]
type = RandomIC
min = -1
max = 0
variable = porepressure
[../]
[./t]
type = RandomIC
min = 1
max = 2
variable = temperature
[../]
[]
[BCs]
# necessary otherwise volumetric strain rate will be zero
[./disp_x]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./disp_y]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'left right'
[../]
[./disp_z]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'left right'
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
displacements = 'disp_x disp_y disp_z'
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
displacements = 'disp_x disp_y disp_z'
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
displacements = 'disp_x disp_y disp_z'
component = 2
[../]
[./dummy]
type = TimeDerivative
variable = porepressure
[../]
[./temp]
type = PorousFlowHeatVolumetricExpansion
variable = temperature
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure temperature disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
cv = 1.3
[../]
[../]
[]
[Materials]
[./p_eff]
type = PorousFlowEffectiveFluidPressure
[../]
[./temperature]
type = PorousFlowTemperature
temperature = temperature
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '2 3'
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss_nodal]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
thermal = true
porosity_zero = 0.1
biot_coefficient = 0.5
solid_bulk = 1
thermal_expansion_coeff = 0.1
reference_temperature = 0.1
reference_porepressure = 0.2
[../]
[./rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1.1
density = 0.5
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-5
[]
[Outputs]
execute_on = 'timestep_end'
file_base = jacobian2
exodus = false
[]
modules/porous_flow/test/tests/jacobian/chem09.i
# PorousFlowPreDis, which is essentially checking the derivatives of the secondary concentrations in PorousFlowMassFractionAqueousPreDisChemistry
# Dissolution with temperature, with one primary variable = 0 and stoichiometry = 1
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
initial_condition = 0.0
[../]
[./b]
initial_condition = 0.2
[../]
[./temp]
initial_condition = 0.5
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1.234
[../]
[./ini_sec_conc]
initial_condition = 0.222
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowPreDis
variable = a
mineral_density = 1E10
stoichiometry = 1
[../]
[./b]
type = PorousFlowPreDis
variable = b
mineral_density = 2.2E10
stoichiometry = 3
[../]
[./temp]
type = Diffusion
variable = temp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b temp'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.9
[../]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '0.5 0.8'
reactions = '1 3'
specific_reactive_surface_area = -44.4E-2
kinetic_rate_constant = 0.678
activation_energy = 4.4
molar_volume = 3.3
reference_temperature = 1
gas_constant = 7.4
theta_exponent = 1
eta_exponent = 1.2
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = ini_sec_conc
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 0.1
[]
[Preconditioning]
[./check]
type = SMP
full = true
petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_1D_adaptivity.i
# Using flux-limited TVD advection ala Kuzmin and Turek, mploying PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 1D version with adaptivity
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[Adaptivity]
initial_steps = 1
initial_marker = tracer_marker
marker = tracer_marker
max_h_level = 1
[./Markers]
[./tracer_marker]
type = ValueRangeMarker
variable = tracer
lower_bound = 0.02
upper_bound = 0.98
[../]
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[./porepressure]
[../]
[./tracer]
[../]
[]
[ICs]
[./porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[../]
[./tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[../]
[./flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[../]
[./mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[../]
[./flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[../]
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[../]
[./no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[../]
[./remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[../]
[./remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[../]
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[../]
[./pc]
type = PorousFlowCapillaryPressureConst
[../]
[./advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[../]
[./advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[../]
[./relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[VectorPostprocessors]
[./tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 11
sort_by = x
variable = tracer
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[./out]
type = CSV
execute_on = final
[../]
[]
modules/porous_flow/test/tests/numerical_diffusion/no_action.i
# Using upwinded and mass-lumped PorousFlow Kernels
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[./porepressure]
[../]
[./tracer]
[../]
[]
[ICs]
[./porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[../]
[./tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[../]
[./flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = tracer
[../]
[./mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[../]
[./flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = porepressure
[../]
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[../]
[./no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[../]
[./remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[../]
[./remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[../]
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[../]
[./pc]
type = PorousFlowCapillaryPressureConst
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[../]
[./relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[VectorPostprocessors]
[./tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 101
sort_by = x
variable = tracer
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-1
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[./out]
type = CSV
execute_on = final
[../]
[]
modules/porous_flow/test/tests/chemistry/except9.i
# Exception test.
# Incorrect number of kinetic rate constants
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = Diffusion
variable = a
[../]
[./b]
type = Diffusion
variable = b
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1E-6
[../]
[./pressure]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '1 1'
reactions = '1 1'
specific_reactive_surface_area = 1.0
kinetic_rate_constant = '1.0e-8 1'
activation_energy = '1.5e4'
molar_volume = 1
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[]
modules/porous_flow/examples/tutorial/06.i
# Darcy flow with a tracer
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[./make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[../]
[./shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[../]
[./aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[../]
[./injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomain_ids = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caps aquifer'
input = 'injection_area'
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./porepressure]
[../]
[./tracer_concentration]
[../]
[]
[ICs]
[./tracer_concentration]
type = FunctionIC
function = '0.5*if(x*x+y*y<1.01,1,0)'
variable = tracer_concentration
[../]
[]
[PorousFlowFullySaturated]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
mass_fraction_vars = tracer_concentration
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1E6
boundary = injection_area
[../]
[./constant_outer_porepressure]
type = DirichletBC
variable = porepressure
value = 0
boundary = rmax
[../]
[./injected_tracer]
type = DirichletBC
variable = tracer_concentration
value = 0.5
boundary = injection_area
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[../]
[./permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_rel_tol = 1E-14
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/jacobian/fflux08.i
# 1phase, 1component, constant viscosity, Kozeny-Carman permeability
# density with constant bulk, Corey relative perm, nonzero gravity, unsaturated with vanGenuchten
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./pp]
[../]
[]
[ICs]
[./disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[../]
[./disp_y]
type = RandomIC
variable = disp_y
min = -0.1
max = 0.1
[../]
[./disp_z]
type = RandomIC
variable = disp_z
min = -0.1
max = 0.1
[../]
[./pp]
type = RandomIC
variable = pp
min = -1
max = 1
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
gravity = '-1 -0.1 0'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5 0.75'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*0.75/3 = 1
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.5
solid_bulk = 1
[../]
[./p_eff]
type = PorousFlowEffectiveFluidPressure
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./permeability]
type = PorousFlowPermeabilityKozenyCarman
poroperm_function = kozeny_carman_phi0
k_anisotropy = '1 0 0 0 2 0 0 0 3'
phi0 = 0.1
n = 1.0
m = 2.0
k0 = 2
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[]
[Preconditioning]
active = check
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[../]
[./check]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
modules/porous_flow/examples/coal_mining/coarse_with_fluid.i
# Strata deformation and fluid flow aaround a coal mine - 3D model
#
# A "half model" is used. The mine is 400m deep and
# just the roof is studied (-400<=z<=0). The mining panel
# sits between 0<=x<=150, and 0<=y<=1000, so this simulates
# a coal panel that is 300m wide and 1000m long. The outer boundaries
# are 1km from the excavation boundaries.
#
# The excavation takes 0.5 years.
#
# The boundary conditions for this simulation are:
# - disp_x = 0 at x=0 and x=1150
# - disp_y = 0 at y=-1000 and y=1000
# - disp_z = 0 at z=-400, but there is a time-dependent
# Young modulus that simulates excavation
# - wc_x = 0 at y=-1000 and y=1000
# - wc_y = 0 at x=0 and x=1150
# - no flow at x=0, z=-400 and z=0
# - fixed porepressure at y=-1000, y=1000 and x=1150
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# A single-phase unsaturated fluid is used.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa, and time units are measured in years.
#
# The initial porepressure is hydrostatic with P=0 at z=0, so
# Porepressure ~ - 0.01*z MPa, where the fluid has density 1E3 kg/m^3 and
# gravity = = 10 m.s^-2 = 1E-5 MPa m^2/kg.
# To be more accurate, i use
# Porepressure = -bulk * log(1 + g*rho0*z/bulk)
# where bulk=2E3 MPa and rho0=1Ee kg/m^3.
# The initial stress is consistent with the weight force from undrained
# density 2500 kg/m^3, and fluid porepressure, and a Biot coefficient of 0.7, ie,
# stress_zz^effective = 0.025*z + 0.7 * initial_porepressure
# The maximum and minimum principal horizontal effective stresses are
# assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 2 MPa
# MC friction angle = 35 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa
# WeakPlane cohesion = 0.1 MPa
# WeakPlane friction angle = 30 deg
# WeakPlane dilation angle = 10 deg
# WeakPlane tensile strength = 0.1 MPa
# WeakPlane compressive strength = 100 MPa softening to 1 MPa at strain = 1
# Fluid density at zero porepressure = 1E3 kg/m^3
# Fluid bulk modulus = 2E3 MPa
# Fluid viscosity = 1.1E-3 Pa.s = 1.1E-9 MPa.s = 3.5E-17 MPa.year
#
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
PorousFlowDictator = dictator
biot_coefficient = 0.7
[]
[Mesh]
[file]
type = FileMeshGenerator
file = mesh/coarse.e
[]
[./xmin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = xmin
normal = '-1 0 0'
input = file
[../]
[./xmax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = xmax
normal = '1 0 0'
input = xmin
[../]
[./ymin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = ymin
normal = '0 -1 0'
input = xmax
[../]
[./ymax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = ymax
normal = '0 1 0'
input = ymin
[../]
[./zmax]
type = SideSetsAroundSubdomainGenerator
block = 16
new_boundary = zmax
normal = '0 0 1'
input = ymax
[../]
[./zmin]
type = SideSetsAroundSubdomainGenerator
block = 2
new_boundary = zmin
normal = '0 0 -1'
input = zmax
[../]
[./excav]
type = SubdomainBoundingBoxGenerator
input = zmin
block_id = 1
bottom_left = '0 0 -400'
top_right = '150 1000 -397'
[../]
[./roof]
type = SideSetsBetweenSubdomainsGenerator
master_block = 3
paired_block = 1
input = excav
new_boundary = roof
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[./wc_y]
[../]
[./porepressure]
scaling = 1E-5
[../]
[]
[ICs]
[./porepressure]
type = FunctionIC
variable = porepressure
function = ini_pp
[../]
[]
[Kernels]
[./cx_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_x
component = 0
[../]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./y_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_y
displacements = 'wc_x wc_y wc_z'
component = 1
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./y_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_y
component = 1
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[../]
[./poro_x]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_x
component = 0
[../]
[./poro_y]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./poro_z]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
component = 2
variable = disp_z
[../]
[./mass0]
type = PorousFlowMassTimeDerivative
use_displaced_mesh = false
fluid_component = 0
variable = porepressure
[../]
[./flux]
type = PorousFlowAdvectiveFlux
use_displaced_mesh = false
variable = porepressure
gravity = '0 0 -10E-6'
fluid_component = 0
[../]
[./poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
use_displaced_mesh = false
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
variable = porepressure
fluid_component = 0
[../]
[]
[AuxVariables]
[./saturation]
order = CONSTANT
family = MONOMIAL
[../]
[./darcy_x]
order = CONSTANT
family = MONOMIAL
[../]
[./darcy_y]
order = CONSTANT
family = MONOMIAL
[../]
[./darcy_z]
order = CONSTANT
family = MONOMIAL
[../]
[./porosity]
order = CONSTANT
family = MONOMIAL
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_yx]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_zy]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./saturation_water]
type = PorousFlowPropertyAux
variable = saturation
property = saturation
phase = 0
execute_on = timestep_end
[../]
[./darcy_x]
type = PorousFlowDarcyVelocityComponent
variable = darcy_x
gravity = '0 0 -10E-6'
component = x
[../]
[./darcy_y]
type = PorousFlowDarcyVelocityComponent
variable = darcy_y
gravity = '0 0 -10E-6'
component = y
[../]
[./darcy_z]
type = PorousFlowDarcyVelocityComponent
variable = darcy_z
gravity = '0 0 -10E-6'
component = z
[../]
[./porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
execute_on = timestep_end
[../]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[../]
[./stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
execute_on = timestep_end
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[../]
[./stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[../]
[./total_strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./total_strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[../]
[./total_strain_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[../]
[./total_strain_yx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yx
index_i = 1
index_j = 0
execute_on = timestep_end
[../]
[./total_strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[./total_strain_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[../]
[./total_strain_zx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[../]
[./total_strain_zy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[../]
[./total_strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[../]
[./perm_xx]
type = PorousFlowPropertyAux
property = permeability
variable = perm_xx
row = 0
column = 0
execute_on = timestep_end
[../]
[./perm_yy]
type = PorousFlowPropertyAux
property = permeability
variable = perm_yy
row = 1
column = 1
execute_on = timestep_end
[../]
[./perm_zz]
type = PorousFlowPropertyAux
property = permeability
variable = perm_zz
row = 2
column = 2
execute_on = timestep_end
[../]
[./mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
execute_on = timestep_end
[../]
[./mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
execute_on = timestep_end
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
execute_on = timestep_end
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
execute_on = timestep_end
[../]
[./mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
execute_on = timestep_end
[../]
[./mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
execute_on = timestep_end
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
execute_on = timestep_end
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
execute_on = timestep_end
[../]
[]
[BCs]
[./no_x]
type = DirichletBC
variable = disp_x
boundary = 'xmin xmax'
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = 'ymin ymax'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = zmin
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = 'ymin ymax'
value = 0.0
[../]
[./no_wc_y]
type = DirichletBC
variable = wc_y
boundary = 'xmin xmax'
value = 0.0
[../]
[./fix_porepressure]
type = FunctionDirichletBC
variable = porepressure
boundary = 'ymin ymax xmax'
function = ini_pp
[../]
[./roof_porepressure]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
pt_vals = '-1E3 1E3'
multipliers = '-1 1'
fluid_phase = 0
flux_function = roof_conductance
boundary = roof
[../]
[./roof_bcs]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = roof
[../]
[]
[Functions]
[./ini_pp]
type = ParsedFunction
vars = 'bulk p0 g rho0'
vals = '2E3 0.0 1E-5 1E3'
value = '-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)'
[../]
[./ini_xx]
type = ParsedFunction
vars = 'bulk p0 g rho0 biot'
vals = '2E3 0.0 1E-5 1E3 0.7'
value = '0.8*(2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)))'
[../]
[./ini_zz]
type = ParsedFunction
vars = 'bulk p0 g rho0 biot'
vals = '2E3 0.0 1E-5 1E3 0.7'
value = '2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk))'
[../]
[./excav_sideways]
type = ParsedFunction
vars = 'end_t ymin ymax minval maxval slope'
vals = '0.5 0 1000.0 1E-9 1 60'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
value = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[../]
[./density_sideways]
type = ParsedFunction
vars = 'end_t ymin ymax minval maxval'
vals = '0.5 0 1000.0 0 2500'
value = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[../]
[./roof_conductance]
type = ParsedFunction
vars = 'end_t ymin ymax maxval minval'
vals = '0.5 0 1000.0 1E7 0'
value = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),maxval,minval)'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1 # MPa^-1
[../]
[./mc_coh_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.99 # MPa
value_residual = 2.01 # MPa
rate = 1.0
[../]
[./mc_fric]
type = TensorMechanicsHardeningConstant
value = 0.61 # 35deg
[../]
[./mc_dil]
type = TensorMechanicsHardeningConstant
value = 0.15 # 8deg
[../]
[./mc_tensile_str_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[../]
[./mc_compressive_str]
type = TensorMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[../]
[./wp_coh_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[../]
[./wp_tan_fric]
type = TensorMechanicsHardeningConstant
value = 0.26 # 15deg
[../]
[./wp_tan_dil]
type = TensorMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = TensorMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E3
density0 = 1000
thermal_expansion = 0
viscosity = 3.5E-17
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity_bulk]
type = PorousFlowPorosity
fluid = true
mechanical = true
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
ensure_positive = true
porosity_zero = 0.02
solid_bulk = 5.3333E3
[../]
[./porosity_excav]
type = PorousFlowPorosityConst
block = 1
porosity = 1.0
[../]
[./permeability_bulk]
type = PorousFlowPermeabilityKozenyCarman
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
poroperm_function = kozeny_carman_phi0
k0 = 1E-15
phi0 = 0.02
n = 2
m = 2
[../]
[./permeability_excav]
type = PorousFlowPermeabilityConst
block = 1
permeability = '0 0 0 0 0 0 0 0 0'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 4
s_res = 0.4
sum_s_res = 0.4
phase = 0
[../]
[./elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[../]
[./elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[../]
[./stress_0]
type = ComputeMultipleInelasticCosseratStress
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./stress_1]
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./mc]
type = CappedMohrCoulombCosseratStressUpdate
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.05
smoothing_tol = 0.05 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./undrained_density_0]
type = GenericConstantMaterial
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
prop_names = density
prop_values = 2500
[../]
[./undrained_density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Postprocessors]
[./min_roof_disp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = disp_z
[../]
[./min_roof_pp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = porepressure
[../]
[./min_surface_disp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = disp_z
[../]
[./min_surface_pp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = porepressure
[../]
[./max_perm_zz]
type = ElementExtremeValue
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
variable = perm_zz
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
# best overall
# petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
# petsc_options_value = ' lu mumps'
# best if you do not have mumps:
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu superlu_dist'
# best if you do not have mumps or superlu_dist:
#petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' asm 2 lu gmres 200'
# very basic:
#petsc_options_iname = '-pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' bjacobi gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 200
nl_max_its = 30
start_time = 0.0
dt = 0.014706
end_time = 0.014706 #0.5
[]
[Outputs]
interval = 1
print_linear_residuals = true
exodus = true
csv = true
console = true
[]
modules/porous_flow/examples/tutorial/05_tabulated.i
# Darcy flow with heat advection and conduction, using Water97 properties
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[./make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[../]
[./shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[../]
[./aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[../]
[./injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomain_ids = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caps aquifer'
input = 'injection_area'
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./porepressure]
initial_condition = 1E6
[../]
[./temperature]
initial_condition = 313
scaling = 1E-8
[../]
[]
[PorousFlowBasicTHM]
porepressure = porepressure
temperature = temperature
coupling_type = ThermoHydro
gravity = '0 0 0'
fp = tabulated_water
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 2E6
boundary = injection_area
[../]
[./constant_injection_temperature]
type = DirichletBC
variable = temperature
value = 333
boundary = injection_area
[../]
[]
[Modules]
[./FluidProperties]
[./true_water]
type = Water97FluidProperties
[../]
[./tabulated_water]
type = TabulatedFluidProperties
fp = true_water
temperature_min = 275
interpolated_properties = 'density viscosity enthalpy internal_energy'
fluid_property_file = water97_tabulated.csv
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.8
solid_bulk_compliance = 2E-7
fluid_bulk_modulus = 1E7
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[../]
[./permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[../]
[./thermal_expansion]
type = PorousFlowConstantThermalExpansionCoefficient
biot_coefficient = 0.8
drained_coefficient = 0.003
fluid_coefficient = 0.0002
[../]
[./rock_internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[../]
[./thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '10 0 0 0 10 0 0 0 10'
block = 'caps aquifer'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-10
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/poroperm/poro_hm.i
# Test that porosity is correctly calculated.
# Porosity = biot + (phi0 - biot) * exp(-vol_strain + (biot - 1) / solid_bulk * (porepressure - ref_pressure))
# The parameters used are:
# biot = 0.7
# phi0 = 0.5
# vol_strain = 0.5
# solid_bulk = 0.3
# porepressure = 2
# ref_pressure = 3
# which yield porosity = 0.370255745860
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
biot_coefficient = 0.7
[]
[Variables]
[./porepressure]
initial_condition = 2
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[ICs]
[./disp_x]
type = FunctionIC
function = '0.5 * x'
variable = disp_x
[../]
[]
[Kernels]
[./dummy_p]
type = TimeDerivative
variable = porepressure
[../]
[./dummy_x]
type = TimeDerivative
variable = disp_x
[../]
[./dummy_y]
type = TimeDerivative
variable = disp_y
[../]
[./dummy_z]
type = TimeDerivative
variable = disp_z
[../]
[]
[AuxVariables]
[./porosity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
[Postprocessors]
[./porosity]
type = PointValue
variable = porosity
point = '0 0 0'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureConst
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = 3
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
ensure_positive = false
porosity_zero = 0.5
solid_bulk = 0.3
reference_porepressure = 3
[../]
[]
[Executioner]
solve_type = Newton
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
[]
modules/porous_flow/test/tests/chemistry/except8.i
# Exception test.
# Incorrect number of reactive surface areas
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = Diffusion
variable = a
[../]
[./b]
type = Diffusion
variable = b
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1E-6
[../]
[./pressure]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '1 1'
reactions = '1 1'
specific_reactive_surface_area = '1.0 1.0'
kinetic_rate_constant = '1.0e-8'
activation_energy = '1.5e4'
molar_volume = 1
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[]
modules/porous_flow/test/tests/chemistry/precipitation_porosity_change.i
# Test to illustrate porosity evolution due to precipitation
#
# The precipitation reaction
#
# a <==> mineral
#
# produces "mineral". Using theta = 1 = eta, the DE that describes the prcipitation is
# reaction_rate = rate * surf_area * molar_vol (1 - (1 / eqm_const) * (act_coeff * a)^stoi)
#
# The following parameters are used
#
# T_ref = 0.5 K
# T = 1 K
# activation_energy = 3 J/mol
# gas_constant = 6 J/(mol K)
# kinetic_rate_at_ref_T = 0.60653 mol/(m^2 s)
# These give rate = 0.60653 * exp(1/2) = 1 mol/(m^2 s)
#
# surf_area = 0.5 m^2/L
# molar_volume = 2 L/mol
# These give rate * surf_area * molar_vol = 1 s^-1
#
# equilibrium_constant = 0.5 (dimensionless)
# primary_activity_coefficient = 2 (dimensionless)
# stoichiometry = 1 (dimensionless)
# This means that 1 - (1 / eqm_const) * (act_coeff * a)^stoi = 1 - 4 a, which is negative (ie precipitation) for a > 0.25
#
# a is held fixed at 0.5, so
# reaction_rate = - (1 - 2) = 1
#
# The mineral volume fraction evolves according to
# Mineral = mineral_old + dt * porosity_old * reaction_rate = mineral_old + dt * porosity_old
#
# Porosity evolves according to
# porosity = porosity(t=0) - (mineral - mineral(t=0))
# = porosity(t=0) - (mineral_old + dt * porosity_old * reaction_rate - mineral(t=0))
#
# Specifically:
# time mineral porosity
# 0 0.2 0.6
# 0.1 0.26 0.54
# 0.2 0.314 0.486
# 0.3 0.3626 0.4374
# 0.4 0.40634 0.39366
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 0.5
[../]
[./a]
initial_condition = 0.5
[../]
[./ini_mineral_conc]
initial_condition = 0.2
[../]
[./mineral]
family = MONOMIAL
order = CONSTANT
[../]
[./porosity]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./mineral]
type = PorousFlowPropertyAux
property = mineral_concentration
mineral_species = 0
variable = mineral
[../]
[./porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./dummy]
type = Diffusion
variable = dummy
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = dummy
number_fluid_phases = 1
number_fluid_components = 2
number_aqueous_kinetic = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = 1
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = dummy
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = a
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = 2
reactions = 1
specific_reactive_surface_area = 0.5
kinetic_rate_constant = 0.6065306597126334
activation_energy = 3
molar_volume = 2
gas_constant = 6
reference_temperature = 0.5
[../]
[./mineral_conc]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = ini_mineral_conc
[../]
[./porosity]
type = PorousFlowPorosity
chemical = true
porosity_zero = 0.6
reference_chemistry = ini_mineral_conc
initial_mineral_concentrations = ini_mineral_conc
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
nl_abs_tol = 1E-10
dt = 0.1
end_time = 0.4
[]
[Postprocessors]
[./porosity]
type = PointValue
point = '0 0 0'
variable = porosity
[../]
[./c]
type = PointValue
point = '0 0 0'
variable = mineral
[../]
[]
[Outputs]
csv = true
perf_graph = true
[]
modules/porous_flow/test/tests/jacobian/chem07.i
# PorousFlowPreDis, which is essentially checking the derivatives of the secondary concentrations in PorousFlowMassFractionAqueousPreDisChemistry
# Dissolution with no temperature dependence, with two primary variables = 0
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
initial_condition = 0.0
[../]
[./b]
initial_condition = 0.0
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1.234
[../]
[./temp]
initial_condition = 0.5
[../]
[./ini_sec_conc]
initial_condition = 0.222
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowPreDis
variable = a
mineral_density = 1E5
stoichiometry = 2
[../]
[./b]
type = PorousFlowPreDis
variable = b
mineral_density = 2.2E5
stoichiometry = 3
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.9
[../]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '0.5 0.8'
reactions = '1 3'
specific_reactive_surface_area = -44.4E-2
kinetic_rate_constant = 0.678
activation_energy = 4.4
molar_volume = 3.3
reference_temperature = 1
gas_constant = 7.4
theta_exponent = 1.0
eta_exponent = 1.2
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = ini_sec_conc
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 0.1
[]
[Preconditioning]
[./check]
type = SMP
full = true
petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
modules/porous_flow/test/tests/poro_elasticity/mandel.i
# Mandel's problem of consolodation of a drained medium
#
# A sample is in plane strain.
# -a <= x <= a
# -b <= y <= b
# It is squashed with constant force by impermeable, frictionless plattens on its top and bottom surfaces (at y=+/-b)
# Fluid is allowed to leak out from its sides (at x=+/-a)
# The porepressure within the sample is monitored.
#
# As is common in the literature, this is simulated by
# considering the quarter-sample, 0<=x<=a and 0<=y<=b, with
# impermeable, roller BCs at x=0 and y=0 and y=b.
# Porepressure is fixed at zero on x=a.
# Porepressure and displacement are initialised to zero.
# Then the top (y=b) is moved downwards with prescribed velocity,
# so that the total force that is inducing this downwards velocity
# is fixed. The velocity is worked out by solving Mandel's problem
# analytically, and the total force is monitored in the simulation
# to check that it indeed remains constant.
#
# Here are the problem's parameters, and their values:
# Soil width. a = 1
# Soil height. b = 0.1
# Soil's Lame lambda. la = 0.5
# Soil's Lame mu, which is also the Soil's shear modulus. mu = G = 0.75
# Soil bulk modulus. K = la + 2*mu/3 = 1
# Drained Poisson ratio. nu = (3K - 2G)/(6K + 2G) = 0.2
# Soil bulk compliance. 1/K = 1
# Fluid bulk modulus. Kf = 8
# Fluid bulk compliance. 1/Kf = 0.125
# Soil initial porosity. phi0 = 0.1
# Biot coefficient. alpha = 0.6
# Biot modulus. M = 1/(phi0/Kf + (alpha - phi0)(1 - alpha)/K) = 4.705882
# Undrained bulk modulus. Ku = K + alpha^2*M = 2.694118
# Undrained Poisson ratio. nuu = (3Ku - 2G)/(6Ku + 2G) = 0.372627
# Skempton coefficient. B = alpha*M/Ku = 1.048035
# Fluid mobility (soil permeability/fluid viscosity). k = 1.5
# Consolidation coefficient. c = 2*k*B^2*G*(1-nu)*(1+nuu)^2/9/(1-nuu)/(nuu-nu) = 3.821656
# Normal stress on top. F = 1
#
# The solution for porepressure and displacements is given in
# AHD Cheng and E Detournay "A direct boundary element method for plane strain poroelasticity" International Journal of Numerical and Analytical Methods in Geomechanics 12 (1988) 551-572.
# The solution involves complicated infinite series, so I shall not write it here
#
# FINAL NOTE: The above solution assumes constant Biot Modulus.
# In porous_flow this is not true. Therefore the solution is
# a little different than in the paper. This test was therefore
# validated against MOOSE's poromechanics, which can choose either
# a constant Biot Modulus (which has been shown to agree with
# the analytic solution), or a non-constant Biot Modulus (which
# gives the same results as porous_flow).
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-5
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./porepressure]
[../]
[]
[BCs]
[./roller_xmin]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left'
[../]
[./roller_ymin]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom'
[../]
[./plane_strain]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[../]
[./xmax_drained]
type = DirichletBC
variable = porepressure
value = 0
boundary = right
[../]
[./top_velocity]
type = FunctionDirichletBC
variable = disp_y
function = top_velocity
boundary = top
[../]
[]
[Functions]
[./top_velocity]
type = PiecewiseLinear
x = '0 0.002 0.006 0.014 0.03 0.046 0.062 0.078 0.094 0.11 0.126 0.142 0.158 0.174 0.19 0.206 0.222 0.238 0.254 0.27 0.286 0.302 0.318 0.334 0.35 0.366 0.382 0.398 0.414 0.43 0.446 0.462 0.478 0.494 0.51 0.526 0.542 0.558 0.574 0.59 0.606 0.622 0.638 0.654 0.67 0.686 0.702'
y = '-0.041824842 -0.042730269 -0.043412712 -0.04428867 -0.045509181 -0.04645965 -0.047268246 -0.047974749 -0.048597109 -0.0491467 -0.049632388 -0.050061697 -0.050441198 -0.050776675 -0.051073238 -0.0513354 -0.051567152 -0.051772022 -0.051953128 -0.052113227 -0.052254754 -0.052379865 -0.052490464 -0.052588233 -0.052674662 -0.052751065 -0.052818606 -0.052878312 -0.052931093 -0.052977751 -0.053018997 -0.053055459 -0.053087691 -0.053116185 -0.053141373 -0.05316364 -0.053183324 -0.053200724 -0.053216106 -0.053229704 -0.053241725 -0.053252351 -0.053261745 -0.053270049 -0.053277389 -0.053283879 -0.053289615'
[../]
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./tot_force]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./tot_force]
type = ParsedAux
args = 'stress_yy porepressure'
execute_on = timestep_end
variable = tot_force
function = '-stress_yy+0.6*porepressure'
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./poro_x]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_x
component = 0
[../]
[./poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_y
component = 1
[../]
[./poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
component = 2
variable = disp_z
[../]
[./poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = porepressure
fluid_component = 0
[../]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = porepressure
[../]
[./flux]
type = PorousFlowAdvectiveFlux
variable = porepressure
gravity = '0 0 0'
fluid_component = 0
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 8
density0 = 1
thermal_expansion = 0
viscosity = 1
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5 0.75'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*0.75/3 = 1
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
ensure_positive = false
porosity_zero = 0.1
biot_coefficient = 0.6
solid_bulk = 1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1.5 0 0 0 1.5 0 0 0 1.5'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[../]
[]
[Postprocessors]
[./p0]
type = PointValue
outputs = csv
point = '0.0 0 0'
variable = porepressure
[../]
[./p1]
type = PointValue
outputs = csv
point = '0.1 0 0'
variable = porepressure
[../]
[./p2]
type = PointValue
outputs = csv
point = '0.2 0 0'
variable = porepressure
[../]
[./p3]
type = PointValue
outputs = csv
point = '0.3 0 0'
variable = porepressure
[../]
[./p4]
type = PointValue
outputs = csv
point = '0.4 0 0'
variable = porepressure
[../]
[./p5]
type = PointValue
outputs = csv
point = '0.5 0 0'
variable = porepressure
[../]
[./p6]
type = PointValue
outputs = csv
point = '0.6 0 0'
variable = porepressure
[../]
[./p7]
type = PointValue
outputs = csv
point = '0.7 0 0'
variable = porepressure
[../]
[./p8]
type = PointValue
outputs = csv
point = '0.8 0 0'
variable = porepressure
[../]
[./p9]
type = PointValue
outputs = csv
point = '0.9 0 0'
variable = porepressure
[../]
[./p99]
type = PointValue
outputs = csv
point = '1 0 0'
variable = porepressure
[../]
[./xdisp]
type = PointValue
outputs = csv
point = '1 0.1 0'
variable = disp_x
[../]
[./ydisp]
type = PointValue
outputs = csv
point = '1 0.1 0'
variable = disp_y
[../]
[./total_downwards_force]
type = ElementAverageValue
outputs = csv
variable = tot_force
[../]
[./dt]
type = FunctionValuePostprocessor
outputs = console
function = if(0.15*t<0.01,0.15*t,0.01)
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu 1E-14 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 0.7
[./TimeStepper]
type = PostprocessorDT
postprocessor = dt
dt = 0.001
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = mandel
[./csv]
interval = 3
type = CSV
[../]
[]
modules/porous_flow/test/tests/chemistry/except11.i
# Exception test.
# Incorrect number of molar volumes
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = Diffusion
variable = a
[../]
[./b]
type = Diffusion
variable = b
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1E-6
[../]
[./pressure]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '1 1'
reactions = '1 1'
specific_reactive_surface_area = 1.0
kinetic_rate_constant = 1.0e-8
activation_energy = 1.5e4
molar_volume = '1 1'
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[]
modules/porous_flow/test/tests/poroperm/poro_thm.i
# Test that porosity is correctly calculated.
# Porosity = biot + (phi0 - biot) * exp(-vol_strain + (biot - 1) / solid_bulk * (porepressure - ref_pressure) + thermal_exp_coeff * (temperature - ref_temperature))
# The parameters used are:
# biot = 0.7
# phi0 = 0.5
# vol_strain = 0.5
# solid_bulk = 0.3
# porepressure = 2
# ref_pressure = 3
# thermal_exp_coeff = 0.5
# temperature = 4
# ref_temperature = 3.5
# which yield porosity = 0.276599996677
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
biot_coefficient = 0.7
[]
[Variables]
[./porepressure]
initial_condition = 2
[../]
[./temperature]
initial_condition = 4
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[ICs]
[./disp_x]
type = FunctionIC
function = '0.5 * x'
variable = disp_x
[../]
[]
[Kernels]
[./dummy_p]
type = TimeDerivative
variable = porepressure
[../]
[./dummy_t]
type = TimeDerivative
variable = temperature
[../]
[./dummy_x]
type = TimeDerivative
variable = disp_x
[../]
[./dummy_y]
type = TimeDerivative
variable = disp_y
[../]
[./dummy_z]
type = TimeDerivative
variable = disp_z
[../]
[]
[AuxVariables]
[./porosity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
[Postprocessors]
[./porosity]
type = PointValue
variable = porosity
point = '0 0 0'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure temperature'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureConst
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temperature
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./porosity]
type = PorousFlowPorosity
mechanical = true
fluid = true
thermal = true
ensure_positive = false
porosity_zero = 0.5
solid_bulk = 0.3
thermal_expansion_coeff = 0.5
reference_porepressure = 3
reference_temperature = 3.5
[../]
[]
[Executioner]
solve_type = Newton
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
[]
modules/porous_flow/test/tests/recover/pffltvd.i
# Tests that PorousFlow can successfully recover using a checkpoint file.
# This test contains stateful material properties, adaptivity, integrated
# boundary conditions with nodal-sized materials, and TVD flux limiting.
#
# This test file is run three times:
# 1) The full input file is run to completion
# 2) The input file is run for half the time and checkpointing is included
# 3) The input file is run in recovery using the checkpoint data
#
# The final output of test 3 is compared to the final output of test 1 to verify
# that recovery was successful.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[Adaptivity]
initial_steps = 1
initial_marker = tracer_marker
marker = tracer_marker
max_h_level = 1
[./Markers]
[./tracer_marker]
type = ValueRangeMarker
variable = tracer
lower_bound = 0.02
upper_bound = 0.98
[../]
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[./porepressure]
[../]
[./tracer]
[../]
[]
[ICs]
[./porepressure]
type = FunctionIC
variable = porepressure
function = '2 - x'
[../]
[./tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[../]
[./flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[../]
[./mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[../]
[./flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[../]
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 2
boundary = left
[../]
[./no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[../]
[./remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[../]
[./remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[../]
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[../]
[./pc]
type = PorousFlowCapillaryPressureConst
[../]
[./advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[../]
[./advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[../]
[./relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[../]
[]
[Preconditioning]
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[]
[VectorPostprocessors]
[./tracer]
type = NodalValueSampler
sort_by = x
variable = tracer
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 0.2
dt = 0.05
[]
[Outputs]
csv = true
[]
modules/porous_flow/test/tests/chemistry/except18.i
# Exception test
# Incorrect number of kinetic in dictator
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = Diffusion
variable = a
[../]
[./b]
type = Diffusion
variable = b
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_equilibrium = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1E-6
[../]
[./pressure]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '1 1'
reactions = '2 3'
specific_reactive_surface_area = 1.0
kinetic_rate_constant = 1.0e-8
activation_energy = 1.5e4
molar_volume = 1
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[]
modules/porous_flow/test/tests/chemistry/except20.i
# Exception test
# No reference chemistry
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1E-6
[../]
[./a]
initial_condition = 0.5
[../]
[./ini_mineral_conc]
initial_condition = 0.2
[../]
[./mineral]
family = MONOMIAL
order = CONSTANT
[../]
[./porosity]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./mineral]
type = PorousFlowPropertyAux
property = mineral_concentration
mineral_species = 0
variable = mineral
[../]
[./porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./dummy]
type = Diffusion
variable = dummy
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = dummy
number_fluid_phases = 1
number_fluid_components = 2
number_aqueous_kinetic = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[Materials]
[./temperature_qp]
type = PorousFlowTemperature
temperature = 1
[../]
[./predis_qp]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = a
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = 2
reactions = 1
specific_reactive_surface_area = 0.5
kinetic_rate_constant = 0.6065306597126334
activation_energy = 3
molar_volume = 2
gas_constant = 6
reference_temperature = 0.5
[../]
[./mineral_conc_qp]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = ini_mineral_conc
[../]
[./porosity]
type = PorousFlowPorosity
chemical = true
porosity_zero = 0.6
initial_mineral_concentrations = ini_mineral_conc
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
nl_abs_tol = 1E-10
dt = 0.1
end_time = 0.4
[]
[Postprocessors]
[./porosity]
type = PointValue
point = '0 0 0'
variable = porosity
[../]
[./c]
type = PointValue
point = '0 0 0'
variable = mineral
[../]
[]
[Outputs]
csv = true
perf_graph = true
[]
modules/porous_flow/test/tests/poroperm/except2.i
# Exception test: fluid=true but no solid_bulk is provided
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
biot_coefficient = 0.7
[]
[Variables]
[./porepressure]
initial_condition = 2
[../]
[./temperature]
initial_condition = 4
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[ICs]
[./disp_x]
type = FunctionIC
function = '0.5 * x'
variable = disp_x
[../]
[]
[Kernels]
[./dummy_p]
type = TimeDerivative
variable = porepressure
[../]
[./dummy_t]
type = TimeDerivative
variable = temperature
[../]
[./dummy_x]
type = TimeDerivative
variable = disp_x
[../]
[./dummy_y]
type = TimeDerivative
variable = disp_y
[../]
[./dummy_z]
type = TimeDerivative
variable = disp_z
[../]
[]
[AuxVariables]
[./porosity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
[Postprocessors]
[./porosity]
type = PointValue
variable = porosity
point = '0 0 0'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure temperature'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureConst
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temperature
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./porosity]
type = PorousFlowPorosity
mechanical = true
fluid = true
thermal = true
ensure_positive = false
porosity_zero = 0.5
thermal_expansion_coeff = 0.5
reference_porepressure = 3
reference_temperature = 3.5
[../]
[]
[Executioner]
solve_type = Newton
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
[]
modules/porous_flow/test/tests/poro_elasticity/terzaghi.i
# Terzaghi's problem of consolodation of a drained medium
#
# A saturated soil sample sits in a bath of water.
# It is constrained on its sides, and bottom.
# Its sides and bottom are also impermeable.
# Initially it is unstressed.
# A normal stress, q, is applied to the soil's top.
# The soil then slowly compresses as water is squeezed
# out from the sample from its top (the top BC for
# the porepressure is porepressure = 0).
#
# See, for example. Section 2.2 of the online manuscript
# Arnold Verruijt "Theory and Problems of Poroelasticity" Delft University of Technology 2013
# but note that the "sigma" in that paper is the negative
# of the stress in TensorMechanics
#
# Here are the problem's parameters, and their values:
# Soil height. h = 10
# Soil's Lame lambda. la = 2
# Soil's Lame mu, which is also the Soil's shear modulus. mu = 3
# Soil bulk modulus. K = la + 2*mu/3 = 4
# Soil confined compressibility. m = 1/(K + 4mu/3) = 0.125
# Soil bulk compliance. 1/K = 0.25
# Fluid bulk modulus. Kf = 8
# Fluid bulk compliance. 1/Kf = 0.125
# Fluid mobility (soil permeability/fluid viscosity). k = 1.5
# Soil initial porosity. phi0 = 0.1
# Biot coefficient. alpha = 0.6
# Soil initial storativity, which is the reciprocal of the initial Biot modulus. S = phi0/Kf + (alpha - phi0)(1 - alpha)/K = 0.0625
# Consolidation coefficient. c = k/(S + alpha^2 m) = 13.95348837
# Normal stress on top. q = 1
# Initial porepressure, resulting from instantaneous application of q, assuming corresponding instantaneous increase of porepressure (Note that this is calculated by MOOSE: we only need it for the analytical solution). p0 = alpha*m*q/(S + alpha^2 m) = 0.69767442
# Initial vertical displacement (down is positive), resulting from instantaneous application of q (Note this is calculated by MOOSE: we only need it for the analytical solution). uz0 = q*m*h*S/(S + alpha^2 m)
# Final vertical displacement (down in positive) (Note this is calculated by MOOSE: we only need it for the analytical solution). uzinf = q*m*h
#
# The solution for porepressure is
# P = 4*p0/\pi \sum_{k=1}^{\infty} \frac{(-1)^{k-1}}{2k-1} \cos ((2k-1)\pi z/(2h)) \exp(-(2k-1)^2 \pi^2 ct/(4 h^2))
# This series converges very slowly for ct/h^2 small, so in that domain
# P = p0 erf( (1-(z/h))/(2 \sqrt(ct/h^2)) )
#
# The degree of consolidation is defined as
# U = (uz - uz0)/(uzinf - uz0)
# where uz0 and uzinf are defined above, and
# uz = the vertical displacement of the top (down is positive)
# U = 1 - (8/\pi^2)\sum_{k=1}^{\infty} \frac{1}{(2k-1)^2} \exp(-(2k-1)^2 \pi^2 ct/(4 h^2))
#
# FINAL NOTE: The above solution assumes constant Biot Modulus.
# In porous_flow this is not true. Therefore the solution is
# a little different than in the paper. This test was therefore
# validated against MOOSE's poromechanics, which can choose either
# a constant Biot Modulus (which has been shown to agree with
# the analytic solution), or a non-constant Biot Modulus (which
# gives the same results as porous_flow).
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 10
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = 0
zmax = 10
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./porepressure]
[../]
[]
[BCs]
[./confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[../]
[./basefixed]
type = DirichletBC
variable = disp_z
value = 0
boundary = back
[../]
[./topdrained]
type = DirichletBC
variable = porepressure
value = 0
boundary = front
[../]
[./topload]
type = NeumannBC
variable = disp_z
value = -1
boundary = front
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./poro_x]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_x
component = 0
[../]
[./poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_y
component = 1
[../]
[./poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
component = 2
variable = disp_z
[../]
[./poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = porepressure
fluid_component = 0
[../]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = porepressure
[../]
[./flux]
type = PorousFlowAdvectiveFlux
variable = porepressure
gravity = '0 0 0'
fluid_component = 0
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 8
density0 = 1
thermal_expansion = 0
viscosity = 0.96
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '2 3'
# bulk modulus is lambda + 2*mu/3 = 2 + 2*3/3 = 4
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./eff_fluid_pressure_qp]
type = PorousFlowEffectiveFluidPressure
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
ensure_positive = false
porosity_zero = 0.1
biot_coefficient = 0.6
solid_bulk = 4
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1.5 0 0 0 1.5 0 0 0 1.5'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[../]
[]
[Postprocessors]
[./p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
use_displaced_mesh = false
[../]
[./p1]
type = PointValue
outputs = csv
point = '0 0 1'
variable = porepressure
use_displaced_mesh = false
[../]
[./p2]
type = PointValue
outputs = csv
point = '0 0 2'
variable = porepressure
use_displaced_mesh = false
[../]
[./p3]
type = PointValue
outputs = csv
point = '0 0 3'
variable = porepressure
use_displaced_mesh = false
[../]
[./p4]
type = PointValue
outputs = csv
point = '0 0 4'
variable = porepressure
use_displaced_mesh = false
[../]
[./p5]
type = PointValue
outputs = csv
point = '0 0 5'
variable = porepressure
use_displaced_mesh = false
[../]
[./p6]
type = PointValue
outputs = csv
point = '0 0 6'
variable = porepressure
use_displaced_mesh = false
[../]
[./p7]
type = PointValue
outputs = csv
point = '0 0 7'
variable = porepressure
use_displaced_mesh = false
[../]
[./p8]
type = PointValue
outputs = csv
point = '0 0 8'
variable = porepressure
use_displaced_mesh = false
[../]
[./p9]
type = PointValue
outputs = csv
point = '0 0 9'
variable = porepressure
use_displaced_mesh = false
[../]
[./p99]
type = PointValue
outputs = csv
point = '0 0 10'
variable = porepressure
use_displaced_mesh = false
[../]
[./zdisp]
type = PointValue
outputs = csv
point = '0 0 10'
variable = disp_z
use_displaced_mesh = false
[../]
[./dt]
type = FunctionValuePostprocessor
outputs = console
function = if(0.5*t<0.1,0.5*t,0.1)
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
[./TimeStepper]
type = PostprocessorDT
postprocessor = dt
dt = 0.0001
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = terzaghi
[./csv]
type = CSV
[../]
[]
modules/porous_flow/test/tests/jacobian/chem04.i
# PorousFlowPreDis, which is essentially checking the derivatives of the secondary concentrations in PorousFlowMassFractionAqueousPreDisChemistry
# Precipitation with temperature
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
initial_condition = 0.6
[../]
[./b]
initial_condition = 0.4
[../]
[./temp]
initial_condition = 0.5
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1.234
[../]
[./ini_sec_conc]
initial_condition = 0.222
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowPreDis
variable = a
mineral_density = 1E-5
stoichiometry = 2
[../]
[./b]
type = PorousFlowPreDis
variable = b
mineral_density = 2.2E-5
stoichiometry = 3
[../]
[./temp]
type = Diffusion
variable = temp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b temp'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.9
[../]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '2.5 3.8'
reactions = '1.1 1.2'
specific_reactive_surface_area = -44.4E-2
kinetic_rate_constant = 0.678
activation_energy = 4.4
molar_volume = 3.3
reference_temperature = 1
gas_constant = 7.4
theta_exponent = 1.1
eta_exponent = 1.2
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = ini_sec_conc
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 0.1
[]
[Preconditioning]
[./check]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
modules/porous_flow/test/tests/jacobian/chem03.i
# PorousFlowPreDis, which is essentially checking the derivatives of the secondary concentrations in PorousFlowMassFractionAqueousPreDisChemistry
# Dissolution with temperature
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
initial_condition = 0.1
[../]
[./b]
initial_condition = 0.2
[../]
[./temp]
initial_condition = 0.5
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1.234
[../]
[./ini_sec_conc]
initial_condition = 0.222
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowPreDis
variable = a
mineral_density = 1E-5
stoichiometry = 2
[../]
[./b]
type = PorousFlowPreDis
variable = b
mineral_density = 2.2E-5
stoichiometry = 3
[../]
[./temp]
type = Diffusion
variable = temp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b temp'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.9
[../]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '0.5 0.8'
reactions = '2 3'
specific_reactive_surface_area = -44.4E-2
kinetic_rate_constant = 0.678
activation_energy = 4.4
molar_volume = 3.3
reference_temperature = 1
gas_constant = 7.4
theta_exponent = 1.1
eta_exponent = 1.2
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = ini_sec_conc
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 0.1
[]
[Preconditioning]
[./check]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
modules/porous_flow/test/tests/pressure_pulse/pressure_pulse_1d_adaptivity.i
# Pressure pulse in 1D with 1 phase - transient simulation with a constant
# PorousFlowPorosity and mesh adaptivity with an indicator
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 100
[]
[Adaptivity]
marker = marker
[./Markers]
[./marker]
type = ErrorFractionMarker
indicator = front
refine = 0.5
coarsen = 0.2
[../]
[../]
[./Indicators]
[./front]
type = GradientJumpIndicator
variable = pp
[../]
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 2E6
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[../]
[./flux]
type = PorousFlowAdvectiveFlux
variable = pp
gravity = '0 0 0'
fluid_component = 0
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0
phase = 0
[../]
[]
[BCs]
[./left]
type = DirichletBC
boundary = left
preset = false
value = 3E6
variable = pp
[../]
[./right]
type = PorousFlowPiecewiseLinearSink
variable = pp
boundary = right
fluid_phase = 0
pt_vals = '0 1E9'
multipliers = '0 1E9'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E-6
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1e3
end_time = 5e3
[]
[Postprocessors]
[./p000]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = 'initial timestep_end'
[../]
[./p010]
type = PointValue
variable = pp
point = '10 0 0'
execute_on = 'initial timestep_end'
[../]
[./p020]
type = PointValue
variable = pp
point = '20 0 0'
execute_on = 'initial timestep_end'
[../]
[./p030]
type = PointValue
variable = pp
point = '30 0 0'
execute_on = 'initial timestep_end'
[../]
[./p040]
type = PointValue
variable = pp
point = '40 0 0'
execute_on = 'initial timestep_end'
[../]
[./p050]
type = PointValue
variable = pp
point = '50 0 0'
execute_on = 'initial timestep_end'
[../]
[./p060]
type = PointValue
variable = pp
point = '60 0 0'
execute_on = 'initial timestep_end'
[../]
[./p070]
type = PointValue
variable = pp
point = '70 0 0'
execute_on = 'initial timestep_end'
[../]
[./p080]
type = PointValue
variable = pp
point = '80 0 0'
execute_on = 'initial timestep_end'
[../]
[./p090]
type = PointValue
variable = pp
point = '90 0 0'
execute_on = 'initial timestep_end'
[../]
[./p100]
type = PointValue
variable = pp
point = '100 0 0'
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
print_linear_residuals = false
csv = true
[]
modules/porous_flow/test/tests/jacobian/denergy03.i
# 2phase, 1 component, with solid displacements, time derivative of energy-density, TM porosity
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./pgas]
[../]
[./pwater]
[../]
[./temp]
[../]
[]
[ICs]
[./disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[../]
[./disp_y]
type = RandomIC
variable = disp_y
min = -0.1
max = 0.1
[../]
[./disp_z]
type = RandomIC
variable = disp_z
min = -0.1
max = 0.1
[../]
[./pgas]
type = RandomIC
variable = pgas
max = 1.0
min = 0.0
[../]
[./pwater]
type = RandomIC
variable = pwater
max = 0.0
min = -1.0
[../]
[./temp]
type = RandomIC
variable = temp
max = 1.0
min = 0.0
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./dummy_pgas]
type = Diffusion
variable = pgas
[../]
[./dummy_pwater]
type = Diffusion
variable = pwater
[../]
[./energy_dot]
type = PorousFlowEnergyTimeDerivative
variable = temp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas temp pwater disp_x disp_y disp_z'
number_fluid_phases = 2
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
cv = 1.3
[../]
[./simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
cv = 0.7
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5 0.75'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*0.75/3 = 1
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./porosity]
type = PorousFlowPorosity
thermal = true
mechanical = true
porosity_zero = 0.7
thermal_expansion_coeff = 0.5
[../]
[./p_eff]
type = PorousFlowEffectiveFluidPressure
[../]
[./rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1.1
density = 0.5
[../]
[./ppss]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = pgas
capillary_pressure = pc
[../]
[./simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[../]
[./simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[../]
[]
[Preconditioning]
active = check
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[../]
[./check]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
modules/porous_flow/test/tests/poroperm/poro_tm.i
# Test that porosity is correctly calculated.
# Porosity = 1 + (phi0 - 1) * exp(-vol_strain + thermal_exp_coeff * (temperature - ref_temperature))
# The parameters used are:
# phi0 = 0.5
# vol_strain = 0.5
# thermal_exp_coeff = 0.5
# temperature = 4
# ref_temperature = 3.5
# which yield porosity = 0.610599608464
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./porepressure]
initial_condition = 2
[../]
[./temperature]
initial_condition = 4
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[ICs]
[./disp_x]
type = FunctionIC
function = '0.5 * x'
variable = disp_x
[../]
[]
[Kernels]
[./dummy_p]
type = TimeDerivative
variable = porepressure
[../]
[./dummy_t]
type = TimeDerivative
variable = temperature
[../]
[./dummy_x]
type = TimeDerivative
variable = disp_x
[../]
[./dummy_y]
type = TimeDerivative
variable = disp_y
[../]
[./dummy_z]
type = TimeDerivative
variable = disp_z
[../]
[]
[AuxVariables]
[./porosity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[../]
[]
[Postprocessors]
[./porosity]
type = PointValue
variable = porosity
point = '0 0 0'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure temperature'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureConst
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temperature
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./porosity]
type = PorousFlowPorosity
mechanical = true
thermal = true
ensure_positive = false
porosity_zero = 0.5
thermal_expansion_coeff = 0.5
reference_temperature = 3.5
[../]
[]
[Executioner]
solve_type = Newton
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
[]
modules/porous_flow/test/tests/jacobian/desorped_mass_vol_exp01.i
# Tests the PorousFlowDesorpedMassVolumetricExpansion kernel
# Fluid with constant bulk modulus, van-Genuchten capillary, HM porosity
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./porepressure]
[../]
[./conc]
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./disp_x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./disp_y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./disp_z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[./p]
type = RandomIC
min = -1
max = 1
variable = porepressure
[../]
[./conc]
type = RandomIC
min = 0
max = 1
variable = conc
[../]
[]
[BCs]
# necessary otherwise volumetric strain rate will be zero
[./disp_x]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./disp_y]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'left right'
[../]
[./disp_z]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'left right'
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
displacements = 'disp_x disp_y disp_z'
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
displacements = 'disp_x disp_y disp_z'
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
displacements = 'disp_x disp_y disp_z'
component = 2
[../]
[./poro]
type = PorousFlowMassVolumetricExpansion
fluid_component = 0
variable = porepressure
[../]
[./conc_in_poro]
type = PorousFlowDesorpedMassVolumetricExpansion
conc_var = conc
variable = porepressure
[../]
[./conc]
type = PorousFlowDesorpedMassVolumetricExpansion
conc_var = conc
variable = conc
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z conc'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '2 3'
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.5
solid_bulk = 1
[../]
[./p_eff]
type = PorousFlowEffectiveFluidPressure
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-5
[]
[Outputs]
execute_on = 'timestep_end'
file_base = jacobian2
exodus = false
[]
modules/porous_flow/examples/tutorial/04.i
# Darcy flow with heat advection and conduction, and elasticity
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[./make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[../]
[./shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[../]
[./aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[../]
[./injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomain_ids = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caps aquifer'
input = 'injection_area'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
biot_coefficient = 1.0
[]
[Variables]
[./porepressure]
[../]
[./temperature]
initial_condition = 293
scaling = 1E-8
[../]
[./disp_x]
scaling = 1E-10
[../]
[./disp_y]
scaling = 1E-10
[../]
[./disp_z]
scaling = 1E-10
[../]
[]
[PorousFlowBasicTHM]
porepressure = porepressure
temperature = temperature
coupling_type = ThermoHydroMechanical
gravity = '0 0 0'
fp = the_simple_fluid
thermal_eigenstrain_name = thermal_contribution
use_displaced_mesh = false
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1E6
boundary = injection_area
[../]
[./constant_injection_temperature]
type = DirichletBC
variable = temperature
value = 313
boundary = injection_area
[../]
[./roller_tmax]
type = DirichletBC
variable = disp_x
value = 0
boundary = dmax
[../]
[./roller_tmin]
type = DirichletBC
variable = disp_y
value = 0
boundary = dmin
[../]
[./roller_top_bottom]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'top bottom'
[../]
[./cavity_pressure_x]
type = Pressure
boundary = injection_area
variable = disp_x
component = 0
factor = 1E6
use_displaced_mesh = false
[../]
[./cavity_pressure_y]
type = Pressure
boundary = injection_area
variable = disp_y
component = 1
factor = 1E6
use_displaced_mesh = false
[../]
[]
[AuxVariables]
[./stress_rr]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_pp]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./stress_rr]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = stress_rr
scalar_type = RadialStress
point1 = '0 0 0'
point2 = '0 0 1'
[../]
[./stress_pp]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = stress_pp
scalar_type = HoopStress
point1 = '0 0 0'
point2 = '0 0 1'
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
thermal_expansion = 0.0002
cp = 4194
cv = 4186
porepressure_coefficient = 0
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./biot_modulus]
type = PorousFlowConstantBiotModulus
solid_bulk_compliance = 2E-7
fluid_bulk_modulus = 1E7
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[../]
[./permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[../]
[./thermal_expansion]
type = PorousFlowConstantThermalExpansionCoefficient
drained_coefficient = 0.003
fluid_coefficient = 0.0002
[../]
[./rock_internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[../]
[./thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '10 0 0 0 10 0 0 0 10'
block = 'caps aquifer'
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 5E9
poissons_ratio = 0.0
[../]
[./strain]
type = ComputeSmallStrain
eigenstrain_names = thermal_contribution
[../]
[./thermal_contribution]
type = ComputeThermalExpansionEigenstrain
temperature = temperature
thermal_expansion_coeff = 0.001 # this is the linear thermal expansion coefficient
eigenstrain_name = thermal_contribution
stress_free_temperature = 293
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-15
nl_rel_tol = 1E-14
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/poroperm/PermTensorFromVar03.i
# Testing permeability calculated from scalar and tensor
# Trivial test, checking calculated permeability is correct
# when k_anisotropy is not specified.
# k = k_anisotropy * perm
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Kernels]
[./flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[../]
[]
[BCs]
[./ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[../]
[./pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[../]
[]
[AuxVariables]
[./perm_var]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_x]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_y]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_z]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./perm_var]
type = ConstantAux
value = 2
variable = perm_var
[../]
[./perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[../]
[./perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[../]
[./perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[../]
[]
[Postprocessors]
[./perm_x_left]
type = PointValue
variable = perm_x
point = '0.5 0 0'
[../]
[./perm_y_left]
type = PointValue
variable = perm_y
point = '0.5 0 0'
[../]
[./perm_z_left]
type = PointValue
variable = perm_z
point = '0.5 0 0'
[../]
[./perm_x_right]
type = PointValue
variable = perm_x
point = '2.5 0 0'
[../]
[./perm_y_right]
type = PointValue
variable = perm_y
point = '2.5 0 0'
[../]
[./perm_z_right]
type = PointValue
variable = perm_z
point = '2.5 0 0'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[Materials]
[./permeability]
type = PorousFlowPermeabilityTensorFromVar
perm = perm_var
[../]
[./temperature]
type = PorousFlowTemperature
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
modules/porous_flow/test/tests/energy_conservation/heat03.i
# The sample is a single unit element, with roller BCs on the sides
# and bottom. A constant displacement is applied to the top: disp_z = -0.01*t.
# There is no fluid flow or heat flow.
# Heat energy conservation is checked.
#
# Under these conditions (here L is the height of the sample: L=1 in this case):
# porepressure = porepressure(t=0) - (Fluid bulk modulus)*log(1 - 0.01*t)
# stress_xx = (bulk - 2*shear/3)*disp_z/L (remember this is effective stress)
# stress_zz = (bulk + 4*shear/3)*disp_z/L (remember this is effective stress)
# Also, the total heat energy must be conserved: this is
# fluid_mass * fluid_heat_cap * temperature + (1 - porosity) * rock_density * rock_heat_cap * temperature * volume
# Since fluid_mass is conserved, and volume = (1 - 0.01*t), this can be solved for temperature:
# temperature = initial_heat_energy / (fluid_mass * fluid_heat_cap + (1 - porosity) * rock_density * rock_heat_cap * (1 - 0.01*t))
#
# Parameters:
# Bulk modulus = 2
# Shear modulus = 1.5
# fluid bulk modulus = 0.5
# initial porepressure = 0.1
# initial temperature = 10
#
# Desired output:
# zdisp = -0.01*t
# p0 = 0.1 - 0.5*log(1-0.01*t)
# stress_xx = stress_yy = -0.01*t
# stress_zz = -0.04*t
# t0 = 11.5 / (0.159 + 0.99 * (1 - 0.01*t))
#
# Regarding the "log" - it comes from preserving fluid mass
#
# Note that the PorousFlowMassVolumetricExpansion and PorousFlowHeatVolumetricExpansion Kernels are used
# Note too that the Postprocessors have use_displaced_mesh = true
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./pp]
initial_condition = 0.1
[../]
[./temp]
initial_condition = 10
[../]
[]
[BCs]
[./confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[../]
[./basefixed]
type = DirichletBC
variable = disp_z
value = 0
boundary = back
[../]
[./top_velocity]
type = FunctionDirichletBC
variable = disp_z
function = -0.01*t
boundary = front
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./poro_x]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_x
component = 0
[../]
[./poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_y
component = 1
[../]
[./poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
component = 2
variable = disp_z
[../]
[./poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = pp
fluid_component = 0
[../]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[../]
[./temp]
type = PorousFlowEnergyTimeDerivative
variable = temp
[../]
[./poro_vol_exp_temp]
type = PorousFlowHeatVolumetricExpansion
variable = temp
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp pp disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 1
viscosity = 1
thermal_expansion = 0
cv = 1.3
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 2.2
density = 0.5
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '0.5 0 0 0 0.5 0 0 0 0.5'
[../]
[]
[Postprocessors]
[./p0]
type = PointValue
outputs = 'console csv'
execute_on = 'initial timestep_end'
point = '0 0 0'
variable = pp
[../]
[./t0]
type = PointValue
outputs = 'console csv'
execute_on = 'initial timestep_end'
point = '0 0 0'
variable = temp
[../]
[./zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
use_displaced_mesh = false
variable = disp_z
[../]
[./stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[../]
[./stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[../]
[./stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[../]
[./fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
use_displaced_mesh = true
outputs = 'console csv'
[../]
[./total_heat]
type = PorousFlowHeatEnergy
phase = 0
execute_on = 'initial timestep_end'
use_displaced_mesh = true
outputs = 'console csv'
[../]
[./rock_heat]
type = PorousFlowHeatEnergy
execute_on = 'initial timestep_end'
use_displaced_mesh = true
outputs = 'console csv'
[../]
[./fluid_heat]
type = PorousFlowHeatEnergy
include_porous_skeleton = false
phase = 0
execute_on = 'initial timestep_end'
use_displaced_mesh = true
outputs = 'console csv'
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-14 1E-8 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 2
end_time = 10
[]
[Outputs]
execute_on = 'initial timestep_end'
file_base = heat03
[./csv]
type = CSV
[../]
[]
modules/porous_flow/examples/tutorial/08.i
# Unsaturated Darcy-Richards flow
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[./make3D]
input = annular
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
[../]
[./shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[../]
[./aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[../]
[./injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomain_ids = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caps aquifer'
input = 'injection_area'
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./porepressure]
[../]
[]
[PorousFlowUnsaturated]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
relative_permeability_exponent = 3
relative_permeability_type = Corey
residual_saturation = 0.1
van_genuchten_alpha = 1E-6
van_genuchten_m = 0.6
[]
[BCs]
[./production]
type = PorousFlowSink
variable = porepressure
fluid_phase = 0
flux_function = 1E-2
use_relperm = true
boundary = injection_area
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[../]
[./permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-7
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined.i
# A sample is constrained on all sides, except its top
# and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie kg/second per cubic meter), and the
# rise in the top surface, porepressure, and stress are observed.
#
# In the standard poromechanics scenario, the Biot Modulus is held
# fixed and the source has units 1/time. Then the expected result
# is
# strain_zz = disp_z = BiotCoefficient*BiotModulus*s*t/((bulk + 4*shear/3) + BiotCoefficient^2*BiotModulus)
# porepressure = BiotModulus*(s*t - BiotCoefficient*strain_zz)
# stress_xx = (bulk - 2*shear/3)*strain_zz (remember this is effective stress)
# stress_zz = (bulk + 4*shear/3)*strain_zz (remember this is effective stress)
#
# In porous_flow, however, the source has units kg/s/m^3 and the
# Biot Modulus is not held fixed. This means that disp_z, porepressure,
# etc are not linear functions of t. Nevertheless, the ratios remain
# fixed:
# stress_xx/strain_zz = (bulk - 2*shear/3) = 1 (for the parameters used here)
# stress_zz/strain_zz = (bulk + 4*shear/3) = 4 (for the parameters used here)
# porepressure/strain_zz = 13.3333333 (for the parameters used here)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-5
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./porepressure]
[../]
[]
[BCs]
[./confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[../]
[./confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back'
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./poro_x]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_x
component = 0
[../]
[./poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_y
component = 1
[../]
[./poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
component = 2
variable = disp_z
[../]
[./poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = porepressure
fluid_component = 0
[../]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = porepressure
[../]
[./flux]
type = PorousFlowAdvectiveFlux
variable = porepressure
gravity = '0 0 0'
fluid_component = 0
[../]
[./source]
type = BodyForce
function = 0.1
variable = porepressure
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 3.3333333333
density0 = 1
thermal_expansion = 0
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.3
solid_bulk = 2
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 1 0 0 0 1' # unimportant
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[../]
[]
[Postprocessors]
[./p0]
type = PointValue
outputs = none
point = '0 0 0'
variable = porepressure
[../]
[./zdisp]
type = PointValue
outputs = none
point = '0 0 0.5'
variable = disp_z
[../]
[./stress_xx]
type = PointValue
outputs = none
point = '0 0 0'
variable = stress_xx
[../]
[./stress_yy]
type = PointValue
outputs = none
point = '0 0 0'
variable = stress_yy
[../]
[./stress_zz]
type = PointValue
outputs = none
point = '0 0 0'
variable = stress_zz
[../]
[./stress_xx_over_strain]
type = FunctionValuePostprocessor
function = stress_xx_over_strain_fcn
outputs = csv
[../]
[./stress_zz_over_strain]
type = FunctionValuePostprocessor
function = stress_zz_over_strain_fcn
outputs = csv
[../]
[./p_over_strain]
type = FunctionValuePostprocessor
function = p_over_strain_fcn
outputs = csv
[../]
[]
[Functions]
[./stress_xx_over_strain_fcn]
type = ParsedFunction
value = a/b
vars = 'a b'
vals = 'stress_xx zdisp'
[../]
[./stress_zz_over_strain_fcn]
type = ParsedFunction
value = a/b
vars = 'a b'
vals = 'stress_zz zdisp'
[../]
[./p_over_strain_fcn]
type = ParsedFunction
value = a/b
vars = 'a b'
vals = 'p0 zdisp'
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-14 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_unconfined
[./csv]
type = CSV
[../]
[]
modules/porous_flow/test/tests/actions/basicthm_thm.i
# PorousFlowBasicTHM action with coupling_type = ThermoHydroMechanicalGenerator
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 3
xmax = 10
ymax = 3
[]
[./aquifer]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 1 0'
top_right = '10 2 0'
[../]
[./injection_area]
type = SideSetsAroundSubdomainGenerator
block = 1
new_boundary = 'injection_area'
normal = '-1 0 0'
input = 'aquifer'
[../]
[./outflow_area]
type = SideSetsAroundSubdomainGenerator
block = 1
new_boundary = 'outflow_area'
normal = '1 0 0'
input = 'injection_area'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caprock aquifer'
input = 'outflow_area'
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y'
biot_coefficient = 1.0
[]
[Variables]
[./porepressure]
initial_condition = 1e6
[../]
[./temperature]
initial_condition = 293
scaling = 1e-6
[../]
[./disp_x]
scaling = 1e-6
[../]
[./disp_y]
scaling = 1e-6
[../]
[]
[PorousFlowBasicTHM]
porepressure = porepressure
temperature = temperature
coupling_type = ThermoHydroMechanical
gravity = '0 0 0'
fp = simple_fluid
thermal_eigenstrain_name = thermal_contribution
use_displaced_mesh = false
add_stress_aux = false
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1.5e6
boundary = injection_area
[../]
[./constant_injection_temperature]
type = DirichletBC
variable = temperature
value = 313
boundary = injection_area
[../]
[./constant_outflow_porepressure]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = outflow_area
pt_vals = '0 1e9'
multipliers = '0 1e9'
flux_function = 1e-6
PT_shift = 1e6
[../]
[./constant_outflow_temperature]
type = DirichletBC
variable = temperature
value = 293
boundary = outflow_area
[../]
[./top_bottom]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'top bottom'
[../]
[./right]
type = DirichletBC
variable = disp_x
value = 0
boundary = right
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.8
solid_bulk_compliance = 2e-7
fluid_bulk_modulus = 1e7
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1e-13 0 0 0 1e-13 0 0 0 1e-13'
[../]
[./permeability_caprock]
type = PorousFlowPermeabilityConst
block = caprock
permeability = '1e-15 0 0 0 1e-15 0 0 0 1e-15'
[../]
[./thermal_expansion]
type = PorousFlowConstantThermalExpansionCoefficient
drained_coefficient = 0.003
fluid_coefficient = 0.0002
[../]
[./rock_internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[../]
[./thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '10 0 0 0 10 0 0 0 10'
block = 'caprock aquifer'
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 5e9
poissons_ratio = 0.0
[../]
[./strain]
type = ComputeSmallStrain
eigenstrain_names = thermal_contribution
[../]
[./thermal_contribution]
type = ComputeThermalExpansionEigenstrain
temperature = temperature
thermal_expansion_coeff = 0.001
eigenstrain_name = thermal_contribution
stress_free_temperature = 293
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Preconditioning]
[./basic]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1e4
dt = 1e3
nl_abs_tol = 1e-12
nl_rel_tol = 1E-10
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/jacobian/desorped_mass01.i
# 1phase
# vanGenuchten, constant-bulk density, HM porosity, 1component, unsaturated
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./pp]
[../]
[./conc]
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[../]
[./disp_y]
type = RandomIC
variable = disp_y
min = -0.1
max = 0.1
[../]
[./disp_z]
type = RandomIC
variable = disp_z
min = -0.1
max = 0.1
[../]
[./pp]
type = RandomIC
variable = pp
min = -1
max = 1
[../]
[./conc]
type = RandomIC
variable = conc
min = 0
max = 1
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[../]
[./conc]
type = PorousFlowDesorpedMassTimeDerivative
conc_var = conc
variable = conc
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp disp_x disp_y disp_z conc'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5 0.75'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*0.75/3 = 1
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.5
solid_bulk = 1
[../]
[./p_eff]
type = PorousFlowEffectiveFluidPressure
[../]
[]
[Preconditioning]
active = check
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[../]
[./check]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
modules/porous_flow/test/tests/poroperm/PermTensorFromVar02.i
# Testing permeability calculated from scalar and tensor
# Trivial test, checking calculated permeability is correct
# when scalar is a FunctionAux.
# k = k_anisotropy * perm
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Kernels]
[./flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[../]
[]
[BCs]
[./ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[../]
[./pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[../]
[]
[Functions]
[./perm_fn]
type = ParsedFunction
value = '2*(x+1)'
[../]
[]
[AuxVariables]
[./perm_var]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_x]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_y]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_z]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./perm_var]
type = FunctionAux
function = perm_fn
variable = perm_var
[../]
[./perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[../]
[./perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[../]
[./perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[../]
[]
[Postprocessors]
[./perm_x_left]
type = PointValue
variable = perm_x
point = '0.5 0 0'
[../]
[./perm_y_left]
type = PointValue
variable = perm_y
point = '0.5 0 0'
[../]
[./perm_z_left]
type = PointValue
variable = perm_z
point = '0.5 0 0'
[../]
[./perm_x_right]
type = PointValue
variable = perm_x
point = '2.5 0 0'
[../]
[./perm_y_right]
type = PointValue
variable = perm_y
point = '2.5 0 0'
[../]
[./perm_z_right]
type = PointValue
variable = perm_z
point = '2.5 0 0'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[Materials]
[./permeability]
type = PorousFlowPermeabilityTensorFromVar
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
perm = perm_var
[../]
[./temperature]
type = PorousFlowTemperature
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
modules/porous_flow/test/tests/jacobian/chem15.i
# Check derivatives of mass-fraction, but using Equilibrium chemistry
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
initial_condition = 0.1
[../]
[./b]
initial_condition = 0.2
[../]
[./h2o_dummy]
[../]
[]
[AuxVariables]
[./eqm_k0]
initial_condition = 1.234E-4
[../]
[./eqm_k1]
initial_condition = 0.987E-4
[../]
[./eqm_k2]
initial_condition = 0.5E-4
[../]
[./temp]
initial_condition = 0.5
[../]
[./ini_sec_conc0]
initial_condition = 0.111
[../]
[./ini_sec_conc1]
initial_condition = 0.222
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowMassTimeDerivative
variable = a
fluid_component = 0
[../]
[./b]
type = PorousFlowMassTimeDerivative
variable = b
fluid_component = 1
[../]
[./h2o_dummy]
# note that in real simulations this Kernel would not be used
# It is just here to check derivatives
type = PorousFlowMassTimeDerivative
variable = h2o_dummy
fluid_component = 2
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_equilibrium = 3
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFractionAqueousEquilibriumChemistry
mass_fraction_vars = 'a b'
num_reactions = 3
equilibrium_constants = 'eqm_k0 eqm_k1 eqm_k2'
primary_activity_coefficients = '1 1.2'
secondary_activity_coefficients = '1 2 3'
reactions = '1 2
2.2 -1
-2 1'
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 0.1
[]
[Preconditioning]
[./check]
type = SMP
full = true
petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
modules/porous_flow/test/tests/jacobian/chem01.i
# PorousFlowPreDis, which is essentially checking the derivatives of the secondary concentrations in PorousFlowMassFractionAqueousPreDisChemistry
# Dissolution with temperature
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
initial_condition = 0.25
[../]
[./b]
initial_condition = 0.2
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1.234
[../]
[./temp]
initial_condition = 0.5
[../]
[./ini_sec_conc]
initial_condition = 0.222
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowPreDis
variable = a
mineral_density = 1E5
stoichiometry = 2
[../]
[./b]
type = PorousFlowPreDis
variable = b
mineral_density = 2.2E5
stoichiometry = 3
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.9
[../]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '0.5 0.8'
reactions = '2 3'
specific_reactive_surface_area = -44.4E-2
kinetic_rate_constant = 0.678
activation_energy = 4.4
molar_volume = 3.3
reference_temperature = 1
gas_constant = 7.4
theta_exponent = 1.1
eta_exponent = 1.2
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = ini_sec_conc
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 0.1
[]
[Preconditioning]
[./check]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
modules/porous_flow/test/tests/chemistry/except13.i
# Exception test.
# Incorrect number of eta exponents
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = Diffusion
variable = a
[../]
[./b]
type = Diffusion
variable = b
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1E-6
[../]
[./pressure]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '1 1'
reactions = '1 1'
specific_reactive_surface_area = 1.0
kinetic_rate_constant = 1.0e-8
activation_energy = 1.5e4
molar_volume = 1
eta_exponent = '1 1'
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[]
modules/porous_flow/test/tests/jacobian/chem06.i
# PorousFlowPreDis, which is essentially checking the derivatives of the secondary concentrations in PorousFlowMassFractionAqueousPreDisChemistry
# Dissolution with no temperature dependence, with one primary variable = 0 and stoichiometry = 1
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
initial_condition = 0.2
[../]
[./b]
initial_condition = 0.0
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1.234
[../]
[./temp]
initial_condition = 0.5
[../]
[./ini_sec_conc]
initial_condition = 0.222
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowPreDis
variable = a
mineral_density = 1E5
stoichiometry = 2
[../]
[./b]
type = PorousFlowPreDis
variable = b
mineral_density = 2.2E5
stoichiometry = 3
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.9
[../]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '0.5 0.8'
reactions = '3 1'
specific_reactive_surface_area = -44.4E-2
kinetic_rate_constant = 0.678
activation_energy = 4.4
molar_volume = 3.3
reference_temperature = 1
gas_constant = 7.4
theta_exponent = 1
eta_exponent = 1.2
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = ini_sec_conc
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 0.1
[]
[Preconditioning]
[./check]
type = SMP
full = true
petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
modules/porous_flow/test/tests/jacobian/chem05.i
# PorousFlowPreDis, which is essentially checking the derivatives of the secondary concentrations in PorousFlowMassFractionAqueousPreDisChemistry
# Dissolution with no temperature dependence, with one primary variable = 0 and stoichiometry > 1
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
initial_condition = 0.0
[../]
[./b]
initial_condition = 0.2
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1.234
[../]
[./ini_sec_conc]
initial_condition = 0.222
[../]
[./temp]
initial_condition = 0.5
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowPreDis
variable = a
mineral_density = 1E5
stoichiometry = 2
[../]
[./b]
type = PorousFlowPreDis
variable = b
mineral_density = 2.2E5
stoichiometry = 3
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.9
[../]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '0.5 0.8'
reactions = '2 3'
specific_reactive_surface_area = -44.4E-2
kinetic_rate_constant = 0.678
activation_energy = 4.4
molar_volume = 3.3
reference_temperature = 1
gas_constant = 7.4
theta_exponent = 1.1
eta_exponent = 1.2
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = ini_sec_conc
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 0.1
[]
[Preconditioning]
[./check]
type = SMP
full = true
petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
modules/porous_flow/test/tests/chemistry/except16.i
# Exception test
# Incorrect number of stoichiometry
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowPreDis
variable = a
mineral_density = 1
stoichiometry = '2 3'
[../]
[./b]
type = PorousFlowPreDis
variable = b
mineral_density = 1
stoichiometry = 3
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
[../]
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1E-6
[../]
[./pressure]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '1 1'
reactions = '2 3'
specific_reactive_surface_area = 1.0
kinetic_rate_constant = 1.0e-8
activation_energy = 1.5e4
molar_volume = 1
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[]
modules/porous_flow/test/tests/poro_elasticity/pp_generation.i
# A sample is constrained on all sides and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie kg/second per cubic meter), and the
# rise in porepressure is observed.
#
# Source = s (units = kg/m^3/second)
#
# Expect:
# fluid_mass = mass0 + s*t
# stress = 0 (remember this is effective stress)
# Porepressure = fluid_bulk*log(fluid_mass_density/density_P0), where fluid_mass_density = fluid_mass*porosity
# porosity = biot+(phi0-biot)*exp(pp(biot-1)/solid_bulk)
#
# Parameters:
# Biot coefficient = 0.3
# Phi0 = 0.1
# Solid Bulk modulus = 2
# fluid_bulk = 13
# density_P0 = 1
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./porepressure]
[../]
[]
[BCs]
[./confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[../]
[./confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./poro_x]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_x
component = 0
[../]
[./poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_y
component = 1
[../]
[./poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
component = 2
variable = disp_z
[../]
[./poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = porepressure
fluid_component = 0
[../]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = porepressure
[../]
[./flux]
type = PorousFlowAdvectiveFlux
variable = porepressure
gravity = '0 0 0'
fluid_component = 0
[../]
[./source]
type = BodyForce
function = 0.1
variable = porepressure
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./porosity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 13
density0 = 1
thermal_expansion = 0
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = porepressure
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.3
solid_bulk = 2
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 1 0 0 0 1' # unimportant
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[../]
[]
[Functions]
[./porosity_analytic]
type = ParsedFunction
value = 'biot+(phi0-biot)*exp(pp*(biot-1)/bulk)'
vars = 'biot phi0 pp bulk'
vals = '0.3 0.1 p0 2'
[../]
[]
[Postprocessors]
[./fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
use_displaced_mesh = true
[../]
[./porosity]
type = PointValue
outputs = 'console csv'
point = '0 0 0'
variable = porosity
[../]
[./p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[../]
[./porosity_analytic]
type = FunctionValuePostprocessor
function = porosity_analytic
[../]
[./zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[../]
[./stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[../]
[./stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[../]
[./stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_max_it -snes_stol'
petsc_options_value = 'bcgs bjacobi 10000 1E-11'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation
[./csv]
type = CSV
[../]
[]
modules/porous_flow/test/tests/poro_elasticity/vol_expansion_poroperm.i
# Apply an increasing porepressure, with zero mechanical forces,
# and observe the corresponding volumetric expansion and porosity increase.
# Check that permeability is calculated correctly from porosity.
#
# P = t
# With the Biot coefficient being 1, the effective stresses should be
# stress_xx = stress_yy = stress_zz = t
# With bulk modulus = 1 then should have
# vol_strain = strain_xx + strain_yy + strain_zz = t.
#
# With the biot coefficient being 1, the porosity (phi) # at time t is:
# phi = 1 - (1 - phi0) / exp(vol_strain)
# where phi0 is the porosity at t = 0 and P = 0.
#
# The permeability (k) is
# k = k_anisotropic * f * d^2 * phi^n / (1-phi)^m
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./p]
[../]
[]
[BCs]
[./p]
type = FunctionDirichletBC
boundary = 'bottom top'
variable = p
function = t
[../]
[./xmin]
type = DirichletBC
boundary = left
variable = disp_x
value = 0
[../]
[./ymin]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0
[../]
[./zmin]
type = DirichletBC
boundary = back
variable = disp_z
value = 0
[../]
[]
[Kernels]
[./p_does_not_really_diffuse]
type = Diffusion
variable = p
[../]
[./TensorMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[./poro_x]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 1
variable = disp_x
component = 0
[../]
[./poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 1
variable = disp_y
component = 1
[../]
[./poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 1
variable = disp_z
component = 2
[../]
[]
[AuxVariables]
[./poro]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_x]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_y]
order = CONSTANT
family = MONOMIAL
[../]
[./perm_z]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./poro]
type = PorousFlowPropertyAux
property = porosity
variable = poro
[../]
[./perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[../]
[./perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[../]
[./perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[../]
[]
[Postprocessors]
[./poro]
type = PointValue
variable = poro
point = '0 0 0'
[../]
[./perm_x]
type = PointValue
variable = perm_x
point = '0 0 0'
[../]
[./perm_y]
type = PointValue
variable = perm_y
point = '0 0 0'
[../]
[./perm_z]
type = PointValue
variable = perm_z
point = '0 0 0'
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'p'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
bulk_modulus = 1
shear_modulus = 1
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./vol_strain]
type = PorousFlowVolumetricStrain
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = p
capillary_pressure = pc
[../]
[./p_eff]
type = PorousFlowEffectiveFluidPressure
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
solid_bulk = 1
biot_coefficient = 1
[../]
[./permeability]
type = PorousFlowPermeabilityKozenyCarman
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
poroperm_function = kozeny_carman_fd2
f = 0.1
d = 5
m = 2
n = 7
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_atol -ksp_rtol'
petsc_options_value = 'gmres bjacobi 1E-10 1E-10 10 1E-15 1E-10'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
dt = 0.1
end_time = 1
[]
[Outputs]
file_base = vol_expansion_poroperm
csv = true
execute_on = 'timestep_end'
[]
modules/porous_flow/examples/tutorial/08_KT.i
# Unsaturated Darcy-Richards flow
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[./make3D]
input = annular
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
[../]
[./shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[../]
[./aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[../]
[./injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomain_ids = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[../]
[./rename]
type = RenameBlockGenerator
old_block_id = '0 1'
new_block_name = 'caps aquifer'
input = 'injection_area'
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./porepressure]
[../]
[]
[PorousFlowUnsaturated]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
relative_permeability_exponent = 3
relative_permeability_type = Corey
residual_saturation = 0.1
van_genuchten_alpha = 1E-6
van_genuchten_m = 0.6
stabilization = KT
flux_limiter_type = None
[]
[BCs]
[./production]
type = PorousFlowSink
variable = porepressure
fluid_phase = 0
flux_function = 1E-2
use_relperm = true
boundary = injection_area
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[../]
[./permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E5
dt = 1E5
nl_rel_tol = 1E-14
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/jacobian/chem08.i
# PorousFlowPreDis, which is essentially checking the derivatives of the secondary concentrations in PorousFlowMassFractionAqueousPreDisChemistry
# Dissolution with temperature, with one primary variable = 0 and stoichiometry > 1
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./a]
initial_condition = 0.2
[../]
[./b]
initial_condition = 0.0
[../]
[./temp]
initial_condition = 0.5
[../]
[]
[AuxVariables]
[./eqm_k]
initial_condition = 1.234
[../]
[./ini_sec_conc]
initial_condition = 0.222
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Kernels]
[./a]
type = PorousFlowPreDis
variable = a
mineral_density = 1E10
stoichiometry = 2
[../]
[./b]
type = PorousFlowPreDis
variable = b
mineral_density = 2.2E10
stoichiometry = 3
[../]
[./temp]
type = Diffusion
variable = temp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b temp'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.9
[../]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[../]
[./predis]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '0.5 0.8'
reactions = '2 3'
specific_reactive_surface_area = -44.4E-2
kinetic_rate_constant = 0.678
activation_energy = 4.4
molar_volume = 3.3
reference_temperature = 1
gas_constant = 7.4
theta_exponent = 1.1
eta_exponent = 1.2
[../]
[./mineral]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = ini_sec_conc
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 0.1
[]
[Preconditioning]
[./check]
type = SMP
full = true
petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
modules/porous_flow/test/tests/numerical_diffusion/pffltvd_action.i
# Using flux-limited TVD advection ala Kuzmin and Turek, employing PorousFlow Kernels and UserObjects, with superbee flux-limiter
# Using the PorousFlowFullySaturated Action
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[./porepressure]
[../]
[./tracer]
[../]
[]
[ICs]
[./porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[../]
[./tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[../]
[]
[PorousFlowFullySaturated]
porepressure = porepressure
coupling_type = Hydro
fp = the_simple_fluid
mass_fraction_vars = tracer
stabilization = KT
flux_limiter_type = superbee
[]
[BCs]
[./constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[../]
[./no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[../]
[./remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[../]
[./remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[../]
[../]
[]
[Materials]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[VectorPostprocessors]
[./tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 101
sort_by = x
variable = tracer
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
file_base = pffltvd_out
[./out]
type = CSV
execute_on = final
[../]
[]
modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D_angle.i
# Using flux-limited TVD advection ala Kuzmin and Turek, mploying PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 2D version with velocity = (0.1, 0.2, 0)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
xmin = 0
xmax = 1
ny = 10
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[./porepressure]
[../]
[./tracer]
[../]
[]
[ICs]
[./porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x - 2 * y'
[../]
[./tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1 | x > 0.3 | y < 0.1 | y > 0.3, 0, 1)'
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[../]
[./flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[../]
[./mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[../]
[./flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[../]
[]
[BCs]
[./constant_boundary_porepressure]
type = FunctionDirichletBC
variable = porepressure
function = '1 - x - 2 * y'
boundary = 'left right top bottom'
[../]
[./no_tracer_at_boundary]
type = DirichletBC
variable = tracer
value = 0
boundary = 'left right top bottom'
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[../]
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[../]
[./pc]
type = PorousFlowCapillaryPressureConst
[../]
[./advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[../]
[./advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[../]
[./relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[../]
[./porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 0.3
dt = 0.1
[]
[Outputs]
[./out]
type = Exodus
execute_on = 'initial final'
[../]
[]
modules/porous_flow/test/tests/poro_elasticity/pp_generation_fullysat_action.i
# Same as pp_generation.i, but using an Action
#
# A sample is constrained on all sides and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie kg/second per cubic meter), and the
# rise in porepressure is observed.
#
# Source = s (units = kg/m^3/second)
#
# Expect:
# fluid_mass = mass0 + s*t
# stress = 0 (remember this is effective stress)
# Porepressure = fluid_bulk*log(fluid_mass_density/density_P0), where fluid_mass_density = fluid_mass*porosity
# porosity = biot+(phi0-biot)*exp(pp(biot-1)/solid_bulk)
#
# Parameters:
# Biot coefficient = 0.3
# Phi0 = 0.1
# Solid Bulk modulus = 2
# fluid_bulk = 13
# density_P0 = 1
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./porepressure]
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 13.0
viscosity = 1.0
density0 = 1.0
[../]
[../]
[]
[PorousFlowFullySaturated]
coupling_type = HydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
biot_coefficient = 0.3
gravity = '0 0 0'
fp = the_simple_fluid
[]
[BCs]
[./confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[../]
[./confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[../]
[]
[Kernels]
[./source]
type = BodyForce
function = 0.1
variable = porepressure
[../]
[]
[AuxVariables]
[./porosity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.3
solid_bulk = 2
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 1 0 0 0 1' # unimportant
[../]
[]
[Functions]
[./porosity_analytic]
type = ParsedFunction
value = 'biot+(phi0-biot)*exp(pp*(biot-1)/bulk)'
vars = 'biot phi0 pp bulk'
vals = '0.3 0.1 p0 2'
[../]
[]
[Postprocessors]
[./fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
use_displaced_mesh = true
[../]
[./porosity]
type = PointValue
outputs = 'console csv'
point = '0 0 0'
variable = porosity
[../]
[./p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[../]
[./porosity_analytic]
type = FunctionValuePostprocessor
function = porosity_analytic
[../]
[./zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[../]
[./stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[../]
[./stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[../]
[./stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-14 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_fullysat_action
csv = true
[]
Child Objects
modules/porous_flow/include/materials/PorousFlowPorosityHMBiotModulus.h
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "PorousFlowPorosity.h"
class PorousFlowPorosityHMBiotModulus;
template <>
InputParameters validParams<PorousFlowPorosityHMBiotModulus>();
/**
* This Matrial evolves porosity so that the PorousFlow equations match
* the standard equations of poroelasticity theory with a constant BiotModulus.
* Even though a constant BiotModulus is not strictly correct, many
* analytical solutions of poroelasticity theory assume this, so
* PorousFlowPorosityHMBiotModulus is useful for comparing with those solutions.
* Otherwise it shouldn't generally be used because PorousFlowPorosity
* is physically more correct.
*/
class PorousFlowPorosityHMBiotModulus : public PorousFlowPorosity
{
public:
PorousFlowPorosityHMBiotModulus(const InputParameters & parameters);
protected:
virtual void computeQpProperties() override;
/// Old value of porosity
const MaterialProperty<Real> & _porosity_old;
/// Constant biot modulus
const Real _biot_modulus;
/// Constant fluid bulk modulus
const Real _fluid_bulk_modulus;
/// Old value of effective fluid pressure
const MaterialProperty<Real> & _pf_old;
/// Old value of total volumetric strain
const MaterialProperty<Real> & _vol_strain_qp_old;
/// Volumetric strain rate
const MaterialProperty<Real> & _vol_strain_rate_qp;
/// d(volumetric strain rate)/d(PorousFlow variable)
const MaterialProperty<std::vector<RealGradient>> & _dvol_strain_rate_qp_dvar;
};