Pressure Changer

The IDAES Pressure Changer model represents a unit operation with a single stream of material which undergoes a change in pressure due to the application of a work. The Pressure Changer model contains support for a number of different thermodynamic assumptions regarding the working fluid.

Degrees of Freedom

Pressure Changer units generally have one or more degrees of freedom, depending on the thermodynamic assumption used.

Typical fixed variables are:

  • outlet pressure, \(P_{ratio}\) or \(\Delta P\),
  • unit efficiency (isentropic or pump assumption).

Model Structure

The core Pressure Changer unit model consists of a single control volume (named ControlVolume0DBlock), a state block, containing the states, one Inlet Port (named inlet) and one Outlet Port (named outlet).

Variables

Pressure Changers contain the following Variables (not including those contained within the control volume Block):

Variable Name Notes
\(P_{ratio}\) ratioP  
\(V_t\) volume Only if has_rate_reactions = True, reference to control_volume.rate_reaction_extent
\(W_{mechanical,t}\) work_mechanical Reference to control_volume.work
\(W_{fluid,t}\) work_fluid Pump assumption only
\(\eta_{pump,t}\) efficiency_pump Pump assumption only
\(W_{isentropic,t}\) work_isentropic Isentropic assumption only
\(\eta_{isentropic,t}\) efficiency_isentropic Isentropic assumption only

Isentropic Pressure Changers also have an additional Property Block named properties_isentropic (attached to the Unit Model).

Constraints

In addition to the Constraints written by the Control Volume block, Pressure Changer writes additional Constraints which depend on the thermodynamic assumption chosen. All Pressure Changers add the following Constraint to calculate the pressure ratio:

\[P_{ratio,t} \times P_{in,t} = P_{out,t}\]

Isothermal Assumption

The isothermal assumption writes one additional Constraint:

\[T_{out} = T_{in}\]

Adiabatic Assumption

The isothermal assumption writes one additional Constraint:

\[H_{out} = H_{in}\]

Isentropic Assumption

The isentropic assumption creates an additional set of Property Blocks (indexed by time) for the isentropic fluid calculations (named properties_isentropic). This requires a set of balance equations relating the inlet state to the isentropic conditions, which are shown below:

\[F_{in,t,p,j} = F_{out,t,p,j}\]
\[s_{in,t} = s_{isentropic,t}\]
\[P_{in,t} \times P_{ratio,t} = P_{isentropic,t}\]

where \(F_{t,p,j}\) is the flow of component \(j\) in phase \(p\) at time \(t\) and \(s\) is the specific entropy of the fluid at time \(t\).

Next, the isentropic work is calculated as follows:

\[W_{isentropic,t} = \sum_p{H_{isentropic,t,p}} - \sum_p{H_{in,t,p}}\]

where \(H_{t,p}\) is the total energy flow of phase \(p\) at time \(t\). Finally, a constraint which relates the fluid work to the actual mechanical work via an efficiency term \(\eta\).

If compressor is True, \(W_{isentropic,t} = W_{mechanical,t} \times \eta_t\)

If compressor is False, \(W_{isentropic,t} \times \eta_t = W_{mechanical,t}\)

Pump (Incompressible Fluid) Assumption

The incompressible fluid assumption writes two additional constraints. Firstly, a Constraint is written which relates fluid work to the pressure change of the fluid.

\[W_{fluid,t} = (P_{out,t}-P_{in,t})\times F_{vol,t}\]

where \(F_{vol,t}\) is the total volumetric flowrate of material at time \(t\) (from the outlet Property Block). Secondly, a constraint which relates the fluid work to the actual mechanical work via an efficiency term \(\eta\).

If compressor is True, \(W_{fluid,t} = W_{mechanical,t} \times \eta_t\)

If compressor is False, \(W_{fluid,t} \times \eta_t = W_{mechanical,t}\)

PressureChanger Class

class idaes.unit_models.pressure_changer.PressureChanger(*args, **kwargs)
Parameters:
  • rule (function) – A rule function or None. Default rule calls build().
  • concrete (bool) – If True, make this a toplevel model. Default - False.
  • ctype (str) – Pyomo ctype of the block. Default - “Block”
  • default (dict) –

    Default ProcessBlockData config

    Keys
    dynamic
    Indicates whether this model will be dynamic or not, default = useDefault. Valid values: { useDefault - get flag from parent (default = False), True - set as a dynamic model, False - set as a steady-state model.}
    has_holdup
    Indicates whether holdup terms should be constructed or not. Must be True if dynamic = True, default - False. Valid values: { True - construct holdup terms, False - do not construct holdup terms}
    material_balance_type
    Indicates what type of mass balance should be constructed, default - MaterialBalanceType.componentPhase. Valid values: { MaterialBalanceType.none - exclude material balances, MaterialBalanceType.componentPhase - use phase component balances, MaterialBalanceType.componentTotal - use total component balances, MaterialBalanceType.elementTotal - use total element balances, MaterialBalanceType.total - use total material balance.}
    energy_balance_type
    Indicates what type of energy balance should be constructed, default - EnergyBalanceType.enthalpyTotal. Valid values: { EnergyBalanceType.none - exclude energy balances, EnergyBalanceType.enthalpyTotal - single enthalpy balance for material, EnergyBalanceType.enthalpyPhase - enthalpy balances for each phase, EnergyBalanceType.energyTotal - single energy balance for material, EnergyBalanceType.energyPhase - energy balances for each phase.}
    momentum_balance_type
    Indicates what type of momentum balance should be constructed, default - MomentumBalanceType.pressureTotal. Valid values: { MomentumBalanceType.none - exclude momentum balances, MomentumBalanceType.pressureTotal - single pressure balance for material, MomentumBalanceType.pressurePhase - pressure balances for each phase, MomentumBalanceType.momentumTotal - single momentum balance for material, MomentumBalanceType.momentumPhase - momentum balances for each phase.}
    has_phase_equilibrium
    Indicates whether terms for phase equilibrium should be constructed, default = False. Valid values: { True - include phase equilibrium terms False - exclude phase equilibrium terms.}
    compressor
    Indicates whether this unit should be considered a compressor (True (default), pressure increase) or an expander (False, pressure decrease).
    thermodynamic_assumption
    Flag to set the thermodynamic assumption to use for the unit. - ThermodynamicAssumption.isothermal (default) - ThermodynamicAssumption.isentropic - ThermodynamicAssumption.pump - ThermodynamicAssumption.adiabatic
    property_package
    Property parameter object used to define property calculations, default - useDefault. Valid values: { useDefault - use default package from parent model or flowsheet, PropertyParameterObject - a PropertyParameterBlock object.}
    property_package_args
    A ConfigBlock with arguments to be passed to a property block(s) and used when constructing these, default - None. Valid values: { see property package for documentation.}
  • 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:

(PressureChanger) New instance

PressureChangerData Class

class idaes.unit_models.pressure_changer.PressureChangerData(component)[source]

Standard Compressor/Expander Unit Model Class

add_adiabatic()[source]

Add constraints for adiabatic assumption.

Parameters:None
Returns:None
add_isentropic()[source]

Add constraints for isentropic assumption.

Parameters:None
Returns:None
add_isothermal()[source]

Add constraints for isothermal assumption.

Parameters:None
Returns:None
add_performance()[source]

Define constraints which describe the behaviour of the unit model.

Parameters:None
Returns:None
add_pump()[source]

Add constraints for the incompressible fluid assumption

Parameters:None
Returns:None
build()[source]
Parameters:None
Returns:None
init_isentropic(state_args, outlvl, solver, optarg)[source]

Initialisation routine for unit (default solver ipopt)

Keyword Arguments:
 
  • state_args – a dict of arguments to be passed to the property package(s) to provide an initial state for initialization (see documentation of the specific property package) (default = {}).
  • outlvl

    sets output level of initialisation routine

    • 0 = no output (default)
    • 1 = return solver state for each step in routine
    • 2 = return solver state for each step in subroutines
    • 3 = include solver output infomation (tee=True)
  • optarg – solver options dictionary object (default={‘tol’: 1e-6})
  • solver – str indicating whcih solver to use during initialization (default = ‘ipopt’)
Returns:

None

initialize(state_args={}, routine=None, outlvl=0, solver='ipopt', optarg={'tol': 1e-06})[source]

General wrapper for pressure changer initialisation routines

Keyword Arguments:
 
  • routine – str stating which initialization routine to execute * None - use routine matching thermodynamic_assumption * ‘isentropic’ - use isentropic initialization routine * ‘isothermal’ - use isothermal initialization routine
  • state_args – a dict of arguments to be passed to the property package(s) to provide an initial state for initialization (see documentation of the specific property package) (default = {}).
  • outlvl

    sets output level of initialisation routine

    • 0 = no output (default)
    • 1 = return solver state for each step in routine
    • 2 = return solver state for each step in subroutines
    • 3 = include solver output infomation (tee=True)
  • optarg – solver options dictionary object (default={‘tol’: 1e-6})
  • solver – str indicating whcih solver to use during initialization (default = ‘ipopt’)
Returns:

None

model_check()[source]

Check that pressure change matches with compressor argument (i.e. if compressor = True, pressure should increase or work should be positive)

Parameters:None
Returns:None
set_geometry()[source]

Define the geometry of the unit as necessary, and link to control volume

Parameters:None
Returns:None