Basic Water Property Package
The basic water property package is meant to calculate the most basic of water properties for WaterTAP unit models from the volumetric flow rate and the component mass concentration. All components are assumed to be in the liquid phase and properties are indexed only to component where appropriate.
Sets
Description |
Symbol |
Indices |
|---|---|---|
Components |
\(j\) |
|
State variables
Description |
Symbol |
Variable |
Index |
Units |
|---|---|---|---|---|
Volumetric flow rate |
\(Q\) |
|
None |
\(\text{m}^{3} \text{ s}^{-1}\) |
Component mass concentration |
\(C_j\) |
|
|
\(\text{kg m}^{-3}\) |
Properties
Description |
Symbol |
Variable |
Index |
Units |
|---|---|---|---|---|
Component mass flowrate |
\(M_j\) |
|
|
\(\text{kg s}^{-1}\) |
Mass density of pure water |
\(\rho\) |
|
None |
\(\text{kg m}^{-3}\) |
Dynamic viscosity of solution |
\(\mu_d\) |
|
None |
\(\text{kg m}^{-1}\text{ s}^{-1}\) |
Temperature |
\(T\) |
|
None |
\(\text{K}\) |
Pressure |
\(P\) |
|
None |
\(\text{Pa}\) |
Relationships
Description |
Equation |
|---|---|
Component mass flowrate |
\(M_j = Q C_j\) |
Scaling
All properties have default scaling factors except flow_mass_comp. Users can apply a custom scaling factor or
it will be calculated automatically by calling calculate_scaling_factors on the flowsheet:
from pyomo.environ import ConcreteModel
from idaes.core import FlowsheetBlock
from idaes.core.util.scaling import calculate_scaling_factors
from watertap_contrib.reflo.property_models.basic_water_properties import BasicWaterParameterBlock
# relevant assignments
m = ConcreteModel()
m.fs = FlowsheetBlock(dynamic=False)
m.fs.properties = BasicWaterParameterBlock()
# calculate scaling factors
calculate_scaling_factors(m.fs)
The default scaling factors are as follows:
\(\text{10}^{-2}\) for temperature
\(\text{10}^{-5}\) for pressure
\(\text{10}^{3}\) for mass density
\(\text{10}^{3}\) for mass concentration
Classes
- class watertap_contrib.reflo.property_models.basic_water_properties.BasicWaterParameterBlock(*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
Config args
- default_arguments
Default arguments to use with Property Package
- solute_list
List of solute species in the water source
initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries with config arguments as keys.
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 override the default behavior of matching the BlockData index exactly to the index in initialize.
- Returns:
(BasicWaterParameterBlock) New instance
- class watertap_contrib.reflo.property_models.basic_water_properties.BasicWaterParameterBlockData(component)[source]
Property Parameter Block Class
Defines component lists, along with base units and constant parameters.
- build()[source]
Callable method for Block construction.
- 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_contrib.reflo.property_models.basic_water_properties._BasicWaterStateBlock(*args, **kwds)[source]
This Class contains methods which should be applied to Property Blocks as a whole, rather than individual elements of indexed Property Blocks.
- initialize(state_args=None, state_vars_fixed=False, hold_state=False, outlvl=0, solver=None, optarg=None)[source]
Initialization routine for property package.
Keyword Arguments: state_args : Dictionary with initial guesses for the state vars
chosen. Note that if this method is triggered through the control volume, and if initial guesses were not provied at the unit model level, the control volume passes the inlet values as initial guess.
outlvl : sets output level of initialization routine state_vars_fixed: Flag to denote if state vars have already been
fixed. - True - states have already been fixed and
initialization does not need to worry about fixing and unfixing variables.
- False - states have not been fixed. The state
block will deal with fixing/unfixing.
- optargsolver options dictionary object (default=None, use
default solver options)
- solverstr indicating which solver to use during
initialization (default = None, use default solver)
- hold_stateflag indicating whether the initialization routine
should unfix any state variables fixed during initialization (default=False). - True - states varaibles are not unfixed, and
a dict of returned containing flags for which states were fixed during initialization.
- False - state variables are unfixed after
initialization by calling the relase_state method
- Returns:
If hold_states is True, returns a dict containing flags for which states were fixed during initialization.
- release_state(flags, outlvl=0)[source]
Method to release state variables fixed during initialization.
- Keyword Arguments:
flags – dict containing information of which state variables were fixed during initialization, and should now be unfixed. This dict is returned by initialize if hold_state=True.
outlvl – sets output level of of logging
- class watertap_contrib.reflo.property_models.basic_water_properties.BasicWaterStateBlockData(*args, **kwargs)[source]
General purpose StateBlock for Zero-Order unit models.
- build()[source]
General build method for StateBlockDatas.
- Parameters:
None –
- Returns:
None
- 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(j)[source]
Method which returns a valid expression for material density to use in the material balances .
- get_material_flow_basis()[source]
Method which returns an Enum indicating the basis of the material flow term.
- get_material_flow_terms(j)[source]
Method which returns a valid expression for material flow to use in the material balances.