Key Concepts

< Why Dynamic Simulation? | Index | Sample Cases >

Introduction

This section discusses some of the key concepts in dynamic simulation. Since many users are familiar with steady state models, it will also explain some of the important differences between the two modes of operation.

The Solver

In steady state, Petro-SIM generally solves one unit operations at a time, in what is called a sequential modular fashion. The approach is generally robust, but it does mean that every unit operation must have enough information to be able to solve fully by itself. Dynamics mode employs a hybrid approach, where each unit operation contributes equations, and all the equations are solved simultaneously. Each unit operation also performs its own specific modular calculations. Not everything is solved using simultaneous equations.

This difference can be very significant. For example, consider a pipeline and a valve in series:

Assume the pressures of the Feed and Product streams are known. Because steady state solves one unit operation at a time, it is unable to solve for the flow rate without the use of iteration or aid of some logical operation. But because dynamics mode solves the hydraulics portions of the flow sheet simultaneously, it can easily solve this problem.

Why does Petro-SIM dynamics use a hybrid approach? For any model that wants to provide a realistic response, a simultaneous solution is essential. If a relief valve opens for example, the entire model could be impacted. Some systems use a pure equation based approach where everything is expressed in terms of equations which are all solved simultaneously. While this is the theoretical ideal, it is practical only for small or simple models. Large sets of non linear equations can be complex to solve, and such systems are vulnerable to solver failures (for which there is often little recourse). Coping with phenomena such as reverse flow, vessels overflowing etc. can be very complex if it is all done equation wise. Petro-SIM's hybrid approach makes it robust and fast in the face of such problems. Its simultaneous equations are written with great care and careful consideration, yet solver convergence problems still occasionally manifest. Petro-SIM then uses a form of natural homotopy, meaning it changes the equations slightly, to facilitate a solution. The aim is to have a model that will keep on running, regardless of what happens inside the model. Petro-SIM is able to handle very large, plant wide models, robustly.

Degress of Freedom

Another difference is that a dynamics model has additional degrees of freedom that are not present in steady state. In steady state the flow rate into a vessel usually equals the flow rate leaving it. The amount of liquid entering the feed equals the amount leaving the vessel through the liquid outlet.

In dynamics that is often not the case. In dynamic mode, the liquid level inside the vessel can change, and the pressure can change as well. Also, the vessel can overflow (or empty out), in which liquid may start flowing out through the top of the vessel.

To further illustrate these concepts, consider this case:

In steady state the feed to the vessel would be fully specified, and assuming that the pipe and valves are configured, that would determine the flows and pressures throughout the model. The valve would typically have a pressure drop specified, and the pipe would calculate its pressure drop.

In dynamics model, the situation is far more complex. Assume that the vessel feed flow rate is specified, its vent stream pressure is specified, and the valve outlet pressure is also specified. The flow rate out of the vessel through the pipe will be determined by the pressure gradient between the vessel and the valve outlet stream. That pressure gradient may also include static head contributions that depend on the level inside the vessel. If the feed flow rate is increased or the valve is closed, then the level inside the vessel will increase. Eventually liquid will start flowing out of the vent stream, as it would in real life. If the flow is changed to be a small amount of vapour feed only, then eventually all the liquid may drain out of the vessel and eventually vapour will start flowing through the pipe.

Note that in steady state one typically specifies the pressure drop across a valve, but such a specification is generally unrealistic in dynamics mode. Typically a valve is sized in dynamics mode, which establishes a relationship between the flow rate and pressure gradient across the valve. The valve can be viewed as a flow resistor. Many pieces of equipment (heat exchangers, pipes, valves etc.) all model flow resistors. Equipment such as vessels or tray sections also model material holdup (contents).

The subset of equations that Petro-SIM solves simultaneously is generally determined by the check boxes on the Dynamics, Specifications page of the unit operation and stream views.

Static Head

Dynamics mode also supports static head, as it can have a significant impact on pressures and flows inside the model. Proper modeling of a tray section without it is not possible. Nearly every piece of equipment lets you specify its elevation, and for each attachment (referred to as a nozzle), its elevation can be set. These elevations, as well as the material and phases and levels inside unit operations determine the static pressure.

Nozzles

Consider the vessel in the case above. What flows in or out of the streams connected to it? This is determined by three factors:

  • The vessel liquid level. It can also have two liquid phases.
  • The diameter and an elevation of a nozzle.
  • The flow direction. Keep in mind that flow can reverse direction, and can enter or leave the vessel through any attachment.

So if the material flows out through a nozzle which is below the liquid level, liquid will flow out through the nozzle. It it is above the liquid level, vapour will flow out. If it is exposed to both vapour and liquid, a mixture will flow out. If the vessel is entirely liquid filled, then liquid will flow out through any attachment, even if the attachment would be a "vapour" only product stream in steady state.

Note that nozzles at the bottom of the vessel typically have a zero elevation, but during the calculations are moved slightly upwards. Nozzles with elevations equal to the height of the vessel, are are moved down slightly for the purpose of calculations.

The nozzles page in the vessel view looks as follows:

Note how feed streams are by default attached halfway up the vessel, vapour streams are attached at the top, and liquid streams at the bottom.

Efficiencies

For unit operations that have non zero volume such as vessels, it is possible to set the nozzle and recycle efficiencies. These can be accessed by going to the Dynamics, Holdup page, and clicking Advanced and going to the efficiencies page.

As the integrator runs, the vessel contents updates and the vessel periodically reflashes. By default phases are assumed to be in equilibrium, but they need not be. By specifying an efficiency lower than 100%, a phase is increasingly prevented from going to equilibrium instantly.

Each time the vessel flashes, all the feed are combined. All the feed streams, with each phase multiplied by the efficiency, are combined to determine the flash input. The vessel contents is also similarly added, and this is referred to as the recycle. The flash output phases are then remixed with any material from the vessel or feeds which did not get fed into the flash because of efficiencies lower than 100%.

While efficiencies can be set in any vessel, and is used in tray sections all the time, they are usually left at 100% except for some special cases.

Stream Location

Given that a stream, which connects two unit operations, has a nozzle at both ends, and the elevations of those nozzles can be set, you may wonder: Which pressure does the stream show? The adopted convention is that for "product" attachments, streams are located immediately at the outlet. What does this mean? Look at this image:

FCV101 has a higher elevation than MIX101. So stream FCV101OUT is located higher up immediately at the valve outlet, and not lower down right at the mixer entrance.

This convention applies regardless of stream direction. If a stream has nothing connected upstream of it, there is assumed to be no elevation change.

Specifications

In dynamics mode, pressures are usually only specified on boundary streams (feed and product streams, which have no unit operations upstream or downstream) with the pressures and flow rates inside the model then a function of the equipment and contents of that equipment over time.

In steady state you make a specification by possibly deleting another specification, and then specifying a value for an EMPTY cell or by changing the value for an existing specification. In dynamic mode this approach just helps you to provide some values. You explicitly choose what is a specifications by clicking on the appropriate checks boxes on the dynamics tab of a unit operations view:

Flow rates can be specified as well, but that is only occasionally done for a feed stream (such as a vessel or column feed), or for very simplistic column models where the recycle flow rate is specified.

Why is this not recommended? Directly specifying or controlling the flow rate of a stream is not possible in practice. While it can certainly be done inside the model, doing so can lead to unrealistic behavior. For example, the flow rate may go against the pressure gradient. Or if the flow rate is typically liquid but ends up being vapour at some point because a vessel drains, then a mass flow rate specification can result in a sudden large change in pressure because the stream density changes. For these reasons, it is best to control flow rates by manipulating a valve or some other piece of equipment, as would be done in real life.

Material generally flows in a certain direction at a certain rate because there is a pressure gradient (driving force) and some sort of resistance (e.g. a pipe). It never flows against a pressure gradient and there is usually some sort of resistance.

Many pieces of equipment allow a pressure drop to be specified, but this is rarely done. Instead of setting a valve to use a fix pressure drop, it often makes more sense to size it and have it operate it is would in real life. Pressure drop specifications are common in steady state model, but generally avoided in dynamics mode.

A dynamics model tends to adhere closely to these concepts. It is possible to set up a model where these fundamentals are ignored for simplicity sake (e.g. flow with no pressure gradient, or excluding valves and such from a model, commonly done in steady state), but such details can be important if realistic behavior and responses are desired.

How much detail you have in your model depends on what you are trying to achieve with your model. The following diagrams illustrate some specifications and equipment that can be used around the simple vessel discussed earlier.

In configuration A, note that the pressure specification can be placed on any of the three streams. The outlet flow specification can also be moved to the other outlet stream. As discussed earlier, this configuration is of limited use.

Configuration B is more meaningful. The level is being controlled via a valve. This configuration, without the controller, could be used for example to determine how long the vessel would take to drain under gravity.

Configuration C shows a system where a vapour-liquid feed flow rate is being controlled, and level and pressure of the downstream vessel are being controlled. Optionally a duty stream can also be added and used to control the temperature.

Backwards Calculations and Flow Reversal

Steady state provides some support for backwards calculations or solving a unit operation from its products. In dynamics, if a stream has a positive flow rate, then its contents are always determined by whatever is inside the unit operation out of which it flows.

Dynamic mode also supports full flow reversal, and composition and other properties will propagate fully, as they would in real life.

Start Values

While in dynamics mode with the integrator not running, Petro-SIM will not exhibit the same behavior as in steady state. When a stream is connected to a unit operation, it will typically be initialized from other streams attached to said unit operation, even if the unit operation is not yet fully configured. This will provide it with a starting point for integration.

Inconsistencies

If too many specifications are given in steady state, the solver tends to stop and an error message about inconsistent specifications usually pops up.

This does not happen in dynamics mode. Each unit operations contributes some equations to the simultaneous solution and that system of equations may be over or under specified, but this can usually be readily understood and remedied and several helpful tools are available. Additionally, the contents of streams are usually determine what the unit operation out of which they flow, regardless of other considerations.

Dynamics mode will update the value of a specified (or even calculated) variable and not trigger an inconsistency. For example, a spreadsheet can export to a stream pressure which is marked as a specification and has a specified value, and will update that value. There is no need to delete the stream pressure value before exporting. And when a Set operation is set up, its target variable value should not be deleted before the connection is made, since the Set operation will adjust and update the target variable value (which should typically be a specification).

In dynamics mode everything should have a value when the integrator is started, and existing values are then updated as appropriate.

< Why Dynamic Simulation? | Index | Sample Cases >