dynsim-training-tutorials-1-4
dynsim-training-tutorials-1-4
dynsim-training-tutorials-1-4
DYNSIM
5.1
Objective: Illustrate the configuration of a simple flowsheet to examine reverse flow across a
valve.
The Dynsim interface incorporates many of the elements found in the PRO/II GUI, and as in a
PRO/II simulation, the steps to setup a simulation are as follows:
Tip: All Dynsim simulation files are saved in a zipped format using *.s4m extension. To unzip
the file rename the extension to .zip and then open file using a compression utility such as
WinZip
Note: There are four User Profile roles under Change Toolbars. Administrator role allows full
access to all Dynsim capabilities whereas Operator, Instructor, and Engineer roles have
different permissions use of the toolbar, e.g. an Engineer role can edit and modify a
simulation and an Operator role cannot. The Operator role is used for the Operator Training
Simulators (OTS) program use a single integrated modeling environment.
The UOM icon is denoted using a ruler icon. A standard set of predefined UOM lists are
available for use with Dynsim. To use a custom UOM, create a New UOM Slate and then
reference an existing UOM and then modify the units as needed.
For this example, using SI as the reference UOM and change Pressure units from kPa to
kPag.
Click on , and the New Slate button and type EngSI as new UOM slate name, select
SI as new UOM base, and then click OK.
Highlight the Pressure parameter, and double click kPa. It will open Change Unit-of-
Measure window
Click Custom radio button, select the pressure new pressure unit as kPag, and click
Change. Note that check marks appear on the UOMs changed.
Tip: A component slate contains all or a subset of the Selected Components list, e.g., in the case
of a cooling water stream there may only be one component i.e. water. As a result, when
Dynsim calculates, for example, the enthalpy of a particular stream at a particular time step,
it only needs to consider those components defined in the component slate resulting in
faster calculation speeds. This is important for large simulation models containing large
numbers of components.
Click on the Slate tab and create a New Component Slate called PROCESS and click
Add. Multi select all components from the Selected Components list, Drag and drop
Ethane, Ethylene, Propane and IsoButane to the PROCESS Components Slate list.
Click on the Method tab and create a New Method Slate called SRK and click Add.
Expand the Thermodynamic Data tree. Right click on Equilibrium, Enthalpy, Entropy
and Density and select Soave-Redlich-Kwong Equation of State for the property
method. For this simulation, the components selected consist of light hydrocarbons and
therefore an equation of state method such as SRK or PR is app opriate.
Tip: Alternatively, select the Types tab on the bottom left hand corner of the screen and contains
the same list of the model libraries that the Icon Palette contains. The Types tree also
includes graphical libraries for widgets, primitives, and references that are not on the Icon
Palette.
From the Icon Palette, click to select a Source, move the mouse to flowsheet canvas, and
then click to drop it on the flowsheet. Do the same with a Valve and a Sink.
Double click on the source icon or right click and select Data Entry to
bring up a Data Entry Window (DEW) to configure the source.
Note: If you select the Edit option, the Object Editor Viewer (OEV) pops-up. This window
contains a super set of all the parameters associated with this Model for advanced users.
Enter the following data: Pressure to 3550 kPag, and Temperature to 395 K.
Enter the component composition data: Ethylene to 3 kg-mol, Ethane to 2 kg-mol,
Propane to 4 kg-mol, and IsoButane to 2 kg-mol. Note: the molar composition will be
normalized to 1.
Click the Thermo Tab and note that the Thermo method is SRK and the component slate
is Process.
Click OK.
Process Stream Used for connecting models from the base equipment library and
represents compositional streams.
Heat Stream Used for connecting utility exchangers to models that can have a duty
associated with them, e.g., distillation column and separator etc.
Mechanical Stream Used for linking a mechanical drive to a model, e.g., a shaft linked to a
pump or compressor.
Electrical Stream Used for linking electrical models to process equipment, e.g., an
electrical bus connected to a motor.
Connectors Used for linking a signal variable to the input of a controller and the
output of a controller to a final control element, e.g., valve.
Once the simulation up and running, test the dynamic behavior of the system as follows:
Select the Flow Rate Indicator from the References library on the Types tab to monitor
the flow rate through the valve
Drop the Flow Rate Indicator below the valve and enter the stream nam that needs to
be tracked, in this case S2. A green arrow denotes a positive flow rate in the direction
specified by the stream. A red arrow denotes reverse flow.
Double click on the valve flowsheet icon to open the Valve faceplate and adjust the
valve position using the slider. Set the position to 100% open and notice that the Flow
Rate Indicator shows a positive flow rate in the direction of flow specified by the user
(green arrow).
Select a Slider from the Widgets library on the Types tab and drop it onto the flowsheet.
Right click and select Draw Attributes. For Point Name type SNK1.PB, which is the
name of the Sink followed by the parameter we wish to control.
The Min/Max ranges for the slider are set to 500 and 5000 kPa respectively, and the
orientation is set to vertical. Set the width and height to 100 and 300.
Before varying this parameter (Sink Pressure Boundary) remotely, change its designation from
STATIC to DYNAMIC.
Highlight the Sink, right click and select Edit. This brings up the Object Editor
Viewer (OEV) interface
Change the Point Class for the
parameter PB under the Boundary
Conditions to
DYNAMIC and click Apply and OK.
DYNSIM Tutorials Company Confidential 17
Click LF button to load the changes.
Click to resume running the simulation.
Vary the pressure of the Sink by moving the slider.
To display the exact value of the pressure at the sink, select a Point from the References
library on the Types tab, place it next to the Sink block, and enter SNK1.PB for the
reference variable.
Note: STATIC points are model parameters, which are normally fixed parameters for the
simulation and represent physical dimensions such as valve Cv, drum diameter, and so on
and cannot change during a simulation. DYNAMIC points are temperatures, pressures, and
flows that change during the simulation.
To customize the flowsheet graphics such as highlighting the slider, select Types\
Primitives\Rectangle and draw a rectangle around the slider then right click and select
Draw Attributes and choose a fill color. Double click on the fill color to customize the
colors
Click OK to confirm the selection.
To move the primitive objects, select the object first, move the mouse to the edge of
selected object, hold down the left button, and move the object.
Objective: Illustrates how to setup a simple flowsheet with a very basic control scheme. At the
end of this section, the flowsheet should look similar to the image below, with a source feeding
into a flash drum and a PI controller to maintain the level in the drum at a fixed value by
adjusting the valve position.
Launch Dynsim, and type username and password as SimSci and SimSci.
Click File\Open and select the previous simulation file ReverseFlow.s4m. to open the
simulation
Click File\Save As …, and give a new name LevelControl and save the ile.
Click the UOM icon and make sure to select EngSI UOM created in the
Tutorial 1. Close the UOM window by clicking OK.
Click to open the Components and Thermodynamics window. Add new
components
Methane, Propane, and n-Butane under the Library Tab.
Select the Slate Tab and create new slate called NATURALGAS, which contains
Methane, Ethane, Propane and n-Butane.
Click the Method Tab; and select SRK thermodynamic slate created previously.
Click on the stream S2 to highlight it, then place your mouse pointer on the black square
that covers the connection between S2 and SNK1, Disconnect will appear. Click on the
square and drag the stream away from SNK1, and then disconnect it from SNK1.
Move SNK1 to the top right hand corner of the flowsheet canvas.
Connect the models using process streams as shown in the figure below:
Right click on the sink SNK2 and select the Data Entry and set the boundary
pressure to 100 kPag
Right click on the valve LV1 and select the Data Entry enter the following details:
Click the Types tab and the Controls Library and select a PID controller model. Lay it
down on the flowsheet canvas; name it LC1. Click OK.
Note: Always click and drag the connector in the direction of data flow, i.e. from the vessel to the
controller.
If Dynsim cannot determine the parameters automatically because there may be more
than one, then define them manually using Parameter Assignment window that pops up.
Select the Process Variable from the Inputs node of controller LC1 and select Level of
liquid phase from the Calculated Values node of the drum L1.
Link the controller LC1output to the valve LV1 using Default Connector and drag a
connector stream from the controller to the valve. In this case, controller parameter is
the Output, and the valve parameter is the Open Command under the External Inputs,
which are linked automatically.
Note: Note the controller faceplate will only appear during simulation mode. When the simulation
is shutdown, double clicking on the controller, brings up DEW for the model.
Click OK and enter the Trend Name as well as the Flowsheet name with which to
associate the trend as follows:
When the system is stable, double click on the valve PV1 (if you closed the faceplate)
and open it full 100%.
Observe the point references on the Depressurizing Trend
Note: Model changes are uploaded without reloading the simulation by clicking the and then
click the Resume button to start again.
Wait for the simulation to reach steady state conditions, and then save an
initial
condition snapshot or IC by clicking on the Snapshot button on the tool bar
and name the IC Steady State.
Click Shutdown button, save, and close the simulation. This workshop answer
will be required for next tutorial.
Objective: Set up and record scenarios, scenarios capture the flowsheet changes with time.
After the simulation has loaded, the IC Summary icon becomes active. Click
on IC Summary icon to bring up the IC SteadyState previously saved in Tutorial 2.
Isolate the flash drum by closing all three valves (i.e. the inlet and two outlet valves).
Continue to run the simulation without changing anything for a minute of simulation
time.
The Depressuring trend located in the Instances tab under the FS tab, double click to
open it.
Display the Scenario Summary Window by clicking on the scenario icon. Click on
the button.
Open the valve PV1 on the vapor outlet line from the drum slowly and watch how the
trends change as the vessel depressurizes down to atmospheric pressure.
Create Scenarios manually using a custom scripting language or record a scenario as one
would record a macro in Microsoft Excel. Clicking the record scenario button changes
the icon to . Click on the Stop Recording button to stop scenario recording or
click the button to pause scenario recording.
Pause the simulation once the flow rates are steady and then close the valves to isolate
the drum.
Click on “Manual” button to override the controller and manually close the
valve by dragging the slider to zero.
Step 4
With the drum isolated and the simulation running, open PV1, the valve on the vapor outlet from
the drum. Watch how the trends change as the valve moves from fully closed to fully open.
Dynsim will automatically bring up the script of the scenario just recorded which can be modified
by editing the script itself.
Note to compare changes in metal and fluid temperature in the drum use the same Ymin and
Ymax values for V1.TM and V1.Flash.T.
Step 6
Having saved the two scenarios they can be run at any time during the simulation by clicking on
the scenario summary icon, highlight the scenario and hit the “Run” key on the Scenario
Summary window.
Dynsim freezes the simulation and notifies the user with a pop-up window at the end of the
scenario run.
Objective: This tutorial looks at how to add a pump and attach a utility exchanger to the drum in
the existing simulation. When you are finished, the model should look something like this, refer
to this schematic for point references and flow indicator locations.
Step 3
Allow the simulation to reach steady state and then create a snapshot called “SS” by
clicking the “Camera” icon on the Snapshot pane.
Display the snapshot summary window, by clicking on the Initi l Conditions Icon
(Snapshots are also called Initial Conditions) to see that the snapshot has
been saved.
Step 5
Connect the controller by dragging the Default Connector from V1 to PC1 and connect
PC1.PV to V1.P. You can find V1.P under the “Calculated Values” node.
Drag the Default Connector from PC1 to PV1which will connect the PV1.Op to the
PC1.Out automatically.
Step 6
Press LF to load your model changes.
Resume the simulation and change make the Setpoint of PC1= 5000 kPa.
Save a snapshot when the pressure lines out at 5000 kPa.
Step 7
Add a Pump between the Drum V1 and Valve LV1 to the flowsheet
Step 8
Press LF to load your model changes. Resume simulation and make the Setpoint of PC1
= 5000 kPa.
Save a snapshot when the pressure steadies out at 5000 kPa.
Step 9
Add a separate flow path for the utility exchanger: Source SRC2, Valve XV2, Utility
Heat Exchanger E1 (Heat Stream type) and Sink SNK3.
Step 10
Drag a heat stream from the E1 to V1. Note: Connect to the fluid heat stream port of V1.