3.1 advanced simulations manual metric

Upload: pineda-jesus

Post on 30-Oct-2015

101 views

Category:

Documents


0 download

TRANSCRIPT

  • Table of Contents

    ProMax Level IIAdvanced Simulation Methods Agenda ............................................... iv

    Customizing ProMax ............................................................................................................. 1

    Modifying Options.xml File ............................................................................................ 1

    Exercise 1: Add New Property to Process Streams ................................................... 2

    Exercise 2: Add New Option in Drop Down Menu ................................................... 2

    Exercise 3: New Tool Tip for Process Streams ......................................................... 2

    Exercise 4: Create a Custom Unit Set ........................................................................ 2

    Modifying Column Hardware.xml File ........................................................................... 3

    Modifying Pipe Segment Data.xml File .......................................................................... 4

    Creating Personalized Watermarks .................................................................................. 5

    Exercise 5: Changing the ProMax Watermark .......................................................... 5

    Property Stencils and Examples............................................................................................. 6

    Recycles/Solvers and Prioritization ..................................................................................... 11

    Exercise 6: Simple Example Demonstrating Prioritization Concept ....................... 12

    Exercise 7: Prioritization of a Large Multi-Flowsheet Plant ................................... 13

    User Value Sets .................................................................................................................... 14

    Defining a User Value ................................................................................................... 14

    Displaying a User Value in a Property Table ................................................................ 15

    Modifying or Creating a Report for the User Value Set ................................................ 15

    User Value Set Problems: .............................................................................................. 16

    Exercise 8: Steam Rate Property User Value .......................................................... 16

    Exercise 9: Tail Gas Ratio User Value .................................................................... 17

    Exercise 10: Grains per 100 SCF User Value .......................................................... 17

    Heat Exchanger Rating ........................................................................................................ 18

    Exercise 11: Crude Oil Shell & Tube Exchanger .................................................... 18

    Exercise 12: Rating a Multi-Sided Compact Heat Exchanger ................................. 20

    ProMax Calculator Methods ................................................................................................ 22

    Use of JScript in Simple Solvers ................................................................................... 22

    Exercise 13: DEPG Acid Gas Removal with JScript Simple Solver ....................... 23

    Exercise 14: MDEA Sweetening with JScript Simple Solver ................................. 24

    Use of Advanced Calculators ......................................................................................... 25

    Creating an Advanced Calculator ............................................................................ 26

    Accessing and Specifying the Advanced Calculator ............................................... 26

    Advanced Specifiers ...................................................................................................... 27

    Complex Mixed Refrigerant Plant Example ............................................................ 27

    Exercise 15: XCHG-100 Hot End Approach Advanced Specifier .................... 28

    Exercise 16: XCHG-101 Advanced Specifier ................................................... 29

    Exercise 17: InterStage Pressure Advanced Specifier ....................................... 29

    Advanced Solvers .......................................................................................................... 30

    Exercise 18: Sulfur Hydrogenation Reactor Advanced Solver................................ 30

  • ii

    Exercise 19: Crude Oil Exchanger Advanced Solver .............................................. 32

    Advanced Calculator Using Excel ................................................................................. 33

    Exercise 20: Example Problem with Excel Calculator ............................................ 34

    Advanced Column Configurations ...................................................................................... 35

    Column Set-up ............................................................................................................... 35

    Column Execution and Convergence............................................................................. 36

    Column Fails to Execute .......................................................................................... 36

    Column Fails to Converge ....................................................................................... 37

    Exercise 21: Demonstration of Reboiler Options .......................................................... 39

    Exercise 22: Sour Water Stripper with Pump-around and Thermosyphon Reboiler ..... 41

    Exercise 23: Glycol Unit with Attached Stahl Column ................................................. 42

    Exercise 24: Stabilizer with Heavy Liquid Draw .......................................................... 43

    Reactors................................................................................................................................ 44

    General Review of Chemical Reactions ........................................................................ 44

    Reaction Sets .................................................................................................................. 46

    General Reaction Information.................................................................................. 46

    Equilibrium Reactions ............................................................................................. 46

    Conversion Reactions .............................................................................................. 47

    Kinetic Reactions ..................................................................................................... 47

    Exercise 25: Defining a Simple Reaction Set .......................................................... 48

    Reactor Blocks in ProMax ............................................................................................. 49

    Gibbs Minimization Reactors .................................................................................. 50

    Exercise 26: Incinerator/Fired-Boiler, Gibbs Minimization Reactor ................ 51

    Equilibrium Reactor Blocks in ProMax ................................................................... 52

    Exercise 27: Steam Methane Reforming (SMR), Equilibrium Reactor ............ 53

    Exercise 28: COS Hydrolysis in an Equilibrium Reactor .................................. 54

    Conversion Reactor Blocks in ProMax.................................................................... 55

    Exercise 29: HF Alkylation using a Conversion Reactor .................................. 56

    Exercise 30: Defining a Catalytic Reaction Set ................................................. 57

    Plug Flow Reactor Blocks in ProMax ..................................................................... 58

    Exercise 31: Water Shift Reactors, Plug Flow Reactor ..................................... 59

    Stirred Tank Reactor Blocks in ProMax .................................................................. 60

    Exercise 32: Allyl Chloride Production (CSTR and PFR) ................................ 61

  • iii

  • iv

    ProMax Level IIAdvanced Simulation Methods Agenda

    Day 1

    Customizing ProMax

    Modifying the Options.xml File

    Modifying Column Hardware.xml File

    Modifying Pipe Segment Data.xml File

    Creating additional personalized stencils

    Creating personalized watermarks

    Property Stencils and Examples

    Adding the Property Stencils to your ProMax project

    Recycles/Solvers and Prioritization

    Techniques for improved solve time

    Troubleshooting

    User Variable Sets

    Creation of user-defined variables

    Examples of using user value sets

    Exchanger Ratings

    HEX Rating

    Day 2

    ProMax Calculator Methods

    Use of JScript language in simple solvers

    Advanced specifiers and examples

    Advanced solvers and examples

    Excel Calculator

    Advanced Column Specifications and Troubleshooting

    Tower Types Available

    Associated Equipment

    Draw Types Available

    Pump-around loops

    Tips to help converge columns

    Day 3

    Review of Reactions

    Reaction Sets

    Defining reaction sets

    Using reaction sets in reactors

    Rating Double-sided Reactors

    Reactors

    Gibbs Minimization

    Conversion

    Equilibrium

    Plug Flow

    Stirred Tank

  • 1

    Customizing ProMax

    ProMax offers many different methods to customize it to your particular needs and

    usages. Several XML files are available to modify many options of ProMax,

    personalized stencils may be created allowing for easy drag-and-drop placement of

    complex units, watermarks can be customized, and binary interaction parameters can be

    calculated and modified based on any additional information you may have available.

    Modifying Options.xml File

    Included in your installation of ProMax is an Options.xml file. This file stores many of

    the preferences and options which are default to ProMax for all users of a computer, or

    for individual users. Some of the options available are:

    Saving all files as either Visio v2002 or Visio v2003

    Modifying color blindness options to suit individual needs

    Changing the Process Stream (PStream) properties and order shown in the Project

    Viewer

    Managing both the information shown and the unit set shown in PStream tooltips

    Customizing the report options

    o Page Sizes (e.g. the default can be A4 for European users)

    o PStream Properties shown. The report follows separate rules than the Project

    Viewer and can be different.

    Altering the default units for any stream property

    Including additional common units (those that appear in the drop-down boxes in the

    Project Viewer)

    Creating custom unit sets if no default unit sets match your needs

    Changing the heat exchanger tabular data order

    Modifying the column tray data internals

    Including different composition bases

    By default the file location is: %AllUsersProfile%\Application Data\Bryan Research &

    Engineering Inc\ProMax3\Data

    Warning: Always back-up your original Options.xml file before

    modifying

  • 2

    Exercise 1: Add New Property to Process Streams

    Modify your Options.xml file to include the Normal Volumetric Flow Rate as a default

    value shown in the Project Viewer for all PStreams.

    Hint: most properties are used at some point in the Options.xml file and can be found

    by searching the document. If a property is not available in the XML file, all properties

    and their respective enumeration strings are listed in the VBA Object Browser. You

    can access this from ProMax by going to the Tools menu, then selective Macros and Visual Basic Editor from the options listed. Once this opens, you can then find the object browser under the View menu. In the list of Classes, scroll to pmxPhasePropEnum to find the list of Phase Property enumeration strings (e.g.,

    pmxPhaseMassCp for the Mass Cp value).

    Exercise 2: Add New Option in Drop Down Menu

    Add an option for tonb/yr in the drop-down menu for your mass flow rate in all

    PStreams.

    Hint: these are classified as common units in the Options.xml file.

    Exercise 3: New Tool Tip for Process Streams

    Allow the molecular weight of your process streams to be shown automatically as a

    tool-tip when your mouse cursor hovers over a stream.

    Hint: these are classified as tool tips in the Options.xml file.

    Exercise 4: Create a Custom Unit Set

    Make a new unit set available for use within ProMax. Start with the kJ - bar unit set,

    and make the following changes:

    Standard Vapor Volumetric Flow: m^3/d instead of m^3/h

    Normal Vapor Volumetric Flow: Nm^3/d instead of Nm^3/h

    Standard Liquid Volumetric Flow: bbl/d instead of lpm

    Pressure: barg instead of bar

  • 3

    Modifying Column Hardware.xml File

    Similar to the Options.xml file, the Column Hardware.xml file allows further

    customization and additions to ProMax. Specifically, the options provided with this file

    include:

    Customizing structured and random packing materials

    Modifying many parameters, including those seen in the sample code below:

    -

    pmxRandomPackUserDefined pmxPackingMaterialMetal

    130.0

    101.7060367

    0.965

    0.0508

    1.61

    0.75

    0.784

    1.218

    0.362

    -

    pmxStructPackUserDefined pmxPackingMaterialMetal

    pmxStructuredPackFloodModelBilletSchultes 250

    0.988

    2.464

    0.292

    0.554

    1.068

    0.406

    By default the file location is: %AllUsersProfile%\Application Data\Bryan Research &

    Engineering Inc\ProMax3\Data

    Warning: Always back-up your original Column Hardware.xml file

    before modifying

  • 4

    Modifying Pipe Segment Data.xml File

    Similar to the Options.xml and Column Hardware.xml files, the Pipe Segment

    Data.xml file allows further customization and additions to ProMax. Specifically, the

    options provided with this file include:

    New fittings and their resistance coefficients

    New ground type and their diffusivity

    New insulation types and their thermal conductivity

    Note: the ID number points ProMax to specific information in its database. When

    modifying any item, the ID must be deleted.

    -

    - 0.35

    -

    -

    2.42303

    1.032256E-06

    -

    -

    0.0004

    By default the file location is: %AllUsersProfile%\Application Data\Bryan Research &

    Engineering Inc\ProMax3\Data

    Warning: Always back-up your original Pipe Segment Data.xml file

    before modifying

  • 5

    Creating Personalized Watermarks

    ProMax allows for customization of the watermark. You can remove the Bryan

    Research & Engineering watermark and have no remaining background picture, or you

    may add your own picture instead.

    To remove or change the watermark, follow these steps:

    1. Go to the Background page of the project, typically the last sheet tab at the bottom of the Visio page.

    2. Right click anywhere on the Background page and choose View, then Layer Properties

    3. De-selecting Visible and Print will disable the watermark, but allow it to later be re-enabled through the same process.

    4. If you wish to permanently delete the Bryan Research & Engineering watermark from this project, select the Watermark layer, and click on the Remove button.

    5. If you would like to add your own watermark to the page, any picture placed on the page will be shown on all other pages. To add a picture, click on the Insert menu item, then insert, picture, and from file, then browse to the picture you would like inserted.

    6. To change the transparency of the newly added picture, right click on the object, select Format, then Picture. On the Image Control tab is an effect Transparency.

    7. This must be done for each project you wish to change the watermark on.

    8. To apply a change for all newly created ProMax projects, a template file must be changed in a similar manner. This template file is found by default in the folder

    C:\Program Files\Bryan Research & Engineering Inc\ProMax2\Templates

    o The template file is Project-A.vst for US customers.

    o The template file is Project-A4.vst for those customers using the A4 size paper.

    o Once you have created the file you would like to use, save it as a .vst file and replace the Project-A.vst or Project-A4.vst file in the Templates folder.

    o Note: new upgrades and releases of ProMax will override these changes. Please keep an additional copy of your modification for future use in a

    separate location.

    Exercise 5: Changing the ProMax Watermark

    Following the instructions above, change the watermark of a blank project to one of the

    images found in the Miscellaneous folder that was copied to your computer at the beginning of the training course.

  • 6

    Property Stencils and Examples

    The following stencils are included with ProMax, however are not loaded by default.

    These provide some extended capabilities, and can be loaded by following these steps:

    1. In ProMax, select File then Shapes

    2. Locate the Stencil titled ProMax Property Stencil and select it

    3. The ProMax Help file includes help topics on the Property Stencils

    There are several Property Calculator examples within the ProMax Property Stencil;

    most are made from the Property Calculator with VPScript added for functionality. In this collection, most of the objects function as is while the Solver/Specifier Example

    requires a small amount of VBScript code. These examples are as follows:

    Single Line Property

    Displays a single ProMax Property on PFD

    Property Input

    Allows input (when shape is selected) of editable ProMax properties

    directly from PFD

    Property Connector

    The Property Connector shape is a visual representation of data

    sharing between shapes. It displays no data itself, but transfers its

    moniker to another shape. It adds its property to a connected Property

    Calculator grid, or the one allowed property for the other basic shape

    types. The Connector contains a partial moniker (an offset) selectable

    via the Object Tree. The remainder of the moniker comes from the

    attached block or stream. A moved or copied connector retains its

    offset moniker if attached to a similar ProMax object, and will

    automatically retrieve the same property.

    Property Calculator

    This shape displays properties that are calculated from other ProMax

    Objects. Unlike the other basic shapes, the user may add multiple

    ProMax properties and local variables. Using VBScript, custom

    calculations are made, displayed, and even returned to ProMax during

    Solve. More information on this can be found in the Help.

    Streams Cn+ GPM

    This Property Calculator example displays a process streams Cn+ GPM. The carbon number cutoff (n) for this property is stored in the local constant called intMinCAtoms, and can be adjusted. Note: units are std gal / MSCF.

  • 7

    Sum I/O Property

    This Property Calculator example sums a given property for all inlet or

    outlet streams. Select the target stream property of a stream of the

    desired type (inlet or outlet) in the Edit Variable dialog. Combining a

    new Sum I/O Property with a Property Connector that the moniker offset selected and connects to the desired stream type (inlet or outlet)

    produces the same effect.

    API Vapor Relief Area

    This Property Calculator example calculates the API Relief Valve

    Area for a vapor stream. This should be used as an example only;

    please use our stream analysis for Relief Valve sizing.

    API Steam Relief Area

    The steam-only (vent to atmosphere) version of API relief valve

    sizing, utilizes the same inputs as above with the exception of

    maximum backpressure. This should be used as an example only;

    please use our stream analysis for Relief Valve sizing.

    Data Exchange

    This Property Calculator example exchanges a ProMax property

    between ProMax and an embedded Excel workbook in a bidirectional

    manner. Selecting cells with the mouse can update the input box.

    Solver/Specifier Example

    This Property Calculator example is a shell that with appropriate

    VBScript edits supplies a value to a script-based ProMax Calculator.

    1. Create a new ProMax calculator for the input variable you

    want to control. You will enter the Measured Variables in the

    Stencil dialog rather than on the calculator dialog.

    2. In the Property Calculator Edit dialog, modify the moniker of

    CalcSource to reference the target ProMax Calculator

    Source.

    3. Add Measured Variables to the grid that reference the required

    properties; then press Edit Script Function.

    4. Use the added measured variables to design the Specifier value

    function, or the Solver residual error function and place this

    formula in the VBScript in place of the number 1 next to the comment Assign value to calculator.

    Cn+GPM Solver Example

    This Property Calculator/Connector example calculates a stream

    Cn+GPM to drive a script based ProMax Solver. The Process stream

    for the Cn+GPM calculation is selected by connecting the unconnected

    end of the Property Connector to the target stream.

  • 8

    Cn+ Flow/Frac

    This Property Calculator example displays the flow or fraction sum of

    Cn+ compounds in a process stream. This has a similar behavior to

    the Cn+GPM calculation but has a user selectable composition basis

    accessible through the Edit dialog.

    Flow Duplicator Example

    This Property Calculator transfers a process stream composition and

    sets the flow from one connected stream to the other. The Property

    connector with the double arrow connects to the reference stream,

    while the other connector designates the target stream. Solver priority,

    flow basis and flow specification are set via the Edit dialog. Only

    when a valid destination stream is connected can the flow specification

    be set (via the Edit dialog or direct entry in the shape).

    UA Wizard

    This Property Calculator example offers the user the capability to

    control heat exchanger performance. UA, minimum approach, LMTD

    and %OD may be targeted by controlling outlet stream conditions or

    unit duty. The tool queries the user for key decisions and

    automatically sets up a Simple ProMax Calculator when connected to

    a heat-integrated exchanger or separator.

    Elemental Flow Example

    This Property Calculator example sums the flow of a given element in

    a process stream. The element is defined by symbol in variable

    "TargetElement". A Companion element, assigned to variable

    "CompanionElement", restricts the molecules included in the sum.

    For Example, the organic carbon flow is calculated by setting the

    target element to C and the companion element to H. Clearing the companion element (or setting it to ) removes this restriction.

    Copy Stream Conditions

    This example transfers a process streams conditions from one connected stream to the other. This differs from the Flow Duplicator Example in that the flow spec is set from the source stream. The destination stream must be completely empty before connecting to this

    Property Calculator. This shape transfers molar enthalpy, pressure and

    component mole fraction automatically while a simple ProMax solver

    is used to set the destinations molar flow.

    [Cn+] Solver

    This example sums the flow or fraction of compounds containing n or more carbon atoms in a process stream to drive a script based

    ProMax Solver. The predefined Simple solver is linked to the shape

    via the dialog that appears on drop or double clicks.

  • 9

    Pipeline Mach Example

    Connect this example to a pipeline to display the maximum fluid Mach

    number. If a user set flow exists on the inlet or outlet process streams,

    a script based ProMax Solver is automatically setup to drive the

    maximum fluid Mach number to the value defined in TargetMach.

    Flow Multiplier Example

    This example transfers a process streams composition, temperature, and pressure from one connected stream to the other. This stencil then

    allows for the connected stream to have a multiple of the flow rate set

    by the original stream. The default is 2, doubling the flow rate.

    Orifice Plate

    The Orifice Plate may be used to simulate either an orifice plate or a

    nozzle/venturi, and is capable of solving for outlet pressure, inlet

    pressure, or mass flow.

    Membrane

    The membrane block simulates an asynchronous vapor phase

    separation using permeability data. This depends on the type and

    thickness of polymer used; patent, literature and vendor references

    should be used for the most appropriate values. This model operates

    irrespective of equipment geometry, and can provide separation based

    on a fixed area, or find required area for a desired separation.

    Component GPM

    This example displays the GPM for a component in a process stream

    (where GPM is Gallons Per MSCF).

    Salt Example

    This shape calculates the amounts of the compounds whose ions

    comprise a salt and the amount of water required to obtain a specified

    weight percent salt. The required amounts of the compounds are

    automatically added to a selected stream.

    Chart

    The Chart tool allows the user to generate simple plots such as a column

    temperature profile, or temperature by increment across an exchanger.

    Date Example

    Dragging this shape to the flowsheet automatically displays the Project

    and flowsheet names, page number, and dates created, saved, modified

    and solved.

    Phase Envelope Example

    This example is a modification of the Chart tool, and displays the phase

    diagram for a specified stream, with an X marking stream conditions.

  • 10

    Heat Transfer Example

    This example is a modification of the Chart tool, and displays the heat

    transfer curve for a specified exchanger.

    Sum Component Flow/Frac.

    This sums the flow or fraction of compounds that are defined by an array

    of names. Predefined groups include amines, BETX, mercaptans and Sx.

    Oil/Water Emulsion Example

    This example modifies the viscosity and specific gravity or an existing

    Single Oil to mimic an oil/water emulsion. The oil to be modified

    should be defined before dragging the shape to the flowsheet.

    Depressurization Example

    This will estimate an orifice diameter required to depressurize a vessel to

    a given pressure in a given amount of time. You will specify the vessel

    volume, vent pipe diameter, initial pressure, downstream pressure, target

    pressure, time to reach pressure, heat input into the vessel, etc

    P/H Diagram

    This example is a modification of the Chart tool, and displays the

    pressure-enthalpy curve for a specified stream.

    Inline Flow Multiplier

    This transfers a process stream conditions and composition from one

    stream to another, with an option to multiply the flow rate by a user-

    defined multiple. The inlet stream should be connected to the small inlet

    arrow on the block. Not all conditions must be transferred.

    HTRI Data Transfer

    This shape is designed to transfer data directly from a ProMax heat

    transfer unit operation to an HTRI (Heat Transfer Research Inc._ input

    file. A licensed copy of the HTRI software must be installed on the

    computer to use this tool. Inlet and outlet conditions for heat transfer, as

    well as thermodynamic property data required by HTRI are exported.

    Block Calculator Designer

    This tool allows the user to create a ProMax shape with associated pre-

    set properties, User Values and/or Calculators from an existing ProMax

    shape. This shape can be saved in a new shape stencil for later use.

    Shape Converter

    This shape allows the user to convert an ordinary Visio shape into a

    ProMax block. The new block can be saved for future use.

  • 11

    Recycles/Solvers and Prioritization

    Both recycles and solvers used in ProMax have an associated priority value. This value

    determines the order in which ProMax attempts to solve any nested or dependent

    recycles and solvers.

    Recycles

    o Each ProMax recycle, whether material or energy, is defined as a solver based on its function.

    o By default, each recycle is assigned a priority of 1 when placed on the drawing page.

    o The user must then take control of the proper prioritization for each recycle to solve most efficiently.

    User-defined Solvers

    o Each solver defined by the user also has a priority.

    o By default each user defined solver is assigned a value of 0 upon creation.

    o The user also has the ability to define the priority of these solvers to help obtain the most efficient solution.

    Troubleshooting

    o The priority is determined by the highest value assigned; the higher the numerical value, the higher the priority.

    o ProMax looks only at relative values, therefore numbers can be skipped. For example, all priorities on the first flowsheet can be numbered in the

    400s, the second flowsheet in the 300s, etc

    o It is usually best to solve the inner loop dependent solvers first and then work your way out. This may not always be the case.

    o A Grouping function is available to have a group of solvers evaluated simultaneously since several solvers may have shared dependencies.

    o If a solver appears to be stuck on iteration 1, and continues to repeat this there could be an issue with dependencies with your current set-up.

    Often selecting the box skip dependency check can assist with this issue, but it will place any solver with this selected as the lowest priority,

    which could increase the solve time.

  • 12

    Exercise 6: Simple Example Demonstrating Prioritization

    Concept

    Open the project named Recycle and Solver Priority Example from the solved folder to illustrate these principles.

    This example is an actual working facility owned by Crosstex Energy. It consists of

    two demethanizer plants, one common deethanizer with overhead treating, a

    depropanizer, debutanizer and associated utilities. The simulation contains a total of 15

    recycles and user defined solvers. The priority of each is critical to obtaining a

    reasonable solution time.

  • 13

    Exercise 7: Prioritization of a Large Multi-Flowsheet Plant

    Open Exercise 7 Prioritization of a Large Multi-Flowsheet Plant from the training session files. Find a sensible order for the simulation to solve its calculators and

    recycles. This plant contains a DEA Amine Unit, two Claus Trains, an MDEA tail gas

    clean up unit and an incinerator. Depending on the priorities of the recycles and the

    calculators included in this simulation, the solve time can range from many hours to

    only a few minutes.

    Additional Process Information

    Flowsheet 1: DEA Flowsheet

    The DEA unit removes hydrogen sulfide (H2S) and carbon dioxide (CO2) from the Sour Gas inlet, creating a sweet gas.

    The stripper then will clean the DEA of the absorbed H2S and CO2. The overhead acid gas stream is then treated in the sulfur recover units.

    Flowsheet 2: SRU-A Flowsheet

    The sulfur recover units burn the acid gas with air, then pass the gas over specialized catalysts to change as much H2S into sulfur as possible. This sulfur

    is then removed from the process stream.

    A calculator is included to adjust the Dry Basis Air stream flow rate until the Tail Gas stream has a 2 mol H2S to 1 mol SO2 ratio; this provides the best

    conversion.

    Sulfur condensing on a catalyst bed leads to deactivation of the catalyst, thus an additional calculator is included on stream 25. This calculator adjusts the

    temperature so that the reactor outlet temperature stays 15C above the dew

    point of the outlet stream.

    Flowsheet 3: SRU-B Flowsheet

    Similar to Flowsheet 2, this flowsheet includes a 2:1 ratio Tail Gas solver on the Dry Basis Air stream, and a Dew Point solver on stream 13.

    This flowsheet also includes the hydrogenation reactor. This reactor converts any remaining sulfur back to hydrogen sulfide so the following MDEA unit can

    remove it from the stream.

    For this hydrogenation reactor to work correctly, the temperature and hydrogen levels must be maintained.

    A calculator has been included to adjust the fuel gas flow rate in stream 21 to solve for a 2 mol% H2 content in the reactor outlet

    Another calculator has been included to adjust the air flow rate in stream 25 to achieve an outlet temperature from the reactor of 315C.

    Flowsheet 4: MDEA Flowsheet

    The outlet from the hydrogenation reactor is then cooled in a Quench Tower, and fed to an amine absorber.

    This absorber then removes the hydrogen sulfide from the Tail Gas before it is sent to the incinerator.

    The amine is then stripped of the hydrogen sulfide in the MDEA stripper, and this off gas is then recycled back to the SRUs.

  • 14

    User Value Sets

    A user value is typically a property defined by the user which is not available in ProMax, but can also be a reference value, composition or property

    A user value set can contain a single user value or multiple user values.

    User values can be assigned a short moniker, and can be used in calculators or displayed in property tables, and can be included in a ProMax Report.

    The user value is defined using a simple specifier to relate properties or to set a reference value.

    Defining a User Value

    1. To define a user value set, open the Project Viewer by double-clicking on any stream or block from the flow sheet view, or through the ProMax drop down

    menu or toolbar. Then right click on the User Value Sets item in the navigation tree on the left side, and click "Add..."

    2. In the User Value Set dialog, click the Add... button at the bottom to open the User Value Selection dialog.

    a. First specify the units. The units can be standard units already used by the program, unrecognized units, or user defined units. User defined

    units must be compatible with the program. Unrecognized units are for

    display only, and are treated as dimensionless by the program.

    b. Type in a descriptive name for the user value in the name field at the bottom.

    c. Be sure the "Associate with a New Specifier" checkbox is selected if you wish for this value to be related to or calculated from other values.

    d. Click the OK button to exit the dialog.

    3. Bounds are optional. If an upper bound and/or lower bound are set and the enforce bounds check box is selected, a warning is issued any time the value of

    the parameter exceeds the specified bounds.

    a. Example: A reboiler steam rate is set as a user value (units of kg/l), and the parameter values are 0.08 (lower bound) and 0.2 (upper bound). If

    the value of the steam rate falls to 0.07, a warning is issued stating that

    the parameter is outside the specified bounds.

    4. Right click on the blue Parameter field and select "Show Calculator" to open the Simple Specifier dialog associated with the user value.

    a. Add any independent variables to be used in defining the user value.

    b. In the specified variable field, type in an equation to define the user value, or a constant representing the user value.

    c. Close the simple specifier dialog.

  • 15

    Displaying a User Value in a Property Table

    User values can be displayed in a property table. Although it is not necessary to

    specify a short moniker for the user value, it is much more convenient to use a

    short descriptive name rather than the very long full moniker for the property.

    To generate a short moniker, open the user value set dialog in the Project

    Viewer and right-click the blue parameter field for the user value of interest.

    Select "Add to Short Moniker List" from the pop-up menu.

    In the short moniker dialog, type a short moniker in the field at the bottom and

    click the Add/Reset Short Moniker button.

    Drag a property table from the ProMax Streams stencils and place on the flow sheet.

    Double-click the property table to open the dialog, and in the lower left corner

    of the dialog, click the Moniker radio button and leave the short moniker check box selected. Available selections will include all short monikers for the

    project. Select the short moniker you want displayed in the property table by

    clicking on it and clicking the arrow button to transfer to the displayed

    selections. Click OK to exit the property table dialog.

    Modifying or Creating a Report for the User Value Set

    To access the defined user values, open the Project Viewer and find the user

    value set in the navigation tree.

    Right click on a user value set to display the options Show, Delete, Rename, and

    Report. Selecting Show is the same as double-clicking on the item to open it.

  • 16

    User Value Set Problems:

    The following three exercises all reference the previously solved Exercise 7:

    Prioritization of Large Multi-Flowsheet Plant

    Exercise 8: Steam Rate Property User Value

    A commonly used parameter in an amine unit is the steam rate, which might be referred

    to as the kg of steam supplied to the stripper reboiler per liter of amine solution

    circulated. Set up a User Value Set for the steam rate on the MDEA SCOT unit from

    Exercise 7: Prioritization of a Multi-Flowsheet Plant.

    1. Select the Amine Unit simulation with the reboiler being heated by utility steam.

    2. To create a user value set, open the Project Viewer and right click on the User Value Sets item in the navigation tree on the left side, and click "Add..."

    3. In the User Value Set dialog, click the Add... button at the bottom to open the User Value Selection dialog.

    a. Click on User Defined Units and type "kg/l" in the units field.

    b. Type "Steam Rate" in the name field at the bottom.

    c. Be sure the "Associate with a New Specifier" checkbox is selected if desired.

    d. Click the OK button to exit the dialog.

    4. Rename the user value set to Steam Rate be more descriptive

    5. Right click on the blue parameter field and select "Show Calculator" to open the simple specifier dialog associated with the Steam Rate user value set.

    a. Add independent variables for the steam mass flow rate and the amine standard liquid volumetric flow rate. Double-check that the amine flow

    rate and the steam flow rate are on the same basis (i.e. both are a rate

    per minute), then click OK to exit the property moniker dialog.

    b. Type in the equation "SteamFlow/AmineFlow" for the specified value, assuming your variables are named SteamFlow and AmineFlow.

    c. Close the simple specifier dialog.

    6. Open the Steam Rate user value set dialog again, right-click on the blue parameter field and select "Add to Short Moniker List" to open the moniker

    builder dialog.

    7. Type "Steam_Rate" as the short moniker and click the Add/Reset Short Moniker button.

    8. Drag a property table from the ProMax Streams stencil and place on the flow sheet.

    9. Double-click the property table to open the dialog, and in the lower left corner of the dialog, click the Moniker radio button and leave the short moniker check box selected. Available selections will include all short monikers for the

    project. Select the Steam_Rate moniker by clicking on it, then click the arrow button to transfer to the Displayed Selections. Click OK to exit the property

    table dialog.

  • 17

    Exercise 9: Tail Gas Ratio User Value

    A parameter often used in a Claus Sulfur Recovery unit is the Tail-gas H2S to SO2

    molar ratio, which is typically controlled to be as close to 2 as possible. Create this

    Tail-gas H2S to SO2 Ratio User Value for both Claus trains and display the parameter in a Property Table for the flowsheet from Exercise 7: Prioritization of a

    Large Multi-Flowsheet Plant.

    Exercise 10: Grains per 100 SCF User Value

    A parameter sometimes used in an amine unit is the concentration of H2S in the treated

    gas in units of grains per 100 SCF. A typical specification is 1/4 grain, which is the

    equivalent of about 4 ppmv H2S. Create this H2S Concentration User Value on the DEA unit of Exercise 7: Prioritization of a Large Multi-Flowsheet Plant and display the

    value of the parameter in a Property Table.

  • 18

    Heat Exchanger Rating

    Exercise 11: Crude Oil Shell & Tube Exchanger

    The first objective is to define two hypothetical oil components and use the heat

    exchanger rating utility within ProMax. Use the following information to create the

    lube and crude oil components and define the feed streams. A drawn version of this

    may be found in the training session files saved as Exercise 11 Crude Oil Shell & Tube Exchanger.

    Lube Oil Properties: Inlet Conditions:

    Volume Average Boiling Pt 425C Temperature 230C

    Temperature of Low T Viscosity 150C Pressure 2.75 bar

    Low Temperature Viscosity 7.7cP Mass Flow 28,000 kg/hr

    Temperature of High T Viscosity 260C

    High Temperature Viscosity 1.4cP

    Crude Oil Properties: Inlet Conditions:

    Volume Average Boiling Pt 310C Temperature 150C

    Pressure 2.75 bar

    Mass Flow 130,000 kg/hr

    Additional Process Information:

    The composition of each feed will be pure Lube or Crude oil.

    Assume a 0.3 bar pressure drop on each side of each exchanger.

    The crude oil is split equally to E3 and E4.

    Use the following temperature conditions: L1 = 225C, L2 = 215C, L3 = 207C and Lube Oil Out = 200C

    Upon successful execution, define each exchanger based on the attached exchanger specification sheet. You may use the Export and Import functions of

    the rating utility to aid in this operation.

    Lube Oil In

    Crude Oil In

    E1

    L1

    E2

    Lube Oil Out

    Mixer

    L2

    E3 E4

    23

    4

    6 7

    L3

    5

    Crude Oil Out

    Splitter

  • 19

  • 20

    Exercise 12: Rating a Multi-Sided Compact Heat Exchanger

    A natural gas stream with the conditions and composition listed below is to be cooled to

    -75C before being throttled to a lower pressure. Set up a complex exchanger which

    uses the flashed vapor and liquid to cool the natural gas. Determine whether or not the

    exchanger will perform based on the following ALPEMA datasheet. You must draw

    this flowsheet.

    Inlet Gas Conditions: Composition (mol %):

    Temperature 25C Methane 85.0

    Pressure 55 bar Ethane 5.0

    Flow Rate 35,000 Nm3/h Propane 3.5

    n-Butane 2.0

    i-Pentane 1.0

    n-Pentane 1.0

    n-Hexane 0.5

    Carbon Dioxide 2.0

    Additional Process Information:

    Throttle the gas to 42 bar.

    The flash vapor side should reference the inlet gas stream and should exit 3C cooler than stream Inlet Gas.

    Determine the outlet temperature of the liquid required to balance the complex exchanger duty.

    Remember that your exchanger sides A, B and C may not match with the sides A, B and C of the specification sheet on the following page. Also note that the layers A, B and C do not necessarily correspond with the sides A, B and C of the exchanger.

    Inlet Gas 2 3

    Flash Vapor5

    Flash Liquids7

    Flash

    VLVE-100

    XCHG-100

  • 21

  • 22

    ProMax Calculator Methods

    ProMax offers many options to help you arrive at your desired solution. These solvers

    and specifiers range from very simple concepts to very complex and elaborate solution

    methods. The primary options available are:

    Simple solvers and specifiers

    Using JScript in simple solvers to arrive at slightly more difficult specifications

    Using JScript or VBScript in advanced solvers and advanced specifiers allowing for much more complex equations and methods to solutions

    Grouping simple solvers together.

    Using the Excel calculator in advanced calculators

    Using VBA, C#, C++, etc

    Use of JScript in Simple Solvers

    Simple Solvers created in ProMax utilize a simple JScript code. Typically these

    calculators are set up as a single function to solve for a single specification.

    However, there is additional functionality available in the simple solver than is typically

    used. The following examples take advantage of both the simplicity of the simple

    solver and the added functionality of this JScript coding.

    If-Then-Else statements can be used; however these occasionally will not work as

    expected due to the tolerances that ProMax allows in its solutions. A better approach is

    the Math.max function available if attempting to have a solution that meets two

    different specifications.

    Please refer to our Help menu regarding the full functionality of JScript.

  • 23

    Exercise 13: DEPG Acid Gas Removal with JScript Simple

    Solver

    Simulate an AGR Contactor used to remove both CO2 and H2S from the feed stream.

    Create a single simple solver, using JScript functionality, to find the necessary DEPG

    flow rate to assure always meeting both 5 mol% CO2 and 35 ppm(mol) H2S in the sweet

    gas. Assume a saturated inlet gas with the following composition:

    Conditions:

    Temperature

    Pressure

    Flow

    35 C

    38 bar

    11,500 Nm3/h

    Composition

    H2S

    CO2

    C1

    C2

    Methyl Mercaptan

    Mole %

    9

    16

    67.9

    7

    0.1

    Additional Process Information

    Assume the Lean DEPG stream is 97.2 mass% DEPG, and contains residual H2S and CO2 each at 0.005 mass%; also assume the stream is 18 C

    Questions:

    Part 1

    1. What is the necessary flow rate of the DEPG to meet the required specifications?

    2. Which specification is determining this?

    Part 2

    Now change the inlet composition to have 12 mol% H2S and 13 mol% CO2

    1. What is the required flow rate of the DEPG to meet the required specifications?

    2. Which specification is determining this?

    AGR Tower

    7

    1

    2

    3

    4

    5

    6

    Dry Sour Gas

    Lean DEPG

    Rich DEPG

    Sweet Gas

    Saturator

    Wet Sour Gas

    Water Saturant

  • 24

    Exercise 14: MDEA Sweetening with JScript Simple Solver

    Simulate an MDEA sweetening tower to sweeten the water-saturated sour gas to 12

    ppmv H2S. However, also ensure that the rich loading does not exceed 0.45 mol total

    acid gas/mol amine.

    Create a simple solver, using JScript functionality, to ensure that both specifications are

    met, starting with the unsolved Exercise 14 Simple MDEA for Scripting Simple Solver file in the training session files. This file is executed, but not at the optimized conditions.

    Conditions:

    Temperature

    Pressure

    Flow

    34 C

    70 barg

    11000 Nm3/h

    Composition

    H2S

    CO2

    C1

    C2

    C3

    C4

    Mole %

    0.5

    3

    90

    5

    1

    0.5

    Additional Process Information

    The regenerator has a condenser temperature of 48C, and a reboiler steam rate of 0.12 kg/l amine.

    The rich flash operates at 5 barg, and the lean/rich exchanger heats the rich amine entering the regenerator to 100C.

    The amine is a 40 wt% solution

    Questions

    What flow rate is required to meet the specifications above?

    What flow rate is required to meet these specifications if the MDEA mixture is diluted over time to 36 wt%? Which constraint is controlling this flow rate?

    Reboiler Duty

    Lean Amine Cooler

    Lean/Rich Exch

    Circulation Pump Makeup/Blowdown

    Sour Feed

    Sweet Gas

    Rich Amine

    10

    Lean Amine

    19

    Recycle Guess

    Makeup

    Amine Circulation

    14

    Lean Amine to Absorber

    Lean Amine Cooler Duty

    Circulation Pump Duty

    Blowdown

    Acid Gas

    Saturator

    Dry Basis Sour Gas

    Saturant (Water)

    vg

    Utility Steam Utility Condensate

    Condenser DutyRecycle

    Absorber

    7

    1

    K-100

    1

    2

    VSSL-100

    3

    4

    DTWR-101

    10

    1

    2

    Rich Flash

    5

    6

  • 25

    Use of Advanced Calculators

    advanced calculators are specifiers or solvers with multiple calculated and measured variables

    They offer extreme flexibility but are more complicated to create

    Like their simple counterparts, calculations in advanced specifiers are specification calculations and calculations in advanced solvers are objective

    function calculations

    Mathematically discontinuous functions are prone to convergence failure in the solver

    Several types of advanced calculators are available: Script-, Event-, Excel-, VBA- and External-based

    Applications of advanced calculators

    o Grouping functionality of multiple simple calculators into a single calculators

    o Consolidation of calculator codecan view all code at a single time

    o More complicated mathematical expressionsnot limited to single line expressions

    o Can obtain additional ProMax data not available in simple calculators (e.g., pure component properties)

    o Used in solvers when there is a multivariable relationship rather than a single variable relationship

    Script type calculators allow both Jscript (used in simple calculators) and VBScript by user selection

    o Requires writing a subroutine in the selected language to specify parameters or to evaluate solver objective functions

    o Jscript is a case sensitive language while VBScript is case insensitive

    o VBScript has similar syntax to VBA (Visual Basic for Applications) used to write macros in Microsoft

    Office applications

    o Complete documentation for both languages is available in the Help->ProMax Help->Scripting Reference menu item

    Excel based advanced calculators

    o Used when calculations are more naturally available in Excel

    o Like exporting and importing, require an OLE embedded Excel Workbook in the ProMax project

    o Involves extra overhead relative to script calculators including OLE Workbook and data transfer between two processes

    o Should restrict use to cases where calculations need to be made in Excel

  • 26

    Creating an Advanced Calculator

    1. Open the Project Viewer and right-click on calculator node in the navigation tree.

    2. Click on "Add..." in the pop-up menu to open the Calculator Specification dialog.

    3. Select Specifier or Solver from the Calculator Specification dialog.

    4. Select Script or Excel from the Calculator Specification dialog.

    5. Click OK to save your choices.

    Accessing and Specifying the Advanced Calculator

    To open the Advanced Specifier dialog or the Advanced Solver dialog, locate

    the Specifier or Solver in the Project Viewer navigation tree and double-click on

    the item, or right click on the item and select "Show" from the pop-up menu.

    After accessing the Advanced Calculator, select variables from the Advanced

    Solver or Advanced Specifier dialogs by clicking on the "Add..." buttons.

    Click on the "Setup..." button to open the Scripting Development Environment

    dialog.

    Select JScript or VBScript as the scripting language by clicking on your

    selection at the top of the dialog.

    Write the Advanced Solver or Specifier script:

    Function Calculator(m,r) is executed by ProMaxs solver every time a calculated variable (or residual error) associated with this calculator is required.

    Variable m contains the measured variables and is accessed by m(NAME)

    Where: NAME is a string containing the variable's Name. For example:

    m("MyMeasuredVariable")

    Variable "r" passes back the residuals or calculated variables and

    is set by r(NAME) = ...

    r.Ready(NAME) returns a Boolean that signifies which

    Calculated Variable needs to be calculated.

  • 27

    Advanced Specifiers

    Complex Mixed Refrigerant Plant Example

    The following three exercises will show how to use advanced specifiers to control

    various properties of a project. In this example, calculators are used to set the

    temperature out of selected sides of the complex exchangers and the pressure for the

    first two stages of compression in a 3 stage compressor.

    This file can be found in your training session files as Exercise 15, 16, 17 Complex Heat Exchangers with Mixed Refrigerant. The unsolved version is executed, however does not include any of the Advanced Specifiers covered in the next several pages.

    XCHG-100

    DeC2 Reboiler

    15

    14

    DeC2 Condenser

    8

    9

    Deethanizer

    15

    1

    7

    Q-1

    Q-2

    VLVE-100

    VLVE-101

    1 - Feed Gas 2

    3

    5

    6

    7

    10

    CMPR-100

    MIX-100

    1112

    4

    13 - Residual

    16 - LPG

    XCHG-101

    VLVE-102

    MIX-101

    CMPR-101 CMPR-102 CMPR-103

    FAXR-100 FAXR-101 XCHG-102VLVE-103

    TRM-1

    525354

    5155

    56

    5758

    41

    42

    43

    44

    45

    46

    47 49 50

    Q-3 Q-4 Q-5

    Q-6

    Q-7 Q-8Q-9

    Complex Heat Exchangers with Mixed Refrigerant

    Cold Separator

    Refrig Drum

  • 28

    Exercise 15: XCHG-100 Hot End Approach Advanced Specifier

    Create an Advanced Specifier to set the temperature of Stream 54 to 4C below the feed

    stream 1-Feed Gas, and Stream 11 and Stream 4 both 2C below the feed stream, which has a known temperature. The use of an Advanced Specifier allows for a single

    calculator instead of 3 different Simple Specifiers. Please refer to page 28 for the

    flowsheet diagram.

    To view the Advanced Specifier dialog, open the Project Viewer and click on

    the Calculators node in the Navigation Tree to the left. Then double-click on

    "XCHG-100 Hot End Approach Advanced Specifier".

    This Specifier uses the following Variables:

    Calculated Variable Measured Variable Function*

    THRef (Stream 54

    Temperature)

    TIn

    (1-Feed Gas

    Temperature)

    Stream 54 is 4C Below the

    Feed Gas Temperature

    THColumn

    (Stream 11

    Temperature)

    TIn

    (1-Feed Gas

    Temperature)

    Stream 11 is 2C Below the

    Feed Gas Temperature

    THFlash

    (Stream 4 Temperature) TIn

    (1-Feed Gas

    Temperature)

    Stream 4 is 2C Below the

    Feed Gas Temperature

    Variables can be added using the Moniker Tree or from pre-defined Short

    Moniker variables.

    For this example, the temperatures of streams 54, 11 and 4 should all be added

    as Calculated Variables.

    Each of these Calculated Variables should then have an Associated Measured

    Variable assigned as the temperature of the inlet stream (1-Feed Gas).

    In the Advanced Specifier dialog, click the "Code Source..." button to view the

    Scripting Development Environment dialog. This code sets the temperatures of

    the three streams relative to the 1-Feed Gas temperature.

  • 29

    Exercise 16: XCHG-101 Advanced Specifier

    Referring to the Complex Mixed Refrigerant Plant Example on page 28, create an

    Advanced Specifier to

    Set the temperature in Stream 56 exiting the complex exchanger XCHG-

    101 (Side A outlet) equal to the known temperature of Stream 52 (Side C

    outlet).

    Set the pressure of Stream 58 out of the exchanger (Side B outlet) equal

    to the known pressure of Stream 54 (compressor CMPR-101 suction).

    Setting this pressure will determine the temperature of Stream 58 (Side B

    outlet)

    Exercise 17: InterStage Pressure Advanced Specifier

    Referring to the Complex Mixed Refrigerant Plant Example on page 28, create an

    Advanced Specifier to

    Set the outlet pressures for the 1st and 2nd stages of compression such that the compression ratios for each stage are approximately equal.

    Use the equations

    o 1st Stage Outlet Pressure = Inlet Pressure * (Discharge Pressure / Inlet Pressure) ^ (1/3)

    o 2nd Stage Outlet Pressure = Inlet Pressure * (Discharge Pressure / Inlet Pressure) ^ (2/3)

    Inlet Pressure = Stream 54

    Discharge Pressure = Stream 46

    1st Stage Outlet = Stream 42

    2nd Stage Outlet = Stream 44

  • 30

    Advanced Solvers

    Exercise 18: Sulfur Hydrogenation Reactor Advanced Solver

    The Simple Sulfur Hydrogenation Reactor example illustrates how to model a

    Hydrogenation or "TGCU" Reactor and the associated Reducing Gas Generator or

    "RGG" Reactor. An unsolved version can be found in the training session files as

    Exercise 18 Sulfur Hydrogenation Reactor.

    From Claus Beds Stream: Inlet Conditions: Composition Mol %

    Temperature 140C

    Pressure 0.6 barg

    Flowrate: 100 kmol/h

    H2

    N2

    CO

    CO2

    H2S

    SO2

    H2O

    0.575

    39.2

    0.005

    35.5

    0.48

    0.24

    24.0

    Simulation Discussion

    The Bone Dry Air stream is saturated to 70% in block Saturator then mixed with the Fuel gas before being fed to the Reducing Gas Burner. Use 100%

    Methane as the Fuel gas in this example.

    The Reducing Gas Burner effluent is mixed with the tail gas "From Claus Beds"

    before being fed to the Hydrogenation Reactor.

    The Hydrogenation Reactor converts all sulfur species to H2S before being fed

    to the Tail Gas Cleanup Unit (TGCU). This is an adiabatic reactor Type "Gibbs

    Minimization" with Gibbs Set Sulfur Hydrogenation.

    Reducing gas is required to convert all sulfur species to H2S. This reducing gas

    can be "pure" hydrogen or can be provided by a Reducing Gas Generator

    (RGG). The RGG provides H2 and CO by burning fuel gas, and is modeled as an

    adiabatic reactor Type "Gibbs Minimization" with Gibbs Set "Burner.

    Excess H2 should be present in the Hydrogenation Reactor effluent (about 1%)

    to assure that all sulfur species have been converted to H2S.

    The Hydrogenation Reactor outlet temperature should be maintained at 260C -

    370C by adjusting the amount of Fuel gas fed to the RGG.

    The Advanced Solver "Hydrolyzing Bed Solver" simultaneously feeds enough

    air to the RGG to achieve 1% H2 in the Hydrogenation Reactor effluent and

    enough Fuel gas to the RGG to achieve a Hydrogenation Reactor outlet

    temperature of 370C.

  • 31

    Following is the Advanced Solver dialog:

    Click the "Code Source..." button to view the VBscript for the Solver.

  • 32

    Exercise 19: Crude Oil Exchanger Advanced Solver

    Using the previously solved Exercise 11, define an advanced calculator that will

    automatically determine the exchanger performance such that you have an excess of 5%

    surface area at the converged conditions.

    The exchanger percent over design will be your measured variable within the solver.

    You will have four calculated variables that represent the four lube oil outlet temperatures from each exchanger.

    The code source should be written to calculate the lube oil outlet temperature from each exchanger that results in an exchanger with 5% over design.

    Lube Oil In

    Crude Oil In

    E1

    L1

    E2

    Lube Oil Out

    Mixer

    L2

    E3 E4

    23

    4

    6 7

    L3

    5

    Crude Oil Out

    Splitter

  • 33

    Advanced Calculator Using Excel

    Requires OLE embedding an Excel workbook in the ProMax project. If you already have a worksheet, copy it to a ProMax OLE-embedded workbook.

    Variables are selected in ProMax just like with script based calculators

    Must map all variables to ranges in Excel for exporting and importing

    Calculations are performed by the Excel engine

    All data must be transferred across process boundary which can be relatively slow

    The first screen looks identical to the

    previous examples.

    1. Select your variable you want ProMax to

    vary.

    2. Select the variables you want ProMax to

    look at for information.

    3. Set any Solver priorities and bounds.

    4. Select Setup under Excel type

    The next screen allows you to link ProMax

    with Excel. Each variable should be linked

    to a specific cell or range in Excel.

    Variables on the left are the measured

    variables; the information that will be put

    into Excel.

    The variable on the right is the residual function, which will be solved to zero by ProMax.

    In the Excel sheet, variables linked to

    ProMax will have a small red triangle in the

    upper corner of their cell.

    The worksheet should be set up to have a

    residual function that will equal zero when the correct answer has been reached. This is

    titled Objective Function returned to ProMax in the example to the left.

  • 34

    Exercise 20: Example Problem with Excel Calculator

    Use an advanced calculator to adjust either the duty or temperature change across the

    exchanger so that the UA ProMax calculates matches the UA calculations from an

    existing Excel worksheet.

    An unsolved version of both the ProMax and Excel files are available as Exercise 20 Double Pipe Exchanger using Advanced Solver in Excel. The Excel sheet performs heat transfer calculations based on the Sieder-Tate equation. This equation estimates

    the Nusselt number as:

    The Excel workbook will calculate the clean and service overall heat transfer

    coefficients based on tube outside area and also calculate the product.

    The purpose of the advanced solver in ProMax is to drive the product calculated by ProMax equal to that calculated in the Excel workbook from the

    heat transfer coefficient calculation.

    All properties of the inlet and outlets that are required to evaluate the heat transfer coefficients must be made measured variables and exported to Excel.

    These include the temperatures, mass heat capacities, mass densities, viscosities,

    and thermal conductivities.

    Additionally the mass flow rates of each fluid must also be selected as measured variables for export to Excel. The calculations in the Excel workbook require

    the viscosities in kg/(ms).

    A double pipe heat exchanger is available to heat 4455 kg/hr of cold benzene at 27C.

    A stream of 2870 kg/hr of toluene at 70C is available for this purpose. The heat

    exchanger has the following characteristics:

    Property Value

    Inside pipe ID 3.5 cm

    Inside pipe OD 4.25 cm

    Outside pipe ID 5.25 cm

    Tube length 33.5 m

    Tube thermal conductivity 59 W/(mC)

    Benzene will be placed in the tube and toluene in the annulus. Use a fouling resistance

    of 0.00018 Cm2/W on both sides.

    If the above heat exchanger is selected for this service, what will be the discharge

    temperatures for both the benzene and the toluene?

    14.0

    31

    Pr

    8.0

    Re023.0w

    bNu NNN

    k

    hDN

    DvN

    k

    CN Nu

    p;; ReP r

    UA

    UA

  • 35

    Advanced Column Configurations

    Column Set-up

    ProMax allows almost any column configuration to be created. Some of the primary

    options available are:

    Multiple Tower Types

    o Columns can be configured as liquid-liquid, vapor-liquid or vapor-light liquid-heavy liquid

    o Equilibrium, TSweet Kinetics, TSweet Alternate Stripper, Polar Liquid and Non-Polar Liquid tower types are available to accurately solve the

    column

    Connected Condensers and Reboilers

    o For ProMax to recognize a condenser or reboiler as part of the column, these must be associated in the Project Viewer, Process Data tab at the bottom

    o Associated condensers and reboilers do not require a recycle block for the returning streams. These blocks, once associated, are actually

    considered an additional stage to the tower. Thus any stream exiting the

    tower and entering either the condenser or reboiler is treated as a pump-

    around stream.

    o These associated blocks will solve simultaneously with the column, and any specifications for the additions can be made inside the main column.

    Reboiler Options

    o There are many variations of reboilers that can be simulated in ProMax. These include both bottoms reboilers and side reboilers

    o Thermosyphons, forced flow and kettle reboilers are available

    o Side reboilers can include same stage returns, thermosyphon types, forced flow types and even direct energy injection to the stage

    Connected Side Strippers

    o The specifications for these side columns can be made in the main column

    o All connected columns are executed simultaneously, and no recycles are necessary for streams returning to the main column from an attachment.

    Vapor and Liquid Draws

    o By default, the draw off the tray is a light liquid

    o Right-click on the tray in the Project Viewer, Connections tab to change this default to either vapor, or heavy liquid (available only in a

    VLLE tower).

    Pump-around Loops

    o Can include pumps and heat exchangers. Splitters can also be used, but will require an additional pump-around estimate as a specification in the

    tower.

    o Specification can be made in the main tower, or in the heat exchangers

  • 36

    Column Execution and Convergence

    While ProMax will allow almost any column configuration, occasionally these

    configurations or the specifications set can be difficult to converge. Below are some

    hints and steps to take to help these towers converge.

    Column Fails to Execute

    These are some steps to take if the column does not attempt to solve when the execute

    button is pressed.

    Specify Column Pressure

    Check the stage data, summary grouping to make certain that the top and bottom

    stage pressures are set, or that the "Pressure Change" parameter is specified.

    Check Degrees of Freedom

    Check the specifications tab to make certain there are 0 degrees of freedom. Add

    specifications if necessary.

    Confirm No Conflicting Specifications

    This condition should be noted in the message log as an over-specification. An

    example of conflicting specifications would be setting both boil-up ratio and

    reboiler heat duty.

    Check Condenser and Reboiler

    A pressure drop should be specified in the reboiler and in the condenser, if

    present. Also verify that energy streams are attached to the condenser and/or

    reboiler.

    Fully Specify all Pump-around Blocks

    If the distillation column has a pump-around with a heat exchanger, pump or

    other block, check that the pressure drop and any required specifications have

    been made. Also check that an energy stream is attached to the heat exchanger if

    it is single sided and to any pumps or compressors.

    Add Required Pump-around Estimates

    Be sure required estimates have been made, especially if the column has a

    pump-around or side column. Duty or flow ratio estimates might be required.

    Designate Condensers and Reboilers

    If a condenser or reboiler is added to a column, it must be specified in the

    column process data tab.

  • 37

    Column Fails to Converge

    Check all Inlet Streams

    First and foremost check each of your column feed streams. If these are not at

    the expected conditions, then the column is more likely to fail.

    Check Specifications

    Confirm that the specifications do not imply an impossible separation.

    Delete Specification Tolerances

    If a tolerance is set, delete the value. In general, setting the specification

    tolerance is discouraged, as the program will automatically choose an optimal

    tolerance.

    Try Easier Specifications

    The ratio specifications automatically created by ProMax are natural variables

    for the solver. These specifications will be easiest for ProMax to solve, and may

    help obtain an initial column profile, allowing you to then enable a more

    difficult specification (such as component compositions, TVP, or temperatures).

    Confirm Vapor and Liquid on All Stages

    Vapor and liquid must be present on each stage of the distillation column. If the

    column does not have a condenser or reboiler, confirm that a feed containing

    some liquid or vapor, respectively, exists on the top or bottom stage.

    Change Enthalpy Model

    This option is found in the column Convergence tab; choices are Boston-Britt or

    Composition-Dependent. The default Boston-Britt should be used when there

    are no convergence problems.

    o Composition-Dependent is a unique enthalpy model and is useful for unstable or difficult-to-converge columns (e.g. ionic columns, especially

    amine strippers, or columns with extremely wide or narrow boiling point

    differences between the components).

    o The Composition-Dependent enthalpy model can be prohibitively slow for a large number of components in a non-electrolytic environment. If

    the column does not converge and oscillates within the first 50 iterations,

    stop execution and check the validity of input data, especially

    specifications.

    Change Inner Loop Model

    This option is also found in the column convergence tab; choices are Boston-

    Sullivan or Boston-Sullivan Non-ideal. Boston-Sullivan is the default and

    should be used when there are no convergence problems.

    o Boston-Sullivan Non-ideal is useful for unstable or difficult-to-converge columns (e.g. highly-loaded amine absorbers, absorbers where the amine

    becomes the limiting reagent and strippers operating near minimum

    reflux).

    o The Non-ideal model should be used in combination with the Composition-Dependent enthalpy model. This model can be

    prohibitively slow for a large number of components in a non-

    electrolytic environment.

  • 38

    Add Initial Estimates

    Add initial estimates, especially for more "difficult" specifications such as

    component flows or draw temperatures. Reflux ratio and boil-up ratio estimates

    are often helpful, as are flow rate estimates for side draws.

    Change Column Type

    The polar liquid column type can aid convergence in columns which have a non-

    polar vapor phase in contact with a polar liquid phase (e.g. methanol-protected

    cold process).

    Use K Damping

    Try changing the K damping parameter in the column convergence tab.

    o Although some damping is performed internally in the column calculations, specifying a K damping parameter can be beneficial. The

    value for the K damping should be non-negative integers up to about 10

    (using too high of a value can lead to erroneous convergence).

    o Increasing the K damping can be useful if the outer loop error oscillates or when the error For staged column X the inner loop calculation failed due to an invalid stage temperature calculation.

    Enable/Disable Boston-Sullivan Kb

    Try using Boston-Sullivan Kb found in the convergence tab; or, if Boston-

    Sullivan Kb is enabled, clear the checkbox to disable. This parameter can aid

    convergence for very wide or very narrow boiling mixtures.

    Increase Maximum Iterations

    If the column appears to be converging, but exceeds the maximum iterations,

    this value can be increased in the solver grouping of the convergence tab.

    Monitor Specifications and Variables

    Monitor the specifications and variables in the tables on the specifications tab,

    and compare the calculated value to the specified target value. For example, if

    the reflux ratio is set to 1, the column fails, and the calculated value is 0.1, there

    is likely not enough liquid flow at the top of the column.

    Modify Variable Estimates and Bounds

    The column provides an estimate for variables if an estimate is not provided by

    the user. The Target values for these variables can be changed on either the

    specifications tab or convergence tab, variables grouping. Lower and upper

    bounds can also be specified.

    Add a Recycle to the Pump-around Loop

    If the column has a pump-around loop and fails to converge due to errors in the

    pump-around blocks or the loop itself, or if the column calculations are

    exceedingly slow, consider adding a recycle block to the pump-around loop.

    When the recycle is added to the loop, the pump-around effectively becomes a

    "draw". The draw rate is still specified in the column Specifications tab, but no

    pump-around estimates are required for exchangers or pumps in the loop.

  • 39

    Exercise 21: Demonstration of Reboiler Options

    ProMax offers many options to model various reboiler types. The flexibility of ProMax

    allows for many different choices of both bottom reboilers, including Kettle and

    Thermosyphon types, and side reboilers. These options will allow your simulation to

    best match your operating conditions. Some of the possible configurations are

    demonstrated below.

    Bottom Reboiler Options:

    Plug Flow Kettle: This is the default in ProMax; it looks identical to the

    Boiling Shell Kettle, but the heat transfer details are

    based on plug flow.

    Boiling Shell Kettle: In this case, a selection has been made to calculate the

    heat transfer details based on pool boiling for the shell

    side of the default kettle reboiler options.

    Thermosyphon with Recycle: A thermosyphon reboiler can be modeled with a

    specified flow rate through the exchanger if a recycle

    is included.

    Thermosyphon without Recycle: No recycle is needed if the split to the reboiler is done

    through a fractional basis.

    Induced Flow: This models a full flow reboiler with partial liquid

    return to the column.

    34

    Thermosyphon without Recycle

    12

    1

    4

    7

    38

    Splitter 3

    36

    39

    33

    Q-6

    24

    Thermosyphon with Recycle

    12

    1

    4

    7

    28

    Splitter 2

    25

    29

    23

    Q-5

    Recycle

    26

    44

    Induced Flow

    12

    1

    4

    7

    46

    Splitter 4

    48

    49

    43

    Q-7

    VSSL-100

    45

    47

    Fixed Fraction TS

    Induced Flow Exch

    Fixed Flowrate TS

    14

    Boiling Shell Kettle

    12

    1

    4

    7

    Q-4

    18

    19

    13

    Q-3

    True Kettle

    55 56

    58

    57

    59

    60

    XCHG-103

    5453

    5

    6

    1

    2

    3

    4

    7

    8

  • 40

    Side Reboiler Options:

    All Liquid to Exchanger: Duty may be directly to a stage of a distillation columns by

    simply attaching an energy stream.

    Same Stage Return: The same effect is obtained by drawing a liquid stream from

    the column and returning to the same stage after having

    passed through a separate heat exchanger.

    Thermosyphon: When removing material from one stage and returning to

    another stage you only need to specify the amount of the

    draw. No recycle is required.

    Forced Flow: Additional equipment may also be modeled in the side

    reboiler pump-around loop. The type of equipment and how

    it is specified will determine if the column needs more

    information to solve.

    4

    QStream (=All Liq to Exch)

    12

    1

    4

    7

    Q-2

    8

    9

    3

    Q-1

    K-100

    14

    Return to same stage 50% Draw

    12

    1

    4

    7

    Q-3

    18

    19

    13

    K-101

    16

    15

    24

    Thermosyphon

    12

    1

    4

    7

    8

    Q-4

    28

    29

    23

    K-102

    26

    25

    34

    Plug Flow 50 % Draw

    12

    1

    4

    7

    8

    Q-5

    38

    39

    33

    K-103

    37

    36

    PUMP-100

    35

    Q-6

    Simple

    51

    52

    53

    54

    55

    56

    57

    58

    Vert Thermosyphon

    Same Stage

    Forced Flow

    5

    6 1 2 7

    10

    11 12

  • 41

    Exercise 22: Sour Water Stripper with Pump-around and

    Thermosyphon Reboiler

    Simulate a sour water stripper used to clean the ammonia and hydrogen sulfide from the

    feed stream. An unsolved version may be found in the training session files as

    Exercise 22 Advanced Column Example - Sour Water Stripper. Assume the following feed composition:

    Conditions:

    Temperature

    Pressure

    Flow

    40 C

    5 bar

    45 m3/hr

    Composition

    NH3

    H2S

    Water

    Mole %

    0.5

    0.5

    99

    Additional Process Information

    The cross exchanger heats the feed entering the tower to 80 C

    The Pump-around cooler can cool the pump-around to 60 C

    60% of the bottoms is returned to the column through the reboiler

    The reboiler is used to vaporize 15% of the return stream

    The overhead should be at 2 bar, and the temperature should not get below 82 C to minimize ammonium salt formation; the temperature should otherwise be

    minimized to reduce water loss

    In most cases a reasonable pumparound duty estimate is required. Good estimates for this case are approximately -3 MW for the cooler and 6 MW for

    the reboiler.

  • 42

    Exercise 23: Glycol Unit with Attached Stahl Column

    Add an attached column to the regenerator of the following glycol unit to enhance the

    stripping of water from the glycol. This file is saved in the training session files as

    Exercise 23 Advanced Column Example Stahl Column; the exercise file is a solved, working glycol unit, but with a less effective regenerator design than the

    following.

    Additional Process Information:

    Use 4 Nm3/h of dry gas as the stripping gas added to the Stahl Column.

    Assume 2 ideal stages for the Stahl Column

    Reboiler4

    3

    Condenser

    1

    2

    Glycol Regenerator

    4

    1

    2

    3

    Q-101

    Reboiler Q

    Glycol Contactor

    2

    1

    Saturator

    TEG Makeup

    QRCYL-1

    Q

    RCYL-1

    Reflux Coil

    Gas/Glycol HEX

    Rich Flash

    VLVE-100

    Glycol Pump

    Inlet Gas

    Water (Saturant)

    8

    TEG

    9 10 11

    12

    13

    Lean TEG

    15

    161718

    19

    20

    Dry Gas

    Flash Gas

    Water Gas

    24

    Q-100

    Pump Hp

    Blowdown

    XCHG-100

    VLVE-101

    6

    SPLT-100 7

    14

    DTWR-100

    2

    1

    5

    21

    Questions:

    1. How does the new dry gas water content compare with the original case?

    2. How does the lean glycol composition compare with the original case?

    3. How do your BTEX emissions in the water gas compare with the original case?

  • 43

    Exercise 24: Stabilizer with Heavy Liquid Draw

    Simulate the following stabilizer column based on the information provided. The

    simulation can be found in the training session files saved as Exercise 24 Advanced Column Example Stabilizer with Heavy Liquid Draw.

    Feed Conditions: Composition (mol%):

    Temperature: 50C

    Pressure: 15 bar

    Flow rate: 750 m3/hr

    Methane 3

    Ethane 7

    Propane 20

    i-Butane 6

    n-Butane 7

    i-Pentane 4

    n-Pentane 3

    Cyclohexane 5

    H2O 6

    Hexane 4

    Heptane 4

    Octane 4

    Nonane 4

    Decane 3

    C11 3

    C12 3

    C13 2

    C14 2

    C15 10

    Additional Process Information

    The column has 10 ideal stages

    The feed is a three phase stream. Please configure the column to accommodate three phases and include a process draw from stage 2 to remove the water phase.

    Add a side reboiler that supplies 4.2x107 kJ/hr of energy to heat the light liquid drawn from stage 7 and returned to stage 8. The draw rate approaches a total

    draw from the stage.

    The reboiler should provide enough heat to obtain a temperature of 120C.

    Questions:

    1. How many liters per minute of water are removed from stage 2?

    2. How many liters per minute of condensate are produced?

    3. What percent water recovery is achieved with the draw?

    K-1001

    2

    Stabilizer

    10

    1

    7

    8

    2

    3

    4

    5

    6

    9

    Q-1

    Three Phase Feed

    4

    5

    XCHG-100

    6

    89

    3

  • 44

    Reactors

    General Review of Chemical Reactions

    For reaction of form:

    dDcCbBaA

    the rates of reaction of each species are related by:

    ADACAB ra

    drr

    a

    crr

    a

    br ,,

    Rates are usually expressed in terms of moles per time per volume

    Heterogeneous catalytic reaction rates are frequently expressed in mole per time per mass of catalyst

    If above reaction is experimentally found to have the following rate expression:

    321

    CBAcA CCCkr

    the reaction is said to be of order 1 with respect to component A, order 2 with

    respect to B, and order 3 with respect to C

    Overall order of the reaction is

    321

    Order of a reaction must be determined experimentally, not from stoichiometry

    For liquid phase reactions, the bases for rate expressions are usually concentration (molarity or molality), mole or mass fractions, or activities. For

    gas phase reactions, the rate expression bases are usually partial pressure,

    fugacity or activity.

    Reactions are usually algebraically stated as

    0NvDvCvBvAv NCBA D

    In the above convention, the stoichiometric numbers iv are negative for reactants

    and positive for products

    For reversible reaction in the liquid phase

    SRA2

    with a net rate for component A based on concentration given by:

    SRcrAcfA CCkCkr2

    at thermodynamic equilibrium, ,0Ar so the equilibrium constant is given by

    2

    A

    SR

    cr

    cf

    cC

    CC

    k

    kK

  • 45

    For gas phase reactions with a rate expression in terms of partial pressures:

    SRcrAcfA ppkpkr2

    the equilibrium constant based on pressure would be

    2

    A

    SR

    pr

    pf

    pp

    pp

    k

    kK

    Combined order of forward and reverse directions must be consistent with orders of the thermodynamic equilibrium constant of reaction

    Equilibrium constant can be calculated from thermodynamics using Gibbs free energies of formation if not specified

    Criterion for thermodynamic equilibrium of a reacting system based on rate of change for Gibbs free energy being zero:

    0iiv

    with chemical potentials defined as:

    iiii aRTGG ln

    and the activity defined as iii ffa / . When substituted into the equilibrium

    requirement,

    0ln iviii aRTGv

    or

    RT

    G

    RT

    GvaK

    iiv

    ii

    expexp

    The above equation relates the equilibrium constant K and activities of

    components in the reacting mixture to the iG for each pure component and

    defines the term G known as the standard Gibbs free energy change of the

    reaction. For a given standard state (which can be different for each component

    in the system), the Gibbs free energy change and consequently the equilibrium

    constant K are solely a function of temperature.

    For gas phase reactions, the standard state is usually the ideal gas state at unit

    pressure (1 atm, 1 bar, 1 psia, 1 Pa, etc.) so 1if (atm, bar, psia, Pa, etc.) and

    the equilibrium constant is expressed:

    iv

    ifK

    This requires the fugacitiesif to be in the same pressure units as the unit

    pressure basis. Further, the iG used to calculate the equilibrium constant must

    also be at the same unit pressure. If the reacting system is assumed to be an

    ideal gas,

    iv

    ipK

    Liquid phase reactions usually use a different reference state so the general relationship using activities must generally be employed

  • 46

    Reaction Sets

    Provides a grouping of reactions that will be used in a non-Gibbs free energy minimization reactor

    Contains one or more consistent reactions

    Reactors with simultaneous or consecutive reactions will use reaction sets with more than one reaction

    Reactions in a reaction set must be consistent with respect to type of reaction and thermodynamics

    Sets are created at the project level and are available for use in any environment

    Reaction sets must be added to an environment

    An individual reaction may be shared among multiple reaction sets

    Reactions within a set may be made active or inactive

    A reaction set is selected at the reactor level and m