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.
- Aspen Plus and Aspen Custom Modeler by AspenTech.
- Aspen’s solvers are employed.
- 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
- Open an NLE Evaluation in MOSAIC
- Set the variable specs to obtain a degree of freedom of zero.
- Select the Predefined Language Specification “ACM Functions as Equations”.
- Choose the Code Generator and Solver Properties in accordance with the User Options above.
- Press Generate Code.
- Copy the generated code into your local ACM environment.