- 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
- phaseThe phase number
C++ Type:unsigned int
Controllable:No
Description:The phase number
PorousFlowRelativePermeabilityConst
This class sets the relative permeability to a constant value (default = 1)
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.
- kr1Relative permeability
Default:1
C++ Type:double
Controllable:No
Description:Relative permeability
- 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.
- s_res0The residual saturation of the phase j. Must be between 0 and 1
Default:0
C++ Type:double
Controllable:No
Description:The residual saturation of the phase j. Must be between 0 and 1
- scaling1Relative permeability is multiplied by this factor
Default:1
C++ Type:double
Controllable:No
Description:Relative permeability is multiplied by this factor
- sum_s_res0Sum of residual saturations over all phases. Must be between 0 and 1
Default:0
C++ Type:double
Controllable:No
Description:Sum of residual saturations over all phases. Must be between 0 and 1
- 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/flux_limited_TVD_pflow/pffltvd_3D.i)
- (modules/porous_flow/test/tests/jacobian/diff01.i)
- (modules/porous_flow/test/tests/dispersion/diff01.i)
- (modules/porous_flow/examples/flow_through_fractured_media/fine_transient.i)
- (modules/porous_flow/test/tests/jacobian/fflux14.i)
- (modules/porous_flow/test/tests/actions/addjoiner.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_1D.i)
- (modules/porous_flow/test/tests/relperm/unity.i)
- (modules/porous_flow/test/tests/actions/block_restricted_materials.i)
- (modules/porous_flow/test/tests/actions/addjoiner_exception.i)
- (modules/porous_flow/test/tests/sinks/outflow_except2.i)
- (modules/porous_flow/test/tests/chemistry/2species_equilibrium_2phase.i)
- (modules/porous_flow/test/tests/dispersion/disp01_heavy.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D.i)
- (modules/porous_flow/test/tests/aux_kernels/darcy_velocity_fv.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D_trimesh.i)
- (modules/porous_flow/examples/flow_through_fractured_media/fine_steady.i)
- (modules/porous_flow/examples/flow_through_fractured_media/coarse.i)
- (modules/porous_flow/test/tests/dispersion/diff01_fv.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_1D_adaptivity.i)
- (modules/porous_flow/examples/flow_through_fractured_media/fine_thick_fracture_transient.i)
- (modules/porous_flow/test/tests/sinks/outflow_except1.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D_angle.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_pflow/jacobian_01.i)
- (modules/porous_flow/test/tests/actions/multiblock.i)
- (modules/porous_flow/examples/flow_through_fractured_media/fine_thick_fracture_steady.i)
- (modules/porous_flow/examples/solute_tracer_transport/solute_tracer_transport.i)
- (modules/porous_flow/test/tests/dispersion/disp01_fv.i)
- (modules/porous_flow/test/tests/dispersion/disp01.i)
- (modules/porous_flow/test/tests/jacobian/diff03.i)
- (modules/porous_flow/test/tests/chemistry/2species_predis.i)
- (modules/porous_flow/test/tests/numerical_diffusion/pffltvd.i)
- (modules/porous_flow/examples/tutorial/13.i)
- (modules/porous_flow/test/tests/adaptivity/tet4_adaptivity.i)
- (modules/porous_flow/test/tests/basic_advection/2phase.i)
- (modules/porous_flow/test/tests/adaptivity/tri3_adaptivity.i)
- (modules/porous_flow/test/tests/adaptivity/hex_adaptivity.i)
- (modules/porous_flow/examples/flow_through_fractured_media/coarse_3D.i)
- (modules/porous_flow/test/tests/jacobian/disp04.i)
- (modules/porous_flow/test/tests/jacobian/disp02.i)
- (modules/porous_flow/test/tests/adaptivity/quad_adaptivity.i)
- (modules/porous_flow/test/tests/jacobian/diff02.i)
- (modules/porous_flow/test/tests/numerical_diffusion/no_action.i)
- (modules/porous_flow/test/tests/jacobian/disp01.i)
- (modules/porous_flow/test/tests/pressure_pulse/pressure_pulse_1d_fully_saturated_fv.i)
- (modules/porous_flow/test/tests/recover/pffltvd.i)
- (modules/porous_flow/test/tests/actions/block_restricted_and_not.i)
- (modules/porous_flow/examples/solute_tracer_transport/solute_tracer_transport_2D.i)
- (modules/porous_flow/test/tests/jacobian/fv_mass_flux.i)
- (modules/porous_flow/test/tests/chemistry/2species_equilibrium.i)
- (modules/porous_flow/test/tests/pressure_pulse/pressure_pulse_1d_fv.i)
- (modules/porous_flow/test/tests/pressure_pulse/pressure_pulse_1d_2comp.i)
- (modules/porous_flow/test/tests/jacobian/disp03.i)
(modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_3D.i)
# Using flux-limited TVD advection ala Kuzmin and Turek, employing PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 3D version
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
xmin = 0
xmax = 1
ny = 4
ymin = 0
ymax = 0.5
nz = 3
zmin = 0
zmax = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[]
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[]
[advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0.5 2'
num_points = 11
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 0.3
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
print_linear_residuals = false
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/test/tests/jacobian/diff01.i)
# Test the Jacobian of the diffusive component of the PorousFlowDisperiveFlux kernel.
# By setting disp_long and disp_trans to zero, the purely diffusive component of the flux
# can be isolated.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[]
[ICs]
[pp]
type = RandomIC
variable = pp
max = 2e1
min = 1e1
[]
[massfrac0]
type = RandomIC
variable = massfrac0
min = 0
max = 1
[]
[]
[Kernels]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pp
gravity = '1 0 0'
disp_long = 0
disp_trans = 0
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
gravity = '1 0 0'
disp_long = 0
disp_trans = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e7
density0 = 10
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temp]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac0'
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-2 1e-1'
tortuosity = '0.1'
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[]
[Preconditioning]
active = smp
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
(modules/porous_flow/test/tests/dispersion/diff01.i)
# Test diffusive part of PorousFlowDispersiveFlux kernel by setting dispersion
# coefficients to zero. Pressure is held constant over the mesh, and gravity is
# set to zero so that no advective transport of mass takes place.
# Mass fraction is set to 1 on the left hand side and 0 on the right hand side.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 10
bias_x = 1.1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[velocity]
type = PorousFlowDarcyVelocityComponent
variable = velocity
component = x
[]
[]
[ICs]
[pp]
type = ConstantIC
variable = pp
value = 1e5
[]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[BCs]
[left]
type = DirichletBC
value = 1
variable = massfrac0
boundary = left
[]
[right]
type = DirichletBC
value = 0
variable = massfrac0
boundary = right
[]
[pright]
type = DirichletBC
variable = pp
boundary = right
value = 1e5
[]
[pleft]
type = DirichletBC
variable = pp
boundary = left
value = 1e5
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pp
disp_trans = 0
disp_long = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[adv1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e7
density0 = 1000
viscosity = 0.001
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = PorousFlowPorosityConst
porosity = 0.3
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1 1'
tortuosity = 0.1
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-9 0 0 0 1e-9 0 0 0 1e-9'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
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 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
end_time = 20
[]
[VectorPostprocessors]
[xmass]
type = NodalValueSampler
sort_by = id
variable = massfrac0
[]
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/examples/flow_through_fractured_media/fine_transient.i)
# Using a mixed-dimensional mesh
# Transient flow and solute transport along a fracture in a porous matrix
# advective dominated flow in the fracture and diffusion into the porous matrix
#
# Note that fine_steady.i must be run to initialise the porepressure properly
[Mesh]
file = 'gold/fine_steady_out.e'
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
initial_from_file_var = pp
initial_from_file_timestep = 1
[]
[massfrac0]
[]
[]
[AuxVariables]
[velocity_x]
family = MONOMIAL
order = CONSTANT
block = fracture
[]
[velocity_y]
family = MONOMIAL
order = CONSTANT
block = fracture
[]
[]
[AuxKernels]
[velocity_x]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = velocity_x
component = x
aperture = 6E-4
[]
[velocity_y]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = velocity_y
component = y
aperture = 6E-4
[]
[]
[Problem]
# massfrac0 has an initial condition despite the restart
allow_initial_conditions_with_restart = true
[]
[ICs]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[BCs]
[top]
type = DirichletBC
value = 0
variable = massfrac0
boundary = top
[]
[bottom]
type = DirichletBC
value = 1
variable = massfrac0
boundary = bottom
[]
[ptop]
type = DirichletBC
variable = pp
boundary = top
value = 1e6
[]
[pbottom]
type = DirichletBC
variable = pp
boundary = bottom
value = 1.002e6
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pp
disp_trans = 0
disp_long = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[adv1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro_fracture]
type = PorousFlowPorosityConst
porosity = 6e-4 # = a * phif
block = 'fracture'
[]
[poro_matrix]
type = PorousFlowPorosityConst
porosity = 0.1
block = 'matrix1 matrix2'
[]
[diff1]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-9 1e-9'
tortuosity = 1.0
block = 'fracture'
[]
[diff2]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-9 1e-9'
tortuosity = 0.1
block = 'matrix1 matrix2'
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability_fracture]
type = PorousFlowPermeabilityConst
permeability = '1.8e-11 0 0 0 1.8e-11 0 0 0 1.8e-11' # kf=3e-8, a=6e-4m. 1.8e-11 = kf * a
block = 'fracture'
[]
[permeability_matrix]
type = PorousFlowPermeabilityConst
permeability = '1e-20 0 0 0 1e-20 0 0 0 1e-20'
block = 'matrix1 matrix2'
[]
[]
[Functions]
[dt_controller]
type = PiecewiseConstant
x = '0 30 40 100 200 83200'
y = '0.01 0.1 1 10 100 32'
[]
[]
[Preconditioning]
active = basic
[mumps_is_best_for_parallel_jobs]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[basic]
type = SMP
full = true
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 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 86400
[TimeStepper]
type = FunctionDT
function = dt_controller
[]
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-9
[]
[VectorPostprocessors]
[xmass]
type = LineValueSampler
start_point = '0.4 0 0'
end_point = '0.5 0 0'
sort_by = x
num_points = 167
variable = massfrac0
[]
[]
[Outputs]
perf_graph = true
console = true
csv = true
exodus = true
[]
(modules/porous_flow/test/tests/jacobian/fflux14.i)
# 1phase, 2components (water and salt using BrineFluidProperties), constant insitu permeability
# Constant relative perm, nonzero gravity
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 1
xmin = 0
xmax = 10
ny = 1
ymin = 0
ymax = 10
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 -10 0'
[]
[Variables]
[pp]
[]
[xnacl]
[]
[]
[ICs]
[pp]
type = RandomIC
variable = pp
min = 1e6
max = 2e6
[]
[massfrac0]
type = RandomIC
variable = xnacl
min = 0.1
max = 0.2
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
variable = pp
fluid_component = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
variable = xnacl
fluid_component = 1
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = xnacl
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp xnacl'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[FluidProperties]
[brine]
type = BrineFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'xnacl'
[]
[brine]
type = PorousFlowBrine
phase = 0
xnacl = xnacl
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-14 0 0 0 2e-14 0 0 0 3e-14'
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
kr = 1
phase = 0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[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/flux_limited_TVD_pflow/pffltvd_1D.i)
# Using flux-limited TVD advection ala Kuzmin and Turek, mploying PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 1D version
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[]
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[]
[advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 11
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/test/tests/relperm/unity.i)
# Test perfectly mobile relative permeability curve by varying saturation over the mesh
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[p0]
initial_condition = 1e6
[]
[s1]
[]
[]
[AuxVariables]
[s0aux]
family = MONOMIAL
order = CONSTANT
[]
[s1aux]
family = MONOMIAL
order = CONSTANT
[]
[kr0aux]
family = MONOMIAL
order = CONSTANT
[]
[kr1aux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s0]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = s0aux
[]
[s1]
type = PorousFlowPropertyAux
property = saturation
phase = 1
variable = s1aux
[]
[kr0]
type = PorousFlowPropertyAux
property = relperm
phase = 0
variable = kr0aux
[]
[kr1]
type = PorousFlowPropertyAux
property = relperm
phase = 1
variable = kr1aux
[]
[]
[Functions]
[s1]
type = ParsedFunction
expression = x
[]
[]
[ICs]
[s1]
type = FunctionIC
variable = s1
function = s1
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[s1]
type = Diffusion
variable = s1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 s1'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = p0
phase1_saturation = s1
capillary_pressure = pc
[]
[kr0]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[kr1]
type = PorousFlowRelativePermeabilityConst
phase = 1
[]
[]
[VectorPostprocessors]
[vpp]
type = LineValueSampler
warn_discontinuous_face_values = false
variable = 's0aux s1aux kr0aux kr1aux'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 20
sort_by = id
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-8
[]
[BCs]
[sleft]
type = DirichletBC
variable = s1
value = 0
boundary = left
[]
[sright]
type = DirichletBC
variable = s1
value = 1
boundary = right
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(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/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/sinks/outflow_except2.i)
# Exception testing of PorousFlowOutflowBC. Note that this input file will produce an error message
[Mesh]
type = GeneratedMesh
dim = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_components = 1
number_fluid_phases = 1
porous_flow_vars = pp
[]
[]
[Variables]
[pp]
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[fluid_props]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[massfrac]
type = PorousFlowMassFraction
[]
[temperature]
type = PorousFlowTemperature
temperature = 1
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '1 0 0 0 1 0 0 0 1'
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0.4 0 0 0 0.4 0 0 0 0.4'
[]
[]
[BCs]
[outflow]
type = PorousFlowOutflowBC
boundary = left
variable = pp
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
[]
(modules/porous_flow/test/tests/chemistry/2species_equilibrium_2phase.i)
# Using a two-phase system (see 2species_equilibrium for the single-phase)
# The saturations, porosity, mass fractions, tortuosity and diffusion coefficients are chosen so that the results are identical to 2species_equilibrium
#
# PorousFlow analogy of chemical_reactions/test/tests/aqueous_equilibrium/2species.i
#
# Simple equilibrium reaction example to illustrate the use of PorousFlowMassFractionAqueousEquilibriumChemistry
#
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction:
#
# reactions = '2a = pa2 rate = 10^2
# a + b = pab rate = 10^-2'
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[a]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[]
[]
[b]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[]
[]
[]
[AuxVariables]
[eqm_k0]
initial_condition = 1E2
[]
[eqm_k1]
initial_condition = 1E-2
[]
[pressure0]
[]
[saturation1]
initial_condition = 0.25
[]
[a_in_phase0]
initial_condition = 0.0
[]
[b_in_phase0]
initial_condition = 0.0
[]
[pa2]
family = MONOMIAL
order = CONSTANT
[]
[pab]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[pa2]
type = PorousFlowPropertyAux
property = secondary_concentration
secondary_species = 0
variable = pa2
[]
[pab]
type = PorousFlowPropertyAux
property = secondary_concentration
secondary_species = 1
variable = pab
[]
[]
[ICs]
[pressure0]
type = FunctionIC
variable = pressure0
function = 2-x
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Kernels]
[mass_a]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = a
[]
[flux_a]
type = PorousFlowAdvectiveFlux
variable = a
fluid_component = 0
[]
[diff_a]
type = PorousFlowDispersiveFlux
variable = a
fluid_component = 0
disp_trans = '0 0'
disp_long = '0 0'
[]
[mass_b]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = b
[]
[flux_b]
type = PorousFlowAdvectiveFlux
variable = b
fluid_component = 1
[]
[diff_b]
type = PorousFlowDispersiveFlux
variable = b
fluid_component = 1
disp_trans = '0 0'
disp_long = '0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 2
number_fluid_components = 3
number_aqueous_equilibrium = 2
aqueous_phase_number = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9 # huge, so mimic chemical_reactions
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
capillary_pressure = pc
phase0_porepressure = pressure0
phase1_saturation = saturation1
[]
[massfrac]
type = PorousFlowMassFractionAqueousEquilibriumChemistry
mass_fraction_vars = 'a_in_phase0 b_in_phase0 a b'
num_reactions = 2
equilibrium_constants = 'eqm_k0 eqm_k1'
primary_activity_coefficients = '1 1'
secondary_activity_coefficients = '1 1'
reactions = '2 0
1 1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.8
[]
[permeability]
type = PorousFlowPermeabilityConst
# porous_flow permeability / porous_flow viscosity = chemical_reactions conductivity = 1E-4
permeability = '1E-7 0 0 0 1E-7 0 0 0 1E-7'
[]
[relp0]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[relp1]
type = PorousFlowRelativePermeabilityConst
phase = 1
[]
[diff]
type = PorousFlowDiffusivityConst
# porous_flow diffusion_coeff * tortuousity * porosity = chemical_reactions diffusivity = 1E-4
diffusion_coeff = '5E-4 5E-4 5E-4
5E-4 5E-4 5E-4'
tortuosity = '0.25 0.25'
[]
[]
[BCs]
[a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[]
[b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 10
end_time = 100
[]
[Outputs]
print_linear_residuals = true
exodus = true
perf_graph = true
[]
(modules/porous_flow/test/tests/dispersion/disp01_heavy.i)
# Test dispersive part of PorousFlowDispersiveFlux kernel by setting diffusion
# coefficients to zero. A pressure gradient is applied over the mesh to give a
# uniform velocity. Gravity is set to zero.
# Mass fraction is set to 1 on the left hand side and 0 on the right hand side.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 200
xmax = 10
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
compute_enthalpy = false
compute_internal_energy = false
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[velocity]
type = PorousFlowDarcyVelocityComponent
variable = velocity
component = x
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = pic
[]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[Functions]
[pic]
type = ParsedFunction
expression = 1.1e5-x*1e3
[]
[]
[BCs]
[xleft]
type = DirichletBC
value = 1
variable = massfrac0
boundary = left
[]
[xright]
type = DirichletBC
value = 0
variable = massfrac0
boundary = right
[]
[pright]
type = DirichletBC
variable = pp
boundary = right
value = 1e5
[]
[pleft]
type = DirichletBC
variable = pp
boundary = left
value = 1.1e5
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = PorousFlowDispersiveFlux
variable = pp
disp_trans = 0
disp_long = 0.2
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[adv1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0.2
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e9
density0 = 1000
viscosity = 0.001
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = PorousFlowPorosityConst
porosity = 0.3
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '0 0'
tortuosity = 0.1
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-9 0 0 0 1e-9 0 0 0 1e-9'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
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 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1e3
dtmax = 10
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 1.5
cutback_factor = 0.5
dt = 1
[]
[]
[VectorPostprocessors]
[xmass]
type = NodalValueSampler
sort_by = id
variable = massfrac0
[]
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D.i)
# Using flux-limited TVD advection ala Kuzmin and Turek, employing PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 3D version
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
xmin = 0
xmax = 1
ny = 4
ymin = 0
ymax = 0.5
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[]
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[]
[advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0.5 0'
num_points = 11
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/test/tests/aux_kernels/darcy_velocity_fv.i)
# checking that the PorousFlowDarcyVelocityComponent AuxKernel works as expected
# for the fully-saturated case (relative-permeability = 1) using finite volumes
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '1 -2 3'
[]
[Variables]
[pp]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[ICs]
[pinit]
type = FunctionIC
function = x
variable = pp
[]
[]
[FVKernels]
[mass0]
type = FVPorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[AuxVariables]
[vel_x]
order = CONSTANT
family = MONOMIAL
[]
[vel_y]
order = CONSTANT
family = MONOMIAL
[]
[vel_z]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[vel_x]
type = ADPorousFlowDarcyVelocityComponent
variable = vel_x
component = x
fluid_phase = 0
[]
[vel_y]
type = ADPorousFlowDarcyVelocityComponent
variable = vel_y
component = y
fluid_phase = 0
[]
[vel_z]
type = ADPorousFlowDarcyVelocityComponent
variable = vel_z
component = z
fluid_phase = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e6
viscosity = 3.2
density0 = 1
thermal_expansion = 0
[]
[]
[Postprocessors]
[vel_x]
type = PointValue
variable = vel_x
point = '0.5 0.5 0.5'
[]
[vel_y]
type = PointValue
variable = vel_y
point = '0.5 0.5 0.5'
[]
[vel_z]
type = PointValue
variable = vel_z
point = '0.5 0.5 0.5'
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
[]
[ppss]
type = ADPorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = ADPorousFlowMassFraction
[]
[simple_fluid]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = ADPorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm]
type = ADPorousFlowRelativePermeabilityConst
phase = 0
kr = 1
[]
[porosity]
type = ADPorousFlowPorosityConst
porosity = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = Newton
nl_abs_tol = 1e-16
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D_trimesh.i)
# Using flux-limited TVD advection ala Kuzmin and Turek, mploying PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 2D version
[Mesh]
type = FileMesh
file = trimesh.msh
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
block = '50'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.305,0,1))'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[]
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[]
[advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0.04 0'
num_points = 101
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
print_linear_residuals = false
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/examples/flow_through_fractured_media/fine_steady.i)
# Using a mixed-dimensional mesh
# Steady-state porepressure distribution along a fracture in a porous matrix
# This is used to initialise the transient solute-transport simulation
[Mesh]
type = FileMesh
# The gold mesh is used to reduce the number of large files in the MOOSE repository.
# The porepressure is not read from the gold mesh
file = 'gold/fine_steady_out.e'
block_id = '1 2 3'
block_name = 'fracture matrix1 matrix2'
boundary_id = '1 2'
boundary_name = 'bottom top'
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = ConstantIC
variable = pp
value = 1e6
[]
[]
[BCs]
[ptop]
type = DirichletBC
variable = pp
boundary = top
value = 1e6
[]
[pbottom]
type = DirichletBC
variable = pp
boundary = bottom
value = 1.002e6
[]
[]
[Kernels]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability1]
type = PorousFlowPermeabilityConst
permeability = '1.8e-11 0 0 0 1.8e-11 0 0 0 1.8e-11' # kf=3e-8, a=6e-4m. 1.8e-11 = kf * a
block = 'fracture'
[]
[permeability2]
type = PorousFlowPermeabilityConst
permeability = '1e-20 0 0 0 1e-20 0 0 0 1e-20'
block = 'matrix1 matrix2'
[]
[]
[Preconditioning]
active = basic
[mumps_is_best_for_parallel_jobs]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[basic]
type = SMP
full = true
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 '
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
# controls for nonlinear iterations
nl_abs_tol = 1e-9
nl_rel_tol = 1e-14
[]
[Outputs]
exodus = true
execute_on = 'timestep_end'
[]
(modules/porous_flow/examples/flow_through_fractured_media/coarse.i)
# Flow and solute transport along a fracture embedded in a porous matrix
# The fracture is represented by lower dimensional elements
# fracture aperture = 6e-4m
# fracture porosity = 6e-4m = phi * a
# fracture permeability = 1.8e-11 which is based on k=3e-8 from a**2/12, and k*a = 3e-8*6e-4
# matrix porosity = 0.1
# matrix permeanility = 1e-20
[Mesh]
type = FileMesh
file = 'coarse.e'
block_id = '1 2 3'
block_name = 'fracture matrix1 matrix2'
boundary_id = '1 2'
boundary_name = 'bottom top'
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[]
[AuxVariables]
[velocity_x]
family = MONOMIAL
order = CONSTANT
block = 'fracture'
[]
[velocity_y]
family = MONOMIAL
order = CONSTANT
block = 'fracture'
[]
[]
[AuxKernels]
[velocity_x]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = velocity_x
component = x
aperture = 6E-4
[]
[velocity_y]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = velocity_y
component = y
aperture = 6E-4
[]
[]
[ICs]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[pp_matrix]
type = ConstantIC
variable = pp
value = 1E6
[]
[]
[BCs]
[top]
type = DirichletBC
value = 0
variable = massfrac0
boundary = top
[]
[bottom]
type = DirichletBC
value = 1
variable = massfrac0
boundary = bottom
[]
[ptop]
type = DirichletBC
variable = pp
boundary = top
value = 1e6
[]
[pbottom]
type = DirichletBC
variable = pp
boundary = bottom
value = 1.002e6
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pp
[]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = pp
[]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = pp
disp_trans = 0
disp_long = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = massfrac0
[]
[adv1]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = massfrac0
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = massfrac0
disp_trans = 0
disp_long = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro_fracture]
type = PorousFlowPorosityConst
porosity = 6e-4 # = a * phif
block = 'fracture'
[]
[poro_matrix]
type = PorousFlowPorosityConst
porosity = 0.1
block = 'matrix1 matrix2'
[]
[diff1]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-9 1e-9'
tortuosity = 1.0
block = 'fracture'
[]
[diff2]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-9 1e-9'
tortuosity = 0.1
block = 'matrix1 matrix2'
[]
[permeability_fracture]
type = PorousFlowPermeabilityConst
permeability = '1.8e-11 0 0 0 1.8e-11 0 0 0 1.8e-11' # 1.8e-11 = a * kf
block = 'fracture'
[]
[permeability_matrix]
type = PorousFlowPermeabilityConst
permeability = '1e-20 0 0 0 1e-20 0 0 0 1e-20'
block = 'matrix1 matrix2'
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 10
dt = 1
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-12
[]
[VectorPostprocessors]
[xmass]
type = LineValueSampler
start_point = '-0.5 0 0'
end_point = '0.5 0 0'
sort_by = x
num_points = 41
variable = massfrac0
outputs = csv
[]
[]
[Outputs]
[csv]
type = CSV
execute_on = 'final'
[]
[]
(modules/porous_flow/test/tests/dispersion/diff01_fv.i)
# Test diffusive part of FVPorousFlowDispersiveFlux kernel by setting dispersion
# coefficients to zero. Pressure is held constant over the mesh, and gravity is
# set to zero so that no advective transport of mass takes place.
# Mass fraction is set to 1 on the left hand side and 0 on the right hand side.
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 20
xmax = 10
bias_x = 1.2
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
type = MooseVariableFVReal
[]
[massfrac0]
type = MooseVariableFVReal
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[velocity]
type = ADPorousFlowDarcyVelocityComponent
variable = velocity
component = x
[]
[]
[ICs]
[pp]
type = ConstantIC
variable = pp
value = 1e5
[]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
value = 1
variable = massfrac0
boundary = left
[]
[right]
type = FVDirichletBC
value = 0
variable = massfrac0
boundary = right
[]
[pright]
type = FVDirichletBC
variable = pp
boundary = right
value = 1e5
[]
[pleft]
type = FVDirichletBC
variable = pp
boundary = left
value = 1e5
[]
[]
[FVKernels]
[mass0]
type = FVPorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[diff0_pp]
type = FVPorousFlowDispersiveFlux
fluid_component = 0
variable = pp
disp_trans = 0
disp_long = 0
[]
[mass1]
type = FVPorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[diff1_x]
type = FVPorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e7
density0 = 1000
viscosity = 0.001
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
[]
[ppss]
type = ADPorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = ADPorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = ADPorousFlowPorosityConst
porosity = 0.3
[]
[diff]
type = ADPorousFlowDiffusivityConst
diffusion_coeff = '1 1'
tortuosity = 0.1
[]
[relp]
type = ADPorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability]
type = ADPorousFlowPermeabilityConst
permeability = '1e-9 0 0 0 1e-9 0 0 0 1e-9'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
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 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
end_time = 20
[]
[VectorPostprocessors]
[xmass]
type = ElementValueSampler
sort_by = id
variable = massfrac0
[]
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_1D_adaptivity.i)
# Using flux-limited TVD advection ala Kuzmin and Turek, mploying PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 1D version with adaptivity
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[Adaptivity]
initial_steps = 1
initial_marker = tracer_marker
marker = tracer_marker
max_h_level = 1
[Markers]
[tracer_marker]
type = ValueRangeMarker
variable = tracer
lower_bound = 0.02
upper_bound = 0.98
[]
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[]
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[]
[advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 11
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/examples/flow_through_fractured_media/fine_thick_fracture_transient.i)
# Using a single-dimensional mesh
# Transient flow and solute transport along a fracture in a porous matrix
# advective dominated flow in the fracture and diffusion into the porous matrix
#
# Note that fine_thick_fracture_steady.i must be run to initialise the porepressure properly
[Mesh]
file = 'gold/fine_thick_fracture_steady_out.e'
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
initial_from_file_var = pp
initial_from_file_timestep = 1
[]
[massfrac0]
[]
[]
[AuxVariables]
[velocity_x]
family = MONOMIAL
order = CONSTANT
block = fracture
[]
[velocity_y]
family = MONOMIAL
order = CONSTANT
block = fracture
[]
[]
[AuxKernels]
[velocity_x]
type = PorousFlowDarcyVelocityComponent
variable = velocity_x
component = x
[]
[velocity_y]
type = PorousFlowDarcyVelocityComponent
variable = velocity_y
component = y
[]
[]
[Problem]
# massfrac0 has an initial condition despite the restart
allow_initial_conditions_with_restart = true
[]
[ICs]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[BCs]
[top]
type = DirichletBC
value = 0
variable = massfrac0
boundary = top
[]
[bottom]
type = DirichletBC
value = 1
variable = massfrac0
boundary = bottom
[]
[ptop]
type = DirichletBC
variable = pp
boundary = top
value = 1e6
[]
[pbottom]
type = DirichletBC
variable = pp
boundary = bottom
value = 1.002e6
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pp
disp_trans = 0
disp_long = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[adv1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro_fracture]
type = PorousFlowPorosityConst
porosity = 1.0 # this is the true porosity of the fracture
block = 'fracture'
[]
[poro_matrix]
type = PorousFlowPorosityConst
porosity = 0.1
block = 'matrix1 matrix2'
[]
[diff1]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-9 1e-9'
tortuosity = 1.0
block = 'fracture'
[]
[diff2]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-9 1e-9'
tortuosity = 0.1
block = 'matrix1 matrix2'
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability1]
type = PorousFlowPermeabilityConst
permeability = '3e-8 0 0 0 3e-8 0 0 0 3e-8' # this is the true permeability of the fracture
block = 'fracture'
[]
[permeability2]
type = PorousFlowPermeabilityConst
permeability = '1e-20 0 0 0 1e-20 0 0 0 1e-20'
block = 'matrix1 matrix2'
[]
[]
[Functions]
[dt_controller]
type = PiecewiseConstant
x = '0 30 40 100 200 83200'
y = '0.01 0.1 1 10 100 32'
[]
[]
[Preconditioning]
active = basic
[mumps_is_best_for_parallel_jobs]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[basic]
type = SMP
full = true
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 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 86400
#dt = 0.01
[TimeStepper]
type = FunctionDT
function = dt_controller
[]
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-9
[]
[VectorPostprocessors]
[xmass]
type = LineValueSampler
start_point = '0.4 0 0'
end_point = '0.5 0 0'
sort_by = x
num_points = 167
variable = massfrac0
[]
[]
[Outputs]
perf_graph = true
console = true
csv = true
exodus = true
[]
(modules/porous_flow/test/tests/sinks/outflow_except1.i)
# Exception testing of PorousFlowOutflowBC. Note that this input file will produce an error message
[Mesh]
type = GeneratedMesh
dim = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_components = 1
number_fluid_phases = 1
porous_flow_vars = pp
[]
[]
[Variables]
[pp]
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[fluid_props]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[massfrac]
type = PorousFlowMassFraction
[]
[temperature]
type = PorousFlowTemperature
temperature = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0.4 0 0 0 0.4 0 0 0 0.4'
[]
[]
[BCs]
[outflow]
type = PorousFlowOutflowBC
boundary = left
variable = pp
mass_fraction_component = 1
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
[]
(modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D_angle.i)
# Using flux-limited TVD advection ala Kuzmin and Turek, mploying PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 2D version with velocity = (0.1, 0.2, 0)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
xmin = 0
xmax = 1
ny = 10
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x - 2 * y'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1 | x > 0.3 | y < 0.1 | y > 0.3, 0, 1)'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[]
[]
[BCs]
[constant_boundary_porepressure]
type = FunctionDirichletBC
variable = porepressure
function = '1 - x - 2 * y'
boundary = 'left right top bottom'
[]
[no_tracer_at_boundary]
type = DirichletBC
variable = tracer
value = 0
boundary = 'left right top bottom'
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[]
[advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 0.3
dt = 0.1
[]
[Outputs]
[out]
type = Exodus
execute_on = 'initial final'
[]
[]
(modules/porous_flow/test/tests/flux_limited_TVD_pflow/jacobian_01.i)
# Checking the Jacobian of Flux-Limited TVD Advection, 1 phase, 1 component, full saturation, using flux_limiter_type = none
# This is quite a heavy test, but we need a fairly big mesh to check the upwinding is happening correctly
[Mesh]
type = GeneratedMesh
dim = 3
nx = 3
xmin = 0
xmax = 1
ny = 4
ymin = -1
ymax = 2
bias_y = 1.5
nz = 4
zmin = 1
zmax = 2
bias_z = 0.8
[]
[GlobalParams]
gravity = '1 2 -0.5'
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
variable = pp
type = RandomIC
min = 1
max = 2
[]
[]
[Kernels]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = pp
advective_flux_calculator = advective_flux_calculator
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.4
viscosity = 1.1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator]
type = PorousFlowAdvectiveFluxCalculatorSaturated
flux_limiter_type = None
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[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/actions/multiblock.i)
# This input file illustrates that PorousFlow can be block-restricted. That is, porous-flow physics acts only on some blocks (block = '0, 1', in this case), and different physics, in this case diffusion, acts on other blocks (block = 2, in this case).
# Here:
# - the Variable "pressure" exists everywhere, but is governed by PorousFlow only on block = '0 1', and diffusion on block = 2
# - the Variable "temp" exists only on block = '0 1', and is governed by PorousFlow there
# - the Variable "temp1" exists only on block = 2, and is governed by diffusion there
# Hence, the PorousFlow Materials only need to be defined on block = '0 1'
[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'
[]
[block2]
type = SubdomainBoundingBoxGenerator
input = block1
block_id = 2
bottom_left = '6 -1 -1'
top_right = '10 1 1'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pressure temp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[pressure] # exists over the entire mesh: governed by PorousFlow on block=0, 1, and diffusion on block=2
[]
[temp]
block = '0 1' # only governed by PorousFlow
[]
[temp1]
block = 2 # only governed by diffusion
[]
[]
[Kernels]
[porous_flow_time_derivative]
type = PorousFlowMassTimeDerivative
block = '0 1'
variable = pressure
[]
[porous_flow_flux]
type = PorousFlowAdvectiveFlux
fluid_component = 0
gravity = '0 0 0'
variable = pressure
block = '0 1'
[]
[porous_flow_heat_time_derivative]
type = PorousFlowEnergyTimeDerivative
variable = temp
block = '0 1'
[]
[porous_flow_heat_advection]
type = PorousFlowHeatAdvection
gravity = '0 0 0'
variable = temp
block = '0 1'
[]
[diffusion_p]
type = Diffusion
variable = pressure
block = 2
[]
[diffusion_t1]
type = Diffusion
variable = temp1
block = 2
[]
[]
[AuxVariables]
[density]
family = MONOMIAL
order = CONSTANT
block = '0 1'
[]
[relperm]
family = MONOMIAL
order = CONSTANT
block = '0 1'
[]
[]
[AuxKernels]
[density]
type = PorousFlowPropertyAux
variable = density
property = density
[]
[relperm]
type = PorousFlowPropertyAux
variable = relperm
property = relperm
[]
[]
[Postprocessors]
[density1000]
type = PointValue
point = '0 0 0'
variable = density
[]
[density2000]
type = PointValue
point = '5 0 0'
variable = density
[]
[relperm0.25]
type = PointValue
point = '0 0 0'
variable = relperm
[]
[relperm0.5]
type = PointValue
point = '5 0 0'
variable = relperm
[]
[]
[FluidProperties]
[simple_fluid1000]
type = SimpleFluidProperties
[]
[simple_fluid2000]
type = SimpleFluidProperties
density0 = 2000
[]
[]
[Materials] # note these PorousFlow materials are all on block = '0 1'
[temperature]
type = PorousFlowTemperature
temperature = temp
block = '0 1'
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
block = '0 1'
[]
[massfrac]
type = PorousFlowMassFraction
block = '0 1'
[]
[simple_fluid1000]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1000
phase = 0
block = 0
[]
[simple_fluid2000]
type = PorousFlowSingleComponentFluid
fp = simple_fluid2000
phase = 0
block = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
block = '0 1'
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
block = '0 1'
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
block = 0
kr = 0.25
[]
[relperm1]
type = PorousFlowRelativePermeabilityConst
phase = 0
block = 1
kr = 0.5
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1
density = 1
block = '0 1'
[]
[dummy_material]
type = GenericConstantMaterial
block = 2
prop_names = dummy
prop_values = 0
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
csv = true
[]
(modules/porous_flow/examples/flow_through_fractured_media/fine_thick_fracture_steady.i)
# Using a single-dimensional mesh
# Steady-state porepressure distribution along a fracture in a porous matrix
# This is used to initialise the transient solute-transport simulation
[Mesh]
type = FileMesh
# The gold mesh is used to reduce the number of large files in the MOOSE repository.
# The porepressure is not read from the gold mesh
file = 'gold/fine_thick_fracture_steady_out.e'
block_id = '1 2 3'
block_name = 'fracture matrix1 matrix2'
boundary_id = '1 2'
boundary_name = 'bottom top'
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = ConstantIC
variable = pp
value = 1e6
[]
[]
[BCs]
[ptop]
type = DirichletBC
variable = pp
boundary = top
value = 1e6
[]
[pbottom]
type = DirichletBC
variable = pp
boundary = bottom
value = 1.002e6
[]
[]
[Kernels]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability1]
type = PorousFlowPermeabilityConst
permeability = '3e-8 0 0 0 3e-8 0 0 0 3e-8' # the true permeability is used without scaling by aperture
block = 'fracture'
[]
[permeability2]
type = PorousFlowPermeabilityConst
permeability = '1e-20 0 0 0 1e-20 0 0 0 1e-20'
block = 'matrix1 matrix2'
[]
[]
[Preconditioning]
active = basic
[mumps_is_best_for_parallel_jobs]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[basic]
type = SMP
full = true
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 '
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
# controls for nonlinear iterations
nl_abs_tol = 1e-9
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
execute_on = 'timestep_end'
[]
(modules/porous_flow/examples/solute_tracer_transport/solute_tracer_transport.i)
# Longitudinal dispersivity
disp = 0.7
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmin = 0
xmax = 100
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
initial_condition = 1e5
[]
[C]
initial_condition = 0
[]
[]
[AuxVariables]
[Darcy_vel_x]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Darcy_vel_x]
type = PorousFlowDarcyVelocityComponent
variable = Darcy_vel_x
component = x
fluid_phase = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure C'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[Kernels]
[mass_der_water]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[adv_pp]
type = PorousFlowFullySaturatedDarcyFlow
variable = porepressure
fluid_component = 1
[]
[diff_pp]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = porepressure
disp_trans = 0
disp_long = ${disp}
[]
[mass_der_C]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = C
[]
[adv_C]
type = PorousFlowFullySaturatedDarcyFlow
fluid_component = 0
variable = C
[]
[diff_C]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = C
disp_trans = 0
disp_long = ${disp}
[]
[]
[FluidProperties]
[water]
type = Water97FluidProperties
[]
[]
[Materials]
[ps]
type = PorousFlow1PhaseFullySaturated
porepressure = porepressure
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.25
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-11 0 0 0 1E-11 0 0 0 1E-11'
[]
[water]
type = PorousFlowSingleComponentFluid
fp = water
phase = 0
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = C
[]
[temperature]
type = PorousFlowTemperature
temperature = 293
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '0 0'
tortuosity = 0.1
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
kr = 1
phase = 0
[]
[]
[BCs]
[constant_inlet_pressure]
type = DirichletBC
variable = porepressure
value = 1.2e5
boundary = left
[]
[constant_outlet_porepressure]
type = DirichletBC
variable = porepressure
value = 1e5
boundary = right
[]
[inlet_tracer]
type = DirichletBC
variable = C
value = 0.001
boundary = left
[]
[outlet_tracer]
type = PorousFlowOutflowBC
variable = C
boundary = right
mass_fraction_component = 0
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[]
[Executioner]
type = Transient
end_time = 17280000
dtmax = 86400
nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
[TimeStepper]
type = IterationAdaptiveDT
dt = 1000
[]
[]
[Postprocessors]
[C]
type = PointValue
variable = C
point = '50 0 0'
[]
[Darcy_x]
type = PointValue
variable = Darcy_vel_x
point = '50 0 0'
[]
[]
[Outputs]
file_base = solute_tracer_transport_${disp}
csv = true
[]
(modules/porous_flow/test/tests/dispersion/disp01_fv.i)
# Test dispersive part of FVPorousFlowDispersiveFlux kernel by setting diffusion
# coefficients to zero. A pressure gradient is applied over the mesh to give a
# uniform velocity. Gravity is set to zero.
# Mass fraction is set to 1 on the left hand side and 0 on the right hand side.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
xmax = 10
bias_x = 1.1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
type = MooseVariableFVReal
[]
[massfrac0]
type = MooseVariableFVReal
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[velocity]
type = ADPorousFlowDarcyVelocityComponent
variable = velocity
component = x
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = pic
[]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[Functions]
[pic]
type = ParsedFunction
expression = '1.1e5-x*1e3'
[]
[]
[FVBCs]
[xleft]
type = FVDirichletBC
value = 1
variable = massfrac0
boundary = left
[]
[xright]
type = FVDirichletBC
value = 0
variable = massfrac0
boundary = right
[]
[pright]
type = FVDirichletBC
variable = pp
boundary = right
value = 1e5
[]
[pleft]
type = FVDirichletBC
variable = pp
boundary = left
value = 1.1e5
[]
[]
[FVKernels]
[mass0]
type = FVPorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = FVPorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = FVPorousFlowDispersiveFlux
variable = pp
disp_trans = 0
disp_long = 0.2
[]
[mass1]
type = FVPorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[adv1]
type = FVPorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
[]
[diff1]
type = FVPorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0.2
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e9
density0 = 1000
viscosity = 0.001
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
[]
[ppss]
type = ADPorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = ADPorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = ADPorousFlowPorosityConst
porosity = 0.3
[]
[diff]
type = ADPorousFlowDiffusivityConst
diffusion_coeff = '0 0'
tortuosity = 0.1
[]
[relp]
type = ADPorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability]
type = ADPorousFlowPermeabilityConst
permeability = '1e-9 0 0 0 1e-9 0 0 0 1e-9'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'gmres asm lu NONZERO'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 3e2
dtmax = 100
nl_abs_tol = 1e-12
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 2
cutback_factor = 0.5
dt = 10
[]
[]
[VectorPostprocessors]
[xmass]
type = ElementValueSampler
sort_by = id
variable = 'massfrac0 velocity'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/test/tests/dispersion/disp01.i)
# Test dispersive part of PorousFlowDispersiveFlux kernel by setting diffusion
# coefficients to zero. A pressure gradient is applied over the mesh to give a
# uniform velocity. Gravity is set to zero.
# Mass fraction is set to 1 on the left hand side and 0 on the right hand side.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 10
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[velocity]
type = PorousFlowDarcyVelocityComponent
variable = velocity
component = x
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = pic
[]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[Functions]
[pic]
type = ParsedFunction
expression = 1.1e5-x*1e3
[]
[]
[BCs]
[xleft]
type = DirichletBC
value = 1
variable = massfrac0
boundary = left
[]
[xright]
type = DirichletBC
value = 0
variable = massfrac0
boundary = right
[]
[pright]
type = DirichletBC
variable = pp
boundary = right
value = 1e5
[]
[pleft]
type = DirichletBC
variable = pp
boundary = left
value = 1.1e5
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = PorousFlowDispersiveFlux
variable = pp
disp_trans = 0
disp_long = 0.2
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[adv1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0.2
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e9
density0 = 1000
viscosity = 0.001
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = PorousFlowPorosityConst
porosity = 0.3
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '0 0'
tortuosity = 0.1
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-9 0 0 0 1e-9 0 0 0 1e-9'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
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 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1e3
dtmax = 50
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 1.5
cutback_factor = 0.5
dt = 1
[]
[]
[VectorPostprocessors]
[xmass]
type = NodalValueSampler
sort_by = id
variable = massfrac0
[]
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/test/tests/jacobian/diff03.i)
# Test the Jacobian of the diffusive component of the PorousFlowDisperiveFlux kernel for two phases.
# By setting disp_long and disp_trans to zero, the purely diffusive component of the flux
# can be isolated. Uses saturation-dependent tortuosity and diffusion coefficients from the
# Millington-Quirk model
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[sgas]
[]
[massfrac0]
[]
[]
[AuxVariables]
[massfrac1]
[]
[]
[ICs]
[sgas]
type = RandomIC
variable = sgas
max = 1
min = 0
[]
[massfrac0]
type = RandomIC
variable = massfrac0
min = 0
max = 1
[]
[massfrac1]
type = RandomIC
variable = massfrac1
min = 0
max = 1
[]
[]
[Kernels]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = sgas
gravity = '1 0 0'
disp_long = '0 0'
disp_trans = '0 0'
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
gravity = '1 0 0'
disp_long = '0 0'
disp_trans = '0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'sgas massfrac0'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1e7
density0 = 10
thermal_expansion = 0
viscosity = 1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1e7
density0 = 1
thermal_expansion = 0
viscosity = 0.1
[]
[]
[Materials]
[temp]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = 1
phase1_saturation = sgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac0 massfrac1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[poro]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[diff]
type = PorousFlowDiffusivityMillingtonQuirk
diffusion_coeff = '1e-2 1e-1 1e-2 1e-1'
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm0]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityConst
phase = 1
[]
[]
[Preconditioning]
active = smp
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
(modules/porous_flow/test/tests/chemistry/2species_predis.i)
# PorousFlow analogy of chemical_reactions/test/tests/solid_kinetics/2species_without_action.i
#
# Simple equilibrium reaction example to illustrate the use of PorousFlowAqueousPreDisChemistry
#
# In this example, two primary species a and b diffuse towards each other from
# opposite ends of a porous medium, reacting when they meet to form a mineral
# precipitate. The kinetic reaction is
#
# a + b = mineral
#
# where a and b are the primary species (reactants), and mineral is the precipitate.
# At the time of writing, the results of this test differ from chemical_reactions because
# in PorousFlow the mineral_concentration is measured in m^3 (precipitate) / m^3 (porous_material)
# in chemical_reactions the mineral_concentration is measured in m^3 (precipitate) / m^3 (fluid)
# ie, PorousFlow_mineral_concentration = porosity * chemical_reactions_mineral_concentration
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 1
ymax = 1
nx = 40
[]
[Variables]
[a]
order = FIRST
family = LAGRANGE
initial_condition = 0
[]
[b]
order = FIRST
family = LAGRANGE
initial_condition = 0
[]
[]
[AuxVariables]
[eqm_k]
initial_condition = 1E-6
[]
[pressure]
[]
[mineral]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[mineral]
type = PorousFlowPropertyAux
property = mineral_concentration
mineral_species = 0
variable = mineral
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Kernels]
[mass_a]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = a
[]
[diff_a]
type = PorousFlowDispersiveFlux
variable = a
fluid_component = 0
disp_trans = 0
disp_long = 0
[]
[predis_a]
type = PorousFlowPreDis
variable = a
mineral_density = 1000
stoichiometry = 1
[]
[mass_b]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = b
[]
[diff_b]
type = PorousFlowDispersiveFlux
variable = b
fluid_component = 1
disp_trans = 0
disp_long = 0
[]
[predis_b]
type = PorousFlowPreDis
variable = b
mineral_density = 1000
stoichiometry = 1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_kinetic = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9 # huge, so mimic chemical_reactions
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = 298.15
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'a b'
[]
[chem]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'a b'
num_reactions = 1
equilibrium_constants = eqm_k
primary_activity_coefficients = '1 1'
reactions = '1 1'
specific_reactive_surface_area = '1.0'
kinetic_rate_constant = '1.0e-8'
activation_energy = '1.5e4'
molar_volume = 1
gas_constant = 8.314
reference_temperature = 298.15
[]
[mineral_conc]
type = PorousFlowAqueousPreDisMineral
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.4
[]
[permeability]
type = PorousFlowPermeabilityConst
# porous_flow permeability / porous_flow viscosity = chemical_reactions conductivity = 4E-3
permeability = '4E-6 0 0 0 4E-6 0 0 0 4E-6'
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[diff]
type = PorousFlowDiffusivityConst
# porous_flow diffusion_coeff * tortuousity * porosity = chemical_reactions diffusivity = 5E-4
diffusion_coeff = '12.5E-4 12.5E-4 12.5E-4'
tortuosity = 1.0
[]
[]
[BCs]
[a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[]
[a_right]
type = DirichletBC
variable = a
boundary = right
value = 0
[]
[b_left]
type = DirichletBC
variable = b
boundary = left
value = 0
[]
[b_right]
type = DirichletBC
variable = b
boundary = right
value = 1.0e-2
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 5
end_time = 50
[]
[Outputs]
print_linear_residuals = true
exodus = true
perf_graph = true
hide = eqm_k
[]
(modules/porous_flow/test/tests/numerical_diffusion/pffltvd.i)
# Using flux-limited TVD advection ala Kuzmin and Turek, employing PorousFlow Kernels and UserObjects, with superbee flux-limiter
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[]
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[]
[advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 101
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/examples/tutorial/13.i)
# Example of reactive transport model with dissolution of dolomite
#
# The equilibrium system has 5 primary species (Variables) and
# 5 secondary species (PorousFlowMassFractionAqueousEquilibrium).
# Some of the equilibrium constants have been chosen rather arbitrarily.
#
# Equilibrium reactions
# H+ + HCO3- = CO2(aq)
# -H+ + HCO3- = CO32-
# HCO3- + Ca2+ = CaHCO3+
# HCO3- + Mg2+ = MgHCO3+
# HCO3- + Fe2+ = FeHCO3+
#
# The kinetic reaction that dissolves dolomite involves all 5 primary species.
#
# -2H+ + 2HCO3- + Ca2+ + 0.8Mg2+ + 0.2Fe2+ = CaMg0.8Fe0.2(CO3)2
#
# The initial concentration of precipitated dolomite is high, so it starts
# to dissolve immediately, increasing the concentrations of the primary species.
#
# Only single-phase, fully saturated physics is used.
# The pressure gradient is fixed, so that the Darcy velocity is 0.1m/s.
#
# Primary species are injected from the left side, and they flow to the right.
# Less dolomite dissolution therefore occurs on the left side (where
# the primary species have higher concentration).
#
# This test is more fully documented in tutorial_13
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 1
[]
[Variables]
[h+]
[]
[hco3-]
[]
[ca2+]
[]
[mg2+]
[]
[fe2+]
[]
[]
[AuxVariables]
[eqm_k0]
initial_condition = 2.19E6
[]
[eqm_k1]
initial_condition = 4.73E-11
[]
[eqm_k2]
initial_condition = 0.222
[]
[eqm_k3]
initial_condition = 1E-2
[]
[eqm_k4]
initial_condition = 1E-3
[]
[kinetic_k]
initial_condition = 326.2
[]
[pressure]
[]
[dolomite]
family = MONOMIAL
order = CONSTANT
[]
[dolomite_initial]
initial_condition = 1E-7
[]
[]
[AuxKernels]
[dolomite]
type = PorousFlowPropertyAux
property = mineral_concentration
mineral_species = 0
variable = dolomite
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[ICs]
[pressure_ic]
type = FunctionIC
variable = pressure
function = '(1 - x) * 1E6'
[]
[h+_ic]
type = BoundingBoxIC
variable = h+
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 5.0e-2
outside = 1.0e-6
[]
[hco3_ic]
type = BoundingBoxIC
variable = hco3-
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 5.0e-2
outside = 1.0e-6
[]
[ca2_ic]
type = BoundingBoxIC
variable = ca2+
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 5.0e-2
outside = 1.0e-6
[]
[mg2_ic]
type = BoundingBoxIC
variable = mg2+
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 5.0e-2
outside = 1.0e-6
[]
[fe2_ic]
type = BoundingBoxIC
variable = fe2+
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 5.0e-2
outside = 1.0e-6
[]
[]
[Kernels]
[h+_ie]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = h+
[]
[h+_conv]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = h+
[]
[predis_h+]
type = PorousFlowPreDis
variable = h+
mineral_density = 2875.0
stoichiometry = -2
[]
[hco3-_ie]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = hco3-
[]
[hco3-_conv]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = hco3-
[]
[predis_hco3-]
type = PorousFlowPreDis
variable = hco3-
mineral_density = 2875.0
stoichiometry = 2
[]
[ca2+_ie]
type = PorousFlowMassTimeDerivative
fluid_component = 2
variable = ca2+
[]
[ca2+_conv]
type = PorousFlowAdvectiveFlux
fluid_component = 2
variable = ca2+
[]
[predis_ca2+]
type = PorousFlowPreDis
variable = ca2+
mineral_density = 2875.0
stoichiometry = 1
[]
[mg2+_ie]
type = PorousFlowMassTimeDerivative
fluid_component = 3
variable = mg2+
[]
[mg2+_conv]
type = PorousFlowAdvectiveFlux
fluid_component = 3
variable = mg2+
[]
[predis_mg2+]
type = PorousFlowPreDis
variable = mg2+
mineral_density = 2875.0
stoichiometry = 0.8
[]
[fe2+_ie]
type = PorousFlowMassTimeDerivative
fluid_component = 4
variable = fe2+
[]
[fe2+_conv]
type = PorousFlowAdvectiveFlux
fluid_component = 4
variable = fe2+
[]
[predis_fe2+]
type = PorousFlowPreDis
variable = fe2+
mineral_density = 2875.0
stoichiometry = 0.2
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'h+ hco3- ca2+ mg2+ fe2+'
number_fluid_phases = 1
number_fluid_components = 6
number_aqueous_equilibrium = 5
number_aqueous_kinetic = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
viscosity = 1E-3
[]
[]
[BCs]
[hco3-_left]
type = DirichletBC
variable = hco3-
boundary = left
value = 5E-2
[]
[h+_left]
type = DirichletBC
variable = h+
boundary = left
value = 5E-2
[]
[ca2+_left]
type = DirichletBC
variable = ca2+
boundary = left
value = 5E-2
[]
[mg2+_left]
type = DirichletBC
variable = mg2+
boundary = left
value = 5E-2
[]
[fe2+_left]
type = DirichletBC
variable = fe2+
boundary = left
value = 5E-2
[]
[hco3-_right]
type = DirichletBC
variable = hco3-
boundary = right
value = 1E-6
[]
[h+_right]
type = DirichletBC
variable = h+
boundary = right
value = 1e-6
[]
[ca2+_right]
type = DirichletBC
variable = ca2+
boundary = right
value = 1E-6
[]
[mg2+_right]
type = DirichletBC
variable = mg2+
boundary = right
value = 1E-6
[]
[fe2+_right]
type = DirichletBC
variable = fe2+
boundary = right
value = 1E-6
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = 298.15
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[]
[equilibrium_massfrac]
type = PorousFlowMassFractionAqueousEquilibriumChemistry
mass_fraction_vars = 'h+ hco3- ca2+ mg2+ fe2+'
num_reactions = 5
equilibrium_constants = 'eqm_k0 eqm_k1 eqm_k2 eqm_k3 eqm_k4'
primary_activity_coefficients = '1 1 1 1 1'
secondary_activity_coefficients = '1 1 1 1 1'
reactions = '1 1 0 0 0
-1 1 0 0 0
0 1 1 0 0
0 1 0 1 0
0 1 0 0 1'
[]
[kinetic]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'h+ hco3- ca2+ mg2+ fe2+'
num_reactions = 1
equilibrium_constants = kinetic_k
primary_activity_coefficients = '1 1 1 1 1'
reactions = '-2 2 1 0.8 0.2'
specific_reactive_surface_area = '1.2E-8'
kinetic_rate_constant = '3E-4'
activation_energy = '1.5e4'
molar_volume = 64365.0
gas_constant = 8.314
reference_temperature = 298.15
[]
[dolomite_conc]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = dolomite_initial
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.1
[]
[]
[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'
[]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
exodus = true
[]
(modules/porous_flow/test/tests/adaptivity/tet4_adaptivity.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
elem_type = TET4
dim = 3
nx = 2
ny = 2
[]
[]
[Adaptivity]
marker = marker
max_h_level = 1
[Markers]
[marker]
type = UniformMarker
mark = REFINE
[]
[]
[]
[GlobalParams]
PorousFlowDictator = 'dictator'
[]
[Variables]
[pp]
initial_condition = '0'
[]
[]
[Kernels]
[mass]
type = PorousFlowMassTimeDerivative
variable = pp
[]
[flux]
type = PorousFlowAdvectiveFlux
variable = pp
gravity = '0 0 0'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = pp
boundary = 'left'
value = 1
[]
[right]
type = DirichletBC
variable = pp
boundary = 'right'
value = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = 'pp'
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = '0.1'
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-3 0 0 0 1e-3 0 0 0 1e-3'
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[]
[Postprocessors]
[numdofs]
type = NumDOFs
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
end_time = 4
dt = 1
solve_type = Newton
nl_abs_tol = 1e-12
[]
[Outputs]
execute_on = 'final'
exodus = true
perf_graph = true
show = pp
[]
(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/adaptivity/tri3_adaptivity.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
elem_type = TRI3
dim = 2
nx = 2
ny = 2
[]
[]
[Adaptivity]
marker = marker
max_h_level = 1
[Markers]
[marker]
type = UniformMarker
mark = REFINE
[]
[]
[]
[GlobalParams]
PorousFlowDictator = 'dictator'
[]
[Variables]
[pp]
initial_condition = '0'
[]
[]
[Kernels]
[mass]
type = PorousFlowMassTimeDerivative
variable = pp
[]
[flux]
type = PorousFlowAdvectiveFlux
variable = pp
gravity = '0 0 0'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = pp
boundary = 'left'
value = 1
[]
[right]
type = DirichletBC
variable = pp
boundary = 'right'
value = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = 'pp'
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = '0.1'
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-3 0 0 0 1e-3 0 0 0 1e-3'
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[]
[Postprocessors]
[numdofs]
type = NumDOFs
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
end_time = 4
dt = 1
solve_type = Newton
nl_abs_tol = 1e-12
[]
[Outputs]
execute_on = 'final'
exodus = true
perf_graph = true
show = pp
[]
(modules/porous_flow/test/tests/adaptivity/hex_adaptivity.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
[]
[]
[Adaptivity]
marker = marker
max_h_level = 1
[Markers]
[marker]
type = UniformMarker
mark = REFINE
[]
[]
[]
[GlobalParams]
PorousFlowDictator = 'dictator'
[]
[Variables]
[pp]
initial_condition = '0'
[]
[]
[Kernels]
[mass]
type = PorousFlowMassTimeDerivative
variable = pp
[]
[flux]
type = PorousFlowAdvectiveFlux
variable = pp
gravity = '0 0 0'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = pp
boundary = 'left'
value = 1
[]
[right]
type = DirichletBC
variable = pp
boundary = 'right'
value = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = 'pp'
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = '0.1'
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-3 0 0 0 1e-3 0 0 0 1e-3'
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[]
[Postprocessors]
[numdofs]
type = NumDOFs
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
end_time = 4
dt = 1
solve_type = Newton
nl_abs_tol = 1e-12
[]
[Outputs]
execute_on = 'final'
exodus = true
perf_graph = true
show = pp
[]
(modules/porous_flow/examples/flow_through_fractured_media/coarse_3D.i)
# Flow and solute transport along 2 2D eliptical fractures embedded in a 3D porous matrix
# the model domain has dimensions 1 x 1 x 0.3m and the two fracture have r1 = 0.45 and r2 = 0.2
# The fractures intersect each other and the domain boundaries on two opposite sides
# fracture aperture = 6e-4m
# fracture porosity = 6e-4m
# fracture permeability = 1.8e-11 which is based in k=3e-8 from a**2/12, and k*a = 3e-8*6e-4;
# matrix porosity = 0.1;
# matrix permeanility = 1e-20;
[Mesh]
type = FileMesh
file = coarse_3D.e
block_id = '1 2 3'
block_name = 'matrix f1 f2'
boundary_id = '1 2 3 4'
boundary_name = 'rf2 lf1 right_matrix left_matrix'
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
[]
[tracer]
[]
[]
[AuxVariables]
[velocity_x]
family = MONOMIAL
order = CONSTANT
block = 'f1 f2'
[]
[velocity_y]
family = MONOMIAL
order = CONSTANT
block = 'f1 f2'
[]
[velocity_z]
family = MONOMIAL
order = CONSTANT
block = 'f1 f2'
[]
[]
[AuxKernels]
[velocity_x]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = velocity_x
component = x
aperture = 6E-4
[]
[velocity_y]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = velocity_y
component = y
aperture = 6E-4
[]
[velocity_z]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = velocity_z
component = z
aperture = 6E-4
[]
[]
[ICs]
[pp]
type = ConstantIC
variable = pp
value = 1e6
[]
[tracer]
type = ConstantIC
variable = tracer
value = 0
[]
[]
[BCs]
[top]
type = DirichletBC
value = 0
variable = tracer
boundary = rf2
[]
[bottom]
type = DirichletBC
value = 1
variable = tracer
boundary = lf1
[]
[ptop]
type = DirichletBC
variable = pp
boundary = rf2
value = 1e6
[]
[pbottom]
type = DirichletBC
variable = pp
boundary = lf1
value = 1.02e6
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pp
disp_trans = 0
disp_long = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = tracer
[]
[adv1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = tracer
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = tracer
disp_trans = 0
disp_long = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'tracer'
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro1]
type = PorousFlowPorosityConst
porosity = 6e-4 # = a * phif
block = 'f1 f2'
[]
[diff1]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1.e-9 1.e-9'
tortuosity = 1.0
block = 'f1 f2'
[]
[poro2]
type = PorousFlowPorosityConst
porosity = 0.1
block = 'matrix'
[]
[diff2]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1.e-9 1.e-9'
tortuosity = 0.1
block = 'matrix'
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability1]
type = PorousFlowPermeabilityConst
permeability = '1.8e-11 0 0 0 1.8e-11 0 0 0 1.8e-11' # 1.8e-11 = a * kf
block = 'f1 f2'
[]
[permeability2]
type = PorousFlowPermeabilityConst
permeability = '1e-20 0 0 0 1e-20 0 0 0 1e-20'
block = 'matrix'
[]
[]
[Preconditioning]
active = basic
[mumps_is_best_for_parallel_jobs]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[basic]
type = SMP
full = true
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 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 20
dt = 1
[]
[VectorPostprocessors]
[xmass]
type = LineValueSampler
start_point = '-0.5 0 0'
end_point = '0.5 0 0'
sort_by = x
num_points = 41
variable = tracer
outputs = csv
[]
[]
[Outputs]
[csv]
type = CSV
execute_on = 'final'
[]
[]
(modules/porous_flow/test/tests/jacobian/disp04.i)
# Test the Jacobian of the PorousFlowDisperiveFlux kernel
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[]
[ICs]
[pp]
type = RandomIC
variable = pp
max = 2e1
min = 1e1
[]
[massfrac0]
type = RandomIC
variable = massfrac0
min = 0
max = 1
[]
[]
[Kernels]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pp
gravity = '1 0 0'
disp_long = 0.2
disp_trans = 0.1
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
gravity = '1 0 0'
disp_long = 0.2
disp_trans = 0.1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e7
density0 = 10
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temp]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac0'
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-2 1e-1'
tortuosity = '0.1'
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[]
[Preconditioning]
active = smp
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
(modules/porous_flow/test/tests/jacobian/disp02.i)
# Test the Jacobian of the dispersive contribution to the diffusive component of
# the PorousFlowDisperiveFlux kernel along with a non-zero diffusion.
# By setting disp_long and disp_trans to the same non-zero value, the purely
# dispersive component of the flux is zero, and the only flux is due to diffusion
# and its contribution from disp_trans.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[]
[ICs]
[pp]
type = RandomIC
variable = pp
max = 2e1
min = 1e1
[]
[massfrac0]
type = RandomIC
variable = massfrac0
min = 0
max = 1
[]
[]
[Kernels]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pp
gravity = '1 0 0'
disp_long = 0.1
disp_trans = 0.1
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
gravity = '1 0 0'
disp_long = 0.1
disp_trans = 0.1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e7
density0 = 10
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temp]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac0'
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-2 1e-1'
tortuosity = '0.1'
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[]
[Preconditioning]
active = smp
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
(modules/porous_flow/test/tests/adaptivity/quad_adaptivity.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[]
[Adaptivity]
marker = marker
max_h_level = 1
[Markers]
[marker]
type = UniformMarker
mark = REFINE
[]
[]
[]
[GlobalParams]
PorousFlowDictator = 'dictator'
[]
[Variables]
[pp]
initial_condition = '0'
[]
[]
[Kernels]
[mass]
type = PorousFlowMassTimeDerivative
variable = pp
[]
[flux]
type = PorousFlowAdvectiveFlux
variable = pp
gravity = '0 0 0'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = pp
boundary = 'left'
value = 1
[]
[right]
type = DirichletBC
variable = pp
boundary = 'right'
value = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = 'pp'
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = '0.1'
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-3 0 0 0 1e-3 0 0 0 1e-3'
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[]
[Postprocessors]
[numdofs]
type = NumDOFs
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
end_time = 4
dt = 1
solve_type = Newton
nl_abs_tol = 1e-12
[]
[Outputs]
execute_on = 'final'
exodus = true
perf_graph = true
show = pp
[]
(modules/porous_flow/test/tests/jacobian/diff02.i)
# Test the Jacobian of the diffusive component of the PorousFlowDisperiveFlux kernel for two phases.
# By setting disp_long and disp_trans to zero, the purely diffusive component of the flux
# can be isolated. Uses constant tortuosity and diffusion coefficients
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[sgas]
[]
[massfrac0]
[]
[]
[AuxVariables]
[massfrac1]
[]
[]
[ICs]
[sgas]
type = RandomIC
variable = sgas
max = 1
min = 0
[]
[massfrac0]
type = RandomIC
variable = massfrac0
min = 0
max = 1
[]
[massfrac1]
type = RandomIC
variable = massfrac1
min = 0
max = 1
[]
[]
[Kernels]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = sgas
gravity = '1 0 0'
disp_long = '0 0'
disp_trans = '0 0'
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
gravity = '1 0 0'
disp_long = '0 0'
disp_trans = '0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'sgas massfrac0'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1e7
density0 = 10
thermal_expansion = 0
viscosity = 1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1e7
density0 = 1
thermal_expansion = 0
viscosity = 0.1
[]
[]
[Materials]
[temp]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = 1
phase1_saturation = sgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac0 massfrac1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[poro]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-2 1e-1 1e-2 1e-1'
tortuosity = '0.1 0.2'
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm0]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityConst
phase = 1
[]
[]
[Preconditioning]
active = smp
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
(modules/porous_flow/test/tests/numerical_diffusion/no_action.i)
# Using upwinded and mass-lumped PorousFlow Kernels: this is equivalent of fully_saturated_action.i with stabilization = Full
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = tracer
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = porepressure
[]
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 101
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-1
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/test/tests/jacobian/disp01.i)
# Test the Jacobian of the dispersive contribution to the diffusive component of
# the PorousFlowDisperiveFlux kernel. By setting disp_long and disp_trans to the same
# non-zero value, and diffusion to zero (by setting tortuosity to zero), the purely
# dispersive component of the flux is zero, and the only flux is due to the contribution
# from disp_trans on the diffusive flux.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[]
[ICs]
[pp]
type = RandomIC
variable = pp
max = 2e1
min = 1e1
[]
[massfrac0]
type = RandomIC
variable = massfrac0
min = 0
max = 1
[]
[]
[Kernels]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pp
gravity = '1 0 0'
disp_long = 0.1
disp_trans = 0.1
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
gravity = '1 0 0'
disp_long = 0.1
disp_trans = 0.1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e7
density0 = 10
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temp]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac0'
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-2 1e-1'
tortuosity = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[]
[Preconditioning]
active = smp
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
(modules/porous_flow/test/tests/pressure_pulse/pressure_pulse_1d_fully_saturated_fv.i)
# Pressure pulse in 1D with 1 phase fully saturated - transient FV model
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 100
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
type = MooseVariableFVReal
initial_condition = 2E6
[]
[]
[FVKernels]
[mass0]
type = FVPorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[flux]
type = FVPorousFlowAdvectiveFlux
variable = pp
gravity = '0 0 0'
fluid_component = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
temperature = 293
[]
[ppss]
type = ADPorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = ADPorousFlowMassFraction
[]
[simple_fluid]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = ADPorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = ADPorousFlowPermeabilityConst
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
[]
[relperm]
type = ADPorousFlowRelativePermeabilityConst
kr = 1
phase = 0
[]
[]
[FVBCs]
[left]
type = FVPorousFlowAdvectiveFluxBC
boundary = left
porepressure_value = 3E6
variable = pp
gravity = '0 0 0'
fluid_component = 0
phase = 0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E3
end_time = 1E4
[]
[Postprocessors]
[p005]
type = PointValue
variable = pp
point = '5 0 0'
execute_on = 'initial timestep_end'
[]
[p015]
type = PointValue
variable = pp
point = '15 0 0'
execute_on = 'initial timestep_end'
[]
[p025]
type = PointValue
variable = pp
point = '25 0 0'
execute_on = 'initial timestep_end'
[]
[p035]
type = PointValue
variable = pp
point = '35 0 0'
execute_on = 'initial timestep_end'
[]
[p045]
type = PointValue
variable = pp
point = '45 0 0'
execute_on = 'initial timestep_end'
[]
[p055]
type = PointValue
variable = pp
point = '55 0 0'
execute_on = 'initial timestep_end'
[]
[p065]
type = PointValue
variable = pp
point = '65 0 0'
execute_on = 'initial timestep_end'
[]
[p075]
type = PointValue
variable = pp
point = '75 0 0'
execute_on = 'initial timestep_end'
[]
[p085]
type = PointValue
variable = pp
point = '85 0 0'
execute_on = 'initial timestep_end'
[]
[p095]
type = PointValue
variable = pp
point = '95 0 0'
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
file_base = pressure_pulse_1d_fv
print_linear_residuals = false
csv = true
[]
(modules/porous_flow/test/tests/recover/pffltvd.i)
# Tests that PorousFlow can successfully recover using a checkpoint file.
# This test contains stateful material properties, adaptivity, integrated
# boundary conditions with nodal-sized materials, and TVD flux limiting.
#
# This test file is run three times:
# 1) The full input file is run to completion
# 2) The input file is run for half the time and checkpointing is included
# 3) The input file is run in recovery using the checkpoint data
#
# The final output of test 3 is compared to the final output of test 1 to verify
# that recovery was successful.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[Adaptivity]
initial_steps = 1
initial_marker = tracer_marker
marker = tracer_marker
max_h_level = 1
[Markers]
[tracer_marker]
type = ValueRangeMarker
variable = tracer
lower_bound = 0.02
upper_bound = 0.98
[]
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '2 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[]
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 2
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[]
[advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[]
[VectorPostprocessors]
[tracer]
type = NodalValueSampler
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 0.2
dt = 0.05
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/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/examples/solute_tracer_transport/solute_tracer_transport_2D.i)
# Longitudinal dispersivity
disp = 5
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 100
xmin = -50
xmax = 50
ny = 60
ymin = 0
ymax = 50
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
initial_condition = 1e5
[]
[C]
initial_condition = 0
[]
[]
[AuxVariables]
[Darcy_vel_x]
order = CONSTANT
family = MONOMIAL
[]
[Darcy_vel_y]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Darcy_vel_x]
type = PorousFlowDarcyVelocityComponent
variable = Darcy_vel_x
component = x
fluid_phase = 0
[]
[Darcy_vel_y]
type = PorousFlowDarcyVelocityComponent
variable = Darcy_vel_y
component = y
fluid_phase = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure C'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[Kernels]
[mass_der_water]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[adv_pp]
type = PorousFlowFullySaturatedDarcyFlow
variable = porepressure
fluid_component = 1
[]
[diff_pp]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = porepressure
disp_trans = 0
disp_long = ${disp}
[]
[mass_der_C]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = C
[]
[adv_C]
type = PorousFlowFullySaturatedDarcyFlow
fluid_component = 0
variable = C
[]
[diff_C]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = C
disp_trans = 0
disp_long = ${disp}
[]
[]
[FluidProperties]
[water]
type = Water97FluidProperties
[]
[]
[Materials]
[ps]
type = PorousFlow1PhaseFullySaturated
porepressure = porepressure
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.25
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-11 0 0 0 1E-11 0 0 0 1E-11'
[]
[water]
type = PorousFlowSingleComponentFluid
fp = water
phase = 0
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = C
[]
[temperature]
type = PorousFlowTemperature
temperature = 293
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '0 0'
tortuosity = 0.1
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
kr = 1
phase = 0
[]
[]
[DiracKernels]
[source_P]
type = PorousFlowSquarePulsePointSource
point = '0 0 0'
mass_flux = 1e-1
variable = porepressure
[]
[source_C]
type = PorousFlowSquarePulsePointSource
point = '0 0 0'
mass_flux = 1e-7
variable = C
[]
[]
[BCs]
[constant_outlet_porepressure_]
type = DirichletBC
variable = porepressure
value = 1e5
boundary = 'top left right'
[]
[outlet_tracer_top]
type = PorousFlowOutflowBC
variable = C
boundary = top
mass_fraction_component = 0
[]
[outlet_tracer_right]
type = PorousFlowOutflowBC
variable = C
boundary = right
mass_fraction_component = 0
[]
[outlet_tracer_left]
type = PorousFlowOutflowBC
variable = C
boundary = left
mass_fraction_component = 0
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[]
[Executioner]
type = Transient
end_time = 17280000
dtmax = 100000
nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
[TimeStepper]
type = IterationAdaptiveDT
dt = 1000
[]
[]
[Postprocessors]
[C]
type = PointValue
variable = C
point = '0 25 0'
[]
[Darcy_x]
type = PointValue
variable = Darcy_vel_x
point = '0 25 0'
[]
[Darcy_y]
type = PointValue
variable = Darcy_vel_y
point = '0 25 0'
[]
[]
[Outputs]
file_base = solute_tracer_transport_2D_${disp}
csv = true
exodus = true
[]
(modules/porous_flow/test/tests/jacobian/fv_mass_flux.i)
# Verify Jacobian of FV advective flux and mass time derivative kernels
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[FVKernels]
[mass0]
type = FVPorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[flux]
type = FVPorousFlowAdvectiveFlux
variable = pp
gravity = '0 -10 0'
fluid_component = 0
[]
[]
[ICs]
[pp]
type = RandomIC
variable = pp
min = 1e6
max = 2e6
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-5
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
temperature = 293
[]
[ppss]
type = ADPorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = ADPorousFlowMassFraction
[]
[simple_fluid]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = ADPorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = ADPorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = ADPorousFlowRelativePermeabilityConst
kr = 1
phase = 0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
(modules/porous_flow/test/tests/chemistry/2species_equilibrium.i)
# PorousFlow analogy of chemical_reactions/test/tests/aqueous_equilibrium/2species.i
#
# Simple equilibrium reaction example to illustrate the use of PorousFlowMassFractionAqueousEquilibriumChemistry
#
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction:
#
# reactions = '2a = pa2 rate = 10^2
# a + b = pab rate = 10^-2'
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[a]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[]
[]
[b]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[]
[]
[]
[AuxVariables]
[eqm_k0]
initial_condition = 1E2
[]
[eqm_k1]
initial_condition = 1E-2
[]
[pressure]
[]
[pa2]
family = MONOMIAL
order = CONSTANT
[]
[pab]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[pa2]
type = PorousFlowPropertyAux
property = secondary_concentration
secondary_species = 0
variable = pa2
[]
[pab]
type = PorousFlowPropertyAux
property = secondary_concentration
secondary_species = 1
variable = pab
[]
[]
[ICs]
[pressure]
type = FunctionIC
variable = pressure
function = 2-x
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Kernels]
[mass_a]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = a
[]
[flux_a]
type = PorousFlowFullySaturatedDarcyFlow
variable = a
fluid_component = 0
[]
[diff_a]
type = PorousFlowDispersiveFlux
variable = a
fluid_component = 0
disp_trans = 0
disp_long = 0
[]
[mass_b]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = b
[]
[flux_b]
type = PorousFlowFullySaturatedDarcyFlow
variable = b
fluid_component = 1
[]
[diff_b]
type = PorousFlowDispersiveFlux
variable = b
fluid_component = 1
disp_trans = 0
disp_long = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_equilibrium = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9 # huge, so mimic chemical_reactions
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[]
[massfrac]
type = PorousFlowMassFractionAqueousEquilibriumChemistry
mass_fraction_vars = 'a b'
num_reactions = 2
equilibrium_constants = 'eqm_k0 eqm_k1'
primary_activity_coefficients = '1 1'
secondary_activity_coefficients = '1 1'
reactions = '2 0
1 1'
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[permeability]
type = PorousFlowPermeabilityConst
# porous_flow permeability / porous_flow viscosity = chemical_reactions conductivity = 1E-4
permeability = '1E-7 0 0 0 1E-7 0 0 0 1E-7'
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[diff]
type = PorousFlowDiffusivityConst
# porous_flow diffusion_coeff * tortuousity * porosity = chemical_reactions diffusivity = 1E-4
diffusion_coeff = '5E-4 5E-4 5E-4'
tortuosity = 1.0
[]
[]
[BCs]
[a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[]
[b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 10
end_time = 100
[]
[Outputs]
print_linear_residuals = true
exodus = true
perf_graph = true
hide = eqm_k0
[]
(modules/porous_flow/test/tests/pressure_pulse/pressure_pulse_1d_fv.i)
# Pressure pulse in 1D with 1 phase - transient FV model
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 100
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 2E6
[]
[]
[FVKernels]
[mass0]
type = FVPorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[flux]
type = FVPorousFlowAdvectiveFlux
variable = pp
gravity = '0 0 0'
fluid_component = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
temperature = 293
[]
[ppss]
type = ADPorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = ADPorousFlowMassFraction
[]
[simple_fluid]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = ADPorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = ADPorousFlowPermeabilityConst
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
[]
[relperm]
type = ADPorousFlowRelativePermeabilityConst
kr = 1
phase = 0
[]
[]
[FVBCs]
[left]
type = FVPorousFlowAdvectiveFluxBC
boundary = left
porepressure_value = 3E6
variable = pp
gravity = '0 0 0'
fluid_component = 0
phase = 0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E3
end_time = 1E4
[]
[Postprocessors]
[p005]
type = PointValue
variable = pp
point = '5 0 0'
execute_on = 'initial timestep_end'
[]
[p015]
type = PointValue
variable = pp
point = '15 0 0'
execute_on = 'initial timestep_end'
[]
[p025]
type = PointValue
variable = pp
point = '25 0 0'
execute_on = 'initial timestep_end'
[]
[p035]
type = PointValue
variable = pp
point = '35 0 0'
execute_on = 'initial timestep_end'
[]
[p045]
type = PointValue
variable = pp
point = '45 0 0'
execute_on = 'initial timestep_end'
[]
[p055]
type = PointValue
variable = pp
point = '55 0 0'
execute_on = 'initial timestep_end'
[]
[p065]
type = PointValue
variable = pp
point = '65 0 0'
execute_on = 'initial timestep_end'
[]
[p075]
type = PointValue
variable = pp
point = '75 0 0'
execute_on = 'initial timestep_end'
[]
[p085]
type = PointValue
variable = pp
point = '85 0 0'
execute_on = 'initial timestep_end'
[]
[p095]
type = PointValue
variable = pp
point = '95 0 0'
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
file_base = pressure_pulse_1d_fv
print_linear_residuals = false
csv = true
[]
(modules/porous_flow/test/tests/pressure_pulse/pressure_pulse_1d_2comp.i)
# Pressure pulse in 1D with 1 phase but 2 components (where density and viscosity depend on mass fraction)
# This test uses BrineFluidProperties with the PorousFlowMultiComponentFluid material, but could be run using
# the PorousFlowBrine material instead.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 100
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp xnacl'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[Variables]
[pp]
initial_condition = 1e6
[]
[xnacl]
initial_condition = 0
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = xnacl
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = xnacl
[]
[]
[AuxVariables]
[density]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[density]
type = PorousFlowPropertyAux
variable = density
property = density
phase = 0
execute_on = 'initial timestep_end'
[]
[]
[FluidProperties]
[brine]
type = BrineFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = 293
[]
[mass_fractions]
type = PorousFlowMassFraction
mass_fraction_vars = xnacl
[]
[ps]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[brine]
type = PorousFlowMultiComponentFluid
x = xnacl
fp = brine
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-7 0 0 0 1e-7 0 0 0 1e-7'
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
kr = 1
phase = 0
[]
[]
[BCs]
[left_p]
type = DirichletBC
boundary = left
value = 2e6
variable = pp
[]
[right_p]
type = DirichletBC
boundary = right
value = 1e6
variable = pp
[]
[left_xnacl]
type = DirichletBC
boundary = left
value = 0.2
variable = xnacl
[]
[right_xnacl]
type = DirichletBC
boundary = right
value = 0
variable = xnacl
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -pc_factor_shift_type'
petsc_options_value = 'bcgs lu NONZERO'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Postprocessors]
[p000]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = 'initial timestep_end'
[]
[p050]
type = PointValue
variable = pp
point = '50 0 0'
execute_on = 'initial timestep_end'
[]
[p100]
type = PointValue
variable = pp
point = '100 0 0'
execute_on = 'initial timestep_end'
[]
[xnacl_000]
type = PointValue
variable = xnacl
point = '0 0 0'
execute_on = 'initial timestep_end'
[]
[density_000]
type = PointValue
variable = density
point = '0 0 0'
execute_on = 'initial timestep_end'
[]
[xnacl_020]
type = PointValue
variable = xnacl
point = '20 0 0'
execute_on = 'initial timestep_end'
[]
[density_020]
type = PointValue
variable = density
point = '20 0 0'
execute_on = 'initial timestep_end'
[]
[xnacl_040]
type = PointValue
variable = xnacl
point = '40 0 0'
execute_on = 'initial timestep_end'
[]
[density_040]
type = PointValue
variable = density
point = '40 0 0'
execute_on = 'initial timestep_end'
[]
[xnacl_060]
type = PointValue
variable = xnacl
point = '60 0 0'
execute_on = 'initial timestep_end'
[]
[density_060]
type = PointValue
variable = density
point = '60 0 0'
execute_on = 'initial timestep_end'
[]
[xnacl_080]
type = PointValue
variable = xnacl
point = '80 0 0'
execute_on = 'initial timestep_end'
[]
[density_080]
type = PointValue
variable = density
point = '80 0 0'
execute_on = 'initial timestep_end'
[]
[xnacl_100]
type = PointValue
variable = xnacl
point = '100 0 0'
execute_on = 'initial timestep_end'
[]
[density_100]
type = PointValue
variable = density
point = '100 0 0'
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/jacobian/disp03.i)
# Test the Jacobian of the dispersive contribution to the PorousFlowDisperiveFlux
# kernel by setting the diffusive component to zero (tortuosity = 0).
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[]
[ICs]
[pp]
type = RandomIC
variable = pp
max = 2e1
min = 1e1
[]
[massfrac0]
type = RandomIC
variable = massfrac0
min = 0
max = 1
[]
[]
[Kernels]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pp
gravity = '1 0 0'
disp_long = 0.2
disp_trans = 0.1
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
gravity = '1 0 0'
disp_long = 0.2
disp_trans = 0.1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e7
density0 = 10
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temp]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac0'
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-2 1e-1'
tortuosity = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[]
[Preconditioning]
active = smp
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]