2. The present thesis was conducted under Polymer
Simulation LTD., a spin-off company of the Laboratory of
Polymer Reaction Engineering (LPRE) of Aristotle
University of Thessaloniki.
Development of process simulation software for the
polymer industry.
As part of the general efforts to redesign the existing
source code database.
4. CAD Polymerization Reactor Packages
LPRE software can be used for:
Computer Aided Design
Computer Aided Process Monitoring
Computer Aided Process Control and Optimization
Modeling abilities of the software tools:
Chemical Kinetics (Monte Carlo Simulations)
Polymerization Reactors
Other Unit Operations
5. CAD Polymerization Reactor Packages
The software can be used in a wide range of industrial applications:
Analysis of the effect of key process
variables on productivity and
product quality.
Examination of process alternatives
for economic optimization and to
improve quality.
Conducting of safety analysis for
reactor runaway conditions.
Training of operators to handle
process transitions and equipment
failure.
6. CAD Polymerization Reactor Packages
As the polymer industry becomes more global, manufacturers are
searching for more reliable software tools that will enable them to
achieve competitive advantage.
Better collaboration between software developers.
Development of web applications for online simulations.
Object-Oriented Design CAPE-OPEN Standards
Design of Software
Packages
7. Object Oriented Design
Object Oriented Design decomposes a complex system into simple
logical objects that are easier to understand, code, and maintain.
The major characteristic of Object Oriented Design is
encapsulation: Grouping variables and computational methods into
logical objects.
The logical objects are defined according to real world objects (e.g.
chemistry, materials, properties).
Simulation of
Polymerization Reactor
Chemical Kinetics
Diffusion Phenomena
Physical & Thermodynamic Properties
Fluid Flow
Energy Balances
Complex System Simpler Systems
8. Object Oriented Design
Example of multi-scale description of a polymerization reactor:
Kinetic Model
Single Particle Model
Population Balance Model
Macroscopic Multiphase Mixing Model
With Object Oriented Design the various phenomena occurring in
micro-, meso- and macro- scales are encapsulated into different
logical units which are connected through well defined interfaces.
9. Object Oriented Design
Chemistry Modeling Tool
Specification of kinetic
parameters or retrieval from a
database
Computation of kinetic rate
constants
Computation of reaction rates
(p, T)
Computation of heat of reaction
Equipment Models
Reactor
Heat Exchanger
Distillation Columns, etc.
A general Equipment Model
10. CAPE-OPEN Standards
The standards of CAPE-OPEN define rules and interfaces
that allow chemical process simulators to interoperate.
The standards are provided by the CAPE-OPEN Laboratories
Network (CO-LaN).
Open source codes implementing globally accepted
interfaces that are completely transparent allowing the user to
tailor the code to his needs.
Flow sheet
Equipment Models
(e.g.: Reactor,
Distillation, etc.)
11. CAPE-OPEN Standards
How does CAPE-OPEN works?
Equipment Model External Equipment Models
Internal Layer
(Fortran)
Wrapper
(C#)
A wrapper is an interface
that connects the internal
layer of an equipment model
(EM) with other EM’s.
Equipment
Model
1
Equipment
Model
2
W
r
a
p
p
e
r
12. Application in MMA Polymerization
Refactor a Fortran source code for the simulation of methyl
methacrylate (MMA) polymerization reactor in order to meet
CAPE-OPEN Standards.
Description of the chemical process:
Type of reactor: Batch stirred tank reactor
Polymerization technique: Suspension polymerization
Thermal decomposition of initiator
Type of control system: Cascade control system (temperature
control)
13. Application in MMA Polymerization
Stages of the diploma thesis:
Analyze the code into logical objects (classes).
Numerical solutions of the mathematical model using Runge-
Kutta 4th and multistep finite differences (Adams-Moulton).
Development of a wrapper in order to be able to connect to
external equipment models.
14. Application in MMA Polymerization
Equipment Model Algorithm Flowchart
The wrapper is used to pass input
data to the equipment model (EM).
Using the input data the EM calls the
numerical library in order to solve the
mathematical models.
Results are passed back to the
wrapper.
If the wrapper is connected with
another EM then the results will be
used as input data to that EM.
Main Program
User Input
Numerical
Method
Energy
Ballance
Mass Ballance
Polymer
Properties
Results
Reactans
Product
By-products
Wrapper
Reactor
External EM
Control
System
t = tinitial,...,tfinal
External
EM
15. Conclusions
Minimization of code redundancies. Large software
projects become smaller in size.
Better code maintenance (fixing bugs, extensions).
Pure object oriented codes are computationally
slower.
Integration with any software that is created using
the CAPE-OPEN Standards.
16. Suggestions
The CPU-intensive numerical computations must be
implemented using:
Highly tuned FORTRAN or C codes.
Parallelization techniques.
C++ with template metaprogramming.
However, the top level interfaces of the code can still be
constructed to provide the typical flexibility of Object
Oriented Design.
Benefits:
Optimal compromise between the flexibility of object oriented
paradigm and the speed of the procedural paradigm.