ACM NLE Functions as Equations

The purpose of this code generator is the export of MOSAIC models consisting of algebraic equations to Aspen Custom Modeler for stand-alone execution or for the introduction into Aspen Plus flowsheets. The latter requires a model using MOSAIC’s ports to connect to other unit operations within an Aspen Plus flowsheet. A detailed example using this code generator can be found here.

Required Environment

  • Aspen Plus and Aspen Custom Modeler by AspenTech.

Required Solver

  • Aspen’s solvers are employed.

User Options

  • Model name: Specify the name of your model with a string consisting of letters and underscores
  • Use component list: Choose if you want to use a specific component list
  • Component list name: Specify the name of your component list if you chose to use a specific component list
  • Used namespace type: Specify the way variable namespaces are displayed in the generated code. The option “short” will lead to prefixes like “e0”. The option “user-defined” adds prefixes as defined by the user in the “info” tab of the simulation.

Preparation of MOSAIC Model

When you want to use your model as an ACM unit operation, you have to add ports. A documentation on flowsheeting with MOSAIC is available on this website. The following description only applies to NLE models.

Usage for Simulation

  1. Open an NLE Evaluation in MOSAIC
  2. Set the variable specs to obtain a degree of freedom of zero.
  3. Select the Predefined Language Specification “ACM Functions as Equations”.
  4. Choose the Code Generator and Solver Properties in accordance with the User Options above.
  5. Press Generate Code.
  6. Copy the generated code into your local ACM environment.