Ideal Water Properties
The ideal water properties module contains a simple property package for saline waters which is intended for use with the WaterTap zero-order unit model library. The ideal water property package can be used in a flowsheet as shown below:
import pyomo.environ as pyo # Pyomo environment
from idaes.core import FlowsheetBlock
# Import ideal water property package from watertap.core
from watertap.core.zero_order_properties import WaterParameterBlock
# Create a flowsheet
m = pyo.ConcreteModel()
m.fs = FlowsheetBlock(default={"dynamic": False})
# Add an instance of the ideal water property package with three solutes A, B and C
m.fs.water_props = WaterParameterBlock(default={"solute_list": ["A", "B", "C"]})
Package Details
The ideal water property package assumes that the solution is at approximately ambient conditions and that contributions to most properties from the dissolved solutes are minimal. Thus, most properties of the solution are assumed to be constant and equal to those of water at ambient conditions (these are defined via parameters in the WaterParameterBlock and can be adjusted if required to model different conditions).
The state variables used in the ideal water property package are:
Volumetric flowrate (flow_vol, \(Q\), units \(m^3/s\)),
Mass concentration of solutes (conc_mass_comp, \(C\), units \(kg/m^3\)),
Pressure (pressure, \(P\), units \(Pa\)), and
Temperature (temperature, \(T\), units \(K\)).
The ideal water property package supports a single liquid phase (named “Liq”) and automatically includes water (named “H2O”) as a solvent in the component list.
Dissolved Solutes
The ideal water property package requires users to define the list of dissolved solutes present in the solution, which is done using the solute_list configuration argument (as shown above). The solutes defined in the solute_list configuration argument are automatically added to the property package component list and concentration terms will be created for each of these.
Class Documentation
- class watertap.core.zero_order_properties.WaterParameterBlock(*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
- database
An instance of a WaterTAP Database to use for parameters.
- water_source
Water source to use when looking up parameters from database.
- solute_list
List of solute species of interest. If None, will use all species defined in the water_source provided.
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
(WaterParameterBlock) New instance
- class watertap.core.zero_order_properties.WaterParameterBlockData(component)[source]
Property Parameter Block Class
Defines component and phase lists, along with base units and constant parameters.
- classmethod define_metadata(obj)[source]
Set all the metadata for properties and units.
This method should be implemented by subclasses. In the implementation, they should set information into the object provided as an argument.
- Parameters
pcm (PropertyClassMetadata) – Add metadata to this object.
- Returns
None
- class watertap.core.zero_order_properties.WaterStateBlock(*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
(WaterStateBlock) New instance
- class watertap.core.zero_order_properties.WaterStateBlockData(*args, **kwargs)[source]
General purpose StateBlock for Zero-Order unit models.
- define_display_vars()[source]
Method used to specify components to use to generate stream tables and other outputs. Defaults to define_state_vars, and developers should overload as required.
- define_state_vars()[source]
Method that returns a dictionary of state variables used in property package. Implement a placeholder method which returns an Exception to force users to overload this.
- get_energy_density_terms(p)[source]
Method which returns a valid expression for enthalpy density to use in the energy balances.
- get_enthalpy_flow_terms(p)[source]
Method which returns a valid expression for enthalpy flow to use in the energy balances.
- get_material_density_terms(p, j)[source]
Method which returns a valid expression for material density to use in the material balances .