 Timestamp:
 Sep 3, 2009, 3:36:47 PM (14 years ago)
 Location:
 branches/gui/tutorial
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

branches/gui/tutorial/ThreeTank1.mso
r765 r843 11 11 * Arquivo de exemplo do EMSO 12 12 * 13 * Sistema de uma série de tanques.14 *15 13 **# 16 14 17 15 Model tank_simplified 18 PARAMETERS19 k as Real (Brief="Valve Constant", Unit = 'm^2.5/h', Default=4);20 A as Real (Brief="Tank area", Default=2, Unit = 'm^2');21 16 22 VARIABLES 23 Level as Real(Brief="Tank level", Unit='m'); 24 in Fin as Real(Brief="Input flow", Unit='m^3/h'); 25 out Fout as Real(Brief="Output flow", Unit='m^3/h'); 17 PARAMETERS 18 pi as Real (Brief="pi number",Default=3.141592); 19 k as Real (Brief="Valve Constant", Unit = 'm^2.5/h', Default=4); 20 Dh as Real (Brief="Hydraulic diameter", Unit = 'm', Default=2); 21 A as Real (Brief="Tank area", Unit = 'm^2'); 26 22 27 EQUATIONS 28 "Mass balance"29 diff(A*Level) = Fin  Fout;23 SET 24 pi = 3.141592; 25 A = (pi*Dh^2)/4; 30 26 31 "Valve equation" 32 Fout = k*sqrt(Level); 27 VARIABLES 28 V as Real (Brief="Tank Volume", Lower = 0, Unit='m^3'); 29 Level as Real (Brief="Tank level", Lower = 0, Unit='m'); 30 in Fin as Real (Brief="Input flow", Lower = 0, Unit='m^3/h'); 31 out Fout as Real (Brief="Output flow",Lower = 0, Unit='m^3/h'); 32 33 EQUATIONS 34 35 "Mass balance" 36 diff(V) = Fin  Fout; 37 38 "Valve equation" 39 Fout = k*sqrt(Level); 40 41 "Tank volume" 42 V = A*Level; 43 33 44 end 34 45 46 FlowSheet ThreeTank 35 47 36 FlowSheet ThreeTank 37 VARIABLES 38 Feed as Real(Unit='m^3/h'); 48 DEVICES 49 Feed as Real (Brief="Feed Stream", Unit='m^3/h'); 39 50 40 DEVICES 41 Tank1 as tank_simplified; 42 Tank2 as tank_simplified; 43 Tank3 as tank_simplified; 51 Tank1 as tank_simplified (Brief="First Tank"); 52 Tank2 as tank_simplified (Brief="Second Tank"); 53 Tank3 as tank_simplified (Brief="Third Tank"); 44 54 45 55 CONNECTIONS 46 56 Feed to Tank1.Fin; 47 57 Tank1.Fout to Tank2.Fin; 48 58 Tank2.Fout to Tank3.Fin; 59 49 60 end 
branches/gui/tutorial/ThreeTank2.mso
r765 r843 10 10 * 11 11 * Arquivo de exemplo do EMSO 12 *13 * Sistema de uma série de tanques.14 *15 12 **# 16 13 17 14 Model tank_simplified 18 PARAMETERS19 k as Real (Brief="Valve Constant", Unit = 'm^2.5/h', Default=4);20 A as Real (Brief="Tank area", Default=2, Unit = 'm^2');21 15 22 VARIABLES 23 Level as Real(Brief="Tank level", Unit='m'); 24 in Fin as Real(Brief="Input flow", Unit='m^3/h'); 25 out Fout as Real(Brief="Output flow", Unit='m^3/h'); 16 PARAMETERS 17 pi as Real (Brief="pi number",Default=3.141592); 18 k as Real (Brief="Valve Constant", Unit = 'm^2.5/h', Default=4); 19 Dh as Real (Brief="Hydraulic diameter", Unit = 'm', Default=2); 20 A as Real (Brief="Tank area", Unit = 'm^2'); 26 21 27 EQUATIONS 28 "Mass balance"29 diff(A*Level) = Fin  Fout;22 SET 23 pi = 3.141592; 24 A = (pi*Dh^2)/4; 30 25 31 "Valve equation" 32 Fout = k*sqrt(Level); 26 VARIABLES 27 V as Real (Brief="Tank Volume", Lower = 0, Unit='m^3'); 28 Level as Real (Brief="Tank level", Lower = 0, Unit='m'); 29 in Fin as Real (Brief="Input flow", Lower = 0, Unit='m^3/h'); 30 out Fout as Real (Brief="Output flow",Lower = 0, Unit='m^3/h'); 31 32 EQUATIONS 33 34 "Mass balance" 35 diff(V) = Fin  Fout; 36 37 "Valve equation" 38 Fout = k*sqrt(Level); 39 40 "Tank volume" 41 V = A*Level; 42 33 43 end 34 44 35 45 36 46 FlowSheet ThreeTank 37 VARIABLES 38 Feed as Real(Unit='m^3/h'); 47 48 DEVICES 49 Feed as Real (Brief="Feed Stream", Unit='m^3/h'); 50 51 Tank1 as tank_simplified (Brief="First Tank"); 52 Tank2 as tank_simplified (Brief="Second Tank"); 53 Tank3 as tank_simplified (Brief="Third Tank"); 39 54 40 DEVICES 41 Tank1 as tank_simplified; 42 Tank2 as tank_simplified; 43 Tank3 as tank_simplified; 44 45 CONNECTIONS 55 CONNECTIONS 46 56 Feed to Tank1.Fin; 47 57 Tank1.Fout to Tank2.Fin; 48 58 Tank2.Fout to Tank3.Fin; 49 59 50 60 SPECIFY 51 61 Feed = 10 * 'm^3/h'; 52 62 53 63 INITIAL 54 64 Tank1.Level = 1 * 'm'; 55 65 Tank2.Level = 2 * 'm'; 56 66 Tank3.Level = 1 * 'm'; 67 57 68 end 
branches/gui/tutorial/ThreeTank3.mso
r765 r843 11 11 * Arquivo de exemplo do EMSO 12 12 * 13 * Sistema de uma série de tanques.14 *15 13 **# 16 14 17 15 Model tank_simplified 18 PARAMETERS19 k as Real (Brief="Valve Constant", Unit = 'm^2.5/h', Default=4);20 A as Real (Brief="Tank area", Default=2, Unit = 'm^2');21 16 22 VARIABLES 23 Level as Real(Brief="Tank level", Unit='m'); 24 in Fin as Real(Brief="Input flow", Unit='m^3/h'); 25 out Fout as Real(Brief="Output flow", Unit='m^3/h'); 17 PARAMETERS 18 pi as Real (Brief="pi number",Default=3.141592); 19 k as Real (Brief="Valve Constant", Unit = 'm^2.5/h', Default=4); 20 Dh as Real (Brief="Hydraulic diameter", Unit = 'm', Default=2); 21 A as Real (Brief="Tank area", Unit = 'm^2'); 26 22 27 EQUATIONS 28 "Mass balance"29 diff(A*Level) = Fin  Fout;23 SET 24 pi = 3.141592; 25 A = (pi*Dh^2)/4; 30 26 31 "Valve equation" 32 Fout = k*sqrt(Level); 27 VARIABLES 28 V as Real (Brief="Tank Volume", Lower = 0, Unit='m^3'); 29 Level as Real (Brief="Tank level", Lower = 0, Unit='m'); 30 in Fin as Real (Brief="Input flow", Lower = 0, Unit='m^3/h'); 31 out Fout as Real (Brief="Output flow",Lower = 0, Unit='m^3/h'); 32 33 EQUATIONS 34 35 "Mass balance" 36 diff(V) = Fin  Fout; 37 38 "Valve equation" 39 Fout = k*sqrt(Level); 40 41 "Tank volume" 42 V = A*Level; 33 43 end 34 44 35 45 36 46 FlowSheet ThreeTank 37 VARIABLES38 Feed as Real(Unit='m^3/h');39 47 40 DEVICES 41 Tank1 as tank_simplified; 42 Tank2 as tank_simplified; 43 Tank3 as tank_simplified; 48 DEVICES 49 Feed as Real (Brief="Feed Stream", Unit='m^3/h'); 50 51 Tank1 as tank_simplified (Brief="First Tank"); 52 Tank2 as tank_simplified (Brief="Second Tank"); 53 Tank3 as tank_simplified (Brief="Third Tank"); 44 54 45 55 CONNECTIONS 46 56 Feed to Tank1.Fin; 47 57 Tank1.Fout to Tank2.Fin; 48 58 Tank2.Fout to Tank3.Fin; 49 59 50 60 SPECIFY 51 61 Feed = 10 * 'm^3/h'; 52 62 53 63 INITIAL 54 64 Tank1.Level = 1 * 'm'; 55 65 Tank2.Level = 2 * 'm'; 56 66 Tank3.Level = 1 * 'm'; 57 67 58 68 SET 59 69 Tank2.k = 8 * 'm^2.5/h'; 60 Tank2. A = 4 * 'm^2';70 Tank2.Dh = 4 * 'm'; 61 71 62 72 OPTIONS 63 73 TimeStep = 0.1; 64 TimeEnd = 2;74 TimeEnd = 10; 65 75 TimeUnit = 'h'; 76 66 77 end
Note: See TracChangeset
for help on using the changeset viewer.