0% found this document useful (0 votes)
18 views

User Guide

Uploaded by

Jaimin Shukla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

User Guide

Uploaded by

Jaimin Shukla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

DWSIM - Process Simulation, Modeling and Optimization

User Guide

Version 4.0, Revision 0


August 2016
License
DWSIM is released under the GNU General Public License (GPL) version 3.

Contact Information
DWSIM - Process Simulation, Modeling and Optimization

Author: Daniel Medeiros

Website: http://dwsim.inforside.com.br / http://www.sourceforge.net/projects/


dwsim

E-mail: [email protected]
Contents
1 Introduction 1

2 Welcome screen 2

3 Simulation 3

3.1 User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3.2 Conguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3.2.1 Components/Compounds . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3.2.2 Basis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3.2.3 Systems of Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3.2.4 Miscelaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.2.5 Property Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.3 Process modeling (Flowsheeting) . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.3.1 Inserting Flowsheet Objects . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.3.2 Process data management . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.3.3 Undo/Redo actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

3.3.4 Cut/Copy/Paste objects . . . . . . . . . . . . . . . . . . . . . . . . . . 22

3.3.5 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

3.3.6 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3.4 Sensitivity Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3.5 Flowsheet Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3.6 Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

3.7 Chemical Reactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

3.8 Characterization of Petroleum Fractions . . . . . . . . . . . . . . . . . . . . . . 33

4 Compound Creator 35

4.1 Component/Compound Databases . . . . . . . . . . . . . . . . . . . . . . . . . 35

4.1.1 Databases/Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

4.2 About the Compound Creator Utility . . . . . . . . . . . . . . . . . . . . . . . . 37

5 Data Regression 37

5.1 About the Data Regression Utility . . . . . . . . . . . . . . . . . . . . . . . . . 37

6 General Settings 39

6.1 Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

6.2 Datasets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

6.3 Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

6.4 Other . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

6.4.1 Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

6.4.2 Debug mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

6.4.3 UI Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

6.5 Flowsheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

6.5.1 Cut/Copy/Paste Flowsheet Objects . . . . . . . . . . . . . . . . . . . . 41

6.5.2 Undo/Redo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

6.5.3 Object Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41


1 INTRODUCTION

1 Introduction
This document gives a detailed description about how to setup, run, modify and view results

of a basic process simulation in DWSIM. The document is organized according to the sequence of

execution of a simulation. Each step/task is explained with the help of images and descriptions

of the associated windows.

For details about the models used for calculation of thermodynamic, transport and thermal

properties, please read the Technical Manual. Detailed Unit Operations and Utilities' descrip-

tions can be found in the context-sensitive help available inside the application by through the

'F1' key.

Visit DWSIM's Wiki for more up-to-date information about DWSIM, including general usage

tips and tricks.

DWSIM - User Guide 1


2 WELCOME SCREEN

2 Welcome screen
When DWSIM is opened, the welcome screen is shown (Figure 1):

Figure 1: DWSIM's welcome screen.

The welcome screen provides the user with shortcuts to open existing simulations, create

new ones, create new compound creator and data regression cases and open the samples folder.

The "Close Window" button closes the window and shows the main DWSIM interface.

The following items are displayed on DWSIM's main window:

Ù Menu bar , with buttons to open/save/create simulations, component creator and data re-
gression cases, congure the active simulation, general preferences, launch tools, congure

the child windows view mode, etc.;

Ù Button strip, to open, save and create new steady-state simulations, component creator

and data regression cases.

There are various ways to access the most commonly operations with simulation les and

component creator/data regression cases - open, save and create. In the next sections you will

be guided through some necessary steps to create and congure a steady-state simulation, a

compound creator and/or a data regression case.

DWSIM - User Guide 2


3 SIMULATION

3 Simulation
3.1 User Interface
The "Create a new steady-state simulation" button in the welcome window can be used to

create a new simulation. After the simulation is created, the conguration window (Figure 3)

is shown. The simulation conguration interface consists in a tabbed window:

Ù Compounds - Add or remove compounds to/from the simulation and petroleum fractions
(pseudocompounents) utilities.

Ù Basis - Property Package conguration, phase equilibrium ash algorithm selection and

other advanced thermodynamic model settings.

Ù System of Units - Management of Systems of Units.

Ù Miscelaneous - Simulation info (title, author and description), number formatting and

password settings.

Ù Property Tables - Denition of objects properties to be shown on owsheet oating

tables.

3.2 Conguration

Figure 2: Simulation Conguration Wizard.

Since DWSIM 3.3, a new Simulation Conguration Wizard (Figure 2) is opened as soon as

a new simulation is created, and will display the interfaces described in the following sections in

a more streamlined way. The older simulation conguration window can be accessed anytime

during the simulation or through a button located in the rst page of the cong wizard.

DWSIM - User Guide 3


3.2 Conguration 3 SIMULATION

Figure 3: Simulation conguration window.

The simulation conguration window (Figure 3) is the interface where all the functions for

conguration and personalization of a simulation in DWSIM can be found. In this window, the

user can manage the simulation components, the property package (thermodynamic model),

units system and number format, among other options.

The simulation conguration window can be accessed anytime when a simulation is


opened in DWSIM. The changes made through it have immediate eect on the
simulation.

3.2.1 Components/Compounds

There are two essential information required by DWSIM in order to correctly start a simu-

lation. The rst refers to the available components (or compounds ). There are three types

of components which can be managed in DWSIM - the rst type are the components present in

the database. The second, hypotheticals , and the third, pseudocomponents , are components
which can be added by the user through the Compound Creator or the Petroleum Character-

ization utilities. These user-created components will be available in the end of the component

list inside the "Components" tab for inclusion or removal from the simulation as required.

View the section 3.8 for information about the compound creation utilities.

3.2.2 Basis

Property Packages The Property Package consists in a set of methods and models for the

calculation of physical and chemical properties of material streams in the simulation. It is

composed of a thermodynamic model - an equation of state or a hybrid model - and methods

DWSIM - User Guide 4


3.2 Conguration 3 SIMULATION

for property calculation, like the surface tension of the liquid phase. The gure 4 shows the

interface for conguration of the property package.

Figure 4: Property Package conguration interface.

If the selected property package has any editable property, the "Congure" button becomes

clickable and the user can click on it to show the property package conguration window.

Figure 5: Property package conguration window (1).

Property Package conguration options

Ù Use Ideal Mixing Rule for Liquid Phase Density

If the liquid phase has small amounts of supercritical components, the default calculation

method may fail. If that is the case, change this option to 1 to force an ideal mixing rule for the

DWSIM - User Guide 5


3.2 Conguration 3 SIMULATION

liquid density (use a molar weighted average of individual component liquid densities).

Additional Property Package conguration options Some Property Packages have extra

conguration options in order to allow a deeper control of the thermodynamic calculations for

the user. They are:

Ù Use EOS for Liquid Density

This option forces the calculation of the liquid densities based on the compressibility factor

given by the EOS. When disabled, DWSIM will use the Rackett correlation to calculate the

liquid density. Please note that this also aects the calculation of partial molar volumes, and,

consequently, component liquid volumetric fractions and ow rates.

Use 0 to disable, 1 to enable this option.

Ù Use Peneloux Volume Translation correction

This option is available for PR and SRK Property Packages. It enables correction of EOS-

calculated densities by the inclusion of a correction factor named volume translation coecient.
This option will be eective only if the Use EOS for Liquid Density option is enabled.
Use 0 to disable, 1 to enable this option.

Ù Use Experimental Liquid Density Data

This option aects ChemSep database compounds only. It forces usage of experimental

coecients present in the database to calculate liquid phase densities.

Use 0 to disable, 1 to enable this option.

Ù Use Experimental Liquid Thermal Conductivity Data

This option aects ChemSep database compounds only. It forces usage of experimental

coecients present in the database to calculate liquid thermal conductivities.

Use 0 to disable, 1 to enable this option.

Ù Enthalpy/Entropy/Cp calculation method (Activity Coecient Property Packages only)

Denes the Enthalpy, Entropy and Heat Capacity calculation model (0 = Lee-Kesler, 1 =

Ideal, 2 = Excess).

Ù Ignore maximum salinity limit (IAPWS-08 Seawater Property Package only)

Ignores the maximum supported salinity value (0.12 kg/kg) for calculations and doesn't

display any warnings. Use 0 to disable, 1 to enable this option. If enabled, the calculated salinity

will be send directly to the property calculation routines without further check. If disabled, the

maximum value of 0.12 will be used if the calculated salinity is higher, and a warning message

will be displayed in the owsheet log window.

Flash Algorithms The Flash Algorithms in DWSIM are the components responsible for de-

termining a particular set of phases at thermodynamic equilibrium, their amounts (and the

amounts of the compounds on each phase) at the specied conditions like Temperature, Pres-

sure, Total Enthalpy and Total Entropy. Some Flash Algorithms are capable of predicting equi-

librium between one vapor and one liquid phase, while others support another co-existing liquid

DWSIM - User Guide 6


3.2 Conguration 3 SIMULATION

and/or solid phase. As the amount of phases considered in equilibrium increases, the calculation

time/complexity also increases while the results' reliability decreases. Some ash algorithms

are more capable/reliable than others, depending on the mixture for which the ash calculation

request is being requested. DWSIM features a selection of ash algorithms that are capable of

calculating VLE, VLLE and SLE. They are:

1. Nested Loops (VLE): recommended for the vast majority of VLE systems;

2. Nested Loops (VLLE): recommended for systems where the liquid phase may be unstable

(will split in two liquid phases with dierent compositions);

3. Inside-Out (VLE/VLLE): recommended for petroleum simulations with many pseudo-

components. The 3-phase option must be used when a second liquid phase is expected

(i.e. free water);

4. Gibbs Minimization (VLE/VLLE): recommended for dicult chemical systems;

5. Nested Loops for Eutectic Solid Systems (SLE-E): Calculates Solid-Liquid Equilibria

for eutectic systems considering the solid phase as being ideal.

6. Nested Loops for Solid Solution Systems (SLE-SS): Calculates Solid-Liquid Equilibria

for solid solution systems considering the solid phase as being ideal.

7. Nested Loops (3-phase immiscible VLLE): For systems with an immiscible second liquid

phase (VLLE). The rst compound selected in the key compound list will be the immiscible

one.

You can congure the added Flash Algorithms by selecting the item to congure and clicking

on the "Congure" button on the "Added Flash Algorithms" section.

Figure 6: Property Package conguration interface.

Ù Force Pressure-Enthalpy (PH) Flash calculations

If enabled, all requests by unit operations for PT Flashes will be replaced by PH ones. This

option must be activated if you are working with only one component (steam simulation, for

example), otherwise you won't have partial vaporization/liquefaction in valves, compressors and

expanders.

DWSIM - User Guide 7


3.2 Conguration 3 SIMULATION

Ù Calculate Bubble and Dew points at stream conditions

Check this box if you want the DWSIM to calculate bubble and dew points at conditions

specied on each material stream. The calculated values will be shown only if the stream is at

VLE equilibrium. The calculations are not exactly fast, so use this option with caution and only

if needed.

Ù Validate Equilibrium Flash Calculation Results

If enabled, DWSIM will check the mixture Gibbs energy before and after the equilibrium

ash calculation. If the gibbs energy increases after the calculation (it should always decrease
when there is a phase split), an error message will be shown and the owsheet calculation will

be aborted.

Ù Apply a Phase Identication Algorithm after Equilibrium Calculations

Check this to apply an identication algorithm to each phase after the equilibrium calculation

is nished. This can be useful for supercritical compounds which behave as liquid at high

pressures and temperatures, or special mixtures which exhibit LLE behavior at low temperatures,

incorrectly identied as VLE by the ash algorithms.

This procedure is enabled by default and will override the ash result regarding phase

identication. For instance, the result of a ash calculation may give an all-vapor solution and,

after the phase identication algorithm is applied, the phase may, in fact, behave as liquid. In

this case, DWSIM will show this phase as liquid in the Material Stream property window.

Visit DWSIM's wiki for more information about the phase identication algorithm.

Ù Stability Test

When a ash algorithm with a three-phase capability is selected, DWSIM needs to know

which components are most likely to be present in a second liquid phase. You can do that by

selecting the ones you think that will be in a higher amount - that is, the key components for the

second liquid phase. That doesn't necessarily imposes that the other, unselected components

cannot be present in the second liquid phase - only the equilibrium calculation will tell you that.

The search severity setting controls how much eort DWSIM should put into searching for

a second liquid phase. In the Low setting, only one trial phase is created with a mixture of the

key components and the convergence tolerance is somewhat high. In the High setting, DWSIM

will include additional trial phases, one for each key component and do additional checks using

incipient phases' gibbs energy, with the smallest convergence tolerance value (1E-06).

Multiple Property Packages & Flash Algorithms DWSIM allows multiple Property Packages

and Flash Algorithms to be added to a single simulation, which can be associated to each unit

operation and material stream on a individual basis. Each property package and ash algorithm

has its own settings, even if two or more packages/algorithms are of the same type.

3.2.3 Systems of Units

Three basic units systems are present in DWSIM: SI System (selected by default), CGS
System and English (Imperial) System . The simulation's units system can be viewed/modied

in the "Units System" section of the "Options" tab in the simulation conguration window

(Figure 7).

DWSIM - User Guide 8


3.2 Conguration 3 SIMULATION

Figure 7: Units system conguration interface.

There are buttons available on this interface to create custom units systems and save/load

them. It is worth remembering that the units systems can also be modied at any time during

the simulation - the changes are applied immediately.

3.2.4 Miscelaneous

In the "Misc" section it is possible to dene the number formatting in the simulation

(Figure 8). In the "Description" group box it is possible to edit some information about the

active simulation (title, author and description). You can also dene a password to prevent the

simulation of being opened by anyone, but this feature only works with the Compressed XML

simulation le format (*.dwxmz).

DWSIM - User Guide 9


3.2 Conguration 3 SIMULATION

Figure 8: Misc settings interface.

3.2.5 Property Tables

In the "Property Tables" section you can dene which properties are going to be shown for

each object type when you hover the mouse over the objects on the owsheet. THe property list

is saved in a per-simulation basis.

Figure 9: Property Tables settings interface.

DWSIM - User Guide 10


3.3 Process modeling (Flowsheeting) 3 SIMULATION

Figure 10: Selected properties on the previous image are shown on the owsheet for the Material
Streams.

3.3 Process modeling (Flowsheeting)


After conguring the simulation, the user is taken to the main simulation window (Figure

11). In this window we can highlight the following areas:

Figure 11: DWSIM simulation window.

Ù Menu bars (left-right / up-down): edit owsheet objects, results viewer, image ant text

insertion, zoom controls and owsheet printing; unit ops and streams insertion buttons;

Ù Object Palette window: shows objects which can be added by dragging them into the

PFD;

DWSIM - User Guide 11


3.3 Process modeling (Flowsheeting) 3 SIMULATION

Ù Material Streams window: lists the material streams in the owsheet and their calculated

properties;

Ù Flowsheet window: process owsheet building and editing area;

Ù Information window: general information about the active simulation;

Ù Spreadsheet window: shows the spreadsheet, a utility to do math operations with data

provided by the objects in the current simulation;

When running DWSIM on a Windows platform, the simulation windows can be freely repo-

sitioned, with the arrangement information being saved together with the rest of simulation data.

To reposition a window, the user should click with the left mouse button in the window's top bar

and drag it to the desired place. A preview of how the window will be is shown in blue (Figure

12).

Figure 12: Window repositioning.

When running DWSIM on Mono, use the context menus (right-click with the mouse on the

window caption bar) on each window to reposition/dock its contents.

3.3.1 Inserting Flowsheet Objects

To add an object to the owsheet, you can:

Ù Use the Insert > Flowsheet Object menu item (keyboard shortcut: Ctrl+A):

DWSIM - User Guide 12


3.3 Process modeling (Flowsheeting) 3 SIMULATION

Figure 13: Inserting an object to the owsheet.

Ù Drag an item from the Object Pallette window located on the far right of the main

window (auto-hidden by default):

DWSIM - User Guide 13


3.3 Process modeling (Flowsheeting) 3 SIMULATION

Figure 14: Inserting an object to the owsheet by dragging from the Object Pallette window.

The elements of a simulation (objects) which can be added to the owsheet are:

Ù Material Stream : used to represent matter which enters and leaves the limits of the

simulation and passes through the unit operations. The user should dene their conditions

and composition in order for DWSIM to calculate their properties accordingly;

Ù Energy Stream : used to represent energy which enters and leaves the limits of the

simulation and passes through the unit operations;

Ù Mixer : used to mix up to three material streams into one, while executing all the mass

and energy balances;

Ù Splitter : mass balance unit operation - divides a material stream into two or three other

streams;

Ù Valve : works like a xed pressure drop for the process, where the outlet material stream

properties are calculated beginning from the principle that the expansion is an isenthalpic

process;

Ù Pipe : simulates a uid ow process (mono or two-phase). The pipe implementation

in DWSIM provides the user with various conguration options, including heat transfer

to environment or even to the soil in buried pipes. Two correlations for pressure drop

calculations are available: Beggs & Brill and Lockhart & martinelli. Both reduces to Darcy

equation in the case of single-phase ow;

DWSIM - User Guide 14


3.3 Process modeling (Flowsheeting) 3 SIMULATION

Ù Pump : used to provide energy to a liquid stream in the form of pressure. The process is

isenthalpic, and the non-idealities are considered according to the pump eciency, which

is dened by the user;

Ù Tank : in the current version of DWSIM, the tank works like a xed pressure drop for the

process;

Ù Separator Vessel : used to separate the vapor and liquid phases of a stream into two

other distinct streams;

Ù Compressor : used to provide energy to a vapor stream in the form of pressure. The ideal

process is isentropic (constant entropy) and the non-idealities are considered according to

the compressor eciency, which is dened by the user;

Ù Expander : the expander is used to extract energy from a high-pressure vapor stream.

The ideal process is isentropic (constant entropy) and the non-idealities are considered

according to the expander eciency, which is dened by the user;

Ù Heater : simulates a stream heating process;

Ù Cooler : simulates a stream cooling process;

Ù Conversion Reactor : simulates a reactor where conversion reactions occur;

Ù Equilibrium Reactor : simulates a reactor where equilibrium reactions occur;

Ù PFR : simulates a Plug Flow Reactor (PFR);

Ù CSTR : simulates a Continuous-Stirred Tank Reactor (CSTR);

Ù Shortcut Column : simulates a simple distillation column with approximate results using

shorcut calculations;

Ù Distillation Column : simulates a distillation column using rigorous thermodynamic mod-

els;

Ù Absorption Column : simulates an absorption column using rigorous thermodynamic mod-

els;

Ù Reuxed Absorber : simulates a reuxed absorber column using rigorous thermodynamic

models;

Ù Reboiled Absorber : simulates a reboiled absorber column using rigorous thermodynamic

models.

Ù Heat Exchanger: simulates a countercurrent heat exchanger using rigorous thermody-

namic models.

Ù Orice Plate: model to simulate an orice plate, used for ow metering.

Ù Component Separator: model to simulate a generic process for component separation.

Ù Custom Unit Operation: an user-dened model based on IronPython/IronRuby scripts.

DWSIM - User Guide 15


3.3 Process modeling (Flowsheeting) 3 SIMULATION

Ù CAPE-OPEN Unit Operation: External CAPE-OPEN Unit Operation socket for adding

CO Unit Operations in DWSIM.

Ù Spreadsheet Unit Operation: Unit Operation where the model is dened and calculated

in Spreadsheet (XLS/XLSX/ODS) les.

Ù Solids Separator: model to simulate a generic process for solid compound separation.

Ù Continuous Cake Filter: continuous cake lter model for solids separation.

Additionally, the following logical operations are available in DWSIM:

Ù Adjust : used to make a variable to be equal to a user-dened value by changing the value

of other (independent) variable;

Ù Specication : used to make a variable to be equal to a value that is a function of other

variable, from other stream;

Ù Recycle : used to mix downstream material with upstream material in a owsheet,

Ù Energy Recycle : used to mix downstream energy with upstream energy in a owsheet.

Figure 15 shows a material stream added to the owsheet by one of the method described

above. It can be observed that the stream is selected and that its property editor is shown as a

panel on the left part of the main window.

Figure 15: A material stream in the owsheet.

DWSIM - User Guide 16


3.3 Process modeling (Flowsheeting) 3 SIMULATION

Connecting objects The material streams represent mass owing between unit operations.

There are two dierent ways in which a material stream can be connected to a unit operation

(or vice-versa):

Ù Through the context menu activated with a right mouse button click over the object

(Figure 16);

Figure 16: Selected object context menu.

Ù Through the property editor window - Connections section.

Figure 17: Connection selection menu.

Ù Through the "Create and Connect" buttons on the object editors. When you click on these

buttons, DWSIM will automatically create and connect streams to the associated ports on

the selected object.

DWSIM - User Guide 17


3.3 Process modeling (Flowsheeting) 3 SIMULATION

Figure 18: Create and Connect tool.

An expander system with its connections is shown on Figure 19.

Figure 19: Expander with all connections correctly congured.

Disconnecting objects Tools to disconnect objects from each other can be found on the same

locations as the connecting ones.

Removing objects from the owsheet The selected object can be removed from the ow-

sheet by pressing the DEL keyboard button or by using the context menu - "Delete" item (Figure

16).

3.3.2 Process data management

Entering process data The objects' process data (temperature, pressure, ow, composition

and/or other parameters) can be entered in the property editor window (Figure 20). Properties

that cannot be edited (read-only) are grayed-out.

DWSIM - User Guide 18


3.3 Process modeling (Flowsheeting) 3 SIMULATION

Figure 20: Viewing object properties in the editor window.

Most properties can be edited directly by typing a value in the textbox and pressing ENTER.

DWSIM will then commit the new property value and trigger the calculator.

Figure 21: Direct editing of a property.

You can also use the inline units converter to convert the value of a property from the

desired units to the current selected units. Type the value of the property on the textbox and

DWSIM - User Guide 19


3.3 Process modeling (Flowsheeting) 3 SIMULATION

select the unit to convert from at the combobox on the right. DWSIM will then convert the

value from the selected units on the combobox to the actual units of the simulation system of

units.

Figure 22: Converting 50 C to the current temperature units (K).

Figure 23: Converted temperature value (323.15 K).

If all object properties were correctly dened, it will be calculated by DWSIM and its

owsheet representation will have a blue border instead of a red one, indicating that the object

was calculated successfully (Figure 24).

Figure 24: Calculated objects.

3.3.3 Undo/Redo actions

DWSIM supports Undo and Redo for certain actions, like:

Ù Changing a property of an object (model and graphic object properties)

DWSIM - User Guide 20


3.3 Process modeling (Flowsheeting) 3 SIMULATION

Ù Connecting, disconnecting objects

Ù Adding and removing objects

Ù Adding and removing compounds

Ù Adding, removing and editing Property Packages

To undo or redo an action, click on the Edit menu item and then on the corresponding

menu items (Figure 26). You can also access a list of actions to undo or redo through the arrow

buttons located in the menu strip, near to the Flowsheet label (Figure 25).

Figure 25: Undo action list.

The Edit menu also contains some handy tools for handling owsheet objects, as well as

simulation and application conguration menu items (Figure 26).

DWSIM - User Guide 21


3.3 Process modeling (Flowsheeting) 3 SIMULATION

Figure 26: Edit menu.

3.3.4 Cut/Copy/Paste objects

DWSIM also supports cutting, copying and pasting owsheet objects inside a owsheet or

between dierent owsheets. When copying objects between owsheets, DWSIM may also copy

compounds and property packages from one owsheet to another. Cut/Copy/Paste behavior is

an application setting and can be set in the General Settings menu (Section 6.4).

3.3.5 Simulation

DWSIM is a sequential modular process simulator, that is, all calculations are made in a

per-module basis, according to the connections between the objects. The calculator checks if

an object has all of its properties dened and, if yes, passes the data for the downstream object

and calculates it, repeating the process in a loop until it reaches an object that doesn't have

any of its dowstream connections attached to any object. This way, the entire owsheet can

be calculated as many times as necessary without having to "tell" DWSIM which object must

be calculated. In fact, this is done indirectly if the user dene all the properties and make all

connections between objects correctly.

DWSIM's calculation starts when the user edits a property which denes an object.

For example, editing a stream mass ow when its temperature, pressure and composition are

already well-dened activates DWSIM`s calculator.

It is possible to control DWSIM's calculator by using its button bar (Figure 27). Clicking

on the button activates or deactivates the calculator. The button performs a full

owsheet recalculation. DWSIM's calculator is enabled by default - if it is disabled, modifying

of a property is accepted, but does not recalculate the object nor the ones that are downstream

DWSIM - User Guide 22


3.3 Process modeling (Flowsheeting) 3 SIMULATION

in the owsheet. The button stops the any ongoing calculation. The button removes

all items which may still be present in the calculator queue, waiting to be processed.

Figure 27: DWSIM's calculator control bar.

As DWSIM's calculator does its job, messages are added to the "Information" window.

These messages tell the user if the object was calculated successfully or if there was an error

while calculating it, among others (Figure 28).

Figure 28: A DWSIM's calculator message.

3.3.6 Results

Results can be viewed in reports, generated (Figures 29 and 30) for printing. Report data

can also be saved to ODT, ODS, XLS, TXT or XML les.

Figure 29: Results report conguration.

DWSIM - User Guide 23


3.4 Sensitivity Analysis 3 SIMULATION

Figure 30: Results report.

3.4 Sensitivity Analysis


You can use the Sensitivity Analysis Utility in order to study the inuence of up to 2 variables

into other dependent owsheet variables. The changes in variables are dened by a value range

and a number of equally spaced points within this range. For example, you can analyze the

inuence of temperature and pressure in the enthalpy of a mixture, from 200 to 400 K and from

100 to 1000 kPa, nine points for temperature and 5 points for pressure, totaling 45 points on

which the enthalpy will be calculated at dierent temperatures and pressures. This also means

that the owsheet will be recalculated 45 times (!), so be careful with the number of points you

choose as the calculation time can be prohibitive.

DWSIM - User Guide 24


3.5 Flowsheet Optimization 3 SIMULATION

Figure 31: Sensitivity Analysis Utility (1).

The sensitivity analysis utility is based on case studies. In a single simulation one can dene

a number of cases, each one with its own variables, ranges and results. These cases will be saved

together with the simulation, and cannot be exported to other ones. The results are shown in

a table, so the data can be copied and pasted into another specialized data analysis software or

sent directly to the data regression plugin.

3.5 Flowsheet Optimization


The new Optimizer in DWSIM handles single and multivariate optimization problems with

or without bound constraints. The objective function can be either a variable in the owsheet

or an expression as a function of as many variables as you need.

The interface is very similar to Sensitivity Analysis's one. One can dene a number of cases,

each one with its own variables, ranges and results. These cases will be saved together with the

current simulation, and cannot be exported to other simulations.

DWSIM - User Guide 25


3.5 Flowsheet Optimization 3 SIMULATION

Figure 32: Multivariate Optimization Utility (1).

There are some options to choose from in DWSIM's Multivariate Optimizer. It is possible

to select the type of the optimization (minimization or maximization of the objective function),

choose if the indendent variables will have lower and/or upper bounds and if the objective

function will be a owsheet variable or an expression based on owsheet variables. One can also

dene a maximum number for the iterations and a tolerance for the variation of the calculated

value for the objective function - if the variation is less than the dened value, the owsheet is

considered optimized and the process stops. There is also an option to choose if the owsheet

will be returned to its original state after optimization, so the results will be shown only in the

current window, and the owsheet initial conguration will remain intact.

In order to dene variables to be used in the optimization process, a variable can be added

by clicking on the "+" button. With the variable row added to the list, one chooses an object,

then the desired property and the type of variable (IND for independent, AUX for auxiliary or

DEP for dependent variables). If necessary, one can dene a lower and/or upper limit for the

IND variables, according to the current unit system. The variable name is the one which will be

used in the expression.

DWSIM only considers bounds for independent variables. Also, if the objective function is a

DEP variable, and you dened multiple DEP variables, only the rst will be used. AUX variables

are used in the context of an expression only. To remove a variable, a row must be selected by

clicking at the row header before pressing the "-" button.

DWSIM - User Guide 26


3.5 Flowsheet Optimization 3 SIMULATION

Figure 33: Multivariate Optimization Utility (2).

With all the variables dened and the case congured, the optimization can be carried out

by clicking on the appropriate button - the button will become disabled. After some time, if the

optimization converges, the button will become active again, indicating that the the optimization

process is over.

Figure 34: Multivariate Optimization Utility (3).

DWSIM - User Guide 27


3.6 Utilities 3 SIMULATION

3.6 Utilities
DWSIM includes some utilities which provides the user with more information about the

process being simulated.

Utilities can be added and attached to Flowsheet objects (Utilities > Add Utility menu

item). After being attached, they will be saved together with simulation data and restored upon

reopening. Some data from the attached utilities will be available to be displayed on property

tables and used on sensitivity analysis and optimization studies.

Figure 35: Attaching Utilities through the "Add Utility" window.

Figure 36: Attaching Utilities through the object editors.

Added/Attached Utilities will be visible on the context menu located on the object editors,

on the right of the Object's Name textbox.

Figure 37: Accessing attached Utilities.

DWSIM - User Guide 28


3.6 Utilities 3 SIMULATION

Ù True Critical Point - utility to calculate the true critical point of a mixture (Figure 38).

Figure 38: Utilities - True Critical Point.

Ù Hydrate Equilibrium/Dissociation Utility - calculation of the equilibrium conditions for

natural gas hydrates (Figure 39);

Figure 39: Utilities - Hydrate Calculations.

DWSIM - User Guide 29


3.6 Utilities 3 SIMULATION

Ù Phase Envelope - Material stream phase equilibria envelope calculation (Figure 40);

Figure 40: Utilities - Phase Envelope.

Ù Binary Envelope - special envelopes for binary mixtures (Figure 41).

Figure 41: Utilities - Binary Envelope.

Ù Petroleum Cold Flow Properties - special properties of petroleum fractions, like cetane

index, ash point, refraction index, etc. (Figure 42).

DWSIM - User Guide 30


3.7 Chemical Reactions 3 SIMULATION

Figure 42: Utilities - Petroleum Cold Flow Properties.

Utilities calculate their properties for one object only, which is selected inside their own

windows. In the majority of cases, this object must be calculated in order to be available for

selection in the utility window.

Please view DWSIM's Technical Manual for more details about the models and methods
used by the Utilities.

3.7 Chemical Reactions


DWSIM classies chemical reactions in three dierent types: Conversion, where the conver-

sion of a reagent can be specied as a function of temperature; Equilibrium, where the reaction

is characterized by an equilibrium constant K, and Kinetic, where the reaction is led by a velocity

expression which is a function of concentration of reagents and/or products.

Please view DWSIM's Technical Manual and Equipment and Utilities Guide for more
details about chemical reactions and reactors, respectively.

Chemical reactions in DWSIM are managed through the Chemical Reactions Manager

(Tools > Reactions Manager menu item) (Figure 43):

DWSIM - User Guide 31


3.7 Chemical Reactions 3 SIMULATION

Figure 43: Chemical Reactions Manager.

The user can dene various reactions which are grouped in Reaction Sets. These reaction

sets list all chemical reactions, and the user must activate only those he wants to become available

for one or more reactors (since the reactor's parameter is the reaction set and not the chemical

reactions themselves). In the reaction set conguration window it is also possible to dene the

reaction ordering. Equal indexes dene parallel reactions (Figure 44):

Figure 44: Reaction Set editor.

When the reactions and their respective reaction sets are correctly dened, the last will be

available for selection in the property window of a reactor in the simulation. The reactor will

then look for active reactions inside the selected set (Figure 45):

DWSIM - User Guide 32


3.8 Characterization of Petroleum Fractions 3 SIMULATION

Figure 45: Reaction set in a reactor's property window.

3.8 Characterization of Petroleum Fractions


DWSIM provides two tools for characterization of petroleum fractions ("Simulation Set-

tings" > "Tools" > "Petroleum Characterization"). One of them characterizes C7+ fractions

from bulk properties (Figure 46). The other characterizes the oil from an ASTM or TBP distil-

lation curve (Figure 47).

In both tools, the characterization is done through the creation of various components with

dierent boiling points (pseudocomponents) which together represent the assay as a whole.

- Characterization from bulk properties The method itself requires a minimum of infor-

mation to generate the pseudocomponents, though the more data the user provides, the better

DWSIM - User Guide 33


3.8 Characterization of Petroleum Fractions 3 SIMULATION

will be the results (Figure 46). It is recommended that the user provides the specic gravity of

the C7+ fraction at least. Viscosity data is also very important.

Figure 46: C7+ petroleum fraction characterization utility.

- Characterization from distillation curves This tool gets data from an ASTM or TBP

distillation curve to generate pseudocomponents. It is also possible to include viscosity, molecular

weight and specic gravity curves to enhance the characterization.

The interface has a wizard-like style, with various customization options (Figure 47):

DWSIM - User Guide 34


4 COMPOUND CREATOR

Figure 47: Characterizing petroleum from distillation curves.

After the pseudocomponents are created, a material stream with a dened composition is

also created, which represents the characterized petroleum fraction.

The hypo and pseudocomponents are available for use only in the simulation in which
they were generated, even if there is more than one opened simulation in DWSIM.
Nevertheless, the user can export these components to a le and import them into
another simulation.

4 Compound Creator
4.1 Component/Compound Databases
4.1.1 Databases/Datasets

The compounds available for use in simulations are grouped in databases /datasets. DWSIM

comes with one database with the most common compounds used in the petroleum industry plus

some alcohols and inert gases. DWSIM also includes a database with more than 400 compounds

from ChemSep— LITE.

DWSIM - User Guide 35


4.1 Component/Compound Databases 4 COMPOUND CREATOR

User-Dened Databases in DWSIM can be managed through a window which can be opened

from the Main Menu > Settings > General Settings (Figure 48):

Figure 48: Database manager.

On this window the user can add and/or remove modied databases (created from the

DWSIM - User Guide 36


4.2 About the Compound Creator Utility 5 DATA REGRESSION

Components tab in the Simulation Settings window).

User databases can be created and managed through the Compound Creator Utility,

which unies the Quick Component Creator and Hypothetical Component utilities into a single,

easy-to-use tool.

4.2 About the Compound Creator Utility


The Compound Creator puts together the features found in the Hypothetical and Quick

Compound Creator, allowing the user to save his compounds into a database that can be loaded

later globally in DWSIM, that is, your compounds can be used in all simulations, not only in

the one that they were created. The Compound Creator also allows you to save and load your

compound creation study/case for later use.

Figure 49: Compound Creator Utility.

5 Data Regression
DWSIM can regress experimental binary VLE/LLE/SLE data in order to calculate interaction

parameters for a variety of thermodynamic models. This way you can calculate interaction

parameters for compounds in DWSIM and ChemSep databases that do not have them or calculate

parameters between known compounds and one that you just created using the Compound

Creator utility.

5.1 About the Data Regression Utility


The Data Regression Utility supports regression of experimental binary data for determina-

tion of interaction parameters for the following models:

Ù PC-SAFT

DWSIM - User Guide 37


5.1 About the Data Regression Utility 5 DATA REGRESSION

Ù Peng-Robinson

Ù Peng-Robinson-Stryjek-Vera 2

Ù Soave-Redlich-Kwong

Ù UNIQUAC

Ù NRTL

Ù Lee-Kesler-Plöcker

The following data sets are supported:

Ù VLE Temperature and molar fractions (Txy)

Ù VLE Pressure and molar fractions (Pxy)

Ù VLE Temperature, Pressure and molar fractions (TPxy)

Ù LLE Temperature and molar fractions (Txx)

Ù LLE Pressure and molar fractions (Pxx)

Ù LLE Temperature, Pressure and molar fractions (TPxx)

Ù SLE Temperatures and mole fractions (TTx)

The Data Regression Utility also possesses some handy aditional features like:

Ù Calculation of initial values for the binaries using UNIFAC/MODFAC structure information

Ù Calculation of missing experimental data using known models/binaries for determination

of parameters for other models

Ù Optimization method selection

Ù Objective Function selection (Least Squares of temperature/pressure plus vapor fractions)

The Data Regression Utility also supports loading and saving of a regression study/case for

later use.

DWSIM - User Guide 38


6 GENERAL SETTINGS

Figure 50: Data Regression Utility.

6 General Settings
The application settings can be accessed through the Edit > General Settings menu item

(Figure 51):

DWSIM - User Guide 39


6.1 Solver 6 GENERAL SETTINGS

Figure 51: General Settings section.

6.1 Solver
The Solver conguration tab display a group of settings to control the behavior of DWSIM's

solver. Check the Wiki articleSolver Congurationfor more details.

6.2 Datasets
In the database tab, you have options to remove, add and edit user-dened compound and

interaction parameter datasets.

DWSIM - User Guide 40


6.3 Backup 6 GENERAL SETTINGS

6.3 Backup
The Backup tab has options to control the frequency of the backup le saving. You can

also congure the option to save an existing le with another name instead of overwriting it.

6.4 Other
6.4.1 Messages

Ù Show tips: displays context-sensitive tips on the owsheet information (log) window.

Ù Show What's New : displays a window with information about what's new on the

running version.

Ù Checks for updates: DWSIM will check for updated installers on startup.

Ù Enable automatic updates: DWSIM will be automatically updated without user in-

tervention. When an update package is available, DWSIM will download and apply it,

restarting after the process is nished.

6.4.2 Debug mode

Ù Debug level: controls the amount of information written to the owsheet information

(log) window when solving the simulation.

Ù Redirect console output: redirects the output of the console to the console window

inside DWSIM.

6.4.3 UI Language

Ù Language: sets the UI language. Requires a restart.

6.5 Flowsheet
6.5.1 Cut/Copy/Paste Flowsheet Objects

Ù Compounds: controls how compounds are handled during cut/copy/paste operations.

Ù Property Packages: controls how Property Packages are handled during cut/copy/paste

operations.

6.5.2 Undo/Redo

Ù Recalculate owsheet: denes if the owsheet is to be recalculated after undo/redo

operations.

6.5.3 Object Editors

Ù Enable multiple editors: allows displaying of multiple object editors at once.

Ù Close editors on deselecting: closes the editors once the object being edited is deselected.

Ù Default initial placement: default location for displaying the object editors.

DWSIM - User Guide 41

You might also like