- PorousFlowDictatorThe UserObject that holds the list of PorousFlow variable names
C++ Type:UserObjectName
Controllable:No
Description:The UserObject that holds the list of PorousFlow variable names
- capillary_pressureName of the UserObject defining the capillary pressure
C++ Type:UserObjectName
Controllable:No
Description:Name of the UserObject defining the capillary pressure
- phase0_porepressureVariable that is the porepressure of phase 0 (eg, the water phase). It will be <= phase1_porepressure.
C++ Type:std::vector<VariableName>
Controllable:No
Description:Variable that is the porepressure of phase 0 (eg, the water phase). It will be <= phase1_porepressure.
- phase1_porepressureVariable that is the porepressure of phase 1 (eg, the gas phase)
C++ Type:std::vector<VariableName>
Controllable:No
Description:Variable that is the porepressure of phase 1 (eg, the gas phase)
PorousFlow2PhasePP
This Material calculates the 2 porepressures and the 2 saturations in a 2-phase situation, and derivatives of these with respect to the PorousFlowVariables
Given the liquid and gas porepressures, this Material computes the liquid and gas saturations for 2-phase fluid simulations. See capillary pressure for further details.
Input Parameters
- at_nodesFalseEvaluate Material properties at nodes instead of quadpoints
Default:False
C++ Type:bool
Controllable:No
Description:Evaluate Material properties at nodes instead of quadpoints
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- boundaryThe list of boundaries (ids or names) from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundaries (ids or names) from the mesh where this object applies
- 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
Controllable:No
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 computeQpProperties() 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
Controllable:No
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 computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped
- declare_suffixAn optional suffix parameter that can be appended to any declared properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any declared properties. The suffix will be prepended with a '_' character.
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
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
Controllable:No
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
Controllable:No
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
Controllable:No
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<std::string>
Controllable:No
Description:List of material properties, from this material, to output (outputs must also be defined to an output type)
- outputsnone Vector of output names where you would like to restrict the output of variables(s) associated with this object
Default:none
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
Outputs Parameters
Input Files
- (modules/porous_flow/test/tests/jacobian/fflux09.i)
- (modules/porous_flow/examples/tutorial/11_2D.i)
- (modules/porous_flow/test/tests/actions/block_restricted_and_not.i)
- (modules/porous_flow/test/tests/jacobian/line_sink01.i)
- (modules/porous_flow/test/tests/basic_advection/2phase.i)
- (modules/porous_flow/test/tests/jacobian/hcs01.i)
- (modules/porous_flow/test/tests/jacobian/denergy02.i)
- (modules/porous_flow/examples/tutorial/11.i)
- (modules/porous_flow/test/tests/jacobian/heat_advection02.i)
- (modules/porous_flow/test/tests/heat_advection/except1.i)
- (modules/porous_flow/test/tests/jacobian/pls03.i)
- (modules/porous_flow/test/tests/sinks/injection_production_eg.i)
- (modules/porous_flow/test/tests/infiltration_and_drainage/rsc02.i)
- (modules/porous_flow/test/tests/sinks/injection_production_eg_outflowBC.i)
- (modules/porous_flow/test/tests/pressure_pulse/pressure_pulse_1d_2phase.i)
- (modules/porous_flow/test/tests/gravity/grav02b_fv.i)
- (modules/porous_flow/test/tests/sinks/s08.i)
- (modules/porous_flow/test/tests/jacobian/basic_advection6.i)
- (modules/porous_flow/test/tests/gravity/grav02a.i)
- (modules/porous_flow/test/tests/jacobian/fflux04.i)
- (modules/porous_flow/test/tests/jacobian/eff_stress01.i)
- (modules/porous_flow/test/tests/jacobian/mass05_nodens.i)
- (modules/porous_flow/test/tests/jacobian/line_sink04.i)
- (modules/porous_flow/test/tests/jacobian/line_sink03.i)
- (modules/porous_flow/test/tests/pressure_pulse/pressure_pulse_1d_2phase_monomial.i)
- (modules/porous_flow/test/tests/jacobian/fflux13.i)
- (modules/porous_flow/test/tests/jacobian/hcond02.i)
- (modules/porous_flow/test/tests/jacobian/line_sink02.i)
- (modules/porous_flow/test/tests/jacobian/hgs01.i)
- (modules/porous_flow/test/tests/jacobian/outflowbc04.i)
- (modules/porous_flow/test/tests/gravity/grav02d.i)
- (modules/porous_flow/test/tests/jacobian/fflux03.i)
- (modules/porous_flow/test/tests/jacobian/eff_stress03.i)
- (modules/porous_flow/test/tests/gravity/grav02b.i)
- (modules/porous_flow/test/tests/jacobian/mass04.i)
- (modules/porous_flow/test/tests/jacobian/denergy03.i)
- (modules/porous_flow/test/tests/gravity/grav02c.i)
- (modules/porous_flow/test/tests/jacobian/mass05.i)
- (modules/porous_flow/test/tests/actions/addjoiner.i)
- (modules/porous_flow/test/tests/actions/block_restricted_materials.i)
- (modules/porous_flow/test/tests/jacobian/pls04.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_pflow/jacobian_05.i)
- (modules/porous_flow/test/tests/actions/addjoiner_exception.i)
- (modules/porous_flow/test/tests/jacobian/pls02.i)
- (modules/porous_flow/test/tests/jacobian/denergy04.i)
- (modules/porous_flow/test/tests/pressure_pulse/pressure_pulse_1d_2phase_fv.i)
- (modules/porous_flow/test/tests/jacobian/denergy05.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_pflow/jacobian_03.i)
- (modules/porous_flow/test/tests/infiltration_and_drainage/rsc01.i)
(modules/porous_flow/test/tests/jacobian/fflux09.i)
# 2phase (PP), 3components (that exist in both phases), constant viscosity, constant insitu permeability
# density with constant bulk, Corey relative perm, nonzero gravity, unsaturated with RSC capillary
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[]
[AuxVariables]
[massfrac_ph0_sp1]
[]
[massfrac_ph1_sp0]
[]
[massfrac_ph1_sp1]
[]
[]
[ICs]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 0.4
[]
[massfrac_ph0_sp1]
type = RandomIC
variable = massfrac_ph0_sp1
min = 0
max = 0.4
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 0.4
[]
[massfrac_ph1_sp1]
type = RandomIC
variable = massfrac_ph1_sp1
min = 0
max = 0.4
[]
[]
[Kernels]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = ppwater
gravity = '-1 -0.1 0'
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = ppgas
gravity = '-1 -0.1 0'
[]
[flux2]
type = PorousFlowAdvectiveFlux
fluid_component = 2
variable = massfrac_ph0_sp0
gravity = '-1 -0.1 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas massfrac_ph0_sp0'
number_fluid_phases = 2
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureRSC
shift = -0.1
scale_ratio = 3
oil_viscosity = 2
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
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/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_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = 'caps aquifer'
input = 'injection_area'
[]
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
variable = pwater
[]
[flux_water]
type = PorousFlowAdvectiveFlux
fluid_component = 0
use_displaced_mesh = false
variable = pwater
[]
[vol_strain_rate_water]
type = PorousFlowMassVolumetricExpansion
fluid_component = 0
variable = pwater
[]
[mass_co2_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pgas
[]
[flux_co2]
type = PorousFlowAdvectiveFlux
fluid_component = 1
use_displaced_mesh = false
variable = pgas
[]
[vol_strain_rate_co2]
type = PorousFlowMassVolumetricExpansion
fluid_component = 1
variable = pgas
[]
[energy_dot]
type = PorousFlowEnergyTimeDerivative
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
variable = T
[]
[grad_stress_r]
type = StressDivergenceRZTensors
temperature = T
variable = disp_r
eigenstrain_names = 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
coupled_variables = 'pwater pgas swater sgas'
expression = '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
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
[]
[]
[FluidProperties]
[true_water]
type = Water97FluidProperties
[]
[tabulated_water]
type = TabulatedBicubicFluidProperties
fp = true_water
temperature_min = 275
pressure_max = 1E8
fluid_property_file = water97_tabulated_11.csv
[]
[true_co2]
type = CO2FluidProperties
[]
[tabulated_co2]
type = TabulatedBicubicFluidProperties
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
symbol_names = effective_fluid_pressure_at_wellbore
symbol_values = effective_fluid_pressure_at_wellbore
expression = '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/block_restricted_and_not.i)
# This input file illustrates that the PorousFlow Joiners can correctly join block-restricted Materials, even when one PorousFlow material type (relative permeability and fluid properties in this case) is block-restricted for one phase and not block-restricted for another
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmin = 0
xmax = 10
[]
[block1]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '3 -1 -1'
top_right = '6 1 1'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 p1'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[Variables]
[p0]
[]
[p1]
[]
[]
[Kernels]
[dot0]
type = PorousFlowMassTimeDerivative
variable = p0
fluid_component = 0
[]
[dot1]
type = PorousFlowAdvectiveFlux
variable = p1
gravity = '0 0 0'
fluid_component = 1
[]
[]
[AuxVariables]
[m0]
[]
[m1]
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
capillary_pressure = pc
phase0_porepressure = p0
phase1_porepressure = p1
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'm0 m1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[simple_fluid10]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 1
block = 0
[]
[simple_fluid11]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 1
block = 1
[]
[porosity0]
type = PorousFlowPorosityConst
porosity = 0.1
block = 0
[]
[porosity1]
type = PorousFlowPorosityConst
porosity = 0.1
block = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[relperm00]
type = PorousFlowRelativePermeabilityConst
phase = 0
block = 0
[]
[relperm01]
type = PorousFlowRelativePermeabilityConst
phase = 0
block = 1
[]
[relperm1_nonblockrestricted]
type = PorousFlowRelativePermeabilityConst
phase = 1
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
(modules/porous_flow/test/tests/jacobian/line_sink01.i)
# PorousFlowPeacemanBorehole with 2-phase, 3-components, with enthalpy, internal_energy, and thermal_conductivity
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[massfrac_ph0_sp1]
[]
[massfrac_ph1_sp0]
[]
[massfrac_ph1_sp1]
[]
[temp]
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp ppwater ppgas massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
number_fluid_phases = 2
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[dummy_outflow0]
type = PorousFlowSumQuantity
[]
[dummy_outflow1]
type = PorousFlowSumQuantity
[]
[dummy_outflow2]
type = PorousFlowSumQuantity
[]
[dummy_outflow3]
type = PorousFlowSumQuantity
[]
[dummy_outflow4]
type = PorousFlowSumQuantity
[]
[dummy_outflow5]
type = PorousFlowSumQuantity
[]
[dummy_outflow6]
type = PorousFlowSumQuantity
[]
[dummy_outflow7]
type = PorousFlowSumQuantity
[]
[]
[ICs]
[temp]
type = RandomIC
variable = temp
min = 1
max = 2
[]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 1
[]
[massfrac_ph0_sp1]
type = RandomIC
variable = massfrac_ph0_sp1
min = 0
max = 1
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 1
[]
[massfrac_ph1_sp1]
type = RandomIC
variable = massfrac_ph1_sp1
min = 0
max = 1
[]
[]
[Kernels]
[dummy_temp]
type = TimeDerivative
variable = temp
[]
[dummy_ppwater]
type = TimeDerivative
variable = ppwater
[]
[dummy_ppgas]
type = TimeDerivative
variable = ppgas
[]
[dummy_m00]
type = TimeDerivative
variable = massfrac_ph0_sp0
[]
[dummy_m01]
type = TimeDerivative
variable = massfrac_ph0_sp1
[]
[dummy_m10]
type = TimeDerivative
variable = massfrac_ph1_sp0
[]
[dummy_m11]
type = TimeDerivative
variable = massfrac_ph1_sp1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
cv = 1.1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1.4
cv = 1.8
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0.1 0.02 0.03 0.02 0.0 0.01 0.03 0.01 0.3'
[]
[]
[DiracKernels]
[dirac0]
type = PorousFlowPeacemanBorehole
fluid_phase = 0
variable = ppwater
point_file = one_point.bh
line_length = 1
SumQuantityUO = dummy_outflow0
character = 1
bottom_p_or_t = -10
unit_weight = '1 2 3'
re_constant = 0.123
[]
[dirac1]
type = PorousFlowPeacemanBorehole
fluid_phase = 1
variable = ppgas
line_length = 1
line_direction = '-1 -1 -1'
use_relative_permeability = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow1
character = -0.5
bottom_p_or_t = 10
unit_weight = '1 2 -3'
re_constant = 0.3
[]
[dirac2]
type = PorousFlowPeacemanBorehole
fluid_phase = 0
variable = massfrac_ph0_sp0
line_length = 1.3
line_direction = '1 0 1'
use_mobility = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow2
character = 0.6
bottom_p_or_t = -4
unit_weight = '-1 -2 -3'
re_constant = 0.4
[]
[dirac3]
type = PorousFlowPeacemanBorehole
fluid_phase = 0
variable = massfrac_ph0_sp1
line_length = 1.3
line_direction = '1 1 1'
use_enthalpy = true
mass_fraction_component = 0
point_file = one_point.bh
SumQuantityUO = dummy_outflow3
character = -1
bottom_p_or_t = 3
unit_weight = '0.1 0.2 0.3'
re_constant = 0.5
[]
[dirac4]
type = PorousFlowPeacemanBorehole
fluid_phase = 1
variable = massfrac_ph1_sp0
function_of = temperature
line_length = 0.9
line_direction = '1 1 1'
mass_fraction_component = 1
use_internal_energy = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow4
character = 1.1
bottom_p_or_t = -7
unit_weight = '-1 2 3'
re_constant = 0.6
[]
[dirac5]
type = PorousFlowPeacemanBorehole
fluid_phase = 1
variable = temp
line_length = 0.9
function_of = temperature
line_direction = '1 2 3'
mass_fraction_component = 2
use_internal_energy = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow5
character = 0.9
bottom_p_or_t = -8
unit_weight = '1 2 1'
re_constant = 0.7
[]
[dirac6]
type = PorousFlowPeacemanBorehole
fluid_phase = 0
variable = ppwater
point_file = one_point.bh
SumQuantityUO = dummy_outflow6
character = 0
bottom_p_or_t = 10
unit_weight = '0.0 0.0 0.0'
[]
[dirac7]
type = PorousFlowPeacemanBorehole
fluid_phase = 1
variable = massfrac_ph0_sp0
use_mobility = true
mass_fraction_component = 1
use_relative_permeability = true
use_internal_energy = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow7
character = -1
bottom_p_or_t = 10
unit_weight = '0.1 0.2 0.3'
[]
[]
[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'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
file_base = line_sink01
[]
(modules/porous_flow/test/tests/basic_advection/2phase.i)
# Basic advection of u in a 2-phase situation
#
# grad(P) = -2
# density * gravity = 4 * 0.25
# grad(P) - density * gravity = -3
# permeability = 10
# relative permeability = 0.5
# viscosity = 150
# so Darcy velocity = 0.1
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[P0]
[]
[P1]
[]
[]
[ICs]
[P0]
type = FunctionIC
variable = P0
function = '0'
[]
[P1]
type = FunctionIC
variable = P1
function = '2*(1-x)'
[]
[u]
type = FunctionIC
variable = u
function = 'if(x<0.1,1,0)'
[]
[]
[Kernels]
[u_dot]
type = TimeDerivative
variable = u
[]
[u_advection]
type = PorousFlowBasicAdvection
variable = u
phase = 1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = ''
number_fluid_phases = 2
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
density0 = 32
viscosity = 123
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 4
thermal_expansion = 0
viscosity = 150.0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = P0
phase1_porepressure = P1
capillary_pressure = pc
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '10 0 0 0 10 0 0 0 10'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityConst
kr = 0.5
phase = 1
[]
[darcy_velocity]
type = PorousFlowDarcyVelocityMaterial
gravity = '0.25 0 0'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 1
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = 0
variable = u
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
petsc_options_iname = '-pc_type -snes_rtol'
petsc_options_value = ' lu 1E-10'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(modules/porous_flow/test/tests/jacobian/hcs01.i)
# apply a half-cubic sink flux and observe the correct behavior
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[massfrac_ph1_sp0]
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas massfrac_ph0_sp0 massfrac_ph1_sp0'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[ICs]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 1
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 1
[]
[]
[Kernels]
[dummy_ppwater]
type = TimeDerivative
variable = ppwater
[]
[dummy_ppgas]
type = TimeDerivative
variable = ppgas
[]
[dummy_m00]
type = TimeDerivative
variable = massfrac_ph0_sp0
[]
[dummy_m10]
type = TimeDerivative
variable = massfrac_ph1_sp0
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1.4
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[]
[BCs]
[flux_w]
type = PorousFlowHalfCubicSink
boundary = 'left'
center = 0.1
cutoff = -1.1
max = 2.2
variable = ppwater
mass_fraction_component = 0
fluid_phase = 0
use_relperm = true
use_mobility = true
flux_function = 'x*y'
[]
[flux_g]
type = PorousFlowHalfCubicSink
boundary = 'top left front'
center = 0.5
cutoff = -1.1
max = -2.2
mass_fraction_component = 0
variable = ppgas
fluid_phase = 1
use_relperm = true
use_mobility = true
flux_function = '-x*y'
[]
[flux_1]
type = PorousFlowHalfCubicSink
boundary = 'right'
center = -0.1
cutoff = -1.1
max = 1.2
mass_fraction_component = 1
variable = massfrac_ph0_sp0
fluid_phase = 1
use_relperm = true
use_mobility = true
flux_function = '-1.1*x*y'
[]
[flux_2]
type = PorousFlowHalfCubicSink
boundary = 'bottom'
center = 3.2
cutoff = -1.1
max = 1.2
mass_fraction_component = 1
variable = massfrac_ph1_sp0
fluid_phase = 1
use_relperm = true
use_mobility = true
flux_function = '0.5*x*y'
[]
[]
[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'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 2
[]
[Outputs]
file_base = hcs01
[]
(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
[]
[]
[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/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_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = '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
variable = pwater
[]
[flux_water]
type = PorousFlowAdvectiveFlux
fluid_component = 0
use_displaced_mesh = false
variable = pwater
[]
[vol_strain_rate_water]
type = PorousFlowMassVolumetricExpansion
fluid_component = 0
variable = pwater
[]
[mass_co2_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pgas
[]
[flux_co2]
type = PorousFlowAdvectiveFlux
fluid_component = 1
use_displaced_mesh = false
variable = pgas
[]
[vol_strain_rate_co2]
type = PorousFlowMassVolumetricExpansion
fluid_component = 1
variable = pgas
[]
[energy_dot]
type = PorousFlowEnergyTimeDerivative
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
variable = T
[]
[grad_stress_x]
type = StressDivergenceTensors
temperature = T
variable = disp_x
eigenstrain_names = 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
eigenstrain_names = 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
coupled_variables = 'pwater pgas swater sgas'
expression = '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
[]
[]
[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_mat]
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_mat]
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
symbol_names = effective_fluid_pressure_at_wellbore
symbol_values = effective_fluid_pressure_at_wellbore
expression = '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/heat_advection02.i)
# 2phase, unsaturated, heat advection
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[temp]
[]
[pgas]
[]
[pwater]
[]
[]
[ICs]
[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]
[dummy_pgas]
type = Diffusion
variable = pgas
[]
[dummy_pwater]
type = Diffusion
variable = pwater
[]
[heat_advection]
type = PorousFlowHeatAdvection
variable = temp
gravity = '1 2 3'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp pgas pwater'
number_fluid_phases = 2
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 1
thermal_expansion = 0
viscosity = 1
cv = 1.1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.8
density0 = 0.7
thermal_expansion = 0
viscosity = 1.3
cv = 1.6
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[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/heat_advection/except1.i)
# Exception testing: cannot use PorousFlowFullySaturatedUpwindHeatAdvection with != 1 phase
[Mesh]
type = GeneratedMesh
dim = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[temp]
[]
[]
[Kernels]
[dummy1]
type = Diffusion
variable = ppwater
[]
[dummy2]
type = Diffusion
variable = ppgas
[]
[advection]
type = PorousFlowFullySaturatedUpwindHeatAdvection
variable = temp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas temp'
number_fluid_phases = 2
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.1 0 0 0 2 0 0 0 3'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
num_steps = 1
[]
(modules/porous_flow/test/tests/jacobian/pls03.i)
# PorousFlowPiecewiseLinearSink with 2-phase, 3-components
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 2
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[massfrac_ph0_sp1]
[]
[massfrac_ph1_sp0]
[]
[massfrac_ph1_sp1]
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
number_fluid_phases = 2
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[ICs]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 1
[]
[massfrac_ph0_sp1]
type = RandomIC
variable = massfrac_ph0_sp1
min = 0
max = 1
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 1
[]
[massfrac_ph1_sp1]
type = RandomIC
variable = massfrac_ph1_sp1
min = 0
max = 1
[]
[]
[Kernels]
[dummy_ppwater]
type = TimeDerivative
variable = ppwater
[]
[dummy_ppgas]
type = TimeDerivative
variable = ppgas
[]
[dummy_m00]
type = TimeDerivative
variable = massfrac_ph0_sp0
[]
[dummy_m01]
type = TimeDerivative
variable = massfrac_ph0_sp1
[]
[dummy_m10]
type = TimeDerivative
variable = massfrac_ph1_sp0
[]
[dummy_m11]
type = TimeDerivative
variable = massfrac_ph1_sp1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1.4
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[]
[BCs]
[flux_w]
type = PorousFlowPiecewiseLinearSink
boundary = 'left'
pt_vals = '-1 -0.5 0'
multipliers = '1 2 4'
variable = ppwater
mass_fraction_component = 0
fluid_phase = 0
use_relperm = true
use_mobility = true
flux_function = 'x*y'
[]
[flux_g]
type = PorousFlowPiecewiseLinearSink
boundary = 'top'
pt_vals = '0 0.5 1'
multipliers = '1 -2 4'
mass_fraction_component = 0
variable = ppgas
fluid_phase = 1
use_relperm = true
use_mobility = true
flux_function = '-x*y'
[]
[flux_1]
type = PorousFlowPiecewiseLinearSink
boundary = 'right'
pt_vals = '0 0.5 1'
multipliers = '1 3 4'
mass_fraction_component = 1
variable = massfrac_ph0_sp0
fluid_phase = 0
use_relperm = true
use_mobility = true
[]
[flux_2]
type = PorousFlowPiecewiseLinearSink
boundary = 'back top'
pt_vals = '0 0.5 1'
multipliers = '0 1 -3'
mass_fraction_component = 1
variable = massfrac_ph1_sp0
fluid_phase = 1
use_relperm = true
use_mobility = true
flux_function = '0.5*x*y'
[]
[flux_3]
type = PorousFlowPiecewiseLinearSink
boundary = 'right'
pt_vals = '0 0.5 1'
multipliers = '1 3 4'
mass_fraction_component = 2
variable = ppwater
fluid_phase = 0
use_relperm = true
use_mobility = true
[]
[flux_4]
type = PorousFlowPiecewiseLinearSink
boundary = 'back top'
pt_vals = '0 0.5 1'
multipliers = '0 1 -3'
mass_fraction_component = 2
variable = massfrac_ph1_sp0
fluid_phase = 1
use_relperm = true
use_mobility = true
flux_function = '-0.5*x*y'
[]
[]
[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'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 2
[]
[Outputs]
file_base = pls03
[]
(modules/porous_flow/test/tests/sinks/injection_production_eg.i)
# phase = 0 is liquid phase
# phase = 1 is gas phase
# fluid_component = 0 is water
# fluid_component = 1 is CO2
# Constant rate of CO2 injection into the left boundary
# 1D mesh
# The PorousFlowPiecewiseLinearSinks remove the correct water and CO2 from the right boundary
# Note i take pretty big timesteps here so the system is quite nonlinear
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 20
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[AuxVariables]
[saturation_gas]
order = CONSTANT
family = MONOMIAL
[]
[frac_water_in_liquid]
initial_condition = 1.0
[]
[frac_water_in_gas]
initial_condition = 0.0
[]
[]
[AuxKernels]
[saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = timestep_end
[]
[]
[Variables]
[pwater]
initial_condition = 20E6
[]
[pgas]
initial_condition = 20.1E6
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pwater
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pgas
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = pgas
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas pwater'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 1E-6
m = 0.6
[]
[]
[FluidProperties]
[true_water]
type = Water97FluidProperties
[]
[tabulated_water]
type = TabulatedBicubicFluidProperties
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 = TabulatedBicubicFluidProperties
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 = 293.15
[]
[saturation_calculator]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = pgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'frac_water_in_liquid frac_water_in_gas'
[]
[water]
type = PorousFlowSingleComponentFluid
fp = tabulated_water
phase = 0
[]
[co2]
type = PorousFlowSingleComponentFluid
fp = tabulated_co2
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-12 0 0 0 1e-12 0 0 0 1e-12'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
s_res = 0.1
sum_s_res = 0.2
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityBC
nw_phase = true
lambda = 2
s_res = 0.1
sum_s_res = 0.2
phase = 1
[]
[]
[BCs]
[co2_injection]
type = PorousFlowSink
boundary = left
variable = pgas # pgas is associated with the CO2 mass balance (fluid_component = 1 in its Kernels)
flux_function = -1E-2 # negative means a source, rather than a sink
[]
[right_water]
type = PorousFlowPiecewiseLinearSink
boundary = right
# a sink of water, since the Kernels given to pwater are for fluid_component = 0 (the water)
variable = pwater
# this Sink is a function of liquid porepressure
# Also, all the mass_fraction, mobility and relperm are referenced to the liquid phase now
fluid_phase = 0
# Sink strength = (Pwater - 20E6)
pt_vals = '0 1E9'
multipliers = '0 1E9'
PT_shift = 20E6
# multiply Sink strength computed above by mass fraction of water at the boundary
mass_fraction_component = 0
# also multiply Sink strength by mobility of the liquid
use_mobility = true
# also multiply Sink strength by the relperm of the liquid
use_relperm = true
# also multiplly Sink strength by 1/L, where L is the distance to the fixed-porepressure external environment
flux_function = 10 # 1/L
[]
[right_co2]
type = PorousFlowPiecewiseLinearSink
boundary = right
variable = pgas
fluid_phase = 1
pt_vals = '0 1E9'
multipliers = '0 1E9'
PT_shift = 20.1E6
mass_fraction_component = 1
use_mobility = true
use_relperm = true
flux_function = 10 # 1/L
[]
[]
[Preconditioning]
active = 'basic'
[basic]
type = SMP
full = true
petsc_options = '-snes_converged_reason -ksp_diagonal_scale -ksp_diagonal_scale_fix -ksp_gmres_modifiedgramschmidt -snes_linesearch_monitor'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2'
[]
[preferred]
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
nl_abs_tol = 1E-13
nl_rel_tol = 1E-10
end_time = 1e4
[TimeStepper]
type = IterationAdaptiveDT
dt = 1E4
growth_factor = 1.1
[]
[]
[VectorPostprocessors]
[pps]
type = LineValueSampler
warn_discontinuous_face_values = false
start_point = '0 0 0'
end_point = '20 0 0'
num_points = 20
sort_by = x
variable = 'pgas pwater saturation_gas'
[]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/test/tests/infiltration_and_drainage/rsc02.i)
# RSC test with low-res time and spatial resolution
[Mesh]
type = GeneratedMesh
dim = 2
nx = 200
ny = 1
xmin = 0
xmax = 10 # x is the depth variable, called zeta in RSC
ymin = 0
ymax = 0.05
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Functions]
[dts]
type = PiecewiseLinear
y = '3E-2 5E-1 8E-1'
x = '0 1 5'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pwater poil'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureRSC
oil_viscosity = 2E-3
scale_ratio = 2E3
shift = 10
[]
[]
[FluidProperties]
[water]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 10
thermal_expansion = 0
viscosity = 1e-3
[]
[oil]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 20
thermal_expansion = 0
viscosity = 2e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = poil
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[water]
type = PorousFlowSingleComponentFluid
fp = water
phase = 0
compute_enthalpy = false
compute_internal_energy = false
[]
[oil]
type = PorousFlowSingleComponentFluid
fp = oil
phase = 1
compute_enthalpy = false
compute_internal_energy = false
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_oil]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.25
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
[]
[]
[Variables]
[pwater]
[]
[poil]
[]
[]
[ICs]
[water_init]
type = ConstantIC
variable = pwater
value = 0
[]
[oil_init]
type = ConstantIC
variable = poil
value = 15
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pwater
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = poil
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = poil
[]
[]
[AuxVariables]
[SWater]
family = MONOMIAL
order = CONSTANT
[]
[SOil]
family = MONOMIAL
order = CONSTANT
[]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[AuxKernels]
[SWater]
type = MaterialStdVectorAux
property = PorousFlow_saturation_qp
index = 0
variable = SWater
[]
[SOil]
type = MaterialStdVectorAux
property = PorousFlow_saturation_qp
index = 1
variable = SOil
[]
[]
[BCs]
# we are pumping water into a system that has virtually incompressible fluids, hence the pressures rise enormously. this adversely affects convergence because of almost-overflows and precision-loss problems. The fixed things help keep pressures low and so prevent these awful behaviours. the movement of the saturation front is the same regardless of the fixed things.
active = 'recharge fixedoil fixedwater'
[recharge]
type = PorousFlowSink
variable = pwater
boundary = 'left'
flux_function = -1.0
[]
[fixedwater]
type = DirichletBC
variable = pwater
boundary = 'right'
value = 0
[]
[fixedoil]
type = DirichletBC
variable = poil
boundary = 'right'
value = 15
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason -ksp_diagonal_scale -ksp_diagonal_scale_fix -ksp_gmres_modifiedgramschmidt -snes_linesearch_monitor'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu NONZERO 2 1E-10 1E-10 10000'
[]
[]
[VectorPostprocessors]
[swater]
type = LineValueSampler
warn_discontinuous_face_values = false
variable = SWater
start_point = '0 0 0'
end_point = '7 0 0'
sort_by = x
num_points = 21
execute_on = timestep_end
[]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options = '-snes_converged_reason'
end_time = 5
[TimeStepper]
type = FunctionDT
function = dts
[]
[]
[Outputs]
file_base = rsc02
[along_line]
type = CSV
execute_vector_postprocessors_on = final
[]
[exodus]
type = Exodus
execute_on = 'initial final'
[]
[]
(modules/porous_flow/test/tests/sinks/injection_production_eg_outflowBC.i)
# phase = 0 is liquid phase
# phase = 1 is gas phase
# fluid_component = 0 is water
# fluid_component = 1 is CO2
# Constant rates of water and CO2 injection into the left boundary
# 1D mesh
# The PorousFlowOutflowBCs remove the correct water and CO2 from the right boundary
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 20
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[AuxVariables]
[saturation_gas]
order = CONSTANT
family = MONOMIAL
[]
[frac_water_in_liquid]
initial_condition = 1.0
[]
[frac_water_in_gas]
initial_condition = 0.0
[]
[water_kg_per_s]
[]
[co2_kg_per_s]
[]
[]
[AuxKernels]
[saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = timestep_end
[]
[]
[Variables]
[pwater]
initial_condition = 20E6
[]
[pgas]
initial_condition = 21E6
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pwater
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pgas
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = pgas
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas pwater'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 1E-6
m = 0.6
[]
[]
[FluidProperties]
[true_water]
type = Water97FluidProperties
[]
[tabulated_water]
type = TabulatedBicubicFluidProperties
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 = TabulatedBicubicFluidProperties
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 = 293.15
[]
[saturation_calculator]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = pgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'frac_water_in_liquid frac_water_in_gas'
[]
[water]
type = PorousFlowSingleComponentFluid
fp = tabulated_water
phase = 0
[]
[co2]
type = PorousFlowSingleComponentFluid
fp = tabulated_co2
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-12 0 0 0 1e-12 0 0 0 1e-12'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
s_res = 0.1
sum_s_res = 0.2
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityBC
nw_phase = true
lambda = 2
s_res = 0.1
sum_s_res = 0.2
phase = 1
[]
[]
[BCs]
[water_injection]
type = PorousFlowSink
boundary = left
variable = pwater # pwater is associated with the water mass balance (fluid_component = 0 in its Kernels)
flux_function = -1E-5 # negative means a source, rather than a sink
[]
[co2_injection]
type = PorousFlowSink
boundary = left
variable = pgas # pgas is associated with the CO2 mass balance (fluid_component = 1 in its Kernels)
flux_function = -2E-5 # negative means a source, rather than a sink
[]
[right_water_component0]
type = PorousFlowOutflowBC
boundary = right
variable = pwater
mass_fraction_component = 0
save_in = water_kg_per_s
[]
[right_co2_component1]
type = PorousFlowOutflowBC
boundary = right
variable = pgas
mass_fraction_component = 1
save_in = co2_kg_per_s
[]
[]
[Preconditioning]
active = 'basic'
[basic]
type = SMP
full = true
petsc_options = '-snes_converged_reason -ksp_diagonal_scale -ksp_diagonal_scale_fix -ksp_gmres_modifiedgramschmidt'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2'
[]
[preferred]
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
nl_abs_tol = 1E-10
nl_rel_tol = 1E-10
end_time = 1E5
[TimeStepper]
type = IterationAdaptiveDT
dt = 1E5
growth_factor = 1.1
[]
[]
[Postprocessors]
[water_kg_per_s]
type = NodalSum
boundary = right
variable = water_kg_per_s
[]
[co2_kg_per_s]
type = NodalSum
boundary = right
variable = co2_kg_per_s
[]
[]
[VectorPostprocessors]
[pps]
type = LineValueSampler
start_point = '0 0 0'
end_point = '20 0 0'
num_points = 20
sort_by = x
variable = 'pgas pwater saturation_gas'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/test/tests/pressure_pulse/pressure_pulse_1d_2phase.i)
# Pressure pulse in 1D with 2 phases (with one having zero saturation), 2components - transient
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 100
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
initial_condition = 2E6
[]
[ppgas]
initial_condition = 2E6
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = ppwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
variable = ppwater
gravity = '0 0 0'
fluid_component = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = ppgas
[]
[flux1]
type = PorousFlowAdvectiveFlux
variable = ppgas
gravity = '0 0 0'
fluid_component = 1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 2e6
density0 = 1
thermal_expansion = 0
viscosity = 1e-5
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[]
[BCs]
[leftwater]
type = DirichletBC
boundary = left
value = 3E6
variable = ppwater
[]
[leftgas]
type = DirichletBC
boundary = left
value = 3E6
variable = ppgas
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason -ksp_diagonal_scale -ksp_diagonal_scale_fix -ksp_gmres_modifiedgramschmidt -snes_linesearch_monitor'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu NONZERO 2 1E-15 1E-20 20'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E3
end_time = 1E4
[]
[Postprocessors]
[p000]
type = PointValue
variable = ppwater
point = '0 0 0'
execute_on = 'initial timestep_end'
[]
[p010]
type = PointValue
variable = ppwater
point = '10 0 0'
execute_on = 'initial timestep_end'
[]
[p020]
type = PointValue
variable = ppwater
point = '20 0 0'
execute_on = 'initial timestep_end'
[]
[p030]
type = PointValue
variable = ppwater
point = '30 0 0'
execute_on = 'initial timestep_end'
[]
[p040]
type = PointValue
variable = ppwater
point = '40 0 0'
execute_on = 'initial timestep_end'
[]
[p050]
type = PointValue
variable = ppwater
point = '50 0 0'
execute_on = 'initial timestep_end'
[]
[p060]
type = PointValue
variable = ppwater
point = '60 0 0'
execute_on = 'initial timestep_end'
[]
[p070]
type = PointValue
variable = ppwater
point = '70 0 0'
execute_on = 'initial timestep_end'
[]
[p080]
type = PointValue
variable = ppwater
point = '80 0 0'
execute_on = 'initial timestep_end'
[]
[p090]
type = PointValue
variable = ppwater
point = '90 0 0'
execute_on = 'initial timestep_end'
[]
[p100]
type = PointValue
variable = ppwater
point = '100 0 0'
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
file_base = pressure_pulse_1d_2phase
print_linear_residuals = false
csv = true
[]
(modules/porous_flow/test/tests/gravity/grav02b_fv.i)
# Checking that gravity head is established in the steady-state situation when 0<saturation<1 (note the strictly less-than).
# 2phase (PP), 2components, vanGenuchten, constant fluid bulk-moduli for each phase, constant viscosity, constant permeability, Corey relative perm
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
type = MooseVariableFVReal
initial_condition = -1.0
[]
[ppgas]
type = MooseVariableFVReal
initial_condition = 0
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
type = MooseVariableFVReal
initial_condition = 1
[]
[massfrac_ph1_sp0]
type = MooseVariableFVReal
initial_condition = 0
[]
[]
[FVKernels]
[flux0]
type = FVPorousFlowAdvectiveFlux
fluid_component = 0
variable = ppwater
gravity = '-1 0 0'
[]
[flux1]
type = FVPorousFlowAdvectiveFlux
fluid_component = 1
variable = ppgas
gravity = '-1 0 0'
[]
[]
[FVBCs]
[ppwater]
type = FVDirichletBC
boundary = right
variable = ppwater
value = -1
[]
[ppgas]
type = FVDirichletBC
boundary = right
variable = ppgas
value = 0
[]
[]
[Functions]
[ana_ppwater]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 2 pp_water_top 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[ana_ppgas]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 1 pp_gas_top 0.1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
viscosity = 0.5
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
[]
[ppss]
type = ADPorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = ADPorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = ADPorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm_water]
type = ADPorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_gas]
type = ADPorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[]
[Postprocessors]
[pp_water_top]
type = PointValue
variable = ppwater
point = '0 0 0'
[]
[pp_water_base]
type = PointValue
variable = ppwater
point = '-1 0 0'
[]
[pp_water_analytical]
type = FunctionValuePostprocessor
function = ana_ppwater
point = '-1 0 0'
[]
[pp_gas_top]
type = PointValue
variable = ppgas
point = '0 0 0'
[]
[pp_gas_base]
type = PointValue
variable = ppgas
point = '-1 0 0'
[]
[pp_gas_analytical]
type = FunctionValuePostprocessor
function = ana_ppgas
point = '-1 0 0'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
[csv]
type = CSV
[]
[]
(modules/porous_flow/test/tests/sinks/s08.i)
# apply a sink flux on just one component of a 3-component, 2-phase system and observe the correct behavior
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pwater frac_ph0_c0 pgas'
number_fluid_phases = 2
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1.1
[]
[]
[Variables]
[pwater]
[]
[frac_ph0_c0]
initial_condition = 0.3
[]
[pgas]
[]
[]
[ICs]
[pwater]
type = FunctionIC
variable = pwater
function = y
[]
[pgas]
type = FunctionIC
variable = pgas
function = y+3
[]
[]
[Kernels]
[mass_c0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = frac_ph0_c0
[]
[mass_c1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pwater
[]
[mass_c2]
type = PorousFlowMassTimeDerivative
fluid_component = 2
variable = pgas
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 2.3
density0 = 1.5
thermal_expansion = 0
viscosity = 2.1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1.3
density0 = 1.1
thermal_expansion = 0
viscosity = 1.1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = pgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'frac_ph0_c0 frac_ph0_c1 frac_ph1_c0 frac_ph1_c1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0.2 0 0 0 0.1 0 0 0 0.1'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 1
[]
[]
[AuxVariables]
[flux_out]
[]
[frac_ph0_c1]
initial_condition = 0.35
[]
[frac_ph1_c0]
initial_condition = 0.1
[]
[frac_ph1_c1]
initial_condition = 0.8
[]
[]
[Functions]
[mass1_00]
type = ParsedFunction
expression = 'fgas*vol*por*dens0gas*exp(pgas/bulkgas)*(1-pow(1+pow(al*(pgas-pwater),1.0/(1-m)),-m))+fwater*vol*por*dens0water*exp(pwater/bulkwater)*(pow(1+pow(al*(pgas-pwater),1.0/(1-m)),-m))'
symbol_names = 'vol por dens0gas pgas pwater bulkgas al m dens0water bulkwater fgas fwater'
symbol_values = '0.25 0.1 1.1 pgas_00 pwater_00 1.3 1.1 0.5 1.5 2.3 frac_ph1_c1_00 frac_ph0_c1_00'
[]
[expected_mass_change1_00]
type = ParsedFunction
expression = 'frac*fcn*area*dt*pow(1-pow(1+pow(al*(pgas-pwater),1.0/(1-m)),-m), 2)'
symbol_names = 'frac fcn area dt pgas pwater al m'
symbol_values = 'frac_ph1_c1_00 100 0.5 1E-3 pgas_00 pwater_00 1.1 0.5'
[]
[mass1_00_expect]
type = ParsedFunction
expression = 'mass_prev-mass_change'
symbol_names = 'mass_prev mass_change'
symbol_values = 'm1_00_prev del_m1_00'
[]
[]
[Postprocessors]
[total_mass_comp0]
type = PorousFlowFluidMass
fluid_component = 0
[]
[total_mass_comp1]
type = PorousFlowFluidMass
fluid_component = 1
[]
[total_mass_comp2]
type = PorousFlowFluidMass
fluid_component = 2
[]
[frac_ph1_c1_00]
type = PointValue
point = '0 0 0'
variable = frac_ph1_c1
execute_on = 'initial timestep_end'
[]
[frac_ph0_c1_00]
type = PointValue
point = '0 0 0'
variable = frac_ph0_c1
execute_on = 'initial timestep_end'
[]
[flux_00]
type = PointValue
point = '0 0 0'
variable = flux_out
execute_on = 'initial timestep_end'
[]
[pgas_00]
type = PointValue
point = '0 0 0'
variable = pgas
execute_on = 'initial timestep_end'
[]
[pwater_00]
type = PointValue
point = '0 0 0'
variable = pwater
execute_on = 'initial timestep_end'
[]
[m1_00]
type = FunctionValuePostprocessor
function = mass1_00
execute_on = 'initial timestep_end'
[]
[m1_00_prev]
type = FunctionValuePostprocessor
function = mass1_00
execute_on = 'timestep_begin'
outputs = 'console'
[]
[del_m1_00]
type = FunctionValuePostprocessor
function = expected_mass_change1_00
execute_on = 'timestep_end'
outputs = 'console'
[]
[m1_00_expect]
type = FunctionValuePostprocessor
function = mass1_00_expect
execute_on = 'timestep_end'
[]
[]
[BCs]
[flux_ph1_c1]
type = PorousFlowSink
boundary = 'left'
variable = pwater # sink applied to the mass_c1 Kernel
use_mobility = false
use_relperm = true
mass_fraction_component = 1
fluid_phase = 1
flux_function = 100
save_in = flux_out
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_max_it -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu 100 NONZERO 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-3
end_time = 0.01
nl_rel_tol = 1E-12
nl_abs_tol = 1E-12
[]
[Outputs]
file_base = s08
exodus = true
[console]
type = Console
execute_on = 'nonlinear linear'
[]
[csv]
type = CSV
execute_on = 'timestep_end'
[]
[]
(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
[]
[]
[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/gravity/grav02a.i)
# Checking that gravity head is established in the transient situation when 0<saturation<1 (note the strictly less-than).
# 2phase (PP), 2components, vanGenuchten, constant fluid bulk-moduli for each phase, constant viscosity, constant permeability, Corey relative perm
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
initial_condition = -1.0
[]
[ppgas]
initial_condition = 0
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = ppwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = ppwater
gravity = '-1 0 0'
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = ppgas
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = ppgas
gravity = '-1 0 0'
[]
[]
[Functions]
[ana_ppwater]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 2 pp_water_top 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[ana_ppgas]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 1 pp_gas_top 0.1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
viscosity = 0.5
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[]
[Postprocessors]
[pp_water_top]
type = PointValue
variable = ppwater
point = '0 0 0'
[]
[pp_water_base]
type = PointValue
variable = ppwater
point = '-1 0 0'
[]
[pp_water_analytical]
type = FunctionValuePostprocessor
function = ana_ppwater
point = '-1 0 0'
[]
[pp_gas_top]
type = PointValue
variable = ppgas
point = '0 0 0'
[]
[pp_gas_base]
type = PointValue
variable = ppgas
point = '-1 0 0'
[]
[pp_gas_analytical]
type = FunctionValuePostprocessor
function = ana_ppgas
point = '-1 0 0'
[]
[mass_ph0]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[mass_ph1]
type = PorousFlowFluidMass
fluid_component = 1
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 1.0
nl_rel_tol = 1E-10
nl_abs_tol = 1E-12
[]
[Outputs]
[csv]
type = CSV
file_base = grav02a
execute_on = 'initial final'
[]
[]
(modules/porous_flow/test/tests/jacobian/fflux04.i)
# 2phase (PP), 3components (that exist in both phases), constant viscosity, constant insitu permeability
# density with constant bulk, Corey relative perm, nonzero gravity, unsaturated with vanGenuchten
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[]
[AuxVariables]
[massfrac_ph0_sp1]
[]
[massfrac_ph1_sp0]
[]
[massfrac_ph1_sp1]
[]
[]
[ICs]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 0.4
[]
[massfrac_ph0_sp1]
type = RandomIC
variable = massfrac_ph0_sp1
min = 0
max = 0.4
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 0.4
[]
[massfrac_ph1_sp1]
type = RandomIC
variable = massfrac_ph1_sp1
min = 0
max = 0.4
[]
[]
[Kernels]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = ppwater
gravity = '-1 -0.1 0'
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = ppgas
gravity = '-1 -0.1 0'
[]
[flux2]
type = PorousFlowAdvectiveFlux
fluid_component = 2
variable = massfrac_ph0_sp0
gravity = '-1 -0.1 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas massfrac_ph0_sp0'
number_fluid_phases = 2
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
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/eff_stress01.i)
# 2phase (PP)
# vanGenuchten, constant-bulk density for each phase, constant porosity, 2components (that exist in both phases)
# unsaturated
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
[]
[massfrac_ph1_sp0]
[]
[]
[ICs]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 1
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 1
[]
[]
[Kernels]
[grad0]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
component = 0
variable = ppwater
[]
[grad1]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
component = 1
variable = ppgas
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[Materials]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[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 = '-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'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
(modules/porous_flow/test/tests/jacobian/mass05_nodens.i)
# 2phase (PP)
# vanGenuchten, constant-bulk density for each phase, constant porosity, 3components (that exist in both phases)
# unsaturated
# multiply_by_density = false
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[]
[AuxVariables]
[massfrac_ph0_sp1]
[]
[massfrac_ph1_sp0]
[]
[massfrac_ph1_sp1]
[]
[]
[ICs]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 0.4
[]
[massfrac_ph0_sp1]
type = RandomIC
variable = massfrac_ph0_sp1
min = 0
max = 0.4
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 0.4
[]
[massfrac_ph1_sp1]
type = RandomIC
variable = massfrac_ph1_sp1
min = 0
max = 0.4
[]
[]
[Kernels]
[mass_sp0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = ppwater
multiply_by_density = false
[]
[mass_sp1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = ppgas
multiply_by_density = false
[]
[mass_sp2]
type = PorousFlowMassTimeDerivative
fluid_component = 2
variable = massfrac_ph0_sp0
multiply_by_density = false
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas massfrac_ph0_sp0'
number_fluid_phases = 2
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.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/line_sink04.i)
# PorousFlowPolyLineSink with 2-phase, 3-components, with enthalpy, internal_energy, and thermal_conductivity
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 2
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[massfrac_ph0_sp1]
[]
[massfrac_ph1_sp0]
[]
[massfrac_ph1_sp1]
[]
[temp]
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp ppwater ppgas massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
number_fluid_phases = 2
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[dummy_outflow]
type = PorousFlowSumQuantity
[]
[]
[ICs]
[temp]
type = RandomIC
variable = temp
min = 1
max = 2
[]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 1
[]
[massfrac_ph0_sp1]
type = RandomIC
variable = massfrac_ph0_sp1
min = 0
max = 1
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 1
[]
[massfrac_ph1_sp1]
type = RandomIC
variable = massfrac_ph1_sp1
min = 0
max = 1
[]
[]
[Kernels]
[dummy_temp]
type = TimeDerivative
variable = temp
[]
[dummy_ppwater]
type = TimeDerivative
variable = ppwater
[]
[dummy_ppgas]
type = TimeDerivative
variable = ppgas
[]
[dummy_m00]
type = TimeDerivative
variable = massfrac_ph0_sp0
[]
[dummy_m01]
type = TimeDerivative
variable = massfrac_ph0_sp1
[]
[dummy_m10]
type = TimeDerivative
variable = massfrac_ph1_sp0
[]
[dummy_m11]
type = TimeDerivative
variable = massfrac_ph1_sp1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
cv = 1.1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1.4
cv = 1.8
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0.1 0.2 0.3 0.2 0 0.1 0.3 0.1 0.1'
[]
[]
[DiracKernels]
[dirac0]
type = PorousFlowPolyLineSink
fluid_phase = 0
variable = ppwater
point_file = one_point.bh
line_length = 1
SumQuantityUO = dummy_outflow
p_or_t_vals = '-0.9 1.5'
fluxes = '-1.1 2.2'
[]
[dirac1]
type = PorousFlowPolyLineSink
fluid_phase = 1
variable = ppgas
line_length = 1
use_relative_permeability = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow
p_or_t_vals = '-1.9 1.5'
fluxes = '1.1 -2.2'
[]
[dirac2]
type = PorousFlowPolyLineSink
fluid_phase = 0
variable = massfrac_ph0_sp0
line_length = 1.3
use_mobility = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow
p_or_t_vals = '-1.9 1.5'
fluxes = '1.1 -0.2'
[]
[dirac3]
type = PorousFlowPolyLineSink
fluid_phase = 0
variable = massfrac_ph0_sp1
line_length = 1.3
use_enthalpy = true
mass_fraction_component = 0
point_file = one_point.bh
SumQuantityUO = dummy_outflow
p_or_t_vals = '-1.9 1.5'
fluxes = '1.1 -0.2'
[]
[dirac4]
type = PorousFlowPolyLineSink
fluid_phase = 1
variable = massfrac_ph1_sp0
function_of = temperature
line_length = 0.9
mass_fraction_component = 1
use_internal_energy = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow
p_or_t_vals = '-1.9 1.5'
fluxes = '1.1 -0.2'
[]
[dirac5]
type = PorousFlowPolyLineSink
fluid_phase = 1
variable = temp
line_length = 0.9
mass_fraction_component = 2
use_internal_energy = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow
p_or_t_vals = '-1.9 1.5'
fluxes = '1.1 -0.2'
[]
[dirac6]
type = PorousFlowPolyLineSink
fluid_phase = 1
variable = massfrac_ph0_sp0
use_mobility = true
function_of = temperature
mass_fraction_component = 1
use_relative_permeability = true
use_internal_energy = true
point_file = ten_points.bh
SumQuantityUO = dummy_outflow
p_or_t_vals = '-1.9 1.5'
fluxes = '0 -0.2'
[]
[]
[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'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
file_base = line_sink04
[]
(modules/porous_flow/test/tests/jacobian/line_sink03.i)
# PorousFlowPeacemanBorehole with 2-phase, 3-components, with enthalpy, internal_energy, and thermal_conductivity
# NOTE: this test has suffered from repeated failures since its inception. The problem always appears to be caused by having too many Dirac points in an element: see #10471. As of Nov2020, the dirac7 DiracKernel uses only one Dirac point, not ten_points.bh. One day it would be good to be able to use point_file = ten_points.bh
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[massfrac_ph0_sp1]
[]
[massfrac_ph1_sp0]
[]
[massfrac_ph1_sp1]
[]
[temp]
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp ppwater ppgas massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
number_fluid_phases = 2
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[dummy_outflow0]
type = PorousFlowSumQuantity
[]
[dummy_outflow1]
type = PorousFlowSumQuantity
[]
[dummy_outflow2]
type = PorousFlowSumQuantity
[]
[dummy_outflow3]
type = PorousFlowSumQuantity
[]
[dummy_outflow4]
type = PorousFlowSumQuantity
[]
[dummy_outflow5]
type = PorousFlowSumQuantity
[]
[dummy_outflow6]
type = PorousFlowSumQuantity
[]
[dummy_outflow7]
type = PorousFlowSumQuantity
[]
[]
[ICs]
[temp]
type = RandomIC
variable = temp
min = 1
max = 2
[]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 1
[]
[massfrac_ph0_sp1]
type = RandomIC
variable = massfrac_ph0_sp1
min = 0
max = 1
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 1
[]
[massfrac_ph1_sp1]
type = RandomIC
variable = massfrac_ph1_sp1
min = 0
max = 1
[]
[]
[Kernels]
[dummy_temp]
type = TimeDerivative
variable = temp
[]
[dummy_ppwater]
type = TimeDerivative
variable = ppwater
[]
[dummy_ppgas]
type = TimeDerivative
variable = ppgas
[]
[dummy_m00]
type = TimeDerivative
variable = massfrac_ph0_sp0
[]
[dummy_m01]
type = TimeDerivative
variable = massfrac_ph0_sp1
[]
[dummy_m10]
type = TimeDerivative
variable = massfrac_ph1_sp0
[]
[dummy_m11]
type = TimeDerivative
variable = massfrac_ph1_sp1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
cv = 1.1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1.4
cv = 1.8
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0.1 0.02 0.03 0.02 0.0 0.01 0.03 0.01 0.3'
[]
[]
[DiracKernels]
#active = 'dirac6 dirac2' # incorrect jacobian for ny=2
#active = 'dirac0 dirac1 dirac2 dirac3 dirac4 dirac5' # correct jacobian for ny=2
#active = 'dirac0 dirac1 dirac2 dirac3 dirac4 dirac5 dirac6' # incorrect jacobian for ny=2
#active = 'dirac0 dirac1 dirac2 dirac3 dirac4 dirac5 dirac7' # correct jacobian in dbg, but not in opt, for ny=2
#active = 'dirac0 dirac1 dirac2 dirac3 dirac4 dirac5 dirac6' # incorrect jacobian in dbg, but correct for opt, for ny=1
#active = 'dirac0 dirac1 dirac2 dirac3 dirac4 dirac5' # correct jacobian, for ny=1
#active = 'dirac0 dirac1 dirac2 dirac3 dirac4 dirac5 dirac6' # incorrect jacobian in dbg, but correct for opt, for ny=1. row24, col 21 and 22 are wrong. row24=node3, 21=ppwater, 22=ppgas, 24=massfrac_ph0_sp1 (all at node3)
[dirac0]
type = PorousFlowPeacemanBorehole
fluid_phase = 0
variable = ppwater
point_file = one_point.bh
line_length = 1
SumQuantityUO = dummy_outflow0
character = 1
bottom_p_or_t = -10
unit_weight = '1 2 3'
re_constant = 0.123
[]
[dirac1]
type = PorousFlowPeacemanBorehole
fluid_phase = 1
variable = ppgas
line_length = 1
line_direction = '-1 -1 -1'
use_relative_permeability = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow1
character = -0.5
bottom_p_or_t = 10
unit_weight = '1 2 -3'
re_constant = 0.3
[]
[dirac2]
type = PorousFlowPeacemanBorehole
fluid_phase = 0
variable = massfrac_ph0_sp0
line_length = 1.3
line_direction = '1 0 1'
use_mobility = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow2
character = 0.6
bottom_p_or_t = -4
unit_weight = '-1 -2 -3'
re_constant = 0.4
[]
[dirac3]
type = PorousFlowPeacemanBorehole
fluid_phase = 0
variable = massfrac_ph0_sp1
line_length = 1.3
line_direction = '1 1 1'
use_enthalpy = true
mass_fraction_component = 0
point_file = one_point.bh
SumQuantityUO = dummy_outflow3
character = -1
bottom_p_or_t = 3
unit_weight = '0.1 0.2 0.3'
re_constant = 0.5
[]
[dirac4]
type = PorousFlowPeacemanBorehole
fluid_phase = 1
variable = massfrac_ph1_sp0
function_of = temperature
line_length = 0.9
line_direction = '1 1 1'
mass_fraction_component = 1
use_internal_energy = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow4
character = 1.1
bottom_p_or_t = -7
unit_weight = '-1 2 3'
re_constant = 0.6
[]
[dirac5]
type = PorousFlowPeacemanBorehole
fluid_phase = 1
variable = temp
line_length = 0.9
function_of = temperature
line_direction = '1 2 3'
mass_fraction_component = 2
use_internal_energy = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow5
character = 0.9
bottom_p_or_t = -8
unit_weight = '1 2 1'
re_constant = 0.7
[]
[dirac6]
type = PorousFlowPeacemanBorehole
fluid_phase = 0
variable = ppwater
point_file = nine_points.bh
SumQuantityUO = dummy_outflow6
character = 0
bottom_p_or_t = 10
unit_weight = '0.0 0.0 0.0'
[]
[dirac7]
type = PorousFlowPeacemanBorehole
fluid_phase = 1
variable = massfrac_ph0_sp0
use_mobility = true
mass_fraction_component = 1
use_relative_permeability = true
use_internal_energy = true
point_file = one_point.bh
#NOTE this commented-out line: point_file = ten_points.bh
SumQuantityUO = dummy_outflow7
character = -1
bottom_p_or_t = 10
unit_weight = '0.1 0.2 0.3'
[]
[]
[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'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
file_base = line_sink03
[]
(modules/porous_flow/test/tests/pressure_pulse/pressure_pulse_1d_2phase_monomial.i)
# Pressure pulse in 1D with 2 phases (with one having zero saturation), 2components - transient
#
# Note: this is identical to pressure_pules_1d_2phase.i, except that the mass fraction AuxVariables are
# constant monomials. The result should be identical though.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 100
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
initial_condition = 2E6
[]
[ppgas]
initial_condition = 2E6
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
order = CONSTANT
family = MONOMIAL
initial_condition = 1
[]
[massfrac_ph1_sp0]
order = CONSTANT
family = MONOMIAL
initial_condition = 0
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = ppwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
variable = ppwater
gravity = '0 0 0'
fluid_component = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = ppgas
[]
[flux1]
type = PorousFlowAdvectiveFlux
variable = ppgas
gravity = '0 0 0'
fluid_component = 1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 2e6
density0 = 1
thermal_expansion = 0
viscosity = 1e-5
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[]
[BCs]
[leftwater]
type = DirichletBC
boundary = left
value = 3E6
variable = ppwater
[]
[leftgas]
type = DirichletBC
boundary = left
value = 3E6
variable = ppgas
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason -ksp_diagonal_scale -ksp_diagonal_scale_fix -ksp_gmres_modifiedgramschmidt -snes_linesearch_monitor'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu NONZERO 2 1E-15 1E-20 20'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E3
end_time = 1E4
[]
[Postprocessors]
[p000]
type = PointValue
variable = ppwater
point = '0 0 0'
execute_on = 'initial timestep_end'
[]
[p010]
type = PointValue
variable = ppwater
point = '10 0 0'
execute_on = 'initial timestep_end'
[]
[p020]
type = PointValue
variable = ppwater
point = '20 0 0'
execute_on = 'initial timestep_end'
[]
[p030]
type = PointValue
variable = ppwater
point = '30 0 0'
execute_on = 'initial timestep_end'
[]
[p040]
type = PointValue
variable = ppwater
point = '40 0 0'
execute_on = 'initial timestep_end'
[]
[p050]
type = PointValue
variable = ppwater
point = '50 0 0'
execute_on = 'initial timestep_end'
[]
[p060]
type = PointValue
variable = ppwater
point = '60 0 0'
execute_on = 'initial timestep_end'
[]
[p070]
type = PointValue
variable = ppwater
point = '70 0 0'
execute_on = 'initial timestep_end'
[]
[p080]
type = PointValue
variable = ppwater
point = '80 0 0'
execute_on = 'initial timestep_end'
[]
[p090]
type = PointValue
variable = ppwater
point = '90 0 0'
execute_on = 'initial timestep_end'
[]
[p100]
type = PointValue
variable = ppwater
point = '100 0 0'
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
file_base = pressure_pulse_1d_2phase
print_linear_residuals = false
csv = true
[]
(modules/porous_flow/test/tests/jacobian/fflux13.i)
# 2phase (PP), 3components (that exist in both phases), constant viscosity, constant insitu permeability
# density with constant bulk, Corey relative perm, nonzero gravity, unsaturated with vanGenuchten
# using harmonic-mean mobility
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[]
[AuxVariables]
[massfrac_ph0_sp1]
[]
[massfrac_ph1_sp0]
[]
[massfrac_ph1_sp1]
[]
[]
[ICs]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 0.4
[]
[massfrac_ph0_sp1]
type = RandomIC
variable = massfrac_ph0_sp1
min = 0
max = 0.4
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 0.4
[]
[massfrac_ph1_sp1]
type = RandomIC
variable = massfrac_ph1_sp1
min = 0
max = 0.4
[]
[]
[Kernels]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = ppwater
gravity = '-1 -0.1 0'
full_upwind_threshold = 0
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = ppgas
gravity = '-1 -0.1 0'
full_upwind_threshold = 0
fallback_scheme = harmonic
[]
[flux2]
type = PorousFlowAdvectiveFlux
fluid_component = 2
variable = massfrac_ph0_sp0
gravity = '-1 -0.1 0'
full_upwind_threshold = 0
fallback_scheme = harmonic
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas massfrac_ph0_sp0'
number_fluid_phases = 2
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
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/hcond02.i)
# 2phase heat conduction
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pgas]
[]
[pwater]
[]
[temp]
[]
[]
[ICs]
[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]
[dummy_pgas]
type = Diffusion
variable = pgas
[]
[dummy_pwater]
type = Diffusion
variable = pwater
[]
[heat_conduction]
type = PorousFlowHeatConduction
variable = temp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas temp pwater'
number_fluid_phases = 2
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '1.1 0.1 0.3 0.1 2.2 0 0.3 0 3.3'
wet_thermal_conductivity = '2.1 0.1 0.3 0.1 1.2 0 0.3 0 1.1'
exponent = 1.7
aqueous_phase_number = 1
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = pgas
capillary_pressure = pc
[]
[]
[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/line_sink02.i)
# PorousFlowPolyLineSink with 2-phase, 3-components, with enthalpy, internal_energy, and thermal_conductivity
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 2
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[massfrac_ph0_sp1]
[]
[massfrac_ph1_sp0]
[]
[massfrac_ph1_sp1]
[]
[temp]
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp ppwater ppgas massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
number_fluid_phases = 2
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[dummy_outflow]
type = PorousFlowSumQuantity
[]
[]
[ICs]
[temp]
type = RandomIC
variable = temp
min = 1
max = 2
[]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 1
[]
[massfrac_ph0_sp1]
type = RandomIC
variable = massfrac_ph0_sp1
min = 0
max = 1
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 1
[]
[massfrac_ph1_sp1]
type = RandomIC
variable = massfrac_ph1_sp1
min = 0
max = 1
[]
[]
[Kernels]
[dummy_temp]
type = TimeDerivative
variable = temp
[]
[dummy_ppwater]
type = TimeDerivative
variable = ppwater
[]
[dummy_ppgas]
type = TimeDerivative
variable = ppgas
[]
[dummy_m00]
type = TimeDerivative
variable = massfrac_ph0_sp0
[]
[dummy_m01]
type = TimeDerivative
variable = massfrac_ph0_sp1
[]
[dummy_m10]
type = TimeDerivative
variable = massfrac_ph1_sp0
[]
[dummy_m11]
type = TimeDerivative
variable = massfrac_ph1_sp1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
cv = 1.1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1.4
cv = 1.8
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0.1 0.2 0.3 0.2 0 0.1 0.3 0.1 0.1'
[]
[]
[DiracKernels]
[dirac0]
type = PorousFlowPolyLineSink
fluid_phase = 0
variable = ppwater
point_file = one_point.bh
line_length = 1
SumQuantityUO = dummy_outflow
p_or_t_vals = '-0.9 1.5'
fluxes = '-1.1 2.2'
[]
[dirac1]
type = PorousFlowPolyLineSink
fluid_phase = 1
variable = ppgas
line_length = 1
use_relative_permeability = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow
p_or_t_vals = '-1.9 1.5'
fluxes = '1.1 -2.2'
[]
[dirac2]
type = PorousFlowPolyLineSink
fluid_phase = 0
variable = massfrac_ph0_sp0
line_length = 1.3
use_mobility = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow
p_or_t_vals = '-1.9 1.5'
fluxes = '1.1 -0.2'
[]
[dirac3]
type = PorousFlowPolyLineSink
fluid_phase = 0
variable = massfrac_ph0_sp1
line_length = 1.3
use_enthalpy = true
mass_fraction_component = 0
point_file = one_point.bh
SumQuantityUO = dummy_outflow
p_or_t_vals = '-1.9 1.5'
fluxes = '1.1 -0.2'
[]
[dirac4]
type = PorousFlowPolyLineSink
fluid_phase = 1
variable = massfrac_ph1_sp0
function_of = temperature
line_length = 0.9
mass_fraction_component = 1
use_internal_energy = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow
p_or_t_vals = '-1.9 1.5'
fluxes = '1.1 -0.2'
[]
[dirac5]
type = PorousFlowPolyLineSink
fluid_phase = 1
variable = temp
line_length = 0.9
mass_fraction_component = 2
use_internal_energy = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow
p_or_t_vals = '-1.9 1.5'
fluxes = '1.1 -0.2'
[]
[dirac6]
type = PorousFlowPolyLineSink
fluid_phase = 1
variable = massfrac_ph0_sp0
use_mobility = true
function_of = temperature
mass_fraction_component = 1
use_relative_permeability = true
use_internal_energy = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow
p_or_t_vals = '-1.9 1.5'
fluxes = '0 -0.2'
[]
[]
[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'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
file_base = line_sink02
[]
(modules/porous_flow/test/tests/jacobian/hgs01.i)
# apply a half-gaussian sink flux and observe the correct behavior
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[massfrac_ph1_sp0]
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas massfrac_ph0_sp0 massfrac_ph1_sp0'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[ICs]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 1
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 1
[]
[]
[Kernels]
[dummy_ppwater]
type = TimeDerivative
variable = ppwater
[]
[dummy_ppgas]
type = TimeDerivative
variable = ppgas
[]
[dummy_m00]
type = TimeDerivative
variable = massfrac_ph0_sp0
[]
[dummy_m10]
type = TimeDerivative
variable = massfrac_ph1_sp0
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1.4
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[]
[BCs]
[flux_w]
type = PorousFlowHalfGaussianSink
boundary = 'left'
center = 0.1
sd = 1.1
max = 2.2
variable = ppwater
mass_fraction_component = 0
fluid_phase = 0
use_relperm = true
use_mobility = true
flux_function = 'x*y'
[]
[flux_g]
type = PorousFlowHalfGaussianSink
boundary = 'top left front'
center = 0.5
sd = 1.1
max = -2.2
mass_fraction_component = 0
variable = ppgas
fluid_phase = 1
use_relperm = true
use_mobility = true
flux_function = '-x*y'
[]
[flux_1]
type = PorousFlowHalfGaussianSink
boundary = 'right'
center = -0.1
sd = 1.1
max = 1.2
mass_fraction_component = 1
variable = massfrac_ph0_sp0
fluid_phase = 1
use_relperm = true
use_mobility = true
flux_function = '-1.1*x*y'
[]
[flux_2]
type = PorousFlowHalfGaussianSink
boundary = 'bottom'
center = 3.2
sd = 1.1
max = 1.2
mass_fraction_component = 1
variable = massfrac_ph1_sp0
fluid_phase = 1
use_relperm = true
use_mobility = true
flux_function = '0.5*x*y'
[]
[]
[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'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 2
[]
[Outputs]
file_base = pls03
[]
(modules/porous_flow/test/tests/jacobian/outflowbc04.i)
# PorousFlowOutflowBC: testing Jacobian for multi-phase, multi-component
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 3
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '1 2 3'
[]
[Variables]
[pwater]
initial_condition = 1
[]
[pgas]
initial_condition = 2
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pwater
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pgas
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = pgas
[]
[]
[AuxVariables]
[frac_water_in_liquid]
initial_condition = 0.6
[]
[frac_water_in_gas]
initial_condition = 0.4
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas pwater'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 1
m = 0.6
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1.2
cp = 0.9
cv = 1.1
viscosity = 0.4
thermal_expansion = 0.7
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 2.5
density0 = 0.5
cp = 1.9
cv = 2.1
viscosity = 0.9
thermal_expansion = 0.4
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = 0
[]
[saturation_calculator]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = pgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'frac_water_in_liquid frac_water_in_gas'
[]
[water]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[co2]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0.1 0.2 0.3 1.8 0.9 1.7 0.4 0.3 1.1'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
s_res = 0.0
sum_s_res = 0.0
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityBC
nw_phase = true
lambda = 2
s_res = 0.0
sum_s_res = 0.0
phase = 1
[]
[]
[BCs]
[outflow0]
type = PorousFlowOutflowBC
boundary = 'front back top bottom'
variable = pwater
mass_fraction_component = 0
multiplier = 1E8 # so this BC gets weighted much more heavily than Kernels
[]
[outflow1]
type = PorousFlowOutflowBC
boundary = 'left right top bottom'
variable = pgas
mass_fraction_component = 1
multiplier = 1E8 # so this BC gets weighted much more heavily than Kernels
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1E-7
num_steps = 1
# petsc_options = '-snes_test_jacobian -snes_force_iteration'
# petsc_options_iname = '-snes_type --ksp_type -pc_type -snes_convergence_test'
# petsc_options_value = ' ksponly preonly none skip'
[]
(modules/porous_flow/test/tests/gravity/grav02d.i)
# Checking that gravity head is established in the transient situation when 0<=saturation<=1 (note the less-than-or-equal-to).
# 2phase (PP), 2components, vanGenuchten, constant fluid bulk-moduli for each phase, constant viscosity, constant permeability, Corey relative perm.
# A boundary condition enforces porepressures at the right boundary
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Functions]
[dts]
type = PiecewiseLinear
x = '1E-3 1E-2 1E-1 2E-1'
y = '1E-3 1E-2 0.2E-1 1E-1'
[]
[]
[Variables]
[ppwater]
initial_condition = 0
[]
[ppgas]
initial_condition = 0.5
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[BCs]
[ppwater]
type = DirichletBC
boundary = right
variable = ppwater
value = 0
[]
[ppgas]
type = DirichletBC
boundary = right
variable = ppgas
value = 0.5
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = ppwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = ppwater
gravity = '-1 0 0'
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = ppgas
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = ppgas
gravity = '-1 0 0'
[]
[]
[Functions]
[ana_ppwater]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 2 pp_water_top 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
viscosity = 0.5
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[]
[Postprocessors]
[pp_water_top]
type = PointValue
variable = ppwater
point = '0 0 0'
[]
[pp_water_base]
type = PointValue
variable = ppwater
point = '-1 0 0'
[]
[pp_water_analytical]
type = FunctionValuePostprocessor
function = ana_ppwater
point = '-1 0 0'
[]
[ppwater_00]
type = PointValue
variable = ppwater
point = '0 0 0'
[]
[ppwater_01]
type = PointValue
variable = ppwater
point = '-0.1 0 0'
[]
[ppwater_02]
type = PointValue
variable = ppwater
point = '-0.2 0 0'
[]
[ppwater_03]
type = PointValue
variable = ppwater
point = '-0.3 0 0'
[]
[ppwater_04]
type = PointValue
variable = ppwater
point = '-0.4 0 0'
[]
[ppwater_05]
type = PointValue
variable = ppwater
point = '-0.5 0 0'
[]
[ppwater_06]
type = PointValue
variable = ppwater
point = '-0.6 0 0'
[]
[ppwater_07]
type = PointValue
variable = ppwater
point = '-0.7 0 0'
[]
[ppwater_08]
type = PointValue
variable = ppwater
point = '-0.8 0 0'
[]
[ppwater_09]
type = PointValue
variable = ppwater
point = '-0.9 0 0'
[]
[ppwater_10]
type = PointValue
variable = ppwater
point = '-1 0 0'
[]
[ppgas_00]
type = PointValue
variable = ppgas
point = '0 0 0'
[]
[ppgas_01]
type = PointValue
variable = ppgas
point = '-0.1 0 0'
[]
[ppgas_02]
type = PointValue
variable = ppgas
point = '-0.2 0 0'
[]
[ppgas_03]
type = PointValue
variable = ppgas
point = '-0.3 0 0'
[]
[ppgas_04]
type = PointValue
variable = ppgas
point = '-0.4 0 0'
[]
[ppgas_05]
type = PointValue
variable = ppgas
point = '-0.5 0 0'
[]
[ppgas_06]
type = PointValue
variable = ppgas
point = '-0.6 0 0'
[]
[ppgas_07]
type = PointValue
variable = ppgas
point = '-0.7 0 0'
[]
[ppgas_08]
type = PointValue
variable = ppgas
point = '-0.8 0 0'
[]
[ppgas_09]
type = PointValue
variable = ppgas
point = '-0.9 0 0'
[]
[ppgas_10]
type = PointValue
variable = ppgas
point = '-1 0 0'
[]
[]
[Preconditioning]
active = andy
[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-12 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-12 1E-10 10000 test'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
[TimeStepper]
type = FunctionDT
function = dts
[]
end_time = 1.0
[]
[Outputs]
[csv]
type = CSV
execute_on = 'initial final'
file_base = grav02d
[]
[]
(modules/porous_flow/test/tests/jacobian/fflux03.i)
# 2phase (PP), 2components (that exist in both phases), constant viscosity, constant insitu permeability
# density with constant bulk, Corey relative perm, nonzero gravity, unsaturated with vanGenuchten
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
[]
[massfrac_ph1_sp0]
[]
[]
[ICs]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 1
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 1
[]
[]
[Kernels]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = ppwater
gravity = '-1 -0.1 0'
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = ppgas
gravity = '-1 -0.1 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
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/eff_stress03.i)
# 2phase (PP)
# vanGenuchten, constant-bulk density for each phase, constant porosity, 2components (that exist in both phases)
# unsaturated
# RZ coordinates
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
coord_type = RZ
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
[]
[massfrac_ph1_sp0]
[]
[]
[ICs]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 1
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 1
[]
[]
[Kernels]
[grad0]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
component = 0
variable = ppwater
[]
[grad1]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
component = 1
variable = ppgas
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[Materials]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[p_eff]
type = PorousFlowEffectiveFluidPressure
[]
[]
[Preconditioning]
[check]
type = SMP
full = true
petsc_options_iname = '-snes_type'
petsc_options_value = 'test'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
(modules/porous_flow/test/tests/gravity/grav02b.i)
# Checking that gravity head is established in the steady-state situation when 0<saturation<1 (note the strictly less-than).
# 2phase (PP), 2components, vanGenuchten, constant fluid bulk-moduli for each phase, constant viscosity, constant permeability, Corey relative perm
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
initial_condition = -1.0
[]
[ppgas]
initial_condition = 0
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[Kernels]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = ppwater
gravity = '-1 0 0'
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = ppgas
gravity = '-1 0 0'
[]
[]
[BCs]
[ppwater]
type = DirichletBC
boundary = right
variable = ppwater
value = -1
[]
[ppgas]
type = DirichletBC
boundary = right
variable = ppgas
value = 0
[]
[]
[Functions]
[ana_ppwater]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 2 pp_water_top 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[ana_ppgas]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 1 pp_gas_top 0.1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
viscosity = 0.5
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[]
[Postprocessors]
[pp_water_top]
type = PointValue
variable = ppwater
point = '0 0 0'
[]
[pp_water_base]
type = PointValue
variable = ppwater
point = '-1 0 0'
[]
[pp_water_analytical]
type = FunctionValuePostprocessor
function = ana_ppwater
point = '-1 0 0'
[]
[pp_gas_top]
type = PointValue
variable = ppgas
point = '0 0 0'
[]
[pp_gas_base]
type = PointValue
variable = ppgas
point = '-1 0 0'
[]
[pp_gas_analytical]
type = FunctionValuePostprocessor
function = ana_ppgas
point = '-1 0 0'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
file_base = grav02b
[csv]
type = CSV
[]
exodus = false
[]
(modules/porous_flow/test/tests/jacobian/mass04.i)
# 2phase (PP)
# vanGenuchten, constant-bulk density for each phase, constant porosity, 2components (that exist in both phases)
# unsaturated
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
[]
[massfrac_ph1_sp0]
[]
[]
[ICs]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 1
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 1
[]
[]
[Kernels]
[mass_sp0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = ppwater
[]
[mass_sp1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = ppgas
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.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/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
[]
[]
[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/gravity/grav02c.i)
# Checking that gravity head is established in the transient situation when 0<=saturation<=1 (note the less-than-or-equal-to).
# 2phase (PP), 2components, vanGenuchten, constant fluid bulk-moduli for each phase, constant viscosity, constant permeability, Corey relative perm
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Functions]
[dts]
type = PiecewiseLinear
y = '1E-3 1E-2 1E-1'
x = '1E-3 1E-2 1E-1'
[]
[]
[Variables]
[ppwater]
initial_condition = -0.1
[]
[ppgas]
initial_condition = 0
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = ppwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = ppwater
gravity = '-1 0 0'
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = ppgas
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = ppgas
gravity = '-1 0 0'
[]
[]
[Functions]
[ana_ppwater]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 2 pp_water_top 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
viscosity = 0.5
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[]
[Postprocessors]
[pp_water_top]
type = PointValue
variable = ppwater
point = '0 0 0'
[]
[pp_water_base]
type = PointValue
variable = ppwater
point = '-1 0 0'
[]
[pp_water_analytical]
type = FunctionValuePostprocessor
function = ana_ppwater
point = '-1 0 0'
[]
[mass_ph0]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[mass_ph1]
type = PorousFlowFluidMass
fluid_component = 1
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
active = andy
[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-12 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-12 1E-10 10000 test'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
[TimeStepper]
type = FunctionDT
function = dts
[]
end_time = 1.0
[]
[Outputs]
execute_on = 'initial timestep_end'
file_base = grav02c
[csv]
type = CSV
[]
exodus = true
[]
(modules/porous_flow/test/tests/jacobian/mass05.i)
# 2phase (PP)
# vanGenuchten, constant-bulk density for each phase, constant porosity, 3components (that exist in both phases)
# unsaturated
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[]
[AuxVariables]
[massfrac_ph0_sp1]
[]
[massfrac_ph1_sp0]
[]
[massfrac_ph1_sp1]
[]
[]
[ICs]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 0.4
[]
[massfrac_ph0_sp1]
type = RandomIC
variable = massfrac_ph0_sp1
min = 0
max = 0.4
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 0.4
[]
[massfrac_ph1_sp1]
type = RandomIC
variable = massfrac_ph1_sp1
min = 0
max = 0.4
[]
[]
[Kernels]
[mass_sp0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = ppwater
[]
[mass_sp1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = ppgas
[]
[mass_sp2]
type = PorousFlowMassTimeDerivative
fluid_component = 2
variable = massfrac_ph0_sp0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas massfrac_ph0_sp0'
number_fluid_phases = 2
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.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/actions/addjoiner.i)
# Tests that including PorousFlowJoiner materials doesn't cause the simulation
# to fail due to the PorousFlowAddMaterialJoiner action adding duplicate
# PorousFlowJoiner materials
[GlobalParams]
PorousFlowDictator = dictator
[]
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[p0]
[]
[p1]
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[p1]
type = Diffusion
variable = p1
[]
[]
[FluidProperties]
[fluid0]
type = SimpleFluidProperties
[]
[fluid1]
type = SimpleFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
at_nodes = true
[]
[temperature_qp]
type = PorousFlowTemperature
[]
[ppss_nodal]
type = PorousFlow2PhasePP
at_nodes = true
phase0_porepressure = p0
phase1_porepressure = p1
capillary_pressure = pc
[]
[ppss_qp]
type = PorousFlow2PhasePP
phase0_porepressure = p0
phase1_porepressure = p1
capillary_pressure = pc
[]
[fluid0_nodal]
type = PorousFlowSingleComponentFluid
fp = fluid0
at_nodes = true
phase = 0
[]
[fluid1_nodal]
type = PorousFlowSingleComponentFluid
fp = fluid1
at_nodes = true
phase = 1
[]
[fluid0_qp]
type = PorousFlowSingleComponentFluid
fp = fluid0
phase = 0
[]
[fluid1_qp]
type = PorousFlowSingleComponentFluid
fp = fluid1
phase = 1
[]
[density_nodal]
type = PorousFlowJoiner
at_nodes = true
material_property = PorousFlow_fluid_phase_density_nodal
[]
[density_qp]
type = PorousFlowJoiner
material_property = PorousFlow_fluid_phase_density_qp
[]
[viscosity_nodal]
type = PorousFlowJoiner
material_property = PorousFlow_viscosity_nodal
at_nodes = true
[]
[viscosity_qp]
type = PorousFlowJoiner
material_property = PorousFlow_viscosity_qp
[]
[energy_ndoal]
type = PorousFlowJoiner
at_nodes = true
material_property = PorousFlow_fluid_phase_internal_energy_nodal
[]
[energy_qp]
type = PorousFlowJoiner
material_property = PorousFlow_fluid_phase_internal_energy_qp
[]
[enthalpy_nodal]
type = PorousFlowJoiner
material_property = PorousFlow_fluid_phase_enthalpy_nodal
at_nodes = true
[]
[enthalpy_qp]
type = PorousFlowJoiner
material_property = PorousFlow_fluid_phase_enthalpy_qp
[]
[relperm0_nodal]
type = PorousFlowRelativePermeabilityConst
at_nodes = true
kr = 0.5
phase = 0
[]
[relperm1_nodal]
type = PorousFlowRelativePermeabilityConst
at_nodes = true
kr = 0.8
phase = 1
[]
[relperm_nodal]
type = PorousFlowJoiner
at_nodes = true
material_property = PorousFlow_relative_permeability_nodal
[]
[]
[Executioner]
type = Steady
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 p1'
number_fluid_phases = 2
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
(modules/porous_flow/test/tests/actions/block_restricted_materials.i)
# Tests that the actions to automatically add PorousFlowJoiner's and the correct
# qp or nodal version of each material work as expected when a material is block
# restricted. Tests both phase dependent properties (like relative permeability)
# as well as phase-independent materials (like porosity)
[GlobalParams]
PorousFlowDictator = dictator
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
ny = 2
[]
[subdomain0]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 0.5 0'
block_id = 0
[]
[subdomain1]
input = subdomain0
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0.5 0'
top_right = '1 1 0'
block_id = 1
[]
[]
[Variables]
[p0]
initial_condition = 1
[]
[p1]
initial_condition = 1.1
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
[]
[kl]
family = MONOMIAL
order = CONSTANT
[]
[kg]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[]
[kl]
type = PorousFlowPropertyAux
property = relperm
variable = kl
phase = 0
[]
[kg]
type = PorousFlowPropertyAux
property = relperm
variable = kg
phase = 1
[]
[]
[Kernels]
[p0]
type = PorousFlowMassTimeDerivative
variable = p0
[]
[p1]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = p1
[]
[]
[FluidProperties]
[fluid0]
type = SimpleFluidProperties
[]
[fluid1]
type = SimpleFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = p0
phase1_porepressure = p1
capillary_pressure = pc
[]
[krl0]
type = PorousFlowRelativePermeabilityConst
kr = 0.7
phase = 0
block = 0
[]
[krg0]
type = PorousFlowRelativePermeabilityConst
kr = 0.8
phase = 1
block = 0
[]
[krl1]
type = PorousFlowRelativePermeabilityConst
kr = 0.5
phase = 0
block = 1
[]
[krg1]
type = PorousFlowRelativePermeabilityConst
kr = 0.4
phase = 1
block = 1
[]
[perm]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 1 0 0 0 1'
[]
[fluid0]
type = PorousFlowSingleComponentFluid
fp = fluid0
phase = 0
[]
[fluid1]
type = PorousFlowSingleComponentFluid
fp = fluid1
phase = 1
[]
[massfrac]
type = PorousFlowMassFraction
[]
[porosity0]
type = PorousFlowPorosityConst
porosity = 0.1
block = 0
[]
[porosity1]
type = PorousFlowPorosityConst
porosity = 0.2
block = 1
[]
[]
[Executioner]
type = Transient
end_time = 1
nl_abs_tol = 1e-10
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 p1'
number_fluid_phases = 2
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/jacobian/pls04.i)
# PorousFlowPiecewiseLinearSink with 2-phase, 3-components, with enthalpy, internal_energy, and thermal_conductivity
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 2
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[massfrac_ph0_sp1]
[]
[massfrac_ph1_sp0]
[]
[massfrac_ph1_sp1]
[]
[temp]
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp ppwater ppgas massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
number_fluid_phases = 2
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[ICs]
[temp]
type = RandomIC
variable = temp
min = 1
max = 2
[]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 1
[]
[massfrac_ph0_sp1]
type = RandomIC
variable = massfrac_ph0_sp1
min = 0
max = 1
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 1
[]
[massfrac_ph1_sp1]
type = RandomIC
variable = massfrac_ph1_sp1
min = 0
max = 1
[]
[]
[Kernels]
[dummy_temp]
type = TimeDerivative
variable = temp
[]
[dummy_ppwater]
type = TimeDerivative
variable = ppwater
[]
[dummy_ppgas]
type = TimeDerivative
variable = ppgas
[]
[dummy_m00]
type = TimeDerivative
variable = massfrac_ph0_sp0
[]
[dummy_m01]
type = TimeDerivative
variable = massfrac_ph0_sp1
[]
[dummy_m10]
type = TimeDerivative
variable = massfrac_ph1_sp0
[]
[dummy_m11]
type = TimeDerivative
variable = massfrac_ph1_sp1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
cv = 1.1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1.4
cv = 1.8
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0.1 0.2 0.3 0.2 0 0.1 0.3 0.1 0.1'
wet_thermal_conductivity = '10 2 31 2 40 1 31 1 10'
exponent = 0.5
[]
[]
[BCs]
[flux_w]
type = PorousFlowPiecewiseLinearSink
boundary = 'left'
pt_vals = '-1 -0.5 0'
multipliers = '1 2 4'
variable = ppwater
mass_fraction_component = 0
fluid_phase = 0
use_relperm = true
use_mobility = true
use_enthalpy = true
flux_function = 'x*y'
[]
[flux_g]
type = PorousFlowPiecewiseLinearSink
boundary = 'top'
pt_vals = '0 0.5 1'
multipliers = '1 -2 4'
mass_fraction_component = 0
variable = ppgas
fluid_phase = 1
use_relperm = true
use_mobility = true
use_internal_energy = true
flux_function = '-x*y'
[]
[flux_1]
type = PorousFlowPiecewiseLinearSink
boundary = 'right'
pt_vals = '0 0.5 1'
multipliers = '1 3 4'
mass_fraction_component = 1
variable = massfrac_ph0_sp0
fluid_phase = 0
use_relperm = true
use_mobility = true
use_internal_energy = true
[]
[flux_2]
type = PorousFlowPiecewiseLinearSink
boundary = 'back top'
pt_vals = '0 0.5 1'
multipliers = '0 1 -3'
mass_fraction_component = 1
variable = massfrac_ph1_sp0
fluid_phase = 1
use_relperm = true
use_mobility = true
use_enthalpy = true
flux_function = '0.5*x*y'
[]
[flux_3]
type = PorousFlowPiecewiseLinearSink
boundary = 'right'
pt_vals = '0 0.5 1'
multipliers = '1 3 4'
mass_fraction_component = 2
variable = ppwater
fluid_phase = 0
use_relperm = true
use_enthalpy = true
use_mobility = true
[]
[flux_4]
type = PorousFlowPiecewiseLinearSink
boundary = 'back top'
pt_vals = '0 0.5 1'
multipliers = '0 1 -3'
mass_fraction_component = 2
variable = massfrac_ph1_sp0
fluid_phase = 1
use_relperm = true
use_mobility = true
flux_function = '-0.5*x*y'
use_enthalpy = true
use_thermal_conductivity = true
[]
[]
[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'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
file_base = pls04
[]
(modules/porous_flow/test/tests/flux_limited_TVD_pflow/jacobian_05.i)
# Checking the Jacobian of Flux-Limited TVD Advection, 2 phases, 2 components, using flux_limiter_type != None
#
# Here we use snes_check_jacobian instead of snes_type=test. The former just checks the Jacobian for the
# random initial conditions, while the latter checks for u=1 and u=-1
#
# The Jacobian is correct for u=1 and u=-1, but the finite-difference scheme used by snes_type=test gives the
# wrong answer.
# For u=constant, the Kuzmin-Turek scheme adds as much antidiffusion as possible, resulting in a central-difference
# version of advection (flux_limiter = 1). This is correct, and the Jacobian is calculated correctly.
# However, when computing the Jacobian using finite differences, u is increased or decreased at a node.
# This results in that node being at a maximum or minimum, which means no antidiffusion should be added
# (flux_limiter = 0). This corresponds to a full-upwind scheme. So the finite-difference computes the
# Jacobian in the full-upwind scenario, which is incorrect (the original residual = 0, after finite-differencing
# the residual comes from the full-upwind scenario).
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 5
[]
[GlobalParams]
gravity = '1.1 2 -0.5'
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[massfrac_ph1_sp0]
[]
[]
[ICs]
[ppwater]
type = FunctionIC
variable = ppwater
function = 'if(x<1,0,if(x<4,sin(x-1),1))'
[]
[ppgas]
type = FunctionIC
variable = ppgas
function = 'x*(6-x)/6'
[]
[massfrac_ph0_sp0]
type = FunctionIC
variable = massfrac_ph0_sp0
function = 'x/6'
[]
[massfrac_ph1_sp0]
type = FunctionIC
variable = massfrac_ph1_sp0
function = '1-x/7'
[]
[]
[Kernels]
[flux_ph0_sp0]
type = PorousFlowFluxLimitedTVDAdvection
variable = ppwater
advective_flux_calculator = advective_flux_calculator_ph0_sp0
[]
[flux_ph0_sp1]
type = PorousFlowFluxLimitedTVDAdvection
variable = ppgas
advective_flux_calculator = advective_flux_calculator_ph0_sp1
[]
[flux_ph1_sp0]
type = PorousFlowFluxLimitedTVDAdvection
variable = massfrac_ph0_sp0
advective_flux_calculator = advective_flux_calculator_ph1_sp0
[]
[flux_ph1_sp1]
type = PorousFlowFluxLimitedTVDAdvection
variable = massfrac_ph1_sp0
advective_flux_calculator = advective_flux_calculator_ph1_sp1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1.4
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas massfrac_ph0_sp0 massfrac_ph1_sp0'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 1
m = 0.5
[]
[advective_flux_calculator_ph0_sp0]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = minmod
phase = 0
fluid_component = 0
[]
[advective_flux_calculator_ph0_sp1]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = vanleer
phase = 0
fluid_component = 1
[]
[advective_flux_calculator_ph1_sp0]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = mc
phase = 1
fluid_component = 0
[]
[advective_flux_calculator_ph1_sp1]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = superbee
phase = 1
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.21 0 0 0 1.5 0 0 0 0.8'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options = '-snes_check_jacobian'
[]
[]
[Executioner]
type = Transient
solve_type = Linear # this is to force convergence even though the nonlinear residual is high: we just care about the Jacobian in this test
end_time = 1
num_steps = 1
dt = 1
[]
(modules/porous_flow/test/tests/actions/addjoiner_exception.i)
# Tests that including a PorousFlowJoiner material throws the
# informative deprecation warning rather than a duplicate material property error
[GlobalParams]
PorousFlowDictator = dictator
[]
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[p0]
[]
[p1]
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[p1]
type = Diffusion
variable = p1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
at_nodes = true
[]
[temperature_qp]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
at_nodes = true
phase0_porepressure = p0
phase1_porepressure = p1
capillary_pressure = pc
[]
[relperm0]
type = PorousFlowRelativePermeabilityConst
at_nodes = true
kr = 0.5
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityConst
at_nodes = true
kr = 0.8
phase = 1
[]
[relperm]
type = PorousFlowJoiner
at_nodes = true
material_property = PorousFlow_relative_permeability_nodal
[]
[]
[Executioner]
type = Steady
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 p1'
number_fluid_phases = 2
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
(modules/porous_flow/test/tests/jacobian/pls02.i)
# PorousFlowPiecewiseLinearSink with 2-phase, 2-components
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 3
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[massfrac_ph1_sp0]
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas massfrac_ph0_sp0 massfrac_ph1_sp0'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[ICs]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 1
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 1
[]
[]
[Kernels]
[dummy_ppwater]
type = TimeDerivative
variable = ppwater
[]
[dummy_ppgas]
type = TimeDerivative
variable = ppgas
[]
[dummy_m00]
type = TimeDerivative
variable = massfrac_ph0_sp0
[]
[dummy_m10]
type = TimeDerivative
variable = massfrac_ph1_sp0
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1.4
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[]
[BCs]
[flux_w]
type = PorousFlowPiecewiseLinearSink
boundary = 'left'
pt_vals = '-1 -0.5 0'
multipliers = '1 2 4'
variable = ppwater
mass_fraction_component = 0
fluid_phase = 0
use_relperm = true
use_mobility = true
flux_function = 'x*y'
[]
[flux_g]
type = PorousFlowPiecewiseLinearSink
boundary = 'top'
pt_vals = '0 0.5 1'
multipliers = '1 -2 4'
mass_fraction_component = 0
variable = ppgas
fluid_phase = 1
use_relperm = true
use_mobility = true
flux_function = '-x*y'
[]
[flux_1]
type = PorousFlowPiecewiseLinearSink
boundary = 'right'
pt_vals = '0 0.5 1'
multipliers = '1 3 4'
mass_fraction_component = 1
variable = massfrac_ph0_sp0
fluid_phase = 0
use_relperm = true
use_mobility = true
[]
[flux_2]
type = PorousFlowPiecewiseLinearSink
boundary = 'back top'
pt_vals = '0 0.5 1'
multipliers = '0 1 -3'
mass_fraction_component = 1
variable = massfrac_ph1_sp0
fluid_phase = 1
use_relperm = true
use_mobility = true
flux_function = '0.5*x*y'
[]
[]
[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'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 2
[]
[Outputs]
file_base = pls02
[]
(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
[]
[]
[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/pressure_pulse/pressure_pulse_1d_2phase_fv.i)
# Pressure pulse in 1D with 2 phases (with one having zero saturation), 2components - transient using FV
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmin = 0
xmax = 100
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
type = MooseVariableFVReal
initial_condition = 2E6
[]
[ppgas]
type = MooseVariableFVReal
initial_condition = 2E6
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
type = MooseVariableFVReal
initial_condition = 1
[]
[massfrac_ph1_sp0]
type = MooseVariableFVReal
initial_condition = 0
[]
[]
[FVKernels]
[mass0]
type = FVPorousFlowMassTimeDerivative
fluid_component = 0
variable = ppwater
[]
[flux0]
type = FVPorousFlowAdvectiveFlux
variable = ppwater
gravity = '0 0 0'
fluid_component = 0
[]
[mass1]
type = FVPorousFlowMassTimeDerivative
fluid_component = 1
variable = ppgas
[]
[flux1]
type = FVPorousFlowAdvectiveFlux
variable = ppgas
gravity = '0 0 0'
fluid_component = 1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 2e6
density0 = 1
thermal_expansion = 0
viscosity = 1e-5
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
[]
[ppss]
type = ADPorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = ADPorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = ADPorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = ADPorousFlowPermeabilityConst
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
[]
[relperm_water]
type = ADPorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_gas]
type = ADPorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[]
[FVBCs]
[leftwater]
type = FVDirichletBC
boundary = left
value = 3E6
variable = ppwater
[]
[leftgas]
type = FVDirichletBC
boundary = left
value = 3E6
variable = ppgas
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap -snes_atol'
petsc_options_value = 'gmres asm lu NONZERO 2 1E-12'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E3
end_time = 1E4
[]
[Postprocessors]
[p005]
type = PointValue
variable = ppwater
point = '5 0 0'
execute_on = 'initial timestep_end'
[]
[p015]
type = PointValue
variable = ppwater
point = '15 0 0'
execute_on = 'initial timestep_end'
[]
[p025]
type = PointValue
variable = ppwater
point = '25 0 0'
execute_on = 'initial timestep_end'
[]
[p035]
type = PointValue
variable = ppwater
point = '35 0 0'
execute_on = 'initial timestep_end'
[]
[p045]
type = PointValue
variable = ppwater
point = '45 0 0'
execute_on = 'initial timestep_end'
[]
[p055]
type = PointValue
variable = ppwater
point = '55 0 0'
execute_on = 'initial timestep_end'
[]
[p065]
type = PointValue
variable = ppwater
point = '65 0 0'
execute_on = 'initial timestep_end'
[]
[p075]
type = PointValue
variable = ppwater
point = '75 0 0'
execute_on = 'initial timestep_end'
[]
[p085]
type = PointValue
variable = ppwater
point = '85 0 0'
execute_on = 'initial timestep_end'
[]
[p095]
type = PointValue
variable = ppwater
point = '95 0 0'
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
file_base = pressure_pulse_1d_2phase_fv
print_linear_residuals = false
csv = true
[]
(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
[]
[]
[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/flux_limited_TVD_pflow/jacobian_03.i)
# Checking the Jacobian of Flux-Limited TVD Advection, 2 phases, 2 components, using flux_limiter_type = None
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
xmin = 0
xmax = 1
ny = 2
ymin = -1
ymax = 2
bias_y = 1.5
[]
[GlobalParams]
gravity = '1 2 -0.5'
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[massfrac_ph1_sp0]
[]
[]
[ICs]
[ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[]
[ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[]
[massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 1
[]
[massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 1
[]
[]
[Kernels]
[flux_ph0_sp0]
type = PorousFlowFluxLimitedTVDAdvection
variable = ppwater
advective_flux_calculator = advective_flux_calculator_ph0_sp0
[]
[flux_ph0_sp1]
type = PorousFlowFluxLimitedTVDAdvection
variable = ppgas
advective_flux_calculator = advective_flux_calculator_ph0_sp1
[]
[flux_ph1_sp0]
type = PorousFlowFluxLimitedTVDAdvection
variable = massfrac_ph0_sp0
advective_flux_calculator = advective_flux_calculator_ph1_sp0
[]
[flux_ph1_sp1]
type = PorousFlowFluxLimitedTVDAdvection
variable = massfrac_ph1_sp0
advective_flux_calculator = advective_flux_calculator_ph1_sp1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1.4
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas massfrac_ph0_sp0 massfrac_ph1_sp0'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 1
m = 0.5
[]
[advective_flux_calculator_ph0_sp0]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = None
phase = 0
fluid_component = 0
[]
[advective_flux_calculator_ph0_sp1]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = None
phase = 0
fluid_component = 1
[]
[advective_flux_calculator_ph1_sp0]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = None
phase = 1
fluid_component = 0
[]
[advective_flux_calculator_ph1_sp1]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = None
phase = 1
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.21 0 0 0 1.5 0 0 0 0.8'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-snes_type'
petsc_options_value = 'test'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
num_steps = 1
dt = 1
[]
(modules/porous_flow/test/tests/infiltration_and_drainage/rsc01.i)
# RSC test with high-res time and spatial resolution
[Mesh]
type = GeneratedMesh
dim = 2
nx = 600
ny = 1
xmin = 0
xmax = 10 # x is the depth variable, called zeta in RSC
ymin = 0
ymax = 0.05
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Functions]
[dts]
type = PiecewiseLinear
y = '3E-3 3E-2 0.05'
x = '0 1 5'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pwater poil'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureRSC
oil_viscosity = 2E-3
scale_ratio = 2E3
shift = 10
[]
[]
[FluidProperties]
[water]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 10
thermal_expansion = 0
viscosity = 1e-3
[]
[oil]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 20
thermal_expansion = 0
viscosity = 2e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = poil
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[water]
type = PorousFlowSingleComponentFluid
fp = water
phase = 0
compute_enthalpy = false
compute_internal_energy = false
[]
[oil]
type = PorousFlowSingleComponentFluid
fp = oil
phase = 1
compute_enthalpy = false
compute_internal_energy = false
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_oil]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.25
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
[]
[]
[Variables]
[pwater]
[]
[poil]
[]
[]
[ICs]
[water_init]
type = ConstantIC
variable = pwater
value = 0
[]
[oil_init]
type = ConstantIC
variable = poil
value = 15
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pwater
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = poil
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = poil
[]
[]
[AuxVariables]
[SWater]
family = MONOMIAL
order = CONSTANT
[]
[SOil]
family = MONOMIAL
order = CONSTANT
[]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[AuxKernels]
[SWater]
type = MaterialStdVectorAux
property = PorousFlow_saturation_qp
index = 0
variable = SWater
[]
[SOil]
type = MaterialStdVectorAux
property = PorousFlow_saturation_qp
index = 1
variable = SOil
[]
[]
[BCs]
# we are pumping water into a system that has virtually incompressible fluids, hence the pressures rise enormously. this adversely affects convergence because of almost-overflows and precision-loss problems. The fixed things help keep pressures low and so prevent these awful behaviours. the movement of the saturation front is the same regardless of the fixed things.
active = 'recharge fixedoil fixedwater'
[recharge]
type = PorousFlowSink
variable = pwater
boundary = 'left'
flux_function = -1.0
[]
[fixedwater]
type = DirichletBC
variable = pwater
boundary = 'right'
value = 0
[]
[fixedoil]
type = DirichletBC
variable = poil
boundary = 'right'
value = 15
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason -ksp_diagonal_scale -ksp_diagonal_scale_fix -ksp_gmres_modifiedgramschmidt -snes_linesearch_monitor'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu NONZERO 2 1E-10 1E-10 10000'
[]
[]
[VectorPostprocessors]
[swater]
type = LineValueSampler
warn_discontinuous_face_values = false
variable = SWater
start_point = '0 0 0'
end_point = '7 0 0'
sort_by = x
num_points = 21
execute_on = timestep_end
[]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options = '-snes_converged_reason'
end_time = 5
[TimeStepper]
type = FunctionDT
function = dts
[]
[]
[Outputs]
file_base = rsc01
[along_line]
type = CSV
execute_vector_postprocessors_on = final
[]
[exodus]
type = Exodus
execute_on = 'initial final'
[]
[]