- fpThe name of the user object for the fluid
C++ Type:UserObjectName
Description:The name of the user object for the fluid
- porepressureFluid porepressure
C++ Type:std::vector
Description:Fluid porepressure
- propertyThe fluid property that this initial condition is to calculate
C++ Type:MooseEnum
Description:The fluid property that this initial condition is to calculate
- temperatureFluid temperature
C++ Type:std::vector
Description:Fluid temperature
- variableThe variable this initial condition is supposed to provide values for.
C++ Type:VariableName
Description:The variable this initial condition is supposed to provide values for.
PorousFlowFluidPropertyIC
An initial condition to calculate one fluid property (such as enthalpy) from pressure and temperature
This initial condition provides a straightforward way to specify an initial value for a fluid property using pressure and temperature as the inputs.
A valid Fluid Properties UserObject is required.
The FluidProperties UserObject expects temperature in Kelvin. If the simulation uses temperature in Celsius, temperature_units = celsius
must be used.
Input Parameters
- blockThe list of block ids (SubdomainID) that this object will be applied
C++ Type:std::vector
Options:
Description:The list of block ids (SubdomainID) that this object will be applied
- boundaryThe list of boundary IDs from the mesh where this boundary condition applies
C++ Type:std::vector
Options:
Description:The list of boundary IDs from the mesh where this boundary condition applies
- temperature_unitKelvinThe unit of the temperature variable
Default:Kelvin
C++ Type:MooseEnum
Options:Kelvin Celsius
Description:The unit of the temperature variable
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector
Options:
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Options:
Description:Set the enabled status of the MooseObject.
- ignore_uo_dependencyFalseWhen set to true, a UserObject retrieved by this IC will not be executed before the this IC
Default:False
C++ Type:bool
Options:
Description:When set to true, a UserObject retrieved by this IC will not be executed before the this IC
Advanced Parameters
Input Files
- modules/porous_flow/test/tests/ics/fluidpropic.i
- modules/porous_flow/test/tests/fluidstate/coldwater_injection_radial.i
- modules/porous_flow/test/tests/ics/fluidpropic_celsius.i
- modules/porous_flow/test/tests/fluidstate/water_vapor_phasechange.i
- modules/porous_flow/test/tests/fluidstate/coldwater_injection.i
modules/porous_flow/test/tests/ics/fluidpropic.i
# Test the correct calculation of fluid properties using PorousFlowFluidPropertyIC
#
# Variables:
# Pressure: 1 MPa
# Temperature: 323.15 K
#
# Fluid properties for water (reference values from NIST webbook)
# Density: 988.43 kg/m^3
# Enthalpy: 210.19 kJ/kg
# Internal energy: 2019.18 kJ/kg
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./pressure]
initial_condition = 1e6
[../]
[./temperature]
initial_condition = 323.15
[../]
[]
[AuxVariables]
[./enthalpy]
[../]
[./internal_energy]
[../]
[./density]
[../]
[]
[ICs]
[./enthalpy]
type = PorousFlowFluidPropertyIC
variable = enthalpy
property = enthalpy
porepressure = pressure
temperature = temperature
fp = water
[../]
[./internal_energy]
type = PorousFlowFluidPropertyIC
variable = internal_energy
property = internal_energy
porepressure = pressure
temperature = temperature
fp = water
[../]
[./density]
type = PorousFlowFluidPropertyIC
variable = density
property = density
porepressure = pressure
temperature = temperature
fp = water
[../]
[]
[Modules]
[./FluidProperties]
[./water]
type = Water97FluidProperties
[../]
[../]
[]
[Kernels]
[./pressure]
type = Diffusion
variable = pressure
[../]
[./temperature]
type = Diffusion
variable = temperature
[../]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-12
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./enthalpy]
type = ElementAverageValue
variable = enthalpy
execute_on = 'initial timestep_end'
[../]
[./internal_energy]
type = ElementAverageValue
variable = internal_energy
execute_on = 'initial timestep_end'
[../]
[./density]
type = ElementAverageValue
variable = density
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
execute_on = initial
[]
modules/porous_flow/test/tests/fluidstate/coldwater_injection_radial.i
# Cold water injection into 1D radial hot reservoir (Avdonin, 1964)
#
# To generate results presented in documentation for this problem,
# set xmax = 1000 and nx = 200 in the Mesh block, and dtmax = 1e4
# and end_time = 1e6 in the Executioner block.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 50
xmin = 0.1
xmax = 5
bias_x = 1.05
[]
[Problem]
rz_coord_axis = Y
coord_type = RZ
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[AuxVariables]
[./temperature]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./temperature]
type = PorousFlowPropertyAux
variable = temperature
property = temperature
execute_on = 'initial timestep_end'
[../]
[]
[Variables]
[./pliquid]
initial_condition = 5e6
[../]
[./h]
scaling = 1e-6
[../]
[]
[ICs]
[./hic]
type = PorousFlowFluidPropertyIC
variable = h
porepressure = pliquid
property = enthalpy
temperature = 170
temperature_unit = Celsius
fp = water
[../]
[]
[Functions]
[./injection_rate]
type = ParsedFunction
vals = injection_area
vars = area
value = '-0.1/area'
[../]
[]
[BCs]
[./source]
type = PorousFlowSink
variable = pliquid
flux_function = injection_rate
boundary = left
[../]
[./pright]
type = DirichletBC
variable = pliquid
value = 5e6
boundary = right
[../]
[./hleft]
type = DirichletBC
variable = h
value = 678.52e3
boundary = left
[../]
[./hright]
type = DirichletBC
variable = h
value = 721.4e3
boundary = right
[../]
[]
[Kernels]
[./mass]
type = PorousFlowMassTimeDerivative
variable = pliquid
[../]
[./massflux]
type = PorousFlowAdvectiveFlux
variable = pliquid
[../]
[./heat]
type = PorousFlowEnergyTimeDerivative
variable = h
[../]
[./heatflux]
type = PorousFlowHeatAdvection
variable = h
[../]
[./heatcond]
type = PorousFlowHeatConduction
variable = h
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pliquid h'
number_fluid_phases = 2
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
pc_max = 1e6
sat_lr = 0.1
m = 0.5
alpha = 1e-5
[../]
[./fs]
type = PorousFlowWaterVapor
water_fp = water
capillary_pressure = pc
[../]
[]
[Modules]
[./FluidProperties]
[./water]
type = Water97FluidProperties
[../]
[../]
[]
[Materials]
[./watervapor]
type = PorousFlowFluidStateSingleComponent
porepressure = pliquid
enthalpy = h
temperature_unit = Celsius
capillary_pressure = pc
fluid_state = fs
[../]
[./porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1.8e-11 0 0 0 1.8e-11 0 0 0 1.8e-11'
[../]
[./relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
s_res = 0.1
sum_s_res = 0.1
[../]
[./relperm_gas]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 1
sum_s_res = 0.1
[../]
[./internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2900
specific_heat_capacity = 740
[../]
[./rock_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '20 0 0 0 20 0 0 0 20'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1e3
nl_abs_tol = 1e-8
[./TimeStepper]
type = IterationAdaptiveDT
dt = 100
[../]
[]
[Postprocessors]
[./injection_area]
type = AreaPostprocessor
boundary = left
execute_on = initial
[../]
[]
[VectorPostprocessors]
[./line]
type = ElementValueSampler
sort_by = x
variable = temperature
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
perf_graph = true
[./csv]
type = CSV
execute_on = final
[../]
[]
modules/porous_flow/test/tests/ics/fluidpropic_celsius.i
# Test the correct calculation of fluid properties using PorousFlwoFluidPropertyIC
# when temperature is given in Celsius
#
# Variables:
# Pressure: 1 MPa
# Temperature: 50 C
#
# Fluid properties for water (reference values from NIST webbook)
# Density: 988.43 kg/m^3
# Enthalpy: 210.19 kJ/kg
# Internal energy: 2019.18 kJ/kg
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./pressure]
initial_condition = 1e6
[../]
[./temperature]
initial_condition = 50
[../]
[]
[AuxVariables]
[./enthalpy]
[../]
[./internal_energy]
[../]
[./density]
[../]
[]
[ICs]
[./enthalpy]
type = PorousFlowFluidPropertyIC
variable = enthalpy
property = enthalpy
porepressure = pressure
temperature = temperature
temperature_unit = Celsius
fp = water
[../]
[./internal_energy]
type = PorousFlowFluidPropertyIC
variable = internal_energy
property = internal_energy
porepressure = pressure
temperature = temperature
temperature_unit = Celsius
fp = water
[../]
[./density]
type = PorousFlowFluidPropertyIC
variable = density
property = density
porepressure = pressure
temperature = temperature
temperature_unit = Celsius
fp = water
[../]
[]
[Modules]
[./FluidProperties]
[./water]
type = Water97FluidProperties
[../]
[../]
[]
[Kernels]
[./pressure]
type = Diffusion
variable = pressure
[../]
[./temperature]
type = Diffusion
variable = temperature
[../]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-12
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./enthalpy]
type = ElementAverageValue
variable = enthalpy
execute_on = 'initial timestep_end'
[../]
[./internal_energy]
type = ElementAverageValue
variable = internal_energy
execute_on = 'initial timestep_end'
[../]
[./density]
type = ElementAverageValue
variable = density
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
file_base = fluidpropic_out
execute_on = initial
[]
modules/porous_flow/test/tests/fluidstate/water_vapor_phasechange.i
# Tests correct calculation of properties in PorousFlowWaterVapor as a phase change
# from liquid to a two-phase model occurs due to a pressure drop.
# A single 10 m^3 element is used, with constant mass and heat production using
# a Dirac kernel. Initial conditions correspond to just outside the two-phase region in
# the liquid state.
#
# An identical problem can be run using TOUGH2, with the following outputs after 1,000s
# Pressure: 8.58 Mpa
# Temperature: 299.92 K
# Vapor saturation: 0.00637
[Mesh]
type = GeneratedMesh
dim = 3
xmax = 10
ymax = 10
zmax = 10
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[./pliq]
initial_condition = 9e6
[../]
[./h]
scaling = 1e-3
[../]
[]
[ICs]
[./hic]
type = PorousFlowFluidPropertyIC
variable = h
porepressure = pliq
property = enthalpy
temperature = 300
temperature_unit = Celsius
fp = water
[../]
[]
[DiracKernels]
[./mass]
type = ConstantPointSource
point = '5 5 5'
variable = pliq
value = -1
[../]
[./heat]
type = ConstantPointSource
point = '5 5 5'
variable = h
value = -1.344269e6
[../]
[]
[AuxVariables]
[./pressure_gas]
order = CONSTANT
family = MONOMIAL
[../]
[./pressure_water]
order = CONSTANT
family = MONOMIAL
[../]
[./enthalpy_gas]
order = CONSTANT
family = MONOMIAL
[../]
[./enthalpy_water]
order = CONSTANT
family = MONOMIAL
[../]
[./saturation_gas]
order = CONSTANT
family = MONOMIAL
[../]
[./saturation_water]
order = CONSTANT
family = MONOMIAL
[../]
[./density_water]
order = CONSTANT
family = MONOMIAL
[../]
[./density_gas]
order = CONSTANT
family = MONOMIAL
[../]
[./viscosity_water]
order = CONSTANT
family = MONOMIAL
[../]
[./viscosity_gas]
order = CONSTANT
family = MONOMIAL
[../]
[./temperature]
order = CONSTANT
family = MONOMIAL
[../]
[./e_gas]
order = CONSTANT
family = MONOMIAL
[../]
[./e_water]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./enthalpy_water]
type = PorousFlowPropertyAux
variable = enthalpy_water
property = enthalpy
phase = 0
execute_on = 'initial timestep_end'
[../]
[./enthalpy_gas]
type = PorousFlowPropertyAux
variable = enthalpy_gas
property = enthalpy
phase = 1
execute_on = 'initial timestep_end'
[../]
[./pressure_water]
type = PorousFlowPropertyAux
variable = pressure_water
property = pressure
phase = 0
execute_on = 'initial timestep_end'
[../]
[./pressure_gas]
type = PorousFlowPropertyAux
variable = pressure_gas
property = pressure
phase = 1
execute_on = 'initial timestep_end'
[../]
[./saturation_water]
type = PorousFlowPropertyAux
variable = saturation_water
property = saturation
phase = 0
execute_on = 'initial timestep_end'
[../]
[./saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = 'initial timestep_end'
[../]
[./density_water]
type = PorousFlowPropertyAux
variable = density_water
property = density
phase = 0
execute_on = 'initial timestep_end'
[../]
[./density_gas]
type = PorousFlowPropertyAux
variable = density_gas
property = density
phase = 1
execute_on = 'initial timestep_end'
[../]
[./viscosity_water]
type = PorousFlowPropertyAux
variable = viscosity_water
property = viscosity
phase = 0
execute_on = 'initial timestep_end'
[../]
[./viscosity_gas]
type = PorousFlowPropertyAux
variable = viscosity_gas
property = viscosity
phase = 1
execute_on = 'initial timestep_end'
[../]
[./temperature]
type = PorousFlowPropertyAux
variable = temperature
property = temperature
execute_on = 'initial timestep_end'
[../]
[./e_water]
type = PorousFlowPropertyAux
variable = e_water
property = internal_energy
phase = 0
execute_on = 'initial timestep_end'
[../]
[./egas]
type = PorousFlowPropertyAux
variable = e_gas
property = internal_energy
phase = 1
execute_on = 'initial timestep_end'
[../]
[]
[Kernels]
[./mass]
type = PorousFlowMassTimeDerivative
variable = pliq
[../]
[./heat]
type = PorousFlowEnergyTimeDerivative
variable = h
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pliq h'
number_fluid_phases = 2
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureBC
pe = 1e5
lambda = 2
pc_max = 1e6
[../]
[./fs]
type = PorousFlowWaterVapor
water_fp = water
capillary_pressure = pc
[../]
[]
[Modules]
[./FluidProperties]
[./water]
type = Water97FluidProperties
[../]
[../]
[]
[Materials]
[./watervapor]
type = PorousFlowFluidStateSingleComponent
porepressure = pliq
enthalpy = h
temperature_unit = Celsius
capillary_pressure = pc
fluid_state = fs
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-14 0 0 0 1e-14 0 0 0 1e-14'
[../]
[./relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[../]
[./relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[../]
[./porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[../]
[./internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2650
specific_heat_capacity = 1000
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1e3
nl_abs_tol = 1e-12
[./TimeStepper]
type = IterationAdaptiveDT
dt = 10
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./density_water]
type = ElementAverageValue
variable = density_water
execute_on = 'initial timestep_end'
[../]
[./density_gas]
type = ElementAverageValue
variable = density_gas
execute_on = 'initial timestep_end'
[../]
[./viscosity_water]
type = ElementAverageValue
variable = viscosity_water
execute_on = 'initial timestep_end'
[../]
[./viscosity_gas]
type = ElementAverageValue
variable = viscosity_gas
execute_on = 'initial timestep_end'
[../]
[./enthalpy_water]
type = ElementAverageValue
variable = enthalpy_water
execute_on = 'initial timestep_end'
[../]
[./enthalpy_gas]
type = ElementAverageValue
variable = enthalpy_gas
execute_on = 'initial timestep_end'
[../]
[./sg]
type = ElementAverageValue
variable = saturation_gas
execute_on = 'initial timestep_end'
[../]
[./sw]
type = ElementAverageValue
variable = saturation_water
execute_on = 'initial timestep_end'
[../]
[./pwater]
type = ElementAverageValue
variable = pressure_water
execute_on = 'initial timestep_end'
[../]
[./pgas]
type = ElementAverageValue
variable = pressure_gas
execute_on = 'initial timestep_end'
[../]
[./temperature]
type = ElementAverageValue
variable = temperature
execute_on = 'initial timestep_end'
[../]
[./enthalpy]
type = ElementAverageValue
variable = h
execute_on = 'initial timestep_end'
[../]
[./pliq]
type = ElementAverageValue
variable = pliq
execute_on = 'initial timestep_end'
[../]
[./liquid_mass]
type = PorousFlowFluidMass
phase = 0
execute_on = 'initial timestep_end'
[../]
[./vapor_mass]
type = PorousFlowFluidMass
phase = 1
execute_on = 'initial timestep_end'
[../]
[./liquid_heat]
type = PorousFlowHeatEnergy
phase = 0
execute_on = 'initial timestep_end'
[../]
[./vapor_heat]
type = PorousFlowHeatEnergy
phase = 1
execute_on = 'initial timestep_end'
[../]
[./e_water]
type = ElementAverageValue
variable = e_water
execute_on = 'initial timestep_end'
[../]
[./e_gas]
type = ElementAverageValue
variable = e_gas
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
perf_graph = false
[]
modules/porous_flow/test/tests/fluidstate/coldwater_injection.i
# Cold water injection into 1D hot reservoir (Avdonin, 1964)
#
# To generate results presented in documentation for this problem,
# set xmax = 50 and nx = 250 in the Mesh block, and dtmax = 100 and
# end_time = 1.3e5 in the Executioner block.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 25
xmax = 20
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[AuxVariables]
[./temperature]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./temperature]
type = PorousFlowPropertyAux
variable = temperature
property = temperature
execute_on = 'initial timestep_end'
[../]
[]
[Variables]
[./pliquid]
initial_condition = 5e6
[../]
[./h]
scaling = 1e-6
[../]
[]
[ICs]
[./hic]
type = PorousFlowFluidPropertyIC
variable = h
porepressure = pliquid
property = enthalpy
temperature = 170
temperature_unit = Celsius
fp = water
[../]
[]
[BCs]
[./pleft]
type = DirichletBC
variable = pliquid
value = 5.05e6
boundary = left
[../]
[./pright]
type = DirichletBC
variable = pliquid
value = 5e6
boundary = right
[../]
[./hleft]
type = DirichletBC
variable = h
value = 678.52e3
boundary = left
[../]
[./hright]
type = DirichletBC
variable = h
value = 721.4e3
boundary = right
[../]
[]
[Kernels]
[./mass]
type = PorousFlowMassTimeDerivative
variable = pliquid
[../]
[./massflux]
type = PorousFlowAdvectiveFlux
variable = pliquid
[../]
[./heat]
type = PorousFlowEnergyTimeDerivative
variable = h
[../]
[./heatflux]
type = PorousFlowHeatAdvection
variable = h
[../]
[./heatcond]
type = PorousFlowHeatConduction
variable = h
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pliquid h'
number_fluid_phases = 2
number_fluid_components = 1
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
pc_max = 1e6
sat_lr = 0.1
m = 0.5
alpha = 1e-5
[../]
[./fs]
type = PorousFlowWaterVapor
water_fp = water
capillary_pressure = pc
[../]
[]
[Modules]
[./FluidProperties]
[./water]
type = Water97FluidProperties
[../]
[../]
[]
[Materials]
[./watervapor]
type = PorousFlowFluidStateSingleComponent
porepressure = pliquid
enthalpy = h
temperature_unit = Celsius
capillary_pressure = pc
fluid_state = fs
[../]
[./porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1.8e-11 0 0 0 1.8e-11 0 0 0 1.8e-11'
[../]
[./relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
s_res = 0.1
sum_s_res = 0.1
[../]
[./relperm_gas]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 1
sum_s_res = 0.1
[../]
[./internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2900
specific_heat_capacity = 740
[../]
[./rock_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '20 0 0 0 20 0 0 0 20'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 5e3
nl_abs_tol = 1e-10
[./TimeStepper]
type = IterationAdaptiveDT
dt = 100
[../]
[]
[VectorPostprocessors]
[./line]
type = ElementValueSampler
sort_by = x
variable = temperature
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
perf_graph = true
[./csv]
type = CSV
execute_on = final
[../]
[]