Jump Start Guide Aspen Customer Modeler

  • Published on
    01-Feb-2016

  • View
    218

  • Download
    0

Embed Size (px)

DESCRIPTION

Simple guide for Aspen Customer Modeler

Transcript

  • Jump Start: Aspen Custom Modeler V8

    A Brief Tutorial (and supplement to training and online documentation)

    David Tremblay, Product Management, Aspen Technology, Inc. Zachary Peers, Product Management, Aspen Technology, Inc

    2015 Aspen Technology, Inc. AspenTech, aspenONE, the Aspen leaf logo, the aspenONE logo, and OPTIMIZE are trademarks of Aspen Technology, Inc. All rights reserved. 11-7691-0715

  • Jump Start: Aspen Custom Modeler V8

    2015 Aspen Technology, Inc. AspenTech, aspenONE, the Aspen leaf logo, the aspenONE logo, and OPTIMIZE are trademarks of Aspen Technology, Inc. All rights reserved. 11-7691-0715

    Table of ContentsIntroduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    Set Up Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    Start from Aspen Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    Start from Aspen Plus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3

    Create an Aspen Custom Modeler Flash Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3

    Set Up a Component List in Aspen Custom Modeler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3

    Select Properties Definition File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

    Create a Custom Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

    Create Variables and Equations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5

    Specify Fixed and Free Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6

    Write Procedure Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7

    Compile and Test the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9

    Add the Phase Equilibrium Equation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10

    Add the Component Mole Balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

    Add the Energy Balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    Add Forms to Improve Usability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    Add Ports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    Reference Port Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    Handle Properties of Port Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    Add the Mass-Transfer Equations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18

    Create an Icon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18

    Test the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

    Add the Model to the Flowsheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

    Create a Dynamic Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

    Next Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

  • Jump Start: Aspen Custom Modeler V8

    1

    2015 Aspen Technology, Inc. AspenTech, aspenONE, the Aspen leaf logo, the aspenONE logo, and OPTIMIZE are trademarks of Aspen Technology, Inc. All rights reserved. 11-7691-0715

    IntroductionAspen Custom Modeler (ACM) provides a powerful way to quickly create rigorous models of processing equipment and

    to apply these equipment models to simulate and optimize continuous, batch, and semi-batch processes. The product is

    both a model development environment, as well as a complete flowsheet modeling environment.

    In this guide, we will follow one example, the development of a mass-transfer rate-based flash model to illustrate how you

    can use Aspen Custom Modeler to develop your own unit operations.

    This document serves as a simple getting started guide for using Aspen Custom Modeler. We recommend that you use a

    range of other resources including:

    AspenTech support website (support.aspentech.com)

    AspenTech courseware available in on-line and in-person versions

    AspenTech knowledgebase items, training, and sample models available in aspenONE Exchange

    AspenTech business consultants

    See Additional Resources (page 23) for more information.

    This guide assumes that the user has Aspen Custom Modeler V8.0 or higher installed on his or her computer.

    There are two example files provided with this guide: Simple Flash Models Steady State and Simple Flash Models

    Dynamic.

    Set Up PropertiesAspen Custom Modeler shares a common property database and common set of thermodynamic models with Aspen

    Plus via Aspen Properties. This provides a tremendous advantage for Process Engineers by ensuring a consistent basis for

    all property calculations and eliminating much of the work required to set up rigorous models.

    There are two options for setting up properties in Aspen Custom Modeler: start from scratch using Aspen Properties or

    export properties from an existing Aspen Plus case.

    Start from Aspen Properties

    From the Windows Start Menu, enter Aspen Properties into the search bar and select Aspen Properties User Interface to

    get started. This will open the desktop version of Aspen Properties. To save time, select an appropriate template. In this

    example, we will use the Chemical with Metric Units template (Figure 1).

  • 2Jump Start: Aspen Custom Modeler V8

    2015 Aspen Technology, Inc. AspenTech, aspenONE, the Aspen leaf logo, the aspenONE logo, and OPTIMIZE are trademarks of Aspen Technology, Inc. All rights reserved. 11-7691-0715

    Figure 1: Select a Template in Aspen Properties

    Enter the list of components to be included in your model. This list should include all of the components that may appear

    in any part of your flowsheet, including process utilities. Figure 2 shows the components used in this example. From this

    point, you can use the next button to confirm the binary parameters for these components. When the file is complete,

    save it to your working folder as an APRBKP file (Aspen Properties Backup File).

    Figure 2: Generate a Component List in Aspen Properties

  • Jump Start: Aspen Custom Modeler V8

    3

    2015 Aspen Technology, Inc. AspenTech, aspenONE, the Aspen leaf logo, the aspenONE logo, and OPTIMIZE are trademarks of Aspen Technology, Inc. All rights reserved. 11-7691-0715

    Start from Aspen Plus

    You can also create an Aspen Properties backup file from any Aspen Plus simulation case. Open the Aspen Plus file, run it

    once, and then select File: Export from the menu. Enter a file name in the Export dialog box, and set the file type to Aspen

    Properties Backup Files (*.aprbkp).

    Create an Aspen Custom Modeler Flash ModelNow that you have set up all of the necessary properties, you can open Aspen Custom Modeler and reference them. Note

    that the file reference can be changed at any time in the future, so it is easy to keep your ACM Model consistent with your

    Aspen Plus models.

    Open Aspen Custom Modeler. It is a good habit to start by naming and saving the file to a local folder. Note that the

    Aspen Custom Modeler file type is used by default.

    Set Up a Component List in Aspen Custom Modeler

    Aspen Custom Modeler allows you to include any number of component lists. In this example, we will start with the

    default list. From the simulation explorer, click Component Lists. Then, double click the Default component list icon

    displayed in the lower portion of the simulation explorer.

    Select the option to Import Aspen Properties File. This will open a file browser. Use the browser to point to the Aspen

    Properties APRBKP file created earlier (Figure 3).

    Figure 3: Reference an Aspen Properties File

  • 4Jump Start: Aspen Custom Modeler V8

    2015 Aspen Technology, Inc. AspenTech, aspenONE, the Aspen leaf logo, the aspenONE logo, and OPTIMIZE are trademarks of Aspen Technology, Inc. All rights reserved. 11-7691-0715

    The next step is to select the components to include in the component list. Initially, the list is empty. Use the >> button

    to push all the components to the right side of the form then click OK (Figure 4).

    Figure 4: Select Components for a Component List

    Select Properties Definition File

    Properties have already been defined for this example. When starting up Simple Flash Models, you will be asked if you

    want to set up properties. Agree and select Use Properties definition file. Click the Browse button and navigate to the

    directory where you saved these files. Use the property file propsplus. For a Simple Flash Model, you will not be asked

    to configure properties.

    Create a Custom Model

    The next step is to create a model. Navigate to the Models folder under Custom Modeling. Click the Add Model icon in

    the lower section of the navigation pane and enter a name for the new model (Figure 5).

  • Jump Start: Aspen Custom Modeler V8

    5

    2015 Aspen Technology, Inc. AspenTech, aspenONE, the Aspen leaf logo, the aspenONE logo, and OPTIMIZE are trademarks of Aspen Technology, Inc. All rights reserved. 11-7691-0715

    Figure 5: Define a New Model

    Create Variables and Equations

    For this example, we are going to start with a simple flash (vapor-liquid phase equilibrium) calculation. We will use the

    phase equilibrium equation:

    where:

    Xi Liquid mole fraction of component i

    i Molar activity coefficient of component i in the liquid phase

    PLi Vapor pressure of component i in the liquid phase

    Yi Vapor mole fraction of component i

    P System pressure

    The vapor pressure of each component is a function of temperature. The liquid-phase activity coefficient of each

    component is a function of temperature and composition. These can be calculated directly by Aspen Properties, using

    property procedures in Aspen Custom Modeler.

    The easiest way to get started defining variables is to use the Model Assistant. You can raise the model assistant by right-

    clicking inside the Model Editor window (which automatically appeared when you created the new model) and selecting

    Model Assistant from the context menu (Figure 6). Note: if you close the Model Editor, you can reopen it by pressing

    Ctrl+E (Appendix, page 22).

    =X P Y P (E1)i i iL i

  • 6Jump Start: Aspen Custom Modeler V8

    2015 Aspen Technology, Inc. AspenTech, aspenONE, the Aspen leaf logo, the aspenONE logo, and OPTIMIZE are trademarks of Aspen Technology, Inc. All rights reserved. 11-7691-0715

    Figure 6: Open the Model Assistant

    The assistant provides a template to define variables. Enter a name, physical type, and description. You also have the option to set the specification (explained in the next section). Click the Insert button to add the text to the model (Figure 7).

    Figure 7: Use the Model Assistant to Define a Variable

    Specify Fixed and Free Variables

    For this example, we will set up temperature and pressure (T, P) as Fixed variables. This means they will be held constant.

    Conversely, Free variables are determined by the model calculations. Note: the value and specification settings in the

    model variable definitions are only default values the person using the model will have the option of changing both.

    However, it is a best practice to define models with good initial values and specifications to help resolve convergence

    problems later.

    The liquid and vapor mole fractions (X, Y) are defined as Arrays, indexed over the component list as shown in Figure 8.

    Activity coefficients and vapor pressures are set up in a similar manner.

  • Jump Start: Aspen Custom Modeler V8

    7

    2015 Aspen Technology, Inc. AspenTech, aspenONE, the Aspen leaf logo, the aspenONE logo, and OPTIMIZE are trademarks of Aspen Technology, Inc. All rights reserved. 11-7691-0715

    Figure 8: Use the Model Assistant to Define an Array

    By default, the mole fractions are initialized to a fixed initial value. A better practice is to set mole fractions to the inverse

    of the number of components (this way you always end up with as many mole fractions as components). In Aspen

    Custom Modeler, the Size function returns the length of any array or set, so 1/Size(Componentlist) can be used to

    initialize the mole fractio...

Recommended

View more >