Solver Methodology
Navigation: User Guide ➔ Solver ➔ Solver Methodology
Project, Model and Solver Settings | Simulation Modes and Solver Setup | Solver Methodology, Convergence and Tolerance | Solving Models | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Project Settings | Solver Settings | Plant Model | Constants | Simulation Modes | ProBal Setup | Dynamic Setup | Solver Status | Solver Methodology | Convergence Methods | Tolerance Testing | Evaluating Sub-Models | Flash Train | Mass & Energy Balance | Referenced Variables | Demand |
Introduction
This section describes the methodology used by the SysCAD software to produce a solution for a user defined process plant model (a project represented by any number of interconnected flowsheets with controllers).
Background
SysCAD is a process plant simulator that allows a user to build a mathematical model of a simple or complex process on a desktop computer. A process model in SysCAD is built using typical graphical techniques to construct a process flow diagram. Configuring the associated process unit models, connections and controls, results in an intelligent diagram for simulation purposes.
SysCAD can operate in either Steady State or Dynamic mode:
- ProBal, or steady state, is used to generate detailed mass and energy balances; and
- Dynamic mode is used for a number of applications, including detailed evaluation of plant behaviour; accelerated time production planning and surge & availability analysis.
Our open systems approach provides flexibility and integration to numerous industry packages.
Executive Sequence
SysCAD comprises a number of Modules (or Executable Objects) some of which are:
- The Solver – this is the SysCAD ‘engine’. It evaluates the process model, assigns units and links to networks as required and calculates the resultant flows and state changes;
- Graphics – this allows the user to see how the mathematical model is connected, navigate the model and the graphics views provide some user feedback with colours and other annotation.
- Trends – this allows the user to watch changes to variables as the solver evaluates the model. The trends may be shown as values only, or the user may choose to plot the variables as a function of iteration;
- Archive Reporter – the user may record values in either a database or a set of CSV files. The user may record any data available within the model. They may also set the recording rate – hourly, daily, weekly, etc., data to record - maximum, average, minimum, etc;
- Historian – this acts much like a plant historian. The user may choose which values to record in the historian;
- SysCAD Marshal – this uses the industry standard OPC protocol to connect SysCAD to external controllers, such as PLC systems, operator software, etc.
The use of modules allows SysCAD to take advantage of hardware capability, including multi-threading, by separating the user functionality of the software and the solver engine.
When running SysCAD the main execution loop will essentially repeatedly complete the following tasks:
- Reads data from the executable objects listed above. This process occurs by subscription, i.e. the executable object will only be used if required.
- Writes subscribed data to the objects that require it.
- Advances the solution by a single step using either the ProBal Solver or Dynamic Solver. The dynamic method is described in the next section.
- Takes decisions on whether to continue, stop or pause the simulation.
With each execution loop (step), each of the objects may update user displays or perform any other actions related to that object’s purpose. When starting the simulation there are some additional tasks relating to initialising the solution and error checking. At the conclusion of a SysCAD run, either when a project converges in the steady state, or at the end of a scenario in the dynamic mode, there will be some shutdown tasks.
Dynamic Solver Sequence
SysCAD has been designed for use as an interactive dynamic solver, to emulate the actions that occur on an actual process plant. The solver must respond to unpredictable events or changes, such as a user input while solving or an external controller (e.g. PLC) writing to SysCAD tags This allows the user to evaluate the plant response to different control strategies, varying external influences, or long term production figures.
The user may set the required time interval for each step in a dynamic solution. Larger step sizes, measured in minutes or hours, are usually associated with long term plant responses, while detailed control issues require small step sizes, or the order of seconds.
The Dynamic Solver performs the following actions during each iteration or step:
- Evaluate Control Actions- A control action is defined as a command that may change a setting or configuration value of a unit in the SysCAD model.
- Any writable tag in a unit may be changed via a control action, for example, a valve position or conveyor speed can be adjusted, or an extent of reaction can be adjusted.
- Control actions can be defined as either Internal or External. These are described below:
- Internal: These are actions initiated by a SysCAD unit, such as a General Controller, PID unit, Profiler, etc. They may also be imitated by the user making manual changes to the project.
- External: These are actions initiated by a command from an external application, such as SysCAD Marshal, to any writable tag.
- Evaluate Electrics- The current state of any electrical network is evaluated to determine which, if any, models have electric power supplied to them. This is performed to determine if any external IO has changed any electrical reticulation model’s state.
- Evaluate All Control Strategy- Described in point 12. The control stratergy is normally evaluated towoards the end of the sequence, but can be evaluated earlier (option retained for compatibility reasons).
- Integrate- Advance the models that have a state integral type solution, e.g. Tanks, Thickeners etc. (The integration step is described in detail in the next section).
- Evaluate All Discrete- Advance models that have a discrete solution, e.g. Conveyor Belts.
- Evaluate All Accumulation-Calculate all accumulators for this step.
- Evaluate All Audit- Evaluate the audit as required to cross-check that all models are operating correctly and that a Mass & Energy Balance is being maintained.
- Evaluate All Power Required- Given the current operating state of the model’s calculate the electric power drawn by those models requiring power to operate.
- Evaluate All Electrics- Given the power draw calculate the voltage & current through out the electric reticulation model.
- Evaluate All Check Data Ranges- Check that all operating cointions are within range. This especially applies to temperatures and pressures being with that data supplied in the species database.
- Evaluate All Statistics - All models with Statistical measurements are evaluated
- Evaluate All Control Strategy - All controllers are evaluated and their outputs readied for the next iteration. All Internal outputs are transferred directly on completion of the individual model evaluation.
- Steady State Test - Measure changes to selected states and flows to check for Steady State. If steady state has been achieved, according to the required test criteria, then set the Stop Flag to signal the executive to stop.
Integration Sequence
This involves one or more evaluations of the rates of change, or derivatives, on the states contained within the models. These are, primarily, the masses of individual species contained in a model with surge and the temperature and pressure of the mixture. The Integrator has a number of options regarding its basic operation:
- Fixed or Variable step size.
- 1st Order (Euler) or 2nd and 4th order Runge-Kutta Integration methods.
- Portions of the network can be solved using the ‘In-Line’ mode to reduce the stiffness of the problem.
A derivative calculation entails:
- Calculate the current pressures at all the endpoints of the piping network(s) given the current contents of tanks, pressures in feeders, etc.
- Evaluation of flows through the piping network given the current configuration of valves, pumps and any other model that may affect the network topology and specification, and the current content of the network (static head) etc.
- Given these flows and the resultant Order of Evaluation the actual composition of material flowing around the network is calculated. Models in ‘Direct’ mode are evaluated during this phase of calculation. Also, the State changes to the ‘In-Line’ models are evaluated during this phase of calculation.
- Given these flows the rates of change in all the ‘Buffered’ models are calculated for use by the integrators.