source: branches/gui/sample/miscellaneous/tenprobs/prob06.mso @ 915

Last change on this file since 915 was 915, checked in by Rafael de Pelegrini Soares, 13 years ago

Updated prob6 from tenprobs

File size: 4.8 KB
Line 
1#*---------------------------------------------------------------------
2* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
3*
4* This LIBRARY is free software; you can distribute it and/or modify
5* it under the therms of the ALSOC FREE LICENSE as available at
6* http://www.enq.ufrgs.br/alsoc.
7*
8* EMSO Copyright (C) 2004 - 2007 ALSOC, original code
9* from http://www.rps.eng.br Copyright (C) 2002-2004.
10* All rights reserved.
11*
12* EMSO is distributed under the therms of the ALSOC LICENSE as
13* available at http://www.enq.ufrgs.br/alsoc.
14*
15*----------------------------------------------------------------------
16* 6. Heat exchange in a series of tanks
17*----------------------------------------------------------------------
18*
19*   Description:
20*      This problem is part of a collection of 10 representative
21*       problems in Chemical Engineering for solution by numerical methods
22*       developed for Cutlip (1998).
23*
24*   Subject:
25*       * Heat Transfer
26*
27*       Concepts utilized:
28*               Unsteady-state energy balances, dynamic response of well mixed
29*       heated tanks in series.
30*
31*       Numerical method:
32*               * Simultaneous first order ODEs
33*
34*   Reference:
35*               * CUTLIP et al. A collection of 10 numerical problems in
36*       chemical engineering solved by various mathematical software
37*       packages. Comp. Appl. in Eng. Education. v. 6, 169-180, 1998.
38*       * More informations and a detailed description of all problems
39*       is available online in http://www.polymath-software.com/ASEE
40*
41*----------------------------------------------------------------------
42* Author: Rodolfo Rodrigues
43* GIMSCOP/UFRGS - Group of Integration, Modeling, Simulation,
44*                                       Control, and Optimization of Processes
45* $Id$
46*--------------------------------------------------------------------*#
47using "types";
48
49
50
51#*---------------------------------------------------------------------
52*       Model of a stream
53*--------------------------------------------------------------------*#
54Model oil_stream
55        PARAMETERS
56        W               as flow_mass    (Brief="Mass flow rate", DisplayUnit='kg/min');
57        cp              as cp_mass              (Brief="Heat capacity of the oil", DisplayUnit='kJ/kg/K');
58       
59        VARIABLES
60        T               as temperature;
61        T_Cdeg  as Real(Brief = "Temperature in °C", Lower=-250, Upper=5000);
62       
63        SET
64        cp = 2*'kJ/kg/K';
65        W = 100*'kg/min';
66       
67        EQUATIONS
68        T_Cdeg = T/'K' - 273.15;
69end
70
71Model tank_source
72        ATTRIBUTES
73        Pallete = true;
74        Brief   = "Simple inlet stream";
75        Icon    = "icon/tank_source";
76       
77        VARIABLES
78out Outlet      as oil_stream   (Brief="Outlet stream", PosX=1, PosY=0.5);
79end
80
81Model tank_sink
82        ATTRIBUTES
83        Pallete = true;
84        Brief   = "Simple outlet stream";
85        Icon    = "icon/tank_sink";
86       
87        VARIABLES
88in      Inlet   as oil_stream   (Brief="Inlet stream", PosX=0, PosY=0.5);
89end
90
91
92Model heat_stream
93        VARIABLES
94        T               as temperature;
95        T_Cdeg  as Real(Brief = "Temperature in °C", Lower=-250, Upper=5000);
96       
97        EQUATIONS
98        T_Cdeg = T/'K' - 273.15;
99end
100
101Model steam
102        ATTRIBUTES
103        Pallete = true;
104        Brief   = "Simple inlet stream";
105        Icon    = "icon/tank_source";
106       
107        VARIABLES
108out Outlet      as heat_stream(Brief="Outlet stream", PosX=1, PosY=0.5);
109end
110
111
112#*---------------------------------------------------------------------
113*       Model of one tank
114*--------------------------------------------------------------------*#
115Model heated_tank
116        ATTRIBUTES
117        Pallete = true;
118        Brief   = "Simple model of a steady-state CSTR";
119        Icon    = "icon/heated_tank";
120       
121       
122        PARAMETERS
123        UA              as Real                 (Brief="Product of the heat transfer coefficient and the area", Unit='kJ/min/K');
124       
125       
126        VARIABLES
127in      Inlet   as oil_stream   (Brief="Inlet stream", PosX=0.51, PosY=0);
128out     Outlet  as oil_stream   (Brief="Outlet stream", PosX=1, PosY=0.975);
129in      InletQ  as heat_stream  (Brief="Rate of heat supply", PosX=0, PosY=0.715);
130       
131        M               as mass                 (Brief="Mass in tank");
132        Q               as heat_rate    (Brief="Rate of heat transferred", DisplayUnit='kJ/min');
133       
134       
135        SET
136        UA = 10*'kJ/min/K';
137       
138       
139        EQUATIONS
140        "Energy balance"
141        (M*Outlet.cp)*diff(Outlet.T) = Inlet.W*Inlet.cp*(Inlet.T - Outlet.T) + Q;
142       
143        "Rate of heat transferred"
144        Q = UA*(InletQ.T - Outlet.T);
145end
146
147
148
149#*---------------------------------------------------------------------
150*       Three tanks in series
151*--------------------------------------------------------------------*#
152FlowSheet series_of_tanks
153        VARIABLES
154        feed    as oil_stream;
155       
156       
157        DEVICES
158        steam1  as steam;
159        steam2  as steam;
160        steam3  as steam;
161       
162        tank1   as heated_tank;
163        tank2   as heated_tank;
164        tank3   as heated_tank;
165       
166       
167        CONNECTIONS
168        feed             to tank1.Inlet;
169        tank1.Outlet to tank2.Inlet;
170        tank2.Outlet to tank3.Inlet;
171       
172        steam1.Outlet to tank1.InletQ;
173        steam2.Outlet to tank2.InletQ;
174        steam3.Outlet to tank3.InletQ;
175       
176       
177        SPECIFY
178        feed.T = (20 + 273.15)*'K';
179       
180        steam1.Outlet.T_Cdeg = 250;
181        steam2.Outlet.T_Cdeg = 250;
182        steam3.Outlet.T_Cdeg = 250;
183       
184        tank1.M = 1000*'kg';
185        tank2.M = tank1.M;
186        tank3.M = tank2.M;
187       
188       
189        INITIAL
190        tank1.Outlet.T_Cdeg = 20;
191        tank2.Outlet.T_Cdeg = 20;
192        tank3.Outlet.T_Cdeg = 20;
193
194
195        OPTIONS
196#       Dynamic = false; # steady-state
197        TimeStart = 0;
198        TimeStep = 1;
199        TimeEnd = 90;
200        TimeUnit = 'min';
201end
Note: See TracBrowser for help on using the repository browser.