Aspen Plus Hydrocracker_User's Guide V7.3.pdf

Embed Size (px)

Citation preview

  • User's Guide

    Aspen Plus Hydrocracker

  • Version Number: V7.3March 2011

    Copyright (c) 2003-2011 by Aspen Technology, Inc. All rights reserved.

    Aspen Plus HydrocrackerTM, Aspen Plus HydrotreaterTM, Aspen Plus CatCrackerTM, Aspen Plus HydrocrackerTM, AspenPlus, Aspen PIMSTM, aspenONE, the aspen leaf logo and Plantelligence and Enterprise Optimization aretrademarks or registered trademarks of Aspen Technology, Inc., Burlington, MA.

    All other brand and product names are trademarks or registered trademarks of their respective companies.

    This document is intended as a guide to using AspenTech's software. This documentation contains AspenTechproprietary and confidential information and may not be disclosed, used, or copied without the prior consent ofAspenTech or as set forth in the applicable license agreement. Users are solely responsible for the proper use ofthe software and the application of the results obtained.

    Although AspenTech has tested the software and reviewed the documentation, the sole warranty for the softwaremay be found in the applicable license agreement between AspenTech and the user. ASPENTECH MAKES NOWARRANTY OR REPRESENTATION, EITHER EXPRESSED OR IMPLIED, WITH RESPECT TO THIS DOCUMENTATION,ITS QUALITY, PERFORMANCE, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.

    Aspen Technology, Inc.200 Wheeler RoadBurlington, MA 01803-5501USAPhone: (781) 221-6400Toll free: (888) 996-7100Website: http://www.aspentech.com

  • Contents iii

    ContentsAbout This Document ..............................................................................................1

    Who Should Read This Guide .............................................................................1Technical Support ............................................................................................1

    Introducing Aspen Plus Hydrocracker .....................................................................3

    Overview.........................................................................................................3Introduction To Aspen Plus Hydrocracker ............................................................3The Aspen Plus Hydrocracker Engine ..................................................................4Equation-Oriented Modeling...............................................................................4Pressure Drop Model Example............................................................................5Model Specifications and Degrees-of-Freedom .....................................................6Modes and Multi-Mode Specifications ..................................................................7Measurements and Parameters ..........................................................................8Changing Specifications with Specification Options ...............................................9Optimization....................................................................................................9

    1 Using Aspen Plus Hydrocracker .........................................................................11

    Starting Aspen Plus Hydrocracker for the First Time ........................................... 11Resetting the Aspen Plus Connection ................................................................ 14Exiting Aspen Plus Hydrocracker ...................................................................... 14General Guidelines for Using the Excel Interface ................................................ 15Saving and Loading Data Files ......................................................................... 16

    Saving Data Files ................................................................................. 16Loading Data Files ................................................................................ 17

    2 The User Interface ............................................................................................19

    The Sheets of the User Interface ...................................................................... 19Flow Diagram Sheet ............................................................................. 20Separation Section ............................................................................... 21Buttons on the Flow Diagram Sheet........................................................ 22

    Hidden Worksheets ........................................................................................ 28Command Line Window................................................................................... 29

    Overview............................................................................................. 29Abort Button........................................................................................ 31No Creep Button .................................................................................. 31Close Residuals Button.......................................................................... 31Close Button........................................................................................ 31Manual Access to the Command Line Window .......................................... 31

    Toolbar and Menu .......................................................................................... 32Startup Aspen Plus Hydrocracker Submenu ............................................. 33File Submenu....................................................................................... 36Setup Cases Submenu .......................................................................... 38

  • iv Contents

    Run Cases Submenu............................................................................. 38Tools Submenu .................................................................................... 39Development Tools Submenu................................................................. 39Help Submenu ..................................................................................... 40

    Exit Aspen Plus Hydrocracker........................................................................... 40

    3 Working With The Equation-Oriented Solver .....................................................42

    Introduction to the Equation-Oriented Solver..................................................... 42Successive Quadratic Programming (SQP)......................................................... 42Changing EO Solver Parameters....................................................................... 43Basic EO Solver Parameters............................................................................. 44EO Solver Output to the Command Window....................................................... 44EO Solver Log Files......................................................................................... 46ATSLV File Problem Information ....................................................................... 46ATSLV Details ................................................................................................ 47

    Basic Iteration Information.................................................................... 47Largest Unscaled Residuals.................................................................... 47Constrained Variables ........................................................................... 47General Iteration Information ................................................................ 48Nonlinearity Ratios ............................................................................... 49

    Usage Notes .................................................................................................. 49Usage Notes-General ............................................................................ 49Dealing With Infeasible Solutions ........................................................... 50Scaling ............................................................................................... 52Dealing With Singularities ..................................................................... 52Notes on Variable Bounding................................................................... 54Run-Time Intervention.......................................................................... 54

    4 Model Parameterization ....................................................................................55

    Introduction .................................................................................................. 55Flow Diagram Sheet ....................................................................................... 55

    Product Properties ................................................................................ 55Model View and Specification Through the Flow........................................ 57Model Specifications ............................................................................. 58

    Running a Parameterization Case ..................................................................... 67Reconciliation Cases ....................................................................................... 69

    More Detailed Parameterization.............................................................. 69

    5 Simulation.........................................................................................................71

    Introduction to Simulation............................................................................... 71Aspen Plus Hydrocracker Simulation Strategy .................................................... 71Commonly-Used Scripts in the EB Script Language............................................. 73Aspen Plus Hydrocracker Variable Specifications ................................................ 73

    Model CONST Specifications .................................................................. 73Model Tuning Facts with Specifications.................................................... 77Flowsheet Changes............................................................................... 80Running a Simulation Case .................................................................... 82Error Recovery - Parameterization.......................................................... 84

    6 Running Multiple Cases .....................................................................................86

    Overview....................................................................................................... 86

  • Contents v

    Before You Start ............................................................................................ 86

    7 Optimization......................................................................................................89

    Optimization Basics ........................................................................................ 89Setting Up Objective Functions ........................................................................ 90Setting Up An Optimization.............................................................................. 95Executing Optimization Cases .......................................................................... 98Analyzing Optimization Solutions.................................................................... 100

    8 LP Vectors .......................................................................................................102

    Overview Generating LP Vectors.................................................................. 102Purpose of Running LP Vectors....................................................................... 102LP Vector Generation .................................................................................... 103

    9 Reaction Kinetics Details .................................................................................108

    Overview..................................................................................................... 108Component Slate ......................................................................................... 108Kinetic Framework........................................................................................ 113

    Reaction Pathways ............................................................................. 113

    10 Simplified Separation Model ..........................................................................116

    Simplified Separation Model........................................................................... 116

    Index ..................................................................................................................119

  • About This Document 1

    About This Document

    This chapter includes the following information:

    Who Should Read This Guide

    Technical Support

    Who Should Read This GuideThis document is designed to be used by the users of Aspen PlusHydrocracker, formerly known as Aspen Hydrocracker, in conjunction with theAspen RxFinery family of products, including Aspen Plus Reformer, formerlyknown as Aspen CatRef, Aspen Plus CatCracker, formerly known as AspenFCC, Aspen Hydrocracker, and Aspen Plus Hydrotreater, formerly known asAspen Hydrotreater.

    Technical SupportAspenTech customers with a valid license and software maintenanceagreement can register to access the online AspenTech Support Center at:

    http://support.aspentech.com

    This Web support site allows you to:

    Access current product documentation

    Search for tech tips, solutions, and frequently asked questions (FAQs)

    Search for and download service packs and product updates

    Submit and track technical issues

    Send suggestions

    Report product defects

    Review lists of known deficiencies and defects

    Registered users can also subscribe to our Technical Support e-Bulletins.These are used to alert users to important technical support information suchas:

    Technical advisories

    Product updates and releases

  • 2 About This Document

    Customer support is also available by phone, fax, and email. The most up-to-date contact information is available at the AspenTech Support Center athttp://support.aspentech.com.

  • Introducing Aspen Plus Hydrocracker 3

    Introducing Aspen PlusHydrocracker

    OverviewAspen Plus Hydrocracker, formerly known as Aspen Hydrocracker, is asimulation system for monitoring, planning, and optimizing hydrocracking andhydrotreating units.

    Aspen Plus Hydrocracker is a member of the AspenTech new generation ofrefinery reactor models. Aspen Plus Hydrocracker accurately predicts yieldsand product properties for widely different feedstocks and operatingconditions. An Aspen Plus Hydrocracker flowsheet simulates all sections of thehydrocracking unit. It can include simplified or vigorous fractionation models.

    Introduction To Aspen PlusHydrocrackerAspen Plus Hydrocracker consists of a client and a server. The client, or userinterface, is built from Microsoft Excel spreadsheets customized with VBAcode and macros. The client and server communicate through DCOM. Thiscommunication should be transparent, and you do not have to understandhow it works in order to use Aspen Plus Hydrocracker If the communicationsoftware fails, contact AspenTech.

    While your primary interaction with Aspen Plus Hydrocracker will be throughthe user interface, you need a basic understanding of how the server works inorder to effectively use and troubleshoot the model. The server has severalcomponents:

    The engine (also known as the kernel or command prompt).

    The solver (DMO).

    The model, which is built as a custom Aspen Plus model using the PML(Process Model Library) system.

  • 4 Introducing Aspen Plus Hydrocracker

    The Aspen Plus HydrocrackerEngineThe Aspen Plus Hydrocracker engine is Aspen Plus. You do not need to be anAspen Plus expert to use Aspen Plus Hydrocracker this section covers themost important concepts.

    The first time the engine is used during an Aspen Plus Hydrocracker session iswhen the user interface connects to the server. This brings up a commandprompt window in which you will see the invoke plant.ebs command, whichtells the engine to open several data files and build the model in the computermemory. The command prompt disappears when the kernel finishes buildingthe model.

    The engine is also used whenever you request a solution from the userinterface. Any changes you have made to data values or model specifications(via specification options) are passed through DCOM from the client to theserver. The command prompt window appears and you will see a stream ofkernel commands going to the engine. These commands tell the engine:

    What mode of solution is required.

    What solver settings should be used.

    There are different sequences of commands for different types of solutions(parameter, simulation, optimization, reconciliation, case study, LP vectorgeneration, and so on.). You can look at the default command sequences onthe EB Script sheet on the user interface. The default command sequencesare all that is necessary for running the model in any of the pre-configuredsolution modes, but advanced users can modify them.

    During a solve, you will see three buttons on the bottom of the commandprompt window. These are labeled Abort, No Creep, and Close Residuals.You use them to interrupt the solver. The Abort button tells the solver to quitat the next opportunity.

    The engine is also used whenever case data is stored or retrieved. The userinterface typically contains only the results of the most recent run of eachsolution type. The save/load case data options let you save the results ofany number of previous runs to review or use later. This user interface optionis implemented using the kernel commands read varfile from and writevarfile to. You can see these commands in the command prompt while it isactive, or you can recall the command prompt using the user interface menuoption Aspen Plus Hydrocracker | Tools | Display Command Line toreview the previous commands.

    Equation-Oriented ModelingAspen Plus Hydrocracker is based on an equation-oriented (EO) formulation,so you need to understand some EO concepts in order to use it effectively.The EO approach is also known as open-form. It can be contrasted with theclosed-form or sequential-modular (SM) technique.

  • Introducing Aspen Plus Hydrocracker 5

    The equations in an EO model are solved simultaneously using an externalsolver, which iteratively manipulates the values of the model variables untilall the equations are satisfied within a convergence tolerance. The solver willwork for any well-posed set of variable specifications. A variablesspecification labels it as

    known (fixed)

    -or-

    unknown (calculated)

    for a given solution mode. An SM model is solved procedurally one equationat a time, and the solution procedure depends on a given specification set.For a different grouping of known and unknown variables the solutionprocedure will be different, since the equations will be solved in a differentorder.

    Pressure Drop Model ExampleA simple example illustrates some important EO concepts. Consider this two-equation model, in which the pressure drop is correlated with the square ofthe mass flow of a fluid:Pressure drop correlation: DELTAP = PRES_PARAM * MASS_FLOW^2

    Define pressure drop: DELTAP = PRES_IN PRES_OUT

    In an EO formulation, we rearrange these equations into residual format. Thevalue of the residual indicates how close that is to being solved at thesolution the value of every residual will be zero, or at least close enough tozero to satisfy our numerical convergence tolerance.

    f(1) = DELTAP - PRES_PARAM * MASS_FLOW^2 (= 0 at solution)f(2) = PRES_IN - PRES_OUT - DELTAP (= 0 at solution)Note that f is the name of the vector of residuals. Its length equals thenumber of equations. The solver prefers to work with vectors and equationindex numbers, while we find it easier to use equation names. The modeldefines names for each residual that can be used in reports and solverdebugging output. In this case, we choose the names:

    f(1) = ESTIMATE_DELTAPf(2) = DELTAP_DEFINITIONSimilarly, the five variables in this model can also be addressed as elementsof a vector x having a length of 5:

    x(1) = DELTAPx(2) = PRES_INx(3) = PRES_OUTx(4) = PRES_PARAMx(5) = MASS_FLOW

  • 6 Introducing Aspen Plus Hydrocracker

    Model Specifications andDegrees-of-FreedomOnce we tell the solver which variables are known (fixed) for a given solutionmode, it manipulates the values of the unknown (free) variables to drive theresiduals to zero. For any system of independent equations, the degrees-of-freedom (DOF) is equal to the number of variables minus the number ofequations minus the number of fixed variables:

    DOF = #variables - #equations - #fixed variablesThe number of degrees-of-freedom of a system classifies it into one of threecategories:

    Category Degrees of Freedom

    Under specified > 0

    Square 0

    Over specified < 0

    Aspen Plus Hydrocracker modes are either under specified or square. Overspecified problems are not allowed in Aspen Plus Hydrocracker.

    Aspen PlusHydrocracker Mode

    Category

    Optimization Under specified

    Reconciliation Under specified

    Simulation Square

    Parameter Square

    Case Study Square

    LP Vector Square

    The pressure drop example has five variables and two equations, so we mustfix three variables to create a square system. Furthermore, we cannot fix anyarbitrary set of three variables. If all variables within one equation are eitherexplicitly or implicitly fixed, the problem is not well posed, as the solver canno longer manipulate any variable to reduce that equations residual. Such anincorrect set of specifications will cause a structural singularity in the solver.However, Aspen Plus Hydrocracker is designed so that if you use the standardspecification options provided in the user interface you will not create astructurally singular system.

  • Introducing Aspen Plus Hydrocracker 7

    Here are some specification attempts for the pressure drop example:

    Fix DELTAP, PRES_OUT: under specified - only acceptable for an optimizationcase with proper selection of independent variables.

    Fix DELTAP, PRES_OUT, PRES_IN, MASS_FLOW: over specified!

    Fix DELTAP, PRES_OUT, PRES_IN:

    f(1) = DELTAP - PRES_PARAM * MASS_FLOW^2

    (fix) (free) (free)

    f(2) = PRES_IN - PRES_OUT DELTAP

    (fix) (fix) (fix)

    Square, but not well posed (structurally singular) all variables in residual 2are fixed! If you compare this to the over specified example, you can see thatover specification is not allowed since it always leads to a structurally singularsystem.

    Fix PRES_IN, PRES_PARAM, MASS_FLOW:

    f(1) = DELTAP - PRES_PARAM * MASS_FLOW^2

    (free) (fix) (fix)

    f(2) = PRES_IN - PRES_OUT DELTAP

    (fix) (free) (free)

    Square and well posed a valid specification set. Note that there are othervalid specification sets, such as PRES_IN, PRES_OUT, and MASS_FLOW.

    Modes and Multi-ModeSpecificationsIn different situations we may want to use different sets of fixed and freevariable specifications.

    Each set of variable specifications is a solution mode. One of the strengths ofthe EO approach is that the same model formulation and solver are used forall the modes. Although there are many possible modes, Aspen PlusHydrocracker is configured for three basic modes: The Process Details,ParamData and Optimize sheets in Aspen Plus Hydrocracker correspond tothose three modes. Case study and LP vector generation are alsosimulation modes.

    Case study is simply a series of simulations with the same specifications,but different values for key fixed variables.

    LP vector generation is a simulation run followed by a sensitivityanalysis. The independent and dependent variables you choose for vectorgeneration must correspond to fixed and free variables in the simulationmode.

  • 8 Introducing Aspen Plus Hydrocracker

    The Aspen Plus Hydrocracker user interface examines the current modelspecifications and lets you choose only proper independent and dependentvariables.

    In order to label how each variable behaves in the various modes, multi-modespecifications are assigned. A variable that is fixed in every mode is called aCONST, while variables that are free in every mode are called CALC.

    For example, in Aspen Plus Hydrocracker, the reactor vessel diameter isusually a CONST because its value is not calculated in any mode, while thecatalyst weight of each reactor bed is usually a CALC because the modelcalculates its value from other information.

    Measurements and ParametersWhile many variables have CONST or CALC specifications, there are othervariables whose behavior changes between modes.

    A MEAS variable is fixed in the parameter-fitting (tuning) mode, but free inthe simulation and optimization (prediction) modes.

    Conversely, a PARAM variable is free in the parameter-fitting mode andfixed in the simulation and optimization modes.

    Usually a MEAS corresponds to a plant measurement, while a PARAM is amodel tuning parameter or a bias to a measurement. Because the MEAS andPARAM variables always have opposite specifications in every mode, thereare always the same number of MEAS and PARAM variables so that everymode is properly specified.

    Another rule of thumb is that it is possible to "swap" the specifications on apair of related CALC and CONST variables to be MEAS and PARAM, sincethe number of DOF stays the same in every mode.

    The concepts of simulation and parameter-fitting mode andCONST/CALC/MEAS/PARAM variables can be illustrated with the pressuredrop example. Assume the equipment across which the pressure drop ismeasured has an inlet pressure gauge, a DP cell, and a mass flowmeter. Wecan specify the DP measurement (variable DELTAP) to be type MEAS andthe pressure drop parameter (PRES_PARAM) to be type PARAM. We candefine inlet pressure (PRES_IN) and mass flowrate (MASS_FLOW) asCONST variables. The outlet pressure (PRES_OUT) is always calculated fromthe other variables, so it is type CALC.

    f(1) = DELTAP - PRES_PARAM * MASS_FLOW^2

    (MEAS) (PARAM) (CONST)

    f(2) = PRES_IN - PRES_OUT DELTAP

    (CONST) (CALC)(MEAS)

    This is a valid multi-mode specification, because in the simulation modeMASS_FLOW, PRES_IN and PRES_PARAM are fixed and PRES_OUT andDELTAP can be calculated from those values. In the parameter-fitting mode:

  • Introducing Aspen Plus Hydrocracker 9

    DELTAP, MASS_FLOW and PRES_IN are fixed.

    PRES_PARAM and PRES_OUT can be computed.

    Changing Specifications withSpecification OptionsWhat if the plant we are modeling has both a DP cell and an outlet pressuregauge? We have a choice as to which to use. From a mathematicalstandpoint, it is just as valid to declare PRES_OUT a MEAS and DELTAP aCALC as the other way around. Thus we have two possible variablespecifications affecting both our simulation and parameter-fitting modes.

    In Aspen Plus Hydrocracker this type of spec swap is made using theSpecification Options button on the Flow Diagram Sheet

    A specification option is a pre-set set of alternate specifications that areequally mathematically valid. The specification sets is set by the EBS scriptdefined on the ES Scripts worksheet. One of the sets may be moreappropriate for a given unit based on its configuration, control strategy,instrumentation, type of lab test, mass or volume basis for flowmeters, or avariety of other reasons.

    In our pressure drop example, on the param sheet we might see aSpecification Option with the following options:

    Use outlet pressure measurementUse pressure drop measurement

    These choices correspond to the following specifications:

    Use outlet pressuremeasurement

    Use pressure dropmeasurement

    DELTAP spec CALC MEAS

    PRES_OUT spec MEAS CALC

    Note: The scripts that are associated with the specification options arelocated on the EB Scripts worksheet. To view them, you must unhide the EBScripts worksheet by clicking Format | Sheets | Unhide; then clicking EBScripts in the Unhide dialog. The scripts start in Column L and end in ColumnS.

    You can add your own custom user scripts by inputting them into Column Vthrough Column Z. Each line must be a valid EB script command (or comment- a line starting with //). Any blank line will be interpreted as the end of thescript.

    OptimizationOptimization is a prediction mode, so it is similar to simulation. The maindifference is that there are positive DOF in optimization mode, and the solver

  • 10 Introducing Aspen Plus Hydrocracker

    uses those DOF to maximize or minimize an objective function within limits oncertain variables.

    To create optimization DOF, simply change the specifications of some CONSTvariables to OPTIM. OPTIM variables are fixed in simulation andparameter-fitting modes and free in optimization mode and are alsoknown as independents. The other free variables (MEAS and CALC) areknown as dependents.

    The solver requires that the number of OPTIM variables be equal to thenumber of DOF, but that requirement is easy to satisfy by starting with awell-posed square set of multi-mode specifications and changing only CONSTvariables to OPTIM.

    Essentially, you must do three things:

    Define an objective function.

    Specify the DOF (independents).

    Put maximum and minimum limits on key independent and dependentvariables.

    Often a profit function contains:

    Revenue terms based on product or export utility flowrates and prices.

    Cost terms based on feed or import utility flowrates and prices.

    You specify the DOF by selecting independent (OPTIM) variables from a picklist. Aspen Plus Hydrocracker presents only CONST variables in this pick listin order to ensure that whatever set you choose will lead to a well-posedproblem.

    You can put bounds on any of the independents, plus whichever dependentsyou select from another pick list that includes CALC and MEAS variables thatyou may wish to limit during the optimization run.

  • 1 Using Aspen Plus Hydrocracker 11

    1 Using Aspen PlusHydrocracker

    Starting Aspen PlusHydrocracker for the First TimeStarting Aspen Plus Hydrocracker For the First Time:

    The first time you start Aspen Plus Hydrocracker, you need to:

    Load the Hydrocracker Flowsheet.

    Establish a connection to the Aspen Plus Hydrocracker model, which is anAspen Plus Flowsheet.

    To Load the Hydrocracker Flowsheet:1 From the Windows Start menu, click Programs | AspenTech | Process

    Modeling | Aspen Plus Based Refinery Reactors | AspenPlus Hydrocracker to launch Excel and open the Aspen PlusHydrocracker GUI.

    2 When prompted by Excel, click the Enable Macros button.

    Note: Aspen Plus Hydrocracker does not support having multiple versions ofitself or Aspen Plus installed at the same time.

    When the Aspen Plus Hydrocracker workbook is loaded, there is no activeconnection to the Aspen Plus Hydrocracker model, which is an Aspen Plusflowsheet. The workbook consists of several spreadsheets where various datacan be entered and retrieved. The application also creates a new menu itemon the Excel menu bar called AspenPlusHYC. This menu provides access toall of the GUIs primary functions including connecting to the model. Throughthe Startup Aspen Plus Hydrocracker menu command, you can load theflowsheet, modify start-up options, or reset the Aspen Plus connection. Mostof the other menu commands are inactive until the flowsheet is loaded.

  • 12 1 Using Aspen Plus Hydrocracker

    3 On the Excel menu bar click AspenPlusHYC | Startup Aspen PlusHydrocracker | Load Hydrocracker Flowsheet.

    To Establish a Connection to the Hydrocracker Flowsheet:

    The Connect dialog box appears.

    1 In the Host field, enter the computer name using all lower case letters.The Browse button will become available If the correct computer name isentered,

    Note: You can easily determine the computer name if it is not known: Win2000: Right-click the My Computer icon on the computerdesktop and select Properties from the pop-up menu. Click the NetworkIdentification tab where the full computer name will be listed near the top. Windows XP: Right-click the My Computer icon on the computerdesktop and select Properties from the pop-up menu. Click the ComputerName tab. The computer name will be listed in the Full Computer Namefield...

  • 1 Using Aspen Plus Hydrocracker 13

    2 Click the Browse button.

    3 Navigate into the Apinit directory, select the file hyc.appdf; then clickthe Open button.

    You are returned to the Connect dialog box where the hyc.appdf file nameits directory now appear in the Problem area.

    4 At the bottom of the Connect dialog box, click the OK button.

    Aspen Plus Hydrocracker now loads the hyc.appdf file. This loading may takeup to five minutes, depending on the speed of your machine. During thistime, the Excel cursor will become the hour-glass symbol, and the Excelstatus line will display the message Loading Aspen Plus Hydrocrackerflowsheet. The cursor will return to the normal cross shape and the statusline will read Ready when the process is complete.

    Once connected to the flowsheet, the previously inactive AspenPlusHYCmenu items become active. The HydroCracker toolbar is also created.

    You are now ready to begin using Aspen Plus Hydrocracker.

    Note: Before using Aspen Plus Hydrocracker, you may want to save thecomputer name and hyc.appdf file location entered in the Connect dialogbox.

    To Do This: Click Saving Data Files

    Starting Aspen Plus Hydrocracker After the First Time:

    If you saved your data file when you first opened Aspen Plus Hydrocracker,the Connect dialog box will be populated with your computer name and thename and location of the .appdf file.

    1 From the Windows Start menu, click Programs | AspenTech | ProcessModeling | Aspen Plus Based Refinery Reactors | AspenPlus Hydrocracker to launch Excel and open the Aspen PlusHydrocracker GUI.

    2 When prompted by Excel, click the Enable Macros button.

    The Connect dialog box appears, populated with your computer name andthe name and location of the .appdf file.

    3 At the bottom of the Connect dialog box, click the OK button.

    Aspen Plus Hydrocracker now loads the hyc.appdf file. This loading may takeup to five minutes, depending on the speed of your machine. During thistime, the Excel cursor assumes the hour-glass symbol, and the Excel statusline displays the message Loading flowsheet. The cursor will return to thenormal cross shape and the status line will read Ready when the process iscomplete.

    Once connected to the flowsheet, the previously inactive AspenPlusHYCmenu items become active. The Hydrocracker toolbar is also created.

    You are now ready to begin using Aspen Plus Hydrocracker.

  • 14 1 Using Aspen Plus Hydrocracker

    Resetting the Aspen PlusConnectionOccasionally, problems can occur where the AspenPlusHYC menu items andtoolbar are still active, but the functions fail with various VB errors. This canbe the result of loading too many applications at once, thereby causing anapplication conflict.

    To Reset The Aspen Plus Connection:1 On the main menu, click AspenPlusHYC | Startup Aspen Plus

    Hydrocracker | Reset ApMain, to reset the connection to the AspenPlus Hydrocracker flowsheet.

    The Reset Aspen Plus warning screen appears.

    2 Click the OK button to reset the Aspen Plus connection (and to terminateall Aspen Plus processes).

    Exiting Aspen PlusHydrocrackerThe best way to exit is to use the menu item, AspenPlusHYC | Exit AspenPlus Hydrocracker.

  • 1 Using Aspen Plus Hydrocracker 15

    1 Click AspenPlusHYC | Exit Aspen Plus Hydrocracker.

    A dialog box appears, asking for confirmation.

    2 Click the OK button to proceed with exiting.

    You are asked whether you want to save the changes made to the Excelworkbook.

    3 Click the Yes button to save your changes and exit.

    -or-

    Click the No button to abandon your changes and exit

    -or-

    Click the Cancel button to abort the exiting operation.

    If you click the Yes or No button:

    The workbook closes.

    The AspenPlusHYC menu disappears.

    The AspenPlusHYC toolbar is hidden.

    General Guidelines for Usingthe Excel InterfaceMost of the features of Excel are available in the Aspen Plus Hydrocrackerworkbook. However, you should only use these features with anunderstanding about the overall functioning of the workbook.

    Here are some things to consider as you use the workbook:

    The only fields that you can make an entry into that the model will use arethose colored blue.

    Entries into number fields that are not colored blue are overwritten by theworkbook after a case is executed.

    Enter only values into blue fields. If you use a formula in a blue field, itwill be overwritten after a case is executed. Therefore, enter only valuesin these fields.

  • 16 1 Using Aspen Plus Hydrocracker

    If you change an option with a combo box, the color coded fields are notautomatically updated. To update the fields, click the Update Fieldsbutton on the Hydrocracker menu.

    If a case does not converge, the calculation engine contains a startingpoint that is not good for subsequent cases. Therefore, before running asuspect case, save your case data. You can then load your case data torestore a case if the problem does not converge.

    The data you enter into the parameter and simulation worksheets isautomatically saved by the workbook when a case is run. You can retrieveit after you restore a case to create a good starting point for thecalculation engine.

    The model is an equation-based model and needs a good starting point toconverge. Therefore, be careful about large changes in the independentvariables (color coded blue).

    Saving and Loading Data Files

    Saving Data FilesUse the AspenPlusHYC | File | Save User Data to Var File command to:

    Save the initial file when you first connect to Aspen Plus Hydrocracker.This preserves the name of your computer and the path to the appdf fileyou selected in the Connect dialog box.

    Save a file for loading later, particularly if you suspect that a run may notconverge. In this case, your saved file can provide a good starting pointfor other runs.

    To Save A Data File:1 On the Excel menu bar click AspenPlusHYC | File | Save User Data to

    Var file.

    The Save User Data to File dialog appears.

    2 In the File Name field, enter the name under which you want to save thisfile. You do not need to add the var extension.

    3 Click the Browse button.

    The Save As dialog appears.

    4 On the Save As dialog, browse to the directory in which you want to savethis file.

    5 On the Save As dialog, click the Save button.

    The Save User Data to File dialog appears again.

    6 On the Save User Data to File dialog, click the Save button.

  • 1 Using Aspen Plus Hydrocracker 17

    Your .var file is saved.

    Loading Data FilesYou can load .var files that you previously saved.

    Note: Loading a .var file will cause you to lose the data currently in theWorkbook.

    To Load Case Data:1 On the main menu, click AspenPlusHYC | File | Load User Data from

    Var File.

    The Load User Data from File dialog appears.

    2 Click the Browse button.

    The Open dialog appears.

  • 18 1 Using Aspen Plus Hydrocracker

    3 On the Open dialog, browse to the correct file name and directory path.

    4 Left-click the file name.

    The file name appears in the File name field.

    5 Click the Open button.

    The Load User Data from File dialog appears, with the file name anddirectory path you selected entered.

    6 Click the Load button to load the file and overwrite the current workbook.-or-Click the Cancel button to abort loading the .var file.

  • 2 The User Interface 19

    2 The User Interface

    The Sheets of the UserInterfaceWhen you start Aspen Plus Hydrocracker, the default spreadsheet is the FlowDiagram sheet. You can navigate to other data entry or results areas byselecting the appropriate tab at the bottom of the Excel window. You can alsoaccess many of these tabs via buttons on the Flow Diagram sheet.

    The Sheets of Aspen Plus Hydrocracker are:

    Worksheet Name Description

    Flow Diagram Provides Flowsheet, data display entry buttons, andchange the model specification

    ProcessOverview Summary of Key operation conditions

    Reactor Profiles Temperature, sulfur, nitrogen, and Aromatics profilefor each reactor.

    ProcessDetail Data entry and reports for the simulation case

    ParamData Data entry and reports for the parameter andreconciliation cases

    Cases Entry and setup form for case studies

    PIMS Vectors Vectors for generating a PIMS Table

    PIMS Table PIMS Table

    LP Vectors Entry and setup form for LP vector calculations

    Optimize Entry and setup form for optimization calculations

    Profit 1 Entry and setup form for profit based objectivefunction 1

    Profit 1 Report Report form for objective function 1

    Profit 2 Entry and setup form for profit based objectivefunction 2

    Profit 2 Report Report form for objective function 2

    Profit 3 Entry and setup form for profit based objectivefunction 3

    Profit 3 Report Report form for objective function 3

    Many of these sheets can also be accessed by buttons on the Flow Diagramsheet.

  • 20 2 The User Interface

    Flow Diagram SheetThe Flow Diagram Sheet provides a overview of the process flow for thehydrocracker. The Aspen Plus Hydrocracker/Hydrotreater model is built basedon Aspen Plus.

    The figure below shows the process flow sheet, which is built into the FlowDiagram sheet of the Excel spreadsheet.

    The Flow Diagram Sheet has three main sections:

    Feed system.

    Reaction section.

    Separation section.

    Feed SystemThe Feed System consists of AspenPlus blocks and customized blocks. Theseblocks let you build the feeds fed into the reactor. These blocks provide youflexibility in specifying the feeds.

    Feed Stream Model (AFFED1-AFFED6).

    Six pre-specified feed stream blocks are provided based on the Aspen feedinformation database.

    Light vacuum gas oil (LVGO)

    Heavy vacuum gas oil (HVGO)

    Light coker gas oil (LCGO)

    Heavy coker gas oil (HCGO)

    FCC LCO (LCO)

    Hydrocracker bottoms (RECOIL)

  • 2 The User Interface 21

    Feed Adjuster Model (FEEDADJ).

    In this model, you can adjust (within reasonable constraints) all feedfingerprints by a feed adjuster model to match client-specified bulkproperties:

    distillation

    gravity

    sulfur

    total nitrogen

    basic nitrogen

    bromine number

    refractive index (optional)

    viscosity (optional)

    Reaction SectionThe blended feed, recycle oil, and hydrogen mixed with the recycle gasthrough a compressor are mixed again, then sent to a furnace (modeled as aheater). The effluent from the furnace is sent to Reactor 1. Therefore, thereactor R1 inlet temperature can be adjusted by manipulating the heateroutlet temperature.

    The whole reactor is modeled by a series of standard Aspen EO reactorblocks, which include,

    Olefins Reactor Models (OLFRXN). One extent-of-reaction block(EOXNTRXN) is used for saturating the olefins to the reactorcomponents.

    Reactor Bed Models (R1B1-R2B2). One reactor block (EORXR) is usedfor each catalyst bed. The Langmuir-Hinshelwood (adsorption-reaction/inhibition-desorption) mechanism is assumed. Collocated trickle-bed kinetics and phase equilibria are employed. Reaction rates and phaseequilibrium are recomputed at each collocation point, which provides veryprecise prediction of heat release.

    Reaction types include: Saturation of olefins Saturation of aromatics Hydrodesulfurization (HDS) Hydrodenitrogenation (HDN) Ring opening Ring dealkyation Paraffin hydrocracking

    Separation SectionThe effluent from the reactor goes through two heaters:

    E1H integrated with the feed heater E1C.

    An air cooler (FinFan).

    The effluent then enters the separation section.

  • 22 2 The User Interface

    The Separation Section contains a number of Aspen Plus blocks andsimplified separation models:

    Block Description

    High Pressure Separator(HPS).

    The bottom stream of HPS goes to aLow Pressure Separator (LPS). Themodel is an Aspen Plus flash model.

    Low Pressure Separator(LPS).

    The bottom of LPS is sent to theseparation section (mainfractionator, gas plant, and so on).The whole separation section is builtas a simplified separation model.

    Simplified SeparationModel for Main Fractionatorand Gas Plant (PRODSP)

    This simplified model uses acombination of component splitters,analyzers, and calculators.

    Buttons on the Flow Diagram Sheet

    Button Action

    R1 R2 HTR takes you to the Process Detail sheet todisplay a summary of the current runningconditions

    Feeds takes you to the Process Detail sheet todisplay feed properties of the combined feedand input sheet for each individual feed

    Yields takes you to the Process Detail sheet todisplay:

    the volume and mass yields of product

    the product properties of each product

    Process Overview takes you to the Process Overview sheet,on which general information forAspenPlusHYC model is presented

    Reaction Profile takes you to the Reaction Profile sheet. Onthis sheet a set of diagrams is set to presentthe temperature, sulfur, nitrogen andaromatic contents for the two beds in thetwo reactors

    Specification Options a dialog box pop up to let you select whichmode to run:

    Temperature Control

    User Scripts

    Click the appropriate tab; then click theSelect button.

    Run a Param case automatically refreshes the ParamDatasheet when the data is passed back to thespreadsheet from the solver

  • 2 The User Interface 23

    Process Overview ButtonOn the Flow Diagram Sheet, click the Process Overview button to view theProcess Overview sheet as shown below.

    Reactor Profiles ButtonOn the Flow Diagram Sheet, click the Reactor Profiles button to view theReactor Profiles sheet as shown below.

  • 24 2 The User Interface

    Specification Options ButtonOn the Flow Diagram Sheet, click the Specification Options button toselect specification options on the Select Spec.Options dialog as shownbelow.

    To Change A Specification:1 Click the desired tab: Temperature Control or User Scripts.

    2 Click the Specification you want to change.

    3 Click the Select button.

    The specification you selected is updated.

    For details about setting and swapping specs, click here.

    Feeds ButtonOn the Flow Diagram Sheet, click the Feeds button to view the Feedssection of the Process Detail sheet as shown below.

  • 2 The User Interface 25

    R1 ButtonOn the Flow Diagram Sheet, click the R1 button to view the Reactor 1section of the Process Detail sheet as shown below.

    R2 ButtonOn the Flow Diagram Sheet, click the R2 button to view the Reactor 2section of the Process Detail sheet as shown below.

  • 26 2 The User Interface

    HTR ButtonOn the Flow Diagram Sheet, click the Htr button to view the Heaters,Exchangers and Flashes section of the Process Detail sheet as shownbelow.

    Save to Prior ButtonThe Save to Prior button saves the current solution to the Prior column onthese worksheets:

    Process Details

    Process Overview

  • 2 The User Interface 27

    Param Data

    This lets you make quick comparisons between different runs. For example,you can run a base case and save the values to the Prior column. Then, forany simulate run, you can quickly compare the results in the value columnto the prior column to see how things changed.

    H2 Streams ButtonClick the H2 Streams button on the Flow Diagram Sheet to view the H2Streams section of the Process Detail sheet as shown below.

    H2 Balance ButtonClick the H2 Balance button on the Flow Diagram Sheet to view the H2Balance section of the Process Detail sheet as shown below.

  • 28 2 The User Interface

    Yields ButtonClick the Yields button on the Flow Diagram Sheet to view the Yieldssection of the Process Detail sheet as shown below.

    Hidden WorksheetsThe Aspen Plus Hydrocracker workbook contains several worksheets that arehidden by default. These are not needed for general use of the workbook, butyou can view the information on them.

  • 2 The User Interface 29

    To View A Hidden Worksheet:1 On the Excel toolbar, click Format | Sheet | Unhide.

    2 Click the worksheet you want to unhide.

    Note: Some of these worksheets are password protected to preventinadvertent changes to their contents. Such changes can affect thefunctionality of the workbook and cause a failure to occur in this functionality.

    The Hidden Worksheets are listed below.

    Worksheet Name Description

    ProcessOverviewIO

    Structures the layout for the ProcessOverview worksheet

    ProcessOverviewLinks

    Contains direct cell links to the model variables available in theworkbook for the ProcessOverview worksheet

    ProcessDetail IO Structures the layout for the ProcessDetail worksheet

    ProcessDetail Links Contains direct cell links to the model variables available in theworkbook for the ProcessDetail worksheet

    ProcessDetailUserInput

    Contains a copy of your input for the ProcessDetail worksheet

    ParamData IO Structures the layout for the ParamData worksheet

    ParamData Links Contains direct cell links to the model variables available in theworkbook for the ParamData worksheet

    Param UserInput Contains a copy of your input for the ParamData worksheet

    ProcessOverviewIO

    Structures the layout for the Simulation worksheet

    ProcessOverviewLinks

    Contains direct cell links to the model variables available in theworkbook for the Simulation worksheet

    ProcessOverviewUserInput

    Contains a copy of your input for the Simulation worksheet

    Feed Input

    EB Scripts Contains the script for execution by the calculation engine

    ReceiveVars Contains and manages variables that are sent from thecalculation engine to the workbook through DCOM

    SendVars Contains and manages variables that are sent to the calculationengine from the workbook through DCOM

    Registry Contains a collection of data and parameters for the Aspen PlusHydrocracker workbook

    PIMSin

    PIMSout

    Command Line Window

    OverviewThe Aspen Plus Command Line window displays the output of commandssent to the Aspen Plus Hydrocracker model. It appears automatically whenloading Aspen Plus Hydrocracker and when running cases.

  • 30 2 The User Interface

    After connecting to the Aspen Plus Hydrocracker flowsheet, you can alsomanually open this window by selecting the AspenPlusHYC | Tools |Display Command Line menu command.

    When Aspen Plus Hydrocracker is loading, the Command Line windowappears briefly, letting you observe the commands that are being sent to themodel during the flowsheet instantiation. You cannot access any functions onthe command line at this time.

    When a case is running, the Command Line window opens automatically. Itlets you see:

    The commands that are being sent to the model.

    The convergence path of a solution.

    In these instances, when the command line opens automatically, the onlybuttons available to you are:

    Abort

    No Creep

    Close Residuals

  • 2 The User Interface 31

    Abort ButtonClick the Abort button to abort the solving of a case.

    If you click the Abort button while a case is running, you must wait until thefollowing messages appear in the command line window:

    Error return due to an ABORT message from the usercommunications file DMO.MSGProblem failed to convergeYou can now click the Close button to close the command line window andreturn to the model. You should then load a data file to ensure the next casestarts from a good converged solution.

    No Creep ButtonWhen running a case, the default is to creep the solver (take small steps) fora few iterations to provide robust behavior. Once you have gained experiencewith the model and are confident that a particular case will solve well withoutthe default number of creep steps, you can manually turn the creep steps offby clicking the No Creep button.

    You can click the No Creep button while a problem is converging. This causesthe solver to eliminate the creep in the next iteration.

    Close Residuals ButtonUse the Close Residuals button to have the model close the residualswithout minimizing the objective function convergence. You might find thisuseful in cases where the objective function very nearly reaches a maximumvalue, but the convergence of the objective does not close.

    Close ButtonThis button closes the Command Line window and returns you to the Exceluser interface.

    Click the Close button only:

    After a run has failed to converge.

    If you aborted a case and the command line message run aborted by theuser appears.

    If you opened the Command Line window manually, and you havefinished using it..

    Manual Access to the Command LineWindowAfter connecting to the Aspen Plus Hydrocracker flowsheet, select theAspenPlusHYC | Tools | Display Command Line menu command. TheAspen Plus Command Line window appears.

  • 32 2 The User Interface

    When you open the command line manually, some buttons are available andsome are not:

    Button Available

    Execute Yes

    Abort No

    No Creep No

    Close Residuals No

    Close Yes

    The Abort, No Creep, and Close Residuals buttons have no effect when thecommand line has been opened manually unless the Execute command isinvoked to run Aspen Plus.

    The Close button closes the command line window and returns you to theExcel spreadsheet. While the command line window is open, you cannotaccess the Excel spreadsheet.

    The command line window can be a very powerful tool in trouble-shootingproblems since the commands sent to the model and the solutions of themodel are stored in the buffer. You can scroll through the buffer (the topwindow of the command line) to see convergence paths and any errormessages generated when trying to solve a problem.

    Toolbar and MenuWhen the Aspen Plus Hydrocracker workbook is selected, Microsoft Excel isloaded and then the Hydrocracker VBA loads a drop-down menu selection tothe Excel toolbar labeled AspenPlusHYC. This menu contains selections thatactivate macros within the Hydrocracker VBA. This section explains theoptions and dialogs that are available from the Aspen Plus Hydrocrackerdialog. Many of the options are associated with the cases for Hydrocrackermodeling.

  • 2 The User Interface 33

    Startup Aspen Plus Hydrocracker Submenu

    OverviewWhen you select the AspenPlusHYC option on the toolbar, the drop-downmenu appears as shown below. Some of the options are grayed out becausethe workbook has not yet been connected to the calculation engine throughthe server. The options on the Development Tools submenu are foradvanced functions in the workbook and will not be covered here.

    The selection you should make at this time is Startup Aspen PlusHydrocracker. With the exception of the advanced functions, this is the firstselection you should make when you first activate the Aspen PlusHydrocracker workbook.

    The Startup AspenPlusHYC submenu contains the commands you typicallyuse when you first activate the Aspen Plus Hydrocracker workbook.

    When you select Startup Aspen Plus Hydrocracker option, the menushown above appears.

    Command Function

    LoadHydrocrackerFlowsheet

    Connect the workbook and load a problem file

    Startup Options Load a problem file automatically or manually

    Reset ApMain Resets the connection with the Aspen Plusserver

    The Load Hydrocracker Flowsheet option is normally the first commandyou will use. This command displays the Connect dialog box. The ResetApMain command causes the workbook to break the connection with theserver. This is necessary if you want to use the Excel File menu. If you do notclose the workbook at this point, you can use the Load HydrocrackerFlowsheet command to reconnect the workbook.

    Connect Dialog Box1 On the Excel menu bar, select AspenPlusHYC | Startup Aspen Plus

    Hydrocracker | Load Hydrocracker Flowsheet.

  • 34 2 The User Interface

    The Connect dialog box appears.

    2 In the Host box, enter the name of the host computer (normally yourcomputer) using all lower case letters.

    If the correct computer name is entered, the Browse button in theProblem area will become enabled.

    Note: You can easily determine the computer name if it is not known.

    Win2000: Right-click the My Computer icon on the computer desktop andselect Properties from the pop-up menu. Click the Network Identificationtab where the full computer name will be listed near the top.

    Windows XP: Right-click the My Computer icon on the computer desktopand select Properties from the pop-up menu. Click the Computer Nametab. The computer name will be listed in the Full Computer Name field.

    3 Click the Browse button in the Problem area, navigate into the Apinitdirectory, select the file hyc.appdf, and then click Open.

    4 At the bottom of the Connect dialog box, click OK.

    On a 750 MHz Pentium III PC, such as a Dell Inspiron 8000, it requiresapproximately two minutes to initialize the Hydrocracker flowsheet andload the data into the Excel GUI. During this time, the Excel cursor willappear as an hourglass symbol and the Excel status line will display themessage Loading Aspen Plus Hydrocracker flowsheet. The cursor willreturn to the normal cross shape and the status line will display Readywhen the process is complete.

    Once the connected to the flowsheet is established, the previously inactiveAspenPlusHYC menu commands become active, and the Aspen PlusHydrocracker toolbar is created.

  • 2 The User Interface 35

    5 Now save the workbook using the Excel File | Save command, topreserve the computer name and hyc.appdf file location entered in theConnect dialog box.

    You are now ready to begin using Aspen Plus Hydrocracker.

    Startup Options Dialog BoxThe Startup Options dialog box is shown below. This dialog box lets youspecify a default problem solution to load into the workbook other thanhyc.appdf (the base solution).

    When the workbook is opened, there is by default no connection establishedwith the Hydrocracker flowsheet. Furthermore, once the connection isestablished, the data loaded into the spreadsheet will be the data that comeswith the generic model.

    You can change these default settings to improve efficiency. By modifying thestartup options, you can automatically connect to the Hydrocrackerspreadsheet and load a specific user data file immediately upon opening theHydrocracker GUI.

    At the top of the Startup Options dialog box, you can choose to make aconnection to the Hydrocracker model either manually or automatically. Ifyou select Automatic Startup, the spreadsheet will automatically establish aconnection to the model whenever it is opened.

    The Startup Options dialog box also has an option to load in a set of dataother than the default problem data. Automatically loading data that matchesyour plant is more convenient.

    To Set Startup Options:1 On the Excel menu bar, select AspenPlusHYC | Startup Aspen Plus

    Hydrocracker | Startup Options.

    The Startup Options dialog box appears.

  • 36 2 The User Interface

    2 Select Manual Startup or Automatic Startup. Your choice willdetermine whether the connection to the Hydrocracker model is mademanually or automatically.

    3 If you chose the Automatic Startup option in Step 2, you can load a setof data other than the default problem data in the hyc.appdf file. To doso, select the Load User Data from File? checkbox.

    4 In the File Name box, enter the name of the data file to be loaded(including the full path). Normally, this is a file that you have saved froma previous execution of the program.

    5 Click OK.

    File SubmenuThe second submenu on the AspenPlusHYC menu is File.

    The File submenu contains four commands:

    Use thisCommand

    To

    Load Case Data Invoke a dialog box to load a case file

    Save Case Data Invoke a dialog box to save a case file

    Load User InputSheet

    Load data you previously entered on aParameter or Simulation worksheet

    Save User InputSheet

    Save data you previously entered on aParameter or Simulation worksheet

    Use the items on this menu to:

    Save and load case data.

    Save and load your data entry sheets.

    Load Case DataUse the Load Case Data command to load in a good starting point fromsaved data. Typically the file you load you have previously saved using theSave Case Data command. Do this when a solution is not achieved and thesolver is left with a bad starting point.

  • 2 The User Interface 37

    Save Case DataUse the Save Case Data command to save a file which has a good startingpoint for possible later retrieval using the Load Case Data command. It isgood practice to periodically save data, because the solver can sometimes beleft with a bad starting point if a solution is not achieved.

    The hydrocracker model is an equation-based model that can be moved froma base solution to another base solution, if the move is not too large.Normally, as a very general rule, too large means a move of about 20% to30% on values other than temperatures. Temperatures changes can be in therange of 10 to 20 F.

    Load User Input SheetUse the Load User Input Sheet command to avoid retyping data if it is lostin a run that doesnt converge. After you retrieve a case, the values inworksheets are updated. If you have entered data on the Parameter orSimulation worksheet, this data is overwritten. To retrieve this overwrittendata, execute the Load User Input Sheet command.

    To Load User Input Sheets:

    Click the Load User Data ( ) button.

    If you need to save the data you have entered, execute the Save User InputSheet command. These can also be activated by buttons on the toolbar:

    Save User Input SheetUse the Save User Input Sheet button to save your data entry sheets forlater retrieval if the data entry is lost in a run that doesnt converge. If youneed to reload a case, your data entry on Parameter or Simulationworksheets will be overwritten. To retrieve your data entry, use the Load UserInput Sheet command.

  • 38 2 The User Interface

    Setup Cases SubmenuThe third submenu on the AspenPlusHYC drop-down menu is Setup Cases.This submenu is unavailable until you successfully connect the workbook tothe calculation engine as explained (fm).

    The Setup Cases submenu contains six commands:

    Use thiscommand

    To

    Case Study Set Up Case Studies

    Optimization Set Up Optimization Calculations

    Vectors Set Up Lp Vectors

    Profit 1 Set Up Profit Function Number 1 For an Optimization Case

    Profit 2 Set Up Profit Function Number 2 For an Optimization Case

    Profit 3 Set Up Profit Function Number 3 For an Optimization Case

    Run Cases SubmenuThe fourth submenu on the AspenPlusHYC drop-down menu is Run Cases.This submenu is unavailable until you successfully connect the workbook tothe calculation engine.

  • 2 The User Interface 39

    Tools SubmenuThe fifth submenu on the AspenPlusHYC drop-down menu is Tools. Thissubmenu is unavailable until you successfully connect the workbook to thecalculation engine.

    Development Tools SubmenuThe sixth submenu on the AspenPlusHYC drop-down menu is DevelopmentTools. This submenu is unavailable until you successfully connect theworkbook to the calculation engine. Development tools are reserved forexpert users and their use is not covered here.

  • 40 2 The User Interface

    Help SubmenuThe seventh submenu on the AspenPlusHYC drop-down menu is Help.

    Use the Help submenu to:

    Invoke the on-line help.

    View details about this version of Aspen Plus Hydrocracker.

    Exit Aspen Plus HydrocrackerThe eighth submenu on the AspenPlusHYC drop-down menu is Exit AspenPlus Hydrocracker.

  • 2 The User Interface 41

    The best way to exit is to use this menu item,

    1 Click AspenPlusHYC | Exit Aspen Plus Hydrocracker.

    A dialog box appears, asking for confirmation.

    2 Click the OK button to proceed with exiting.

    You are asked whether you want to save the changes made to the Excelworkbook.

    3 Click the Yes button to save your changes and exit.

    -or-

    Click the No button to abandon your changes and exit

    -or-

    Click the Cancel button to abort the exiting operation.

    If you click either the Yes or No button:

    The workbook closes.

    The AspenPlusHYC menu disappears.

    The AspenPlusHYC toolbar is hidden.

  • 42 3 Working With The Equation-Oriented Solver

    3 Working With TheEquation-Oriented Solver

    Introduction to the Equation-Oriented SolverWhen you click on the solve button, Aspen Plus Hydrocracker submits themathematical formulation of the problem to the Aspen Plus open equationmodel based simulation solver.

    If the solution is successful:

    the kernel command window closes

    the results of the solution are returned to the Excel GUI

    the status indicators will change to Ready and Converged

    If the solver fails:

    the status indicators show Ready and Not Converged

    you must perform some troubleshooting to determine the cause of thefailure

    The following topics provide information on the basics of the solvertechnology and error messages issued by the solver when certain types oferrors occur.

    Successive QuadraticProgramming (SQP)The Aspen Plus Equation Oriented (EO) model based solver is a specificimplementation of the general class of nonlinear optimization algorithmsknown as Successive Quadratic Programming (SQP), which perform theoptimization by solving a sequence of quadratic programming subproblems.The general optimization problem that DMO solves can be expressed asfollows:

    Minimize f(x)

  • 3 Working With The Equation-Oriented Solver 43

    Subject to c(x) = 0xmin x xmax

    Where:

    x Rn Vector of unknown variablesf(x) R1 Objective functionc(x) Rm Vector of constraint equationsxmin Rn Vector of lower bounds on xxmax Rn Vector of upper bounds on x

    A simplified description of the EO model solver algorithm is outlined asfollows:

    1 Given an initial estimate of the solution vector, x0.

    2 Set iteration counter, k = 0.

    3 Evaluate derivative of the objective function, gradient, and the derivativeof the constraints, Jacobian.

    4 Initialize or update an approximation of the second derivative matrix, orHessian, of the Lagrange function. The Lagrange function, f(x) + ici,accounts for constraints through weighting factors i, often calledLagrange multipliers or shadow prices.

    5 Solve a quadratic programming subproblem to determine a searchdirection, dk. In the quadratic programming subproblem, the objectivefunction is replaced by a quadratic approximation, constraints arelinearized, and bounds are included.

    6 Check for convergence or failure. If the optimization convergence criteriaare satisfied, or if the maximum number of allowed iterations, MAXITER,is reached, then end. Convergence is achieved when:

    Objective function gradient OBJCVG

    Scaled or unscaled constraint residuals RESCVG

    7 Perform a one-dimensional search to determine a search step k so thatxk+kdk is a better approximation of the solution as measured by a linesearch or merit function. The reduction of merit function requirement issometimes relaxed to achieve a full correction step.

    8 Update iteration counter, k = k + 1, and loop back to step 3.

    Changing EO Solver ParametersYou can change parameters for the solver can be changed with scriptcommands. Enter commands at the kernel command prompt or on the EBscripts sheet in the Excel GUI.

    The script language for a parameter change is:

    DMO.parameter = value

  • 44 3 Working With The Equation-Oriented Solver

    The parameters are discussed in the following sections. As an example, thefollowing commands:

    DMO.MAXITER = 10DMO.RESCVG = 1.0D-5

    change the maximum number of iterations to 10 and the residualconvergence tolerance to 1.0d- 5. This input would apply for all modes.

    Basic EO Solver ParametersHere are the most commonly used DMO parameters for Aspen PlusHydrocracker:

    MAXITER Maximum number of SQP iterations allowed (default = 50).

    MINITER Minimum number of SQP iterations allowed (default = 0).

    CREEPFLAG Flag for the creep mode. This mode makes the optimizer movesmore conservative. It is very helpful when the problem diverges.

    No (default)

    Yes

    CREEPITER Number of iterations to perform creep mode (default = 10).

    CREEPSIZE Creep mode step size. This is the fraction of the full step to betaken when in creep mode (default = 0.1).

    RESCVG Residual convergence tolerance (default = 1.0D-6).

    OBJCVG Objective function convergence tolerance (default = 1.0D-6).

    EO Solver Output to theCommand WindowDuring each solution, the following iteration log is sent to the commandwindow:

  • 3 Working With The Equation-Oriented Solver 45

    Iteration is the count of SQP iterations (QP subproblems) performed bythe solver. There is one line of output for each normal iteration of thesolver. Abnormal iterations may have additional lines for error orinformation messages.

    Residual Convergence Function indicates the solvers progress towardssolution, in terms of feasibility of the residuals. The problem does notconverge until this measure gets below the DMO rescvg value defined inthe EB script for that solution mode.

    Objective Convergence Function is a measure of the solvers progresstowards solution in terms of optimality of the objective function. This isonly meaningful in modes with degrees-of-freedom, which for Aspen PlusHydrocracker is only the optimization mode. The problem does notconverge until this measure gets below the DMO objcvg value defined inthe EB script for that solution mode.

    Objective Function Value refers to the Jacobian of the objectivefunction.

    Nonlinearity Ratio is a measure of the nonlinearity of the problem. Thecloser the value is to one, the more linear the problem. A negative valueindicates that the problem behaved in the opposite of what was expected.Near the solution, as the step sizes become small, this value becomesclose to one. There are two nonlinearity ratios: Overall Model

    Worst Model is the model which has the worst non-linear ratio.

    The last section of the output shows the execution times for the various partsof the problem.

    In this example, we can see that convergence was achieved when the residualand objective convergence functions were less than their respectivetolerances at iteration 3.

    From this output, we also see that there have been no line searches. Thus thestep size for each iteration is one. When a line search is performed for aniteration, a message similar to the one below appears:

    ==> Step taken 3.26D-01

  • 46 3 Working With The Equation-Oriented Solver

    If the solver has to line search continually and the step size gets very small(less than 1.0D-2), most likely the solution is trying to move very far from thestarting point or some of the specified values are nearly infeasible.

    EO Solver Log FilesAspen Plus Hydrocracker outputs DMO solver information to two log files:

    ATSLV.

    ATACT.

    These files reside in the working directory you defined in the startup menubox (fm).

    The ATACT file is similar to the ATSLV file, but lists all the problem variablesand independent variables, whereas the ATSLV file does not. The ATSLV file istypically more useful and is described in more detail below.

    ATSLV File ProblemInformationAt the top of the ATSLV file, a summary of the problem is printed. This showsthe size of the problem and the values of some important parameters.

  • 3 Working With The Equation-Oriented Solver 47

    ATSLV Details

    Basic Iteration InformationAt each iteration, the following header is printed:

    This shows the iteration number and the value of the objective function.

    Largest Unscaled ResidualsThis section shows the largest unscaled residuals. A similar section shows thelargest scaled residuals. This section is particularly helpful when the solverhas trouble closing all the residuals because it will point to the largest.

    Constrained VariablesThis section shows the variables that lie on their bounds. This is onlymeaningful in a mode with degrees of freedom (optimization for Aspen PlusHydrocracker).

    The output shows the variable number, which bound is active, the variablename, the current value and the shadow price. The shadow price is alsoknown as the Lagrange multiplier. This is the derivative of the objectivefunction with respect to the value of the constraint and represents the cost forthe constraint.

    The shadow price is based on the value of the objective function that is seenby DMO. That means the shadow price is in SI units (such as $/sec) and isaffected by any scaling. This is true even if you declare the units to besomething other than SI (such as $/HR).

  • 48 3 Working With The Equation-Oriented Solver

    Consider this example. We have a tower with a composition constraint,expressed as a mole fraction of a component. The following table shows theresults of two optimization runs at two different values of the compositionconstraint:

    Value Objective Shadow Price

    0.0002 2.853 432.924

    0.0003 2.893 258.664

    The large change in the shadow price indicates that the effect of thecomposition on the objective function is very nonlinear. We can manuallyestimate the average shadow price in this region by a finite differencemethod:

    Price = Obj/x = ( 2.893-2.853 ) / ( 0.0003 - 0.0002 ) =400.00 $/sec/mole fractionThis value lies between the two prices.

    If the objective function had a scale factor of 100, we would get the following:

    Value Objective Shadow Price

    0.0002 285.4 43290.7

    0.0003 289.3 25860.2

    We would have to remember to unscale the shadow price by dividing by 100.

    General Iteration InformationThis section appears after the residual output:

    The iteration status shows the exit condition of that iteration. Normalindicates a normal successful iteration. Warning indicates a successfuliteration despite some solver difficulties. Error indicates a failure. Solvedindicates the final iteration of a successfully solved problem.

    The degrees of freedom is the number of declared independent variables inthe problem. The constrained variables are those at bounds in the QPsubproblem. The current degrees of freedom is the degrees of freedom lessthe constrained variables. This is the true degrees of freedom for theproblem. A highly constrained solution is one that has very few currentdegrees of freedom.

  • 3 Working With The Equation-Oriented Solver 49

    The number of function and Jacobian evaluations is an accumulative countand generally matches the number of iterations.

    The objective function convergence function is the norm of the Jacobian forthe objective function. At the solution, this value should be near zero.

    The residual convergence function is the sum of the scaled residuals. At thesolution, this value should be near zero.

    Nonlinearity RatiosThis section shows the nonlinearity ratio of the worst block, the objectivefunction, and the worst equations. The criterion is the accuracy of thepredicted change in the equation. If the function is linear, then the new valuewould match the predicted value and the nonlinearity ratio would be one. Avalue of the ratio other than one indicates some degree of nonlinearity. Anegative value indicates that the function value moved in the opposite of theexpected direction. Large negative values could indicate a discontinuity or badderivative.

    This section also shows the step size for the iteration.

    Usage Notes

    Usage Notes-GeneralThis section describes some usage notes and troubleshooting tips to improvethe performance of the solver and to help diagnose common problems.

    The topics in this section are:

    Dealing With Infeasible Solutions

    Scaling

    Dealing With Singularities

    Notes on Variable Bounding

    Run-Time Intervention

  • 50 3 Working With The Equation-Oriented Solver

    BoundsAspen Plus lets you bound every variable in the problem as shown below:

    Xl < X < XuThe step bound of an independent variable defines how much the value of thevariable can be changed in a single optimization run. The step bound is usedalong with the initial value, lower bound, and upper bound to compute theactual bounds to be used in the run:

    Xl = max(X - |Xstep|, Xlower)Xu = min(X + |Xstep|, Xupper)

    You should define upper and lower bounds for all independent variables. Youcan also define the step bounds for independent variables.

    Most of the dependent variables in the Hydrocracker model have very widebounds, such as 1.E20 for lower bound and 1.E20 for upper bound.However, some dependent variables have physical meaning. You should setup appropriate bounds for them to prevent the solution from getting intoinfeasible operating conditions. For example, there is a metallurgic limit onregenerator cyclone temperature. Hence, an upper bound should be set forthis variable. Only those constrained dependent variables must be definedwhen setting up an optimization case in Hydrocracker model.

    In general, it is not recommended to heavily bound an optimization problemfor reasons that are both practical and algorithmic. Bounds on independentvariables are recommended in order to avoid unbounded problems. All otherbounds should be used only if they are absolutely necessary. The optimizationengine for Hydrocracker model is the DMO solver.

    Independent VariablesIndependent variables are variables whose values can be changedindependently, for example, the feed rate in the Hydrocracker unit. Theoptimizer can vary the values of independent variables to push the values ofthe objective function in the defined direction (maximize profit or minimizecost) until some bounds are reached. Each independent variable accounts fora degree of freedom. The number of degrees of freedom is equal to thenumber of independent variables in an optimization run if no independentvariable is at its bound. You can impose upper and lower bounds onindependent variables to prevent the final solution from deviating too faraway from the starting point. You can also impose step bounds onindependent variables.

    Dealing With Infeasible SolutionsThese often occur during optimization cases where it is not possible tosimultaneously solve all the equations while respecting all the variablebounds. This doesn't happen in simulation cases because DMO ignores boundsin simulation cases. If you solve a simulation case that violates a bound, thenthe optimization case will start at an infeasible point. In this case, thefollowing is printed in the OUT file:

  • 3 Working With The Equation-Oriented Solver 51

    This says that this variable's value had to be adjusted to respect the bound.When the optimization proceeds and there is no feasible solution for theequality constraints, the screen output might look like this:

    Residual Objective Objective Overall ModelConvergence Convergence Function Nonlinearity Worst Nonlinearity

    Iteration Function Function Value Ratio Model Ratio--------- ----------- ----------- ---------- ------------ ------- ------------Warning ... QP slack variable = 2.29070D-01Warning ... QP slack variable = 2.29070D-01

    0 9.312D-04 4.809D-03 -2.779D+00 9.968D-01 C2S -2.834D-01Warning ... QP slack variable = 1.80624D-01Warning ... QP slack variable = 1.80624D-01

    1 5.244D-04 4.667D-02 -2.792D+00 2.900D-01 C2S -1.846D+02Warning ... QP slack variable = 1.44771D-01Warning ... QP slack variable = 1.44771D-01

    2 1.552D-02 5.479D-02 -2.922D+00 -7.475D-01 C2S -1.540D+01Warning ... QP slack variable = 6.09502D-01Warning ... QP slack variable = 6.09502D-01

    3 3.853D-02 2.379D-03 -3.083D+00 9.908D-01 C2S 9.914D-01Warning ... QP slack variable = 1.87163D-01Warning ... QP slack variable = 1.87163D-01

    4 1.496D-02 1.040D-02 -3.075D+00 8.346D-01 C2S 6.012D-01Warning ... QP slack variable = 3.18508D-01Warning ... QP slack variable = 3.18508D-01

    +---------------------- ERROR ----------------------+

    Error return from [DMO] system subroutine DMOQPSbecause the problem has NO FEASIBLE SOLUTION.

    Action : Check the bounds that are set on variablesto insure consistency. Check the .ACT filefor information on initialinfeasibilities.

    +---------------------------------------------------+

    Error return, [DMO] System Status Information = 5

  • 52 3 Working With The Equation-Oriented Solver

    Optimization Timing Statistics Time Percent================================ ======== =======

    MODEL computations 1.32 secs 31.10 %DMO computations 0.91 secs 21.28 %Miscellaneous 2.03 secs 47.61 %-------------------------------- --------- -------Total Optimization Time 4.26 secs 100.00 %Updating PlexProblem failed to converge

    Note the messages from the QP indicating an invalid value for a slackvariable.

    To solve this problem, you need to be aware of the initial message indicatingthat the initial value of a variable violated its bound. In this case,C2S.SPC.REFL_RATIO_MASS is causing the problems. Unfortunately, theOUT file does not list this variable as constrained, since it could never solvethe QP successfully.

    ScalingGenerally, it is not necessary to scale your equations or variables beyondwhat is done by default in the models. However, it may be more efficient toscale your objective function. A good rule of thumb is to scale the objectivefunction so that its value is on the order of 10 to 1000. The scaling of theobjective function plays an important role since it affects the overallconvergence behavior. This is particularly important in cases where there is alarge change between the original value of the objective and the expectedoptimum.

    Dealing With SingularitiesSingularities often occur when the model is moved into a region where theequations are not well defined. The most common example of this is when astream flow becomes too small. If singularities exist, they are usuallydetected at the start of the problem. In this case, some information is writtento the OUT file and this can help locate the cause of the problem. In general,you should prevent stream flows from going near zero by placing nonzerolower bounds on the flow (e.g., 10 kg/hr). This is especially important onstreams from flow splitters or feed streams whose total flow is beingmanipulated. In the case of a singularity the following message will bedisplayed:

  • 3 Working With The Equation-Oriented Solver 53

    The OUT file contains information on the possible cause of the singularity inthe following manner:

    Sometimes, singularities are simply caused by the optimization being tooaggressive. This moves the models into a region where the equations are notwell defined. To make the optimization more robust, DMO has a creep mode.This mode simply causes smaller steps to be taken for a specified number ofiterations. To use this mode, you can enter the following script command:

    DMO.CREEPFLAG = 1This turns on the creep mode. When active, the following message isdisplayed at each iteration:

    ==> Step taken 1.00D-01By default, this will operate for 10 iterations with a step size of 0.1. You canchange these values with the commands:

    DMO.CREEPITER = 20DMO.CREEPSIZE = 0.5In this example, we change the number of creep iterations to 20 and the stepsize to 0.5.

  • 54 3 Working With The Equation-Oriented Solver

    Notes on Variable BoundingRemember that by default DMO does not respect bounds during the solutionof a SIM or PAR case. The user, however, has the capability to imposebounds in a square case by using a different line search parameter. The useof this mode is recommended only in cases where there are truly multiplesolutions to a model (for example, the cubic equation) and you want to use abound to eliminate an unwanted one.

    To use this mode, enter the following script command:

    DMO.LINESEARCH = 4In general it is not recommended to heavily bound an optimization problemfor reasons that are both practical and algorithmic. Bounds on independentvariables are recommended in order to avoid unbounded problems. All otherbounds should be used only if they are absolutely necessary. Finally,redundant bounds should be avoided.

    Run-Time InterventionDuring long runs, you can change the behavior of the DMO solver by clickingone of the three buttons at the bottom of the command window. Yourselection takes effect at the start of the next DMO iteration.

    The three buttons are:

    Button Action

    ABORT Stops the solver

    CLOSE Fixes all the independent variables at theircurrent values and closes the residuals

    NOCREEP Takes DMO out of creep mode

  • 4 Model Parameterization 55

    4 Model Parameterization

    IntroductionTo provide a better understanding of the Aspen PlusHydrocracker/Hydrotreater model, this section presents a generaldescription and discussion of the model.

    Flow Diagram Sheet

    Product PropertiesYou can vary product cut-points. The table below shows a list of productproperties predicted by AspenPlusHYC model.

    Product Stream Properties

    H2S Mass flow, mole flow

    NH3 Mass flow, mole flow

    H2 Total consumption (mass and moles)

    C1 C1 mass flow, mole flow, mass fraction

    C2 mass flow, mole flow, mass fraction

    C2 C1 mass flow, mole flow, mass fraction

    C2 mass flow, mole flow, mass fraction

    C3 mass flow, mole flow, mass fraction

    H2S mass flow, mole flow, mass fraction

    H2 mass flow, mole flow, mass fraction

    C3 C2 mass flow, mole flow, mass fraction

    C3 mass flow, mole flow, mass fraction

    C4 mass flow, mole flow, mass fraction

    C4 C3 mass flow, mole flow, mass fraction

    C4 mass flow, mole flow, mass fraction

    C5 mass flow, mole flow, mass fraction

    C4 iso/normal ratio

  • 56 4 Model Parameterization

    Product Stream Properties

    Light naphtha C4 mass fraction

    TBP distillation

    API gravity

    Specific gravity

    PIANO

    Total Sulfur

    Total Nitrogen

    RON/MON

    Heavy Naphtha TBP distillation

    API gravity

    Specific gravity

    PIANO

    Total Sulfur

    Total Nitrogen

    RON/MON

    Distillate TBP distillation

    API gravity

    Specific gravity

    PIANO

    Total Sulfur

    Total Nitrogen

    Basic Nitrogen

    Smoke point

    Pour Point

    Freeze point

    Bottoms TBP distillation

    API gravity

    Specific gravity

    PIANO

    Total Sulfur

    Total Nitrogen

    Basic Nitrogen

    Cetane Index

    Viscosity

    For recycle hydrocracking,

    The maximum-naphtha base case recycles the 400oF-plus material.

    The maximum-distillate base case recycles the 700oF-plus material.

    Distillation overlap is calibrated with plant data. The following yields andproduct properties are provided. Recycle Gas Scrubber is simplified as acomponent splitter, RGSPLIT, a standard Aspen Plus component splitterblock (SEP).

    Note: Scrubbing efficiency can be calibrated with plant data.

    If there is no recycle gas scrubber,no H2S is removed by this block.

  • 4 Model Parameterization 57

    The quench-distribution system is modeled by a Standard Aspen Plus splitterblock (FSPLIT). Mixer blocks are used for quenches. You can specify:

    Heat loss.

    Temperature.

    Pressure.

    Pressure drop.

    Quench valve characte