Custom modelling in gPROMS
Capture corporate knowledge in high-fidelity custom models
A key feature of the gPROMS platform is the ability to create high-fidelity custom models of processes to capture corporate knowledge and create competitive advantage.
Unlike traditional flowsheeting packages, you can easily create and maintain custom models using all the power of the gPROMS® platform’s advanced process modelling language – with no need for programming. Models can then be published in libraries for other users across the organisation.
Models can be validated against laboratory, pilot or operating data to fit empirical constants such as reaction kinetic parameters and heat transfer coefficients using gPROMS’s state-of-the-art parameter estimation capabilities.
Utilising corporate knowledge to create competitive advantage
Custom modelling is provided as an option on most gPROMS family products, and as core functionality in gPROMS ModelBuilder®.
Typical reasons for writing your own models include:
- creating novel process units with novel configurations where suitable standard library models might not exist
- including more detail than is contained in the standard library models
- taking advantage of existing investment in legacy models by moving them to a modern, maintainable platform
- creating your own corporate model libraries
- creating your own industry-specific flowsheeting simulator.
Note that many standard library models may be configured with user-supplied equations. For example, you can add your own rate equations to library kinetic reactor models.
A step-by-step approach to creating custom models
Step 1. Using the gPROMS language editor, create a first-principles mathematical model that embodies the physics, chemistry and chemicals engineering relationships governing the process and phenomena (for example, the reaction kinetics) that occur within it.
Step 2. Where necessary, fit any empirical constants within the first-principles model – for example, reaction kinetic parameters – to experimental data. This is done to ensure that the model reflects physically-observed reality and has a high degree of predictive accuracy.
Step 3. Test the model standalone to verify results and ensure that it works under all anticipated conditions.
Step 4. Optionally, provide various interface attributes (icon, port definition and placing, specification dialogues, results reports) and add the model to a custom library. This allows the model to be used in flowsheets by users across the organisation, like any other gPROMS Process model.
The gPROMS language
gPROMS models are created using a powerful fourth-generation language specifically designed for the process industries. Model creators need write only the physics and chemicals relationships and leave the mathematical solution to gPROMS.
This allows model developers to create models of the most complex processes and their operating procedures by writing equations almost as they appear on paper.
At solution time these equations are gathered and solved simultaneously with the equations from all the other units in the flowsheet.
The clear, concise language allows model developers to easily document and quality-assure their work, capturing the knowledge assets of the company for future use.
gPROMS language feature provides many powerful facilities that allow easy representation of virtually any process.
Steady-state and dynamic
gPROMS’s Integro-Partial Differential Algebraic Equation (IPDAE) formulation provides complete modelling power for steady-state or dynamic modelling – there is no distinction. Dynamic models can easily be solved for steady-state simply by setting the appropriate specifications – there is no need to iterate to a steady-state.
Distributed systems modelling
gPROMS provides easy handling of distributed equations, with any number of spatial dimensions (for example, axial or radial concentration distribution of concentration along a fixed bed reactor) and/or property (e.g. molecular weight, particle size) distributions.
Equations not expressions
gPROMS equations are true equations, not expressions that need to be evaluated in a particular order. The gPROMS solvers take care of the mathematical solution automatically.
Calls to external functions
The gPROMS Foreign Object Interface (FOI) allows easy calls to external calculations or software through a well-defined published interface. This makes it easy to incorporate legacy or physical properties calculations, or MS Excel® data for example.
Powerful discontinuity handling
Numerous mechanisms, including IF and CASE statements, are provided for handling process discontinuities in order to model conditional behaviour such as changes in number of fluid phases or controller states. Discontinuities are robustly and efficiently handled by gPROMS’s numerical solvers.
Hierarchical modelling structure
Flowsheets can contain flowsheets, which can contain flowsheets … and so on, ad infinitum. This provides complete flexibility of modelling, and makes models easy to maintain and re-use. gPROMS has comprehensive facilities for propagating parameter and other information correctly through the hierarchy.
Powerful array handling
The gPROMS language contains consistent and robust array handling up to a practically unlimited number of dimensions. The concept extends throughout the gPROMS language: it is possible – for example – to have an array of units or ports within a unit.
It is possible to have zero-length arrays (i.e. where the array index is set to 0) to allow models to be written in a completely general fashion. For example a liquid tank model can contain a reaction model where the number of reactions is simply set to zero at runtime if no reaction is taking place.
Enumerated domains: ordered sets
Text descriptors may be used as array indices in gPROMS, making it easy to, for example, write equations for specific components (e.g. ‘methane’). This makes models easy to understand, easy to maintain and smaller in size, thereby reducing solution times.
Complex operating procedures
A hierarchical task language means that it is easy to describe operating procedures, including start-up and shutdown and complex batch operating policy. Dynamic optimization can be applied to such procedures to determine optimal operation – for example, to minimise start-up time.
Powerful initialisation language
The gPROMS Model Initialisation Procedures (MIPs) make it possible for the modeller to formally specify how the model is initialised for various combinations of specifications, in order to ensure that models initialise rapidly and robustly in many different contexts.
Arbitrary stream types
It is easy to create your own stream types for unusual or complex processes – for example, where it is necessary to handle distributions of particle size or molecular weight. Streams are propagated through the flowsheet automatically according to the rules set within each model.
Models can call any licensed physical properties package, or (via the FOI) an in-house properties package. As properties calls are resolved at runtime, models can be written completely generically, without having to know which package the user will choose at solution time.
Auto-complete and syntax checking
gPROMS’s sophisticated object server understands what you are trying to do and can provide context-specific assistance – for example, prompt for variable names, unit names and keywords – to save time and eliminate errors.
Deploying models to other users
Having written the basic model, there are many facilities that make it easier for you to use in your own flowsheeting activities, or to provide as part of a corporate model library to other users in your organisation.
Icons and ports
You can provide icons in many different vector and bitmap formats, and specify port type and location for connection to other units in the flowsheet.
To simplify user input of specification data, gPROMS provides extensive capabilities for configuring multi-tabbed input dialogs.
It is possible to create custom reports for any model that include text, images, plots, tables and other result fields. These are displayed when you double-click on the unit in the results display.
You can provide comprehensive help text for models in HTML format.
Once you are satisfied that the model is suitable for distribution, you can optionally protect it (make the equations invisible to users for confidentiality reasons or to prevent unauthorised modification) and supply it in library form.
Making models compatible with the PSE gML and AMLs
As part of the gPROMS Process Custom Modelling option, PSE provides templates and guidance on creating models that are fully-compatible with the PSE gPROMS Model Libraries and Advanced Model Libraries.