Apresenta - PowerPoint PPT Presentation

About This Presentation
Title:

Apresenta

Description:

... R. M. & Rousseau, R. W., – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 86
Provided by: petrobras
Category:

less

Transcript and Presenter's Notes

Title: Apresenta


1
EQE038 Simulação e Otimização de Processos
Químicos
Aula 2 Concepts of modeling and simulation.
Object-oriented modeling in EMSO.
Argimiro R. Secchi
EQ/UFRJ 30 de agosto de 2013
2
Applications of Process Modeling
applications
tools
3
Some questions that could be answered with these
applications
  • Market if the price of a product increases,
    what will be the reduction of demand and what
    should be the new scheduling of production?
  • Production planning having several sources of
    raw material and several manufacturing plants,
    how to distribute the raw material among these
    plants and what products each plant has to
    produce?
  • Synthesis what process should be used for
    manufacturing a given product?
  • Design what type and size of equipment are
    necessary to produce a given product?
  • Operation what operating condition will
    maximize the production of a product?
  • Control how a process input can be manipulated
    to keep a measured process output at its desired
    value?
  • Safety if an equipment failure occur, what will
    be the impact over the operators and other
    equipments?
  • Environment how long will take to biodegrade a
    contaminated soil by dangerous waste?

4
Difficulties in Dynamic Simulation
  • Reliable models
  • High-Index DAE systems
  • Large-Scale systems
  • Model consistency

- Degree of Freedom (DoF) - Dynamic Degree of
Freedom (DDoF) - Units of measurement -
Structural non-singularity - Consistent initial
condition
5
Concepts of Modeling and Simulation
Modeling in Latin modus a measure, a small
representation of a designed or existing object.
from dictionary a mathematical or physical
system, obeying certain specified conditions,
whose behavior is used for understanding a
physical, biological or social system, with
analogy in some aspects. Is only an approximate
representation of a real system.
Process model a set a equations and
specifications that allows to predict the
behavior of a process.
6
Model Building
  • A mathematical model has
  • A set of model parameters (reaction order, valve
    constant, etc.)
  • A set of variables (temperatures, pressures,
    flow rates, etc.)
  • A set of equations (algebraic and differential)
    relating the variables
  • Problems in model building
  • Number of equations and variables do not match
    (DoF ? 0)
  • Equations of the model are inconsistent (linear
    dependence, UOM, etc.)
  • The number of initial conditions and DDoF do not
    match

7
Modeling Tools
The available tools for process modeling may be
classified into
  • Block-Oriented
  • focus on the flowsheet topology using
    standardized unit models and streams to link
    these unit models
  • Equation-Oriented
  • rely purely on mathematical rather than
    phenomena-based descriptions, making difficult to
    customize and reuse existing models
  • Object-Oriented
  • Models are recursively decomposed into a
    hierarchy of sub-models and inheritance concepts
    are used to refine previously defined models into
    new models

(Bogusch and Marquardt, 1997)
8
Object-Oriented Modeling
A process flowsheet model can be hierarchically
decomposed
9
Object-Oriented Modeling
10
Object-Oriented Modeling
Model types
Abstract models are models that embody coherent
and cohesive, but incomplete concepts, and in
turn, make these characteristics available to
their specializations via inheritance. While we
would never create instances (devices) of
abstract models, we most certainly would make
their individual characteristics available to
more specialized models via inheritance. Concrete
models are complete models, usually derived
from abstract models, ready to be instantiated,
i.e., we can create devices (e.g., equipments) of
concrete models.
11
Object-Oriented Modeling
OOM main concepts
Inheritance is the process whereby one object
acquires (gets, receives) characteristics from
one or more other objects. Aggregation is the
process of creating a new object from two or more
other objects, or an object that is composed of
two or more other objects.
12
Object-Oriented Modeling
Examples of general-purpose object-oriented
modeling languages
  • ABACUSS II (Barton, 1999)
  • ASCEND (Piela, 1989)
  • Dymola (Elmqvist, 1978)
  • EcosimPro (EA Int. ESA, 1999)
  • EMSO (Soares and Secchi, 2003)
  • gPROMS/Speedup (Barton and Pantelides, 1994)
  • Modelica (Modelica Association, 1996)
  • ModKit (Bogusch et al., 2001)
  • MPROSIM (Rao et al., 2004)
  • Omola (Andersson, 1994)
  • ProMoT (Tränkle et al., 1997)

13
Object-Oriented Modeling
A simpler example
Streams Inlet Material stream feeding the
tank Outlet Material stream leaving the
tank Parameters k Valve constant D Hydraulic
diameter of the tank Variables A Tank cross
section area V Tank volume h Tank level Devices
source, tank, sink
Level Tank
Available model of the tank gtgtgt Model with
circular cross section gtgtgt Model with square
cross section
14
Object-Oriented Modeling
Inheritance
Model equations
mass balance
valve equation
liquid volume
15
Object-Oriented Modeling
EMSO
Abstract model
using "types" Model Tank_Basic PARAMETERS k
as Real (BriefValve constant", Unitm2.5/h,
Default 12) D as length (BriefTank
hydraulic diameter", Default 4) VARIABLES in
Fin as flow_vol (BriefFeed flow rate") out
Fout as flow_vol (Brief Output flow rate")
A as area (BriefCross section area") V
as volume (BriefLiquid volume") h as
length (BriefTank level") EQUATIONS Mass
balance Fin - Fout diff(V) Valve
equation Fout k sqrt(h) Liquid
volume V A h end
mass balance
valve equation
liquid volume
16
Object-Oriented Modeling
Concrete models
Model Tank_Circular as Tank_Basic PARAMETERS
Pi as Real (Default 3.1416) EQUATIONS
Cross section area" A (Pi D2) / 4 end
Model Tank_Square as Tank_Basic EQUATIONS
Cross section area A D2 end
EMSO
17
Object-Oriented Modeling
EMSO
Flowsheet
using "tank_oom" FlowSheet Tanks DEVICES
source as Feed T_c as Tank_Circular
T_sq as Tank_Square sink as
Sink CONNECTIONS source.F to T_c.Fin
T_c.Fout to T_sq.Fin T_sq.Fout to
sink.F SET T_c.D 3 m T_sq.D 3
m SPECIFY source.F 20
m3/h INITIAL T_c.h 1 m
T_sq.h 2 m OPTIONS TimeStart 0
TimeEnd 20 TimeStep 0.5 TimeUnit
h end
18
Object-Oriented Modeling
using "tank_oom" FlowSheet Tanks2 DEVICES
source as Feed T_c as Tank_Section T_sq
as Tank_Section sink as Sink CONNECTIONS
source.F to T_c.Fin T_c.Fout to
T_sq.Fin T_sq.Fout to sink.F SET
T_c.D 3 m T_sq.D 3 m
T_c.Section Circular T_sq.Section
Square SPECIFY source.F 20
m3/h INITIAL T_c.h 1 m
T_sq.h 2 m OPTIONS TimeStart 0
TimeEnd 20 TimeStep 0.5 TimeUnit
h end
Model switching
Model Tank_Section as Tank_Basic PARAMETERS
Pi as Real (Default 3.1416) Section as
Switcher (Valid "Circular", "Square",
Default
"Circular") EQUATIONS switch Section
case "Circular" Cross section area"
A (Pi D2)/4 case "Square"
Cross section area" A D2 end end
19
Object-Oriented Modeling
Aggregation
P0
P0
P
Level Tank
20
Object-Oriented Modeling
Tank model with valve
using "types" Model Tank_Basic PARAMETERS D
as length (BriefTank hydraulic diameter",
Default 4) rg as Real (Briefrho g",
Unit kg/(ms)2, Default 1e4) VARIABLES in
Sin as stream (BriefInlet stream") out Sout
as stream (Brief Outlet stream") A as
area (BriefCross section area") V as
volume (BriefLiquid volume") h as length
(BriefTank level") valve as Valve
(BriefValve model") CONNECTIONS Sout to
valve.Sin EQUATIONS Mass balance Sin.F
Sout.F diff(V) Liquid volume V A
h Outlet pressure Sout.P Sin.P rg
h end
21
Object-Oriented Modeling
Flowsheet
using "tank_valve_oom" FlowSheet Tanks DEVICES
source as Feed T_c as Tank_Circular
T_sq as Tank_Square sink as
Sink CONNECTIONS source.Sout to T_c.Sin
T_c.valve.Sout to T_sq.Sin
T_sq.valve.Sout to sink.Sin SET T_c.D 3
m T_sq.D 3 m SPECIFY
source.Sout.F 20 m3/h source.Sout.P
1 atm T_c.valve.Sout.P 1 atm
sink.Sin.P 1 atm INITIAL T_c.h 1
m T_sq.h 2 m OPTIONS
TimeStart 0 TimeEnd 20 TimeStep
0.5 TimeUnit h end
22
Modeling workshop
Model equations
mass balance
valve equation
liquid volume
23
Modeling workshop
Flowsheet
20 m3/h
D 3 m h(0) 1 m
D 3 m h(0) 2 m
D 3 m h(0) 2.5 m
24
Elementos Básicos na Modelagem
  • Descrição do processo e definição do problema
  • Teoria e aplicação das leis fundamentais
  • Hipóteses e considerações simplificadoras
  • Equacionamento
  • Análise de Consistência
  • Solução desejada
  • Matemática e computação
  • Solução e validação

Definir o Modelo
Construir o Modelo
Validar o Modelo
25
Modeling
1. Process Description and Problem Definition
Process Description Process objectives
Process flowsheet Process operation unit
operations and control Problem Definition
Simulation objectives Simulation applications
26
Modeling
Process Description
Example level tank
A liquid flows in and out of a tank due to
gravitational forces. We wish to analyze the
volume, height and flowrate variations in the
tank (system response) as function of feed
disturbances.
27
Modeling
2. Fundamental Laws Theory and Applications
Bases to be used in the modeling
- mass conservation
- momentum conservation
- energy conservation
28
Modeling Levels
29
Modeling Levels
Modelo Microscópico
Modelo de Gradientes Múltiplos
Modelo de Máximo Gradiente
Modelo de Macroscópico
30
Modeling
3. Simplifying Assumptions
Establish the assumptions and
simplifications Define the model limitations
- constant specific mass - isothermal -
perfect mixture -
31
Modeling
4. Mathematical Model
Data mining for simulation Collect data and
information of the studied system Identify the
engineering unit of measurements Specify
operating procedures Specify the operating
regions of the variables Memory of
Calculation Mathematical model Define unit
of measurements of variables and parameters
Define and specify free variables Define and
determine values of parameters Define and
establish initial conditions
32
Mathematical Model
33
Modeling
Mathematical Model
In the simulator
Build process equipment models Identify and
create abstract and concrete models Declare
variables and parameters Write model
equations Compose the equipment model via
inheritance and aggregation Build process
flowsheet Declare flowsheet devices Define
process connections Set process parameters
values Specify process free variables
Establish initial conditions Establish
simulation options
34
Mathematical Model
mass balance
(1)
(2)
valve equation
liquid volume
(3)
(4)
35
Modeling
5. Consistency Analysis
Model consistency analysis for unit of
measurements (UOM) Degree of freedom analysis
Dynamic degree of freedom analysis
variable UOM Fin, Fout m3 h-1 V m3 A m2
h, D m k m2.5 h-1 t h
equations (1) m3 h-1 m3 h-1 m3 /
h (2) m3 h-1 m2.5 h-1 (h)0.5 (3) m3
m2 m (4) m2 (m)2
36
Modeling
Consistency Analysis
variables Fin, Fout, V, A, h, D, k, t ?
8 constants k, D ? 2 specifications t ?
1 driving forces Fin ? 1 unknown variables
V, h, A, Fout ? 4 equations 4 Degree of
Freedom variables constants specification
driving forces equations unknown variables
equations 8 2 1 1 4 0 Dynamic Degree
of freedom (index lt 2) differential equations
1 Needs 1 initial condition h(0) ? 1
37
Modeling
6. Desired Solution
Plan case studies Define Objectives of
the study Problems to be solved Evaluation
criteria
For the given example and initial condition (h0
or V0), we wish to analyze h(Fin), V(Fin) and
Fout(Fin).
38
Modeling
7. Computation
Define the desired accuracy Specify the
simulation time and reporting interval Verify
the necessity of specialized solvers (high-index
problems)
39
Modeling
8. Solution and Validation
Analyze simulation results Analyze state
variables dynamics Test model fitting with
plant data Compare simulation x plant
40
Modeling
Solution and Validation
Check output sensitivity to input
disturbances Carry out parametric sensitivity
analysis Analyze output data with statistical
techniques Verify results coherence
Document obtained results
41
Modeling
Remarks
Start with a simple model and gradually
increase complexity when necessary The model
should have sufficient details to capture the
essence of the studied system It is not
necessary to reproduce each element of the
system Models with excessive details are
expensive, difficult to implement and to
solve Interact with people that operate the
equipment Deeply understand the process
behavior.
42
A simple in EMSO
  • Starting EMSO

43
(No Transcript)
44
Model
45
Model Language Equation-based system
Equations The order the equations appear in the
model do not matter
Equivalent Equations Can be written in any user
desired form
46
Model Language Object-Oriented Modeling
The modeling and simulation of complex systems is
facilitated by the use of the Object-Oriented
concept
Equipment
Component
System
The system can be decomposed in several
components, each one described separately using
its constitutive equations
The components of the system exchange information
through the connecting ports
47
Model Components
Including sub- models and types
Automatic model documentation
Symbol of variable in LaTeX command for
documentation
Basic sections to create a math. model
Port location to draw a flowsheet connection
Input and output connections
48
Basic Variable Types in a Model
Parameters and variables are declared within
their valid domains and units using types created
based on the built-in types Real, Integer,
Switcher, Plugin
49
Building a Model A simple example level tank
Streams Inlet Material stream feeding the
tank Outlet Material stream leaving the
tank Parameters k Valve constant D Hydraulic
diameter of the tank Variables A Tank cross
section area V Tank volume h Tank level Devices
source, tank, sink
Available model of the tank gtgtgt Model with
circular cross section gtgtgt Model with square
cross section
50
Material Stream Modeling
The material stream carries the information
entering and leaving the equipment
VARIABLES F volumetric flowrate T temperature P p
ressure
Source - component that has a feed material
stream. It has an output connection
Source
Sink - component that receives an output material
stream. It has an input connection
Sink
51
Level Tank Modeling
Inlet Feed material stream to the tank Fin
inlet volumetric flowrate Tin inlet
temperature Pin inlet pressure Outlet Output
material stream from the tank Fout outlet
volumetric flowrate Tout outlet temperature Pout
outlet pressure
52
Level Tank Inheritance
Basic tank
Circular tank
Square tank
53
Creating a MSO file for Model
New Model
Menu
File Name
Destination
54
Creating a Model using the template
using including references to other
files. Model a new model is declared with the
keyword Model and its name. a model contains a
few basic sections PARAMETERS section which
defines the parameters of the model. VARIABLES se
ction which defines the variables of the
model. EQUATIONS section which describes the
model equations.
55
Creating a Material Stream Model
Including pre-defined types of EMSO
Symbol of variable are LaTeX commands
Model Documentation
selecting the desired unit of measure
Using the types defined in the file types.mso
56
Creating a Source Stream Model
Using the same file
Model Documentation
Output Connection
57
Creating a Sink Stream Model
Using the same file
Model Documentation
Input Connection
58
Creating a Basic Tank Model
Creating new UOM
Reference
Model Ports
59
Creating the Circular Tank Model
Using the same file
Inheritance Model inherits all the attributes of
the class from which it derives
Equation Writing the particular equations model
SET Defining values ??for parameters
60
Creating the Square Tank Model
Inheritance Model inherits all the attributes of
the class from which it derives
Using the same file
Equation Writing the particular equations model
61
FlowSheet
62
Process Diagram FlowSheet
The equipment are called DEVICES
In EMSO the user can manipulate various
FlowSheets at same time
A FlowSheet consists of a series of unit
operations or equipment connected to each other
63
FlowSheet Language Component-based system
The system modeling is made by the use,
configuration and connection of pre-existing
components
64
FlowSheet Components
Parameters of DEVICES
Degree of Freedom
Simulation options
Dynamic Degree of Freedom
65
Creating a MSO file for FlowSheet
New FlowSheet
Menu
File Name
Destination
66
Creating a FlowSheet using the template
using including references to other
files. FlowSheet A process diagram is declared
with the keyword FlowSheet and its name. A
FlowSheet contains some basic sections PARAMETER
S DEVICES CONNECTIONS SET SPECIFY INITIAL OPTIONS
. . .
67
FlowSheet for the Level Tank
Parameters of DEVICES
Degree of Freedom
Simulation options
Dynamic Degree of Freedom
68
Consistency Analysis of the Process
EMSO analyzes the consistency of the system
created in the FlowSheet
69
Simulation of the Level Tank Process
Simulation details
70
Level Tank Results
double-click
Horizontal axis is always the independent
variable (usually time)
71
Series of Level Tanks
Building a system consisting of three tanks
connected in series
72
Series of Level Tanks - FlowSheet
Degrees of freedom increases
73
Series of Level Tanks - Results
74
Building a more interesting Model CSTR with Van
der Vusse reaction
Streams Inlet Feed material stream with molar
concentration Outlet Output material stream with
molar concentration Parameters Cv Valve
constant k1 Constant of reaction rate 1 k2
Constant of reaction rate 2 k3 Constant of
reaction rate 3 A Cross-section area
Variables V Reactor volume r1, r2, r3
Reaction rates Ca, Cb, Cc, Cd Molar
concentrations h Reactor level tau
Residence time
75
Van der Vusse Reactor Modeling
Component mass balances
Reaction rates
Perfect mixing
Residence time
76
Van der Vusse Reactor Stream Model
Adding molar concentration in the material stream
77
Van der Vusse Reactor Attributes
78
Van der Vusse Reactor Model
79
Van der Vusse Reactor Model Equations
80
Van der Vusse Reactor FlowSheet
81
Van der Vusse Reactor Results
82
Exercises
1) Simulate the CSTR example for different values
of the valve constant ?to find the one that
maximizes the concentration of component B at the
outlet of the reactor at steady state. Comment
the results 2) Modify the reactor model by
adding an opening fraction on the outlet valve
and make this fraction vary
sinusoidally x (1 sin (t)) / 2, where t is
given in hours. Use a Cv value of 20 m2,5/h.
Comment the results for a 20 h simulation 3)
Build a block diagram to simulate the CSTR
process.
83
References
  • Himmelblau, D. M. Bischoff, K. B., "Process
    Analysis and Simulation - Deterministic Systems",
    John Wiley Sons, 1968.
  • Felder, R. M. Rousseau, R. W., "Elementary
    Principles of Chemical Processes", John Wiley
    Sons, 1978.
  • Denn, M., "Process Modeling", Longman, New York,
    1986.
  • Luyben, W. L., "Process Modeling, Simulation,
    and Control for Chemical Engineers", McGraw-Hill,
    1990.
  • Silebi, C.A. Schiesser, W.E., Dynamic
    Modeling of Transport Process Systems, Academic
    Press, Inc., 1992.
  • Ogunnaike, B.A. Ray, W.H., Process Dynamics,
    Modeling, and Control, Oxford Univ. Press, New
    York, 1994.
  • Rice, R.G. Do, D.D., Applied Mathematics and
    Modeling for Chemical Engineers, John Wiley
    Sons, 1995.
  • Bequette, B.W., Process Dynamics Modeling,
    Analysis, and Simulation, Prentice Hall, 1998.
  • Engell, S. E Klatt, K.-U. Nonlinear Control of a
    Non-Minimum-Phase CSTR, Proc. of American Control
    Conference, Los Angeles, 2041 2045 (1993).
  • Rodrigues, R., R.P. Soares and A.R Secchi.
    Teaching Chemical Reaction Engineering Using EMSO
    Simulator. Computer Applications in Engineering
    Education, Wiley (2008).
  • Soares, R.P. and A.R. Secchi. EMSO A New
    Environment for Modeling, Simulation and
    Optimization. ESCAPE 13, Lappeenranta, Finlândia,
    947 952 (2003).

84
Special thanks to
Prof. Rafael de Pelegrini Soares, D.Sc. Eng.
Gerson Balbueno Bicca, M.Sc. Eng. Euclides
Almeida Neto, D.Sc. Eng. Eduardo Moreira de
Lemos, D.Sc. Eng. Marco Antônio Müller
For helping in the preparation of this material
For supporting the ALSOC Project.
85
EP 2013
... thank you for your attention!
http//www.enq.ufrgs.br/alsoc
  • Process Modeling, Simulation and Control Lab
  • Prof. Argimiro Resende Secchi, D.Sc.
  • Phone 55-21-2562-8307
  • E-mail arge_at_peq.coppe.ufrj.br
  • http//www.peq.coppe.ufrj.br/Areas/Modelagem_e_sim
    ulacao.html
Write a Comment
User Comments (0)
About PowerShow.com