Water-steam equation of state

A single component two-phase model suitable for non-isothermal water-steam transport is available in PorousFlow based on the persistent variable approach.

The primary variables for this model are porepressure of the liquid phase and enthalpy, as they form a complete set of persistent variables. Temperature and vapor saturation are then calculated using these primary variables.

commentnote

This fluid state model must be run in a non-isothermal setting. If an isothermal model of water flow is required, just use one of the single phase models instead.

The temperature as a function of water porepressure and enthalpy is shown in Figure 1 for the entire range of pressure and temperature that this equation of state is valid for. In the two-phase region (inside the phase envelope shown in Figure 1), the water temperature is constant for a given pressure along the saturation curve as the phase transitions from a liquid (the region outside and to the left of the phase envelope) to a vapor (the region outside and to the right of the phase envelope). It is for this reason that pressure and temperature cannot be used as the primary variables, as they are not independent in this two-phase region.

Figure 1: Temperature of water as a function of porepressure and enthalpy. Phase envelope shown as solid line. (a) Full parameter space; (b) Vicinity of two-phase region. Isotherms shown as dashed lines.

The left-hand side of the phase envelope corresponds to a fully saturated liquid phase, while the right-hand side corresponds to a fully saturated vapor phase. In between, both liquid and vapor phases coexist, with the composition described by the vapor quality

(1)

where and are the mass in the vapor and liquid phase, respectively. A fully saturated liquid phase therefore has a quality of 0 and a fully saturated vapor has a quality of 1.

Alternatively, vapor quality can be expressed in terms of enthalpy for a single-component system (e.g. water and water vapor)

(2)

where is the total enthalpy, and and are the enthalpies for fully saturated vapor and liquid phases, respectively. The quantity is the enthalpy of vaporization, and corresponds to the enthalpy difference along an isotherm in the two-phase region (the enthalpies on the phase envelope at a given pressure).

The mass of phase is defined as where is the porosity of the porous media, is the saturation of phase and its density. Using this definition and Eq. (2), the saturation of the vapor phase in the two-phase region can be calculated as

(3)

Thermophysical properties

In the single phase liquid or vapor regions, all water properties are calculated by first calculating temperature given porepressure and enthalpy (except for enthalpy, of course, which is a nonlinear variable in this case).

In the two-phase region, the properties of the liquid and vapor are calculated at the saturation temperature and pressure, with enthalpy given by the fully-saturated state for either vapor or liquid.

Implementation

Variables

This class requires pressure of the liquid phase and enthalpy as primary variables.

[Variables<<<{"href": "../../syntax/Variables/index.html"}>>>]
  [pliq]
    initial_condition<<<{"description": "Specifies a constant initial condition for this variable"}>>> = 1e6
  []
  [h]
    initial_condition<<<{"description": "Specifies a constant initial condition for this variable"}>>> = 8e5
    scaling<<<{"description": "Specifies a scaling factor to apply to this variable"}>>> = 1e-3
  []
[]
(modules/porous_flow/test/tests/fluidstate/water_vapor.i)
commentnote

These variables must be listed as PorousFlow variables in the PorousFlowDictator UserObject

In the simplest case, the number of fluid components should be set to one, and the number of phases set to two in the PorousFlowDictator.

[UserObjects<<<{"href": "../../syntax/UserObjects/index.html"}>>>]
  [dictator]
    type = PorousFlowDictator<<<{"description": "Holds information on the PorousFlow variable names", "href": "../../source/userobjects/PorousFlowDictator.html"}>>>
    porous_flow_vars<<<{"description": "List of primary variables that are used in the PorousFlow simulation.  Jacobian entries involving derivatives wrt these variables will be computed.  In single-phase models you will just have one (eg 'pressure'), in two-phase models you will have two (eg 'p_water p_gas', or 'p_water s_water'), etc."}>>> = 'pliq h'
    number_fluid_phases<<<{"description": "The number of fluid phases in the simulation"}>>> = 2
    number_fluid_components<<<{"description": "The number of fluid components in the simulation"}>>> = 1
  []
[]
(modules/porous_flow/test/tests/fluidstate/water_vapor.i)

It can be beneficial to scale the residual contribution for each variable to assist nonlinear convergence. Following the discussion about convergence in the PorousFlow documentation, the residual contribution from the fluid heat equations is approximately 1,000 times larger than the residual contribution from the fluid mass equations.

UserObjects

This fluid state is implemented in the PorousFlowWaterVapor UserObject. This UserObject is a GeneralUserObject that contains methods that provide a complete thermophysical description of the model given pressure and enthalpy.

[UserObjects<<<{"href": "../../syntax/UserObjects/index.html"}>>>]
  [fs]
    type = PorousFlowWaterVapor<<<{"description": "Fluid state class for water and vapor", "href": "../../source/userobjects/PorousFlowWaterVapor.html"}>>>
    water_fp<<<{"description": "The name of the user object for water"}>>> = water
    capillary_pressure<<<{"description": "Name of the UserObject defining the capillary pressure"}>>> = pc
  []
[]
(modules/porous_flow/test/tests/fluidstate/water_vapor.i)

The water fluid formulation is set in the FluidProperties block

[FluidProperties<<<{"href": "../../syntax/FluidProperties/index.html"}>>>]
  [water]
    type = Water97FluidProperties<<<{"description": "Fluid properties for water and steam (H2O) using IAPWS-IF97", "href": "../../source/fluidproperties/Water97FluidProperties.html"}>>>
  []
[]
(modules/porous_flow/test/tests/fluidstate/water_vapor.i)

Materials

The PorousFlowFluidStateSingleComponent material provides all phase pressures, saturation, densities, viscosities etc using the formulation provided in the PorousFlowWaterVapor UserObject.

[Materials<<<{"href": "../../syntax/Materials/index.html"}>>>]
  [watervapor]
    type = PorousFlowFluidStateSingleComponent<<<{"description": "Class for single component multiphase fluid state calculations using pressure and enthalpy", "href": "../../source/materials/PorousFlowFluidStateSingleComponent.html"}>>>
    porepressure<<<{"description": "Variable that is the porepressure of the liquid phase"}>>> = pliq
    enthalpy<<<{"description": "Enthalpy of the fluid"}>>> = h
    temperature_unit<<<{"description": "The unit of the temperature variable"}>>> = Celsius
    capillary_pressure<<<{"description": "Name of the UserObject defining the capillary pressure"}>>> = pc
    fluid_state<<<{"description": "Name of the FluidState UserObject"}>>> = fs
  []
[]
(modules/porous_flow/test/tests/fluidstate/water_vapor.i)

Initial condition

An initial condition that makes it easy to set enthalpy for a specified pressure and temperature (which may be more suitable for the user) is provided in PorousFlowFluidPropertyIC.

[ICs<<<{"href": "../../syntax/ICs/index.html"}>>>]
  [enthalpy]
    type = PorousFlowFluidPropertyIC<<<{"description": "An initial condition to calculate one fluid property (such as enthalpy) from pressure and temperature", "href": "../../source/ics/PorousFlowFluidPropertyIC.html"}>>>
    variable<<<{"description": "The variable this initial condition is supposed to provide values for."}>>> = enthalpy
    property<<<{"description": "The fluid property that this initial condition is to calculate"}>>> = enthalpy
    porepressure<<<{"description": "Fluid porepressure"}>>> = pressure
    temperature<<<{"description": "Fluid temperature"}>>> = temperature
    fp<<<{"description": "The name of the user object for the fluid"}>>> = water
  []
  [internal_energy]
    type = PorousFlowFluidPropertyIC<<<{"description": "An initial condition to calculate one fluid property (such as enthalpy) from pressure and temperature", "href": "../../source/ics/PorousFlowFluidPropertyIC.html"}>>>
    variable<<<{"description": "The variable this initial condition is supposed to provide values for."}>>> = internal_energy
    property<<<{"description": "The fluid property that this initial condition is to calculate"}>>> = internal_energy
    porepressure<<<{"description": "Fluid porepressure"}>>> = pressure
    temperature<<<{"description": "Fluid temperature"}>>> = temperature
    fp<<<{"description": "The name of the user object for the fluid"}>>> = water
  []
  [density]
    type = PorousFlowFluidPropertyIC<<<{"description": "An initial condition to calculate one fluid property (such as enthalpy) from pressure and temperature", "href": "../../source/ics/PorousFlowFluidPropertyIC.html"}>>>
    variable<<<{"description": "The variable this initial condition is supposed to provide values for."}>>> = density
    property<<<{"description": "The fluid property that this initial condition is to calculate"}>>> = density
    porepressure<<<{"description": "Fluid porepressure"}>>> = pressure
    temperature<<<{"description": "Fluid temperature"}>>> = temperature
    fp<<<{"description": "The name of the user object for the fluid"}>>> = water
  []
[]
(modules/porous_flow/test/tests/ics/fluidpropic.i)