Control Volume¶
Overview¶
Control Volumes are the center of the IDAES process modeling framework, and serve as the fundamental building block of all unit operations. Control Volumes represent a single, well-defined volume of material over which material, energy and/or momentum balances will be performed.
The IDAES Control Volume classes are designed to facilitate the construction of these balance equations by providing the model developer with a set of pre-built methods to perform the most common tasks in developing models of unit operations. The Control Volume classes contain methods for creating and linking the necessary property calculations and writing common forms of the balance equations so that the model developer can focus their time on the aspects that make each unit model unique.
The IDAES process modeling framework currently supports two types of Control Volumes:
- ControlVolume0DBlock represents a single well-mixed volume of material with a single inlet and a single outlet. This type of control volume is sufficient to model most inlet-outlet type unit operations which do not require spatial discretization.
- ControlVolume1DBlock represents a volume with spatial variation in one dimension parallel to the material flow. This type of control volume is useful for representing flow in pipes and simple 1D flow reactors.
Common Control Volume Tasks¶
All of the IDAES Control Volume classes are built on a common core ControlVolumeBlockData which defines a set of common tasks required for all Control Volumes. The more specific Control Volume classes then build upon these common tasks to provide tools appropriate for their specific application.
All Control Volume classes begin with the following tasks:
- Determine if the Control Volume should be steady-state or dynamic.
- Get the time domain.
- Determine whether material and energy holdups should be calculated.
- Collect information necessary for creating StateBlocks and ReactionBlocks.
- Create references to phase_list and component_list Sets in the PhysicalParameterBlock
Setting up the time domain¶
The first common task the Control Volume Block performs is to determine if it should be dynamic
or steady-state and to collect the time domain from the UnitModel. Control Volume blocks have
an argument dynamic
which can be provided during construction which specifies if the
Control Volume should be dynamic (dynamic=True
) or steady-state (dynamic=False
). If the
argument is not provided, the Control Volume Block will inherit this argument from its parent
Unit model.
Finally, the Control Volume checks that the has_holdup
argument is consistent with the
dynamic
argument, and raises a ConfigurationError
if it is not.
Getting Property Package Information¶
If a reference to a property package was not provided by the UnitModel
as an argument,
the Control Volume first checks to see if the UnitModel
has a property_package
argument
set, and uses this if present. Otherwise, the Control Volume block begins searching up the model
tree looking for an argument named default_property_package
and uses the first of these
that it finds. If no default_property_package
is found, a ConfigurationError
is returned.
Collecting Indexing Sets for Property Package¶
The final common step for all Control Volumes is to collect any required indexing sets from the physical property package (for example component and phase lists). These are used by the Control Volume for determining what balance equations need to be written, and what terms to create.
The indexing sets the Control Volume looks for are:
component_list
- used to determine what components are present, and thus what material balances are requiredphase_list
- used to determine what phases are present, and thus what balance equations are required
ControlVolume and ControlVolumeBlockData Classes¶
A key purpose of Control Volumes is to automate as much of the task of writing a unit model as
possible. For this purpose, Control Volumes support a number of methods for common tasks model
developers may want to perform. The specifics of these methods will be different between
different types of Control Volumes, and certain methods may not be applicable to some types of
Control Volumes (in which case a NotImplementedError
will be returned). A full list of
potential methods is provided here, however users should check the documentation for the
specific Control Volume they are using for more details on what methods are supported in that
specific Control Volume.
A key feature of the IDAES modeling framework is the use of Control Volume Blocks. Control Volumes represent a volume of material over which material, energy and/or momentum balances can be performed. Control Volume Blocks contain methods to automate the task of writing common forms of these balance equations. Control Volume Blocks can also automate the creation of StateBlocks and ReactionBlocks associated with the control volume.