Span-Wager CO2

This implements the Span-Wagner equation of state for CO2 “Span-Wagner equation of state for CO2” Please see the general Helmholtz documentation for more information.

Example

The Heater unit model example, provides a simple example for using water properties.

from idaes.models.properties import swco2
from pyomo.environ import ConcreteModel, units as pyunits, SolverFactory # Pyomo environment
from idaes.models.unit_models import Compressor
from idaes.core import FlowsheetBlock

model = ConcreteModel()
model.fs = FlowsheetBlock(dynamic=False)
model.fs.properties = swco2.SWCO2ParameterBlock()
model.fs.unit = Compressor(property_package=model.fs.properties)
F = 1000
Tin = 500
Pin = 10000
Pout = 20000
hin = swco2.htpx(T=Tin*pyunits.K, P=Pin*pyunits.Pa)

model.fs.unit.inlet.flow_mol[0].fix(F)
model.fs.unit.inlet.enth_mol[0].fix(hin)
model.fs.unit.inlet.pressure[0].fix(Pin)
model.fs.unit.deltaP.fix(Pout - Pin)
model.fs.unit.efficiency_isentropic.fix(0.9)
model.fs.unit.initialize(optarg={'tol': 1e-6})

solver = SolverFactory("ipopt")
solver.solve(model)

For more information about how StateBlocks and PropertyParameterBlocks work see the StateBlock documentation.

Expressions

The Span-Wager property package contains the standard expressions described in the general Helmholtz documentation, but it also defines expressions for transport properties.

Expression

Description

therm_cond_phase[phase]

Thermal conductivity of phase (W/K/m)

visc_d_phase[phase]

Viscosity of phase (Pa/s)

visc_k_phase[phase]

Kinimatic viscosity of phase (m2/s)

Convenience Functions

idaes.models.properties.swco2.htpx(T=None, P=None, x=None)[source]

Convenience function to calculate enthalpy from temperature and either pressure or vapor fraction. This function can be used for inlet streams and initialization where temperature is known instead of enthalpy. User must provided values for two of T, P, or x.

Parameters
  • T – Temperature with units (between 200 and 3000 K)

  • P – Pressure with units (between 1 and 1e9 Pa), None if saturated vapor

  • x – Vapor fraction [mol vapor/mol total] (between 0 and 1), None if superheated or subcooled

Returns

Total molar enthalpy [J/mol].

SWCO2StateBlock Class

class idaes.models.properties.swco2.SWCO2StateBlock(*args, **kwds)
Parameters
  • rule (function) – A rule function or None. Default rule calls build().

  • concrete (bool) – If True, make this a toplevel model. Default - False.

  • ctype (class) – Pyomo ctype of the block. Default - pyomo.environ.Block

  • default (dict) –

    Default ProcessBlockData config

    Keys
    parameters

    A reference to an instance of the Property Parameter Block associated with this property package.

    defined_state

    Flag indicating whether the state should be considered fully defined, and thus whether constraints such as sum of mass/mole fractions should be included, default - False. Valid values: { True - state variables will be fully defined, False - state variables will not be fully defined.}

    has_phase_equilibrium

    Flag indicating whether phase equilibrium constraints should be constructed in this state block, default - True. Valid values: { True - StateBlock should calculate phase equilibrium, False - StateBlock should not calculate phase equilibrium.}

  • initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.

  • idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.

Returns

(SWCO2StateBlock) New instance

SWCO2StateBlockData Class

class idaes.models.properties.swco2.SWCO2StateBlockData(*args, **kwargs)[source]

SWCO2ParameterBlock Class

class idaes.models.properties.swco2.SWCO2ParameterBlock(*args, **kwds)
Parameters
  • rule (function) – A rule function or None. Default rule calls build().

  • concrete (bool) – If True, make this a toplevel model. Default - False.

  • ctype (class) – Pyomo ctype of the block. Default - pyomo.environ.Block

  • default (dict) –

    Default ProcessBlockData config

    Keys
    default_arguments

    Default arguments to use with Property Package

    pure_component

    Pure component to calculate properies for

    phase_presentation

    Set the way phases are presented to models. The MIX option appears to the framework to be a mixed phase containing liquid and/or vapor. The mixed option can simplify calculations at the unit model level since it can be treated as a single phase, but unit models such as flash vessels will not be able to treat the phases independently. The LG option presents as two separate phases to the framework. The L or G options can be used if it is known for sure that only one phase is present. default - PhaseType.MIX Valid values: { PhaseType.MIX - Present a mixed phase with liquid and/or vapor, PhaseType.LG - Present a liquid and vapor phase, PhaseType.L - Assume only liquid can be present, PhaseType.G - Assume only vapor can be present}

    state_vars

    The set of state variables to use. Depending on the use, one state variable set or another may be better computationally. Usually pressure and enthalpy are the best choice because they are well behaved during a phase change. default - StateVars.PH Valid values: { StateVars.PH - Pressure-Enthalpy, StateVars.TPX - Temperature-Pressure-Quality}

    amount_basis

    The set of state variables to use. Depending on the use, one state variable set or another may be better computationally. Usually pressure and enthalpy are the best choice because they are well behaved during a phase change. default - StateVars.PH Valid values: { StateVars.PH - Pressure-Enthalpy, StateVars.TPX - Temperature-Pressure-Quality}

  • initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries described under the “default” argument above.

  • idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to overide the default behavior of matching the BlockData index exactly to the index in initialize.

Returns

(SWCO2ParameterBlock) New instance

SWCO2ParameterBlockData Class

class idaes.models.properties.swco2.SWCO2ParameterBlockData(component)[source]

References

Span, R., W. Wagner, W. (1996). “A New Equation of State for Carbon Dioxide Covering the Fluid Region from the Triple-Point Temperature to 1100 K at Pressures up to 800 MPa.” J. Phys. Chem. Ref. Data, 25(6), 1509-1596.

Akasaka, R. (2008). “A Reliable and Useful Method to Determine the Saturation State from Helmholtz Energy Equations of State.” Journal of Thermal Science and Technology, 3(3), 442-451.

Vesovic, V., W.A. Wakeham, G.A. Olchowy, J.V. Sengers, J.T.R. Watson, J. Millat, (1990). “The transport properties of carbon dioxide.” J. Phys. Chem. Ref. Data, 19, 763-808.

Fenghour, A., W.A. Wakeham, V. Vesovic, (1998). “The Viscosity of Carbon Dioxide.” J. Phys. Chem. Ref. Data, 27, 31-44.