- PorousFlowDictatorThe UserObject that holds the list of PorousFlow variable names
C++ Type:UserObjectName
Description:The UserObject that holds the list of PorousFlow variable names
- SumQuantityUOUser Object of type=PorousFlowSumQuantity in which to place the total outflow from the line sink for each time step.
C++ Type:UserObjectName
Description:User Object of type=PorousFlowSumQuantity in which to place the total outflow from the line sink for each time step.
- bottom_p_or_tFor function_of=pressure, this parameter is the pressure at the bottom of the borehole, otherwise it is the temperature at the bottom of the borehole
C++ Type:double
Description:For function_of=pressure, this parameter is the pressure at the bottom of the borehole, otherwise it is the temperature at the bottom of the borehole
- characterIf zero then borehole does nothing. If positive the borehole acts as a sink (production well) for porepressure > borehole pressure, and does nothing otherwise. If negative the borehole acts as a source (injection well) for porepressure < borehole pressure, and does nothing otherwise. The flow rate to/from the borehole is multiplied by |character|, so usually character = +/- 1, but you can specify other quantities to provide an overall scaling to the flow if you like.
C++ Type:FunctionName
Description:If zero then borehole does nothing. If positive the borehole acts as a sink (production well) for porepressure > borehole pressure, and does nothing otherwise. If negative the borehole acts as a source (injection well) for porepressure < borehole pressure, and does nothing otherwise. The flow rate to/from the borehole is multiplied by |character|, so usually character = +/- 1, but you can specify other quantities to provide an overall scaling to the flow if you like.
- point_fileThe file containing the coordinates of the points and their weightings that approximate the line sink. The physical meaning of the weightings depend on the scenario, eg, they may be borehole radii. Each line in the file must contain a space-separated weight and coordinate, viz r x y z. For boreholes, the last point in the file is defined as the borehole bottom, where the borehole pressure is bottom_pressure. If your file contains just one point, you must also specify the line_length and line_direction parameters. Note that you will get segementation faults if your points do not lie within your mesh!
C++ Type:std::string
Description:The file containing the coordinates of the points and their weightings that approximate the line sink. The physical meaning of the weightings depend on the scenario, eg, they may be borehole radii. Each line in the file must contain a space-separated weight and coordinate, viz r x y z. For boreholes, the last point in the file is defined as the borehole bottom, where the borehole pressure is bottom_pressure. If your file contains just one point, you must also specify the line_length and line_direction parameters. Note that you will get segementation faults if your points do not lie within your mesh!
- unit_weight(fluid_density*gravitational_acceleration) as a vector pointing downwards. Note that the borehole pressure at a given z position is bottom_p_or_t + unit_weight*(q - q_bottom), where q=(x,y,z) and q_bottom=(x,y,z) of the bottom point of the borehole. The analogous formula holds for function_of=temperature. If you don't want bottomhole pressure (or temperature) to vary in the borehole just set unit_weight=0. Typical value is = (0,0,-1E4), for water
C++ Type:libMesh::VectorValue
Description:(fluid_density*gravitational_acceleration) as a vector pointing downwards. Note that the borehole pressure at a given z position is bottom_p_or_t + unit_weight*(q - q_bottom), where q=(x,y,z) and q_bottom=(x,y,z) of the bottom point of the borehole. The analogous formula holds for function_of=temperature. If you don't want bottomhole pressure (or temperature) to vary in the borehole just set unit_weight=0. Typical value is = (0,0,-1E4), for water
- variableThe name of the variable that this kernel operates on
C++ Type:NonlinearVariableName
Description:The name of the variable that this kernel operates on
PorousFlowPeacemanBorehole
A PorousFlowPeacemanBorehole
is a special case of the general line sink in which a polyline (represented by a sequence of points) acts as a sink or source in the model. Please see sinks for an extended discussion and examples.
Input Parameters
- fluid_phase0The fluid phase whose pressure (and potentially mobility, enthalpy, etc) controls the flux to the line sink. For p_or_t=temperature, and without any use_*, this parameter is irrelevant
Default:0
C++ Type:unsigned int
Options:
Description:The fluid phase whose pressure (and potentially mobility, enthalpy, etc) controls the flux to the line sink. For p_or_t=temperature, and without any use_*, this parameter is irrelevant
- function_ofpressureModifying functions will be a function of either pressure and permeability (eg, for boreholes that pump fluids) or temperature and thermal conductivity (eg, for boreholes that pump pure heat with no fluid flow)
Default:pressure
C++ Type:MooseEnum
Options:pressure temperature
Description:Modifying functions will be a function of either pressure and permeability (eg, for boreholes that pump fluids) or temperature and thermal conductivity (eg, for boreholes that pump pure heat with no fluid flow)
- line_direction0 0 1Line direction. Note this is only used if there is only one point in the point_file.
Default:0 0 1
C++ Type:libMesh::VectorValue
Options:
Description:Line direction. Note this is only used if there is only one point in the point_file.
- line_length0Line length. Note this is only used if there is only one point in the point_file.
Default:0
C++ Type:double
Options:
Description:Line length. Note this is only used if there is only one point in the point_file.
- mass_fraction_componentThe index corresponding to a fluid component. If supplied, the flux will be multiplied by the nodal mass fraction for the component
C++ Type:unsigned int
Options:
Description:The index corresponding to a fluid component. If supplied, the flux will be multiplied by the nodal mass fraction for the component
- re_constant0.28The dimensionless constant used in evaluating the borehole effective radius. This depends on the meshing scheme. Peacemann finite-difference calculations give 0.28, while for rectangular finite elements the result is closer to 0.1594. (See Eqn(4.13) of Z Chen, Y Zhang, Well flow models for various numerical methods, Int J Num Analysis and Modeling, 3 (2008) 375-388.)
Default:0.28
C++ Type:double
Options:
Description:The dimensionless constant used in evaluating the borehole effective radius. This depends on the meshing scheme. Peacemann finite-difference calculations give 0.28, while for rectangular finite elements the result is closer to 0.1594. (See Eqn(4.13) of Z Chen, Y Zhang, Well flow models for various numerical methods, Int J Num Analysis and Modeling, 3 (2008) 375-388.)
- use_enthalpyFalseMultiply the flux by the fluid enthalpy
Default:False
C++ Type:bool
Options:
Description:Multiply the flux by the fluid enthalpy
- use_internal_energyFalseMultiply the flux by the fluid internal energy
Default:False
C++ Type:bool
Options:
Description:Multiply the flux by the fluid internal energy
- use_mobilityFalseMultiply the flux by the fluid mobility
Default:False
C++ Type:bool
Options:
Description:Multiply the flux by the fluid mobility
- use_relative_permeabilityFalseMultiply the flux by the fluid relative permeability
Default:False
C++ Type:bool
Options:
Description:Multiply the flux by the fluid relative permeability
- well_constant-1Usually this is calculated internally from the element geometry, the local borehole direction and segment length, and the permeability. However, if this parameter is given as a positive number then this number is used instead of the internal calculation. This speeds up computation marginally. re_constant becomes irrelevant
Default:-1
C++ Type:double
Options:
Description:Usually this is calculated internally from the element geometry, the local borehole direction and segment length, and the permeability. However, if this parameter is given as a positive number then this number is used instead of the internal calculation. This speeds up computation marginally. re_constant becomes irrelevant
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector
Options:
Description:Adds user-defined labels for accessing object parameters via control logic.
- drop_duplicate_pointsTrueBy default points added to a DiracKernel are dropped if a point at the same locationhas been added before. If this option is set to false duplicate points are retainedand contribute to residual and Jacobian.
Default:True
C++ Type:bool
Options:
Description:By default points added to a DiracKernel are dropped if a point at the same locationhas been added before. If this option is set to false duplicate points are retainedand contribute to residual and Jacobian.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Options:
Description:Set the enabled status of the MooseObject.
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Options:
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
- extra_matrix_tagsThe extra tags for the matrices this Kernel should fill
C++ Type:std::vector
Options:
Description:The extra tags for the matrices this Kernel should fill
- extra_vector_tagsThe extra tags for the vectors this Kernel should fill
C++ Type:std::vector
Options:
Description:The extra tags for the vectors this Kernel should fill
- matrix_tagssystemThe tag for the matrices this Kernel should fill
Default:system
C++ Type:MultiMooseEnum
Options:nontime system
Description:The tag for the matrices this Kernel should fill
- vector_tagsnontimeThe tag for the vectors this Kernel should fill
Default:nontime
C++ Type:MultiMooseEnum
Options:nontime time
Description:The tag for the vectors this Kernel should fill
Tagging Parameters
Input Files
- modules/porous_flow/test/tests/dirackernels/bh_except01.i
- modules/porous_flow/test/tests/dirackernels/bh_except16.i
- modules/porous_flow/test/tests/dirackernels/bh04.i
- modules/porous_flow/test/tests/jacobian/line_sink03.i
- modules/porous_flow/test/tests/dirackernels/bh_except14.i
- modules/porous_flow/test/tests/dirackernels/bh_except03.i
- modules/porous_flow/test/tests/dirackernels/bh05.i
- modules/porous_flow/test/tests/dirackernels/bh02.i
- modules/porous_flow/test/tests/dirackernels/bh_except02.i
- modules/porous_flow/test/tests/dirackernels/bh_except15.i
- modules/porous_flow/test/tests/dirackernels/bh_except13.i
- modules/porous_flow/test/tests/dirackernels/bh_except07.i
- modules/porous_flow/test/tests/dirackernels/bh_except06.i
- modules/porous_flow/test/tests/dirackernels/bh_except08.i
- modules/porous_flow/test/tests/dirackernels/bh_except05.i
- modules/porous_flow/test/tests/dirackernels/bh07.i
- modules/porous_flow/test/tests/dirackernels/bh_except11.i
- modules/porous_flow/test/tests/dirackernels/bh03.i
- modules/porous_flow/test/tests/dirackernels/bh_except10.i
- modules/porous_flow/test/tests/dirackernels/bh_except04.i
- modules/porous_flow/test/tests/dirackernels/bh_except09.i
- modules/porous_flow/test/tests/jacobian/line_sink01.i
- modules/porous_flow/test/tests/dirackernels/injection_production.i
- modules/porous_flow/test/tests/dirackernels/bh_except12.i
modules/porous_flow/test/tests/dirackernels/bh_except01.i
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = TimeDerivative
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
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-12 0 0 0 1E-12 0 0 0 1E-12'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 1
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
modules/porous_flow/test/tests/dirackernels/bh_except16.i
# fully-saturated
# production
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
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-12 0 0 0 1E-12 0 0 0 1E-12'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
function_of = temperature
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
modules/porous_flow/test/tests/dirackernels/bh04.i
# fully-saturated
# production
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1 1E1 1E2 1E3'
x = '0 1E-1 1 1E1 1E2 1E3'
[../]
[]
[Variables]
[./pp]
initial_condition = 0
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-5
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
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-12 0 0 0 1E-12 0 0 0 1E-12'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityFLAC
m = 2
phase = 0
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
variable = pp
SumQuantityUO = borehole_total_outflow_mass
point_file = bh02.bh
fluid_phase = 0
bottom_p_or_t = -1E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 1E3
solve_type = NEWTON
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = bh04
exodus = false
csv = true
execute_on = timestep_end
[]
modules/porous_flow/test/tests/jacobian/line_sink03.i
# PorousFlowPeacemanBorehole with 2-phase, 3-components, with enthalpy, internal_energy, and thermal_conductivity
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./ppwater]
[../]
[./ppgas]
[../]
[./massfrac_ph0_sp0]
[../]
[./massfrac_ph0_sp1]
[../]
[./massfrac_ph1_sp0]
[../]
[./massfrac_ph1_sp1]
[../]
[./temp]
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp ppwater ppgas massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
number_fluid_phases = 2
number_fluid_components = 3
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[./dummy_outflow0]
type = PorousFlowSumQuantity
[../]
[./dummy_outflow1]
type = PorousFlowSumQuantity
[../]
[./dummy_outflow2]
type = PorousFlowSumQuantity
[../]
[./dummy_outflow3]
type = PorousFlowSumQuantity
[../]
[./dummy_outflow4]
type = PorousFlowSumQuantity
[../]
[./dummy_outflow5]
type = PorousFlowSumQuantity
[../]
[./dummy_outflow6]
type = PorousFlowSumQuantity
[../]
[./dummy_outflow7]
type = PorousFlowSumQuantity
[../]
[]
[ICs]
[./temp]
type = RandomIC
variable = temp
min = 1
max = 2
[../]
[./ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[../]
[./ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[../]
[./massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 1
[../]
[./massfrac_ph0_sp1]
type = RandomIC
variable = massfrac_ph0_sp1
min = 0
max = 1
[../]
[./massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 1
[../]
[./massfrac_ph1_sp1]
type = RandomIC
variable = massfrac_ph1_sp1
min = 0
max = 1
[../]
[]
[Kernels]
[./dummy_temp]
type = TimeDerivative
variable = temp
[../]
[./dummy_ppwater]
type = TimeDerivative
variable = ppwater
[../]
[./dummy_ppgas]
type = TimeDerivative
variable = ppgas
[../]
[./dummy_m00]
type = TimeDerivative
variable = massfrac_ph0_sp0
[../]
[./dummy_m01]
type = TimeDerivative
variable = massfrac_ph0_sp1
[../]
[./dummy_m10]
type = TimeDerivative
variable = massfrac_ph1_sp0
[../]
[./dummy_m11]
type = TimeDerivative
variable = massfrac_ph1_sp1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
cv = 1.1
[../]
[./simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1.4
cv = 1.8
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
[../]
[./simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[../]
[./simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[../]
[./relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[./relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[../]
[./thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0.1 0.02 0.03 0.02 0.0 0.01 0.03 0.01 0.3'
[../]
[]
[DiracKernels]
#active = 'dirac6 dirac2' # incorrect jacobian for ny=2
#active = 'dirac0 dirac1 dirac2 dirac3 dirac4 dirac5' # correct jacobian for ny=2
#active = 'dirac0 dirac1 dirac2 dirac3 dirac4 dirac5 dirac6' # incorrect jacobian for ny=2
#active = 'dirac0 dirac1 dirac2 dirac3 dirac4 dirac5 dirac7' # correct jacobian in dbg, but not in opt, for ny=2
#active = 'dirac0 dirac1 dirac2 dirac3 dirac4 dirac5 dirac6' # incorrect jacobian in dbg, but correct for opt, for ny=1
#active = 'dirac0 dirac1 dirac2 dirac3 dirac4 dirac5' # correct jacobian, for ny=1
#active = 'dirac0 dirac1 dirac2 dirac3 dirac4 dirac5 dirac6' # incorrect jacobian in dbg, but correct for opt, for ny=1. row24, col 21 and 22 are wrong. row24=node3, 21=ppwater, 22=ppgas, 24=massfrac_ph0_sp1 (all at node3)
[./dirac0]
type = PorousFlowPeacemanBorehole
fluid_phase = 0
variable = ppwater
point_file = one_point.bh
line_length = 1
SumQuantityUO = dummy_outflow0
character = 1
bottom_p_or_t = -10
unit_weight = '1 2 3'
re_constant = 0.123
[../]
[./dirac1]
type = PorousFlowPeacemanBorehole
fluid_phase = 1
variable = ppgas
line_length = 1
line_direction = '-1 -1 -1'
use_relative_permeability = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow1
character = -0.5
bottom_p_or_t = 10
unit_weight = '1 2 -3'
re_constant = 0.3
[../]
[./dirac2]
type = PorousFlowPeacemanBorehole
fluid_phase = 0
variable = massfrac_ph0_sp0
line_length = 1.3
line_direction = '1 0 1'
use_mobility = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow2
character = 0.6
bottom_p_or_t = -4
unit_weight = '-1 -2 -3'
re_constant = 0.4
[../]
[./dirac3]
type = PorousFlowPeacemanBorehole
fluid_phase = 0
variable = massfrac_ph0_sp1
line_length = 1.3
line_direction = '1 1 1'
use_enthalpy = true
mass_fraction_component = 0
point_file = one_point.bh
SumQuantityUO = dummy_outflow3
character = -1
bottom_p_or_t = 3
unit_weight = '0.1 0.2 0.3'
re_constant = 0.5
[../]
[./dirac4]
type = PorousFlowPeacemanBorehole
fluid_phase = 1
variable = massfrac_ph1_sp0
function_of = temperature
line_length = 0.9
line_direction = '1 1 1'
mass_fraction_component = 1
use_internal_energy = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow4
character = 1.1
bottom_p_or_t = -7
unit_weight = '-1 2 3'
re_constant = 0.6
[../]
[./dirac5]
type = PorousFlowPeacemanBorehole
fluid_phase = 1
variable = temp
line_length = 0.9
function_of = temperature
line_direction = '1 2 3'
mass_fraction_component = 2
use_internal_energy = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow5
character = 0.9
bottom_p_or_t = -8
unit_weight = '1 2 1'
re_constant = 0.7
[../]
[./dirac6]
type = PorousFlowPeacemanBorehole
fluid_phase = 0
variable = ppwater
point_file = nine_points.bh
SumQuantityUO = dummy_outflow6
character = 0
bottom_p_or_t = 10
unit_weight = '0.0 0.0 0.0'
[../]
[./dirac7]
type = PorousFlowPeacemanBorehole
fluid_phase = 1
variable = massfrac_ph0_sp0
use_mobility = true
mass_fraction_component = 1
use_relative_permeability = true
use_internal_energy = true
point_file = ten_points.bh
SumQuantityUO = dummy_outflow7
character = -1
bottom_p_or_t = 10
unit_weight = '0.1 0.2 0.3'
[../]
[]
[Preconditioning]
[./check]
type = SMP
full = true
#petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
file_base = line_sink03
[]
modules/porous_flow/test/tests/dirackernels/bh_except14.i
# fully-saturated
# production
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
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-12 0 0 0 1E-12 0 0 0 1E-12'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02_huge.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
modules/porous_flow/test/tests/dirackernels/bh_except03.i
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = TimeDerivative
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
at_nodes = true # Needed to force expected error
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
modules/porous_flow/test/tests/dirackernels/bh05.i
# unsaturated
# injection
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '500 500 1E1'
x = '4000 5000 6500'
[../]
[]
[Variables]
[./pp]
initial_condition = -2E5
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-5
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
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-12 0 0 0 1E-12 0 0 0 1E-12'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityFLAC
m = 2
phase = 0
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
variable = pp
SumQuantityUO = borehole_total_outflow_mass
point_file = bh03.bh
fluid_phase = 0
bottom_p_or_t = 0
unit_weight = '0 0 0'
use_mobility = true
character = -1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 6500
solve_type = NEWTON
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = bh05
exodus = false
csv = true
execute_on = timestep_end
[]
modules/porous_flow/test/tests/dirackernels/bh02.i
# fully-saturated
# production
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[../]
[]
[UserObjects]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
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-12 0 0 0 1E-12 0 0 0 1E-12'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
# Because the Variable for this Sink is pp, and pp is associated
# with the fluid-mass conservation equation, this sink is extracting
# fluid mass (and not heat energy or something else)
variable = pp
# The following specfies that the total fluid mass coming out of
# the porespace via this sink in this timestep should be recorded
# in the pls_total_outflow_mass UserObject
SumQuantityUO = borehole_total_outflow_mass
# The following file defines the polyline geometry
# which is just two points in this particular example
point_file = bh02.bh
# First, we want Peacemans f to be a function of porepressure (and not
# temperature or something else). So bottom_p_or_t is actually porepressure
function_of = pressure
fluid_phase = 0
# The bottomhole pressure
bottom_p_or_t = 0
# In this example there is no increase of the wellbore pressure
# due to gravity:
unit_weight = '0 0 0'
# PeacemanBoreholes should almost always have use_mobility = true
use_mobility = true
# This is a production wellbore (a sink of fluid that removes fluid from porespace)
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
[Outputs]
file_base = bh02
exodus = false
csv = true
execute_on = timestep_end
[]
modules/porous_flow/test/tests/dirackernels/bh_except02.i
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = TimeDerivative
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
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-12 0 0 0 1E-12 0 0 0 1E-12'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
mass_fraction_component = 1
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
modules/porous_flow/test/tests/dirackernels/bh_except15.i
# fully-saturated
# production
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
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
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
modules/porous_flow/test/tests/dirackernels/bh_except13.i
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = TimeDerivative
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
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
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = coincident_points.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
modules/porous_flow/test/tests/dirackernels/bh_except07.i
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = TimeDerivative
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
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-12 0 0 0 1E-12 0 0 0 1E-12'
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
use_mobility = true
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
modules/porous_flow/test/tests/dirackernels/bh_except06.i
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = TimeDerivative
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
use_mobility = true
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
modules/porous_flow/test/tests/dirackernels/bh_except08.i
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = TimeDerivative
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
[../]
[./porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
at_nodes = false # Needed to force expected error
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
use_mobility = true
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
modules/porous_flow/test/tests/dirackernels/bh_except05.i
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = TimeDerivative
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
[../]
[./ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[../]
[./porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
mass_fraction_component = 0
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
modules/porous_flow/test/tests/dirackernels/bh07.i
# Comparison with analytical solution for cylindrically-symmetric situation
[Mesh]
type = FileMesh
file = bh07_input.e
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1000 10000'
x = '100 1000'
[../]
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[../]
[./fflux]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
gravity = '0 0 0'
[../]
[]
[BCs]
[./fix_outer]
type = DirichletBC
boundary = perimeter
variable = pp
value = 1E7
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-5
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
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-11 0 0 0 1E-11 0 0 0 1E-11'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityFLAC
m = 2
phase = 0
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
variable = pp
SumQuantityUO = borehole_total_outflow_mass
point_file = bh07.bh
fluid_phase = 0
bottom_p_or_t = 0
unit_weight = '0 0 0'
use_mobility = true
re_constant = 0.1594 # use Chen and Zhang version
character = 2 # double the strength because bh07.bh only fills half the mesh
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
execute_on = 'initial timestep_end'
[../]
[./fluid_mass]
type = PorousFlowFluidMass
execute_on = 'initial timestep_end'
[../]
[]
[VectorPostprocessors]
[./pp]
type = LineValueSampler
variable = pp
start_point = '0 0 0'
end_point = '300 0 0'
sort_by = x
num_points = 300
execute_on = timestep_end
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 1E3
solve_type = NEWTON
[./TimeStepper]
# get only marginally better results for smaller time steps
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = bh07
[./along_line]
type = CSV
execute_on = final
[../]
[./exodus]
type = Exodus
execute_on = 'initial final'
[../]
[]
modules/porous_flow/test/tests/dirackernels/bh_except11.i
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = TimeDerivative
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
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
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
use_relative_permeability = true
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
modules/porous_flow/test/tests/dirackernels/bh03.i
# fully-saturated
# injection
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 0
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
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-12 0 0 0 1E-12 0 0 0 1E-12'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
variable = pp
SumQuantityUO = borehole_total_outflow_mass
point_file = bh03.bh
function_of = pressure
fluid_phase = 0
bottom_p_or_t = 1E7
unit_weight = '0 0 0'
use_mobility = true
character = -1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
[Outputs]
file_base = bh03
exodus = false
csv = true
execute_on = timestep_end
[]
modules/porous_flow/test/tests/dirackernels/bh_except10.i
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = TimeDerivative
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
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
compute_internal_energy = false
[../]
[./porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
use_mobility = true
use_internal_energy = true
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
modules/porous_flow/test/tests/dirackernels/bh_except04.i
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = TimeDerivative
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
at_nodes = true # Needed to force exepected error
[../]
[./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-12 0 0 0 1E-12 0 0 0 1E-12'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
function_of = temperature
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
modules/porous_flow/test/tests/dirackernels/bh_except09.i
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = TimeDerivative
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
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
compute_enthalpy = false
[../]
[./porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[../]
[./relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
use_mobility = true
use_enthalpy = true
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
modules/porous_flow/test/tests/jacobian/line_sink01.i
# PorousFlowPeacemanBorehole with 2-phase, 3-components, with enthalpy, internal_energy, and thermal_conductivity
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./ppwater]
[../]
[./ppgas]
[../]
[./massfrac_ph0_sp0]
[../]
[./massfrac_ph0_sp1]
[../]
[./massfrac_ph1_sp0]
[../]
[./massfrac_ph1_sp1]
[../]
[./temp]
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp ppwater ppgas massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
number_fluid_phases = 2
number_fluid_components = 3
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[../]
[./dummy_outflow0]
type = PorousFlowSumQuantity
[../]
[./dummy_outflow1]
type = PorousFlowSumQuantity
[../]
[./dummy_outflow2]
type = PorousFlowSumQuantity
[../]
[./dummy_outflow3]
type = PorousFlowSumQuantity
[../]
[./dummy_outflow4]
type = PorousFlowSumQuantity
[../]
[./dummy_outflow5]
type = PorousFlowSumQuantity
[../]
[./dummy_outflow6]
type = PorousFlowSumQuantity
[../]
[./dummy_outflow7]
type = PorousFlowSumQuantity
[../]
[]
[ICs]
[./temp]
type = RandomIC
variable = temp
min = 1
max = 2
[../]
[./ppwater]
type = RandomIC
variable = ppwater
min = -1
max = 0
[../]
[./ppgas]
type = RandomIC
variable = ppgas
min = 0
max = 1
[../]
[./massfrac_ph0_sp0]
type = RandomIC
variable = massfrac_ph0_sp0
min = 0
max = 1
[../]
[./massfrac_ph0_sp1]
type = RandomIC
variable = massfrac_ph0_sp1
min = 0
max = 1
[../]
[./massfrac_ph1_sp0]
type = RandomIC
variable = massfrac_ph1_sp0
min = 0
max = 1
[../]
[./massfrac_ph1_sp1]
type = RandomIC
variable = massfrac_ph1_sp1
min = 0
max = 1
[../]
[]
[Kernels]
[./dummy_temp]
type = TimeDerivative
variable = temp
[../]
[./dummy_ppwater]
type = TimeDerivative
variable = ppwater
[../]
[./dummy_ppgas]
type = TimeDerivative
variable = ppgas
[../]
[./dummy_m00]
type = TimeDerivative
variable = massfrac_ph0_sp0
[../]
[./dummy_m01]
type = TimeDerivative
variable = massfrac_ph0_sp1
[../]
[./dummy_m10]
type = TimeDerivative
variable = massfrac_ph1_sp0
[../]
[./dummy_m11]
type = TimeDerivative
variable = massfrac_ph1_sp1
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
cv = 1.1
[../]
[./simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1.4
cv = 1.8
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
temperature = temp
[../]
[./ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph0_sp1 massfrac_ph1_sp0 massfrac_ph1_sp1'
[../]
[./simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[../]
[./simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[../]
[./relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[./relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[../]
[./thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0.1 0.02 0.03 0.02 0.0 0.01 0.03 0.01 0.3'
[../]
[]
[DiracKernels]
[./dirac0]
type = PorousFlowPeacemanBorehole
fluid_phase = 0
variable = ppwater
point_file = one_point.bh
line_length = 1
SumQuantityUO = dummy_outflow0
character = 1
bottom_p_or_t = -10
unit_weight = '1 2 3'
re_constant = 0.123
[../]
[./dirac1]
type = PorousFlowPeacemanBorehole
fluid_phase = 1
variable = ppgas
line_length = 1
line_direction = '-1 -1 -1'
use_relative_permeability = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow1
character = -0.5
bottom_p_or_t = 10
unit_weight = '1 2 -3'
re_constant = 0.3
[../]
[./dirac2]
type = PorousFlowPeacemanBorehole
fluid_phase = 0
variable = massfrac_ph0_sp0
line_length = 1.3
line_direction = '1 0 1'
use_mobility = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow2
character = 0.6
bottom_p_or_t = -4
unit_weight = '-1 -2 -3'
re_constant = 0.4
[../]
[./dirac3]
type = PorousFlowPeacemanBorehole
fluid_phase = 0
variable = massfrac_ph0_sp1
line_length = 1.3
line_direction = '1 1 1'
use_enthalpy = true
mass_fraction_component = 0
point_file = one_point.bh
SumQuantityUO = dummy_outflow3
character = -1
bottom_p_or_t = 3
unit_weight = '0.1 0.2 0.3'
re_constant = 0.5
[../]
[./dirac4]
type = PorousFlowPeacemanBorehole
fluid_phase = 1
variable = massfrac_ph1_sp0
function_of = temperature
line_length = 0.9
line_direction = '1 1 1'
mass_fraction_component = 1
use_internal_energy = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow4
character = 1.1
bottom_p_or_t = -7
unit_weight = '-1 2 3'
re_constant = 0.6
[../]
[./dirac5]
type = PorousFlowPeacemanBorehole
fluid_phase = 1
variable = temp
line_length = 0.9
function_of = temperature
line_direction = '1 2 3'
mass_fraction_component = 2
use_internal_energy = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow5
character = 0.9
bottom_p_or_t = -8
unit_weight = '1 2 1'
re_constant = 0.7
[../]
[./dirac6]
type = PorousFlowPeacemanBorehole
fluid_phase = 0
variable = ppwater
point_file = one_point.bh
SumQuantityUO = dummy_outflow6
character = 0
bottom_p_or_t = 10
unit_weight = '0.0 0.0 0.0'
[../]
[./dirac7]
type = PorousFlowPeacemanBorehole
fluid_phase = 1
variable = massfrac_ph0_sp0
use_mobility = true
mass_fraction_component = 1
use_relative_permeability = true
use_internal_energy = true
point_file = one_point.bh
SumQuantityUO = dummy_outflow7
character = -1
bottom_p_or_t = 10
unit_weight = '0.1 0.2 0.3'
[../]
[]
[Preconditioning]
[./check]
type = SMP
full = true
#petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
file_base = line_sink01
[]
modules/porous_flow/test/tests/dirackernels/injection_production.i
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 1
xmin = -50
xmax = 50
ymin = -50
ymax = 50
zmin = 0
zmax = 10
[]
[./central_nodes]
input = gen
type = ExtraNodesetGenerator
new_boundary = central_nodes
coord = '0 0 0 0 0 10'
[../]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./porepressure]
initial_condition = 20E6
[../]
[./temperature]
initial_condition = 400
scaling = 1E-6 # fluid enthalpy is roughly 1E6
[../]
[]
[BCs]
[./injection_temperature]
type = DirichletBC
variable = temperature
value = 300
boundary = central_nodes
[../]
[]
[DiracKernels]
[./fluid_injection]
type = PorousFlowPeacemanBorehole
variable = porepressure
SumQuantityUO = injected_mass
point_file = injection.bh
function_of = pressure
fluid_phase = 0
bottom_p_or_t = 21E6
unit_weight = '0 0 0'
use_mobility = true
character = -1
[../]
[./fluid_production]
type = PorousFlowPeacemanBorehole
variable = porepressure
SumQuantityUO = produced_mass
point_file = production.bh
function_of = pressure
fluid_phase = 0
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[../]
[./remove_heat_at_production_well]
type = PorousFlowPeacemanBorehole
variable = temperature
SumQuantityUO = produced_heat
point_file = production.bh
function_of = pressure
fluid_phase = 0
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
use_enthalpy = true
character = 1
[../]
[]
[UserObjects]
[./injected_mass]
type = PorousFlowSumQuantity
[../]
[./produced_mass]
type = PorousFlowSumQuantity
[../]
[./produced_heat]
type = PorousFlowSumQuantity
[../]
[]
[Postprocessors]
[./heat_joules_extracted_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_heat
[../]
[]
[Modules]
[./FluidProperties]
[./the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 2E-4
bulk_modulus = 2E9
viscosity = 1E-3
density0 = 1000
cv = 4000.0
cp = 4000.0
[../]
[../]
[]
[PorousFlowUnsaturated]
porepressure = porepressure
temperature = temperature
coupling_type = ThermoHydro
gravity = '0 0 0'
fp = the_simple_fluid
[]
[Materials]
[./porosity]
type = PorousFlowPorosityConst # only the initial value of this is ever used
porosity = 0.1
[../]
[./biot_modulus]
type = PorousFlowConstantBiotModulus
solid_bulk_compliance = 1E-10
fluid_bulk_modulus = 2E9
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[../]
[./thermal_expansion]
type = PorousFlowConstantThermalExpansionCoefficient
fluid_coefficient = 5E-6
drained_coefficient = 2E-4
[../]
[./thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '1 0 0 0 1 0 0 0 1'
[../]
[./rock_heat]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[../]
[]
[Preconditioning]
active = basic
[./basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[../]
[./preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 2E6
dt = 2E5
[]
[Outputs]
exodus = true
[]
modules/porous_flow/test/tests/dirackernels/bh_except12.i
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pp]
initial_condition = 1E7
[../]
[]
[Kernels]
[./mass0]
type = TimeDerivative
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
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
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = does_not_exist
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]