source: trunk/eml/heat_exchangers/heater.mso @ 352

Last change on this file since 352 was 352, checked in by Argimiro Resende Secchi, 15 years ago

Adding more symbol for latex.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.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* Author: Gerson Balbueno Bicca
16* $Id: heater.mso 352 2007-08-30 05:39:11Z arge $
17*--------------------------------------------------------------------*#
18
19using "streams";
20
21Model heater_basic
22
23 ATTRIBUTES
24        Pallete         = false;
25        Brief   = "Basic model for Heater or Cooler";
26        Info            =
27        "Determines thermal and phase conditions of an outlet stream";
28
29 PARAMETERS
30        outer PP        as Plugin       (Brief="Physical Properties", Type="PP");
31        outer NComp     as Integer      (Brief="Number of Components");
32        Ninlet          as Integer      (Brief="Number of Inlet Streams");
33        Kvalues         as Switcher (Brief="Option for Display Phase Equilibrium K-values",Valid=["yes","no"], Default="yes");
34
35 VARIABLES
36        QDuty                   as power                        (Brief = "Actual Duty");
37        Vfrac                   as fraction             (Brief = "Vapor fraction Outlet Stream");
38        Lfrac                   as fraction             (Brief = "Liquid fraction Outlet Stream");
39        Kvalue(NComp)   as Real                         (Brief = "Phase Equilibrium K-values");
40in  Inlet(Ninlet )  as stream                   (Brief="Inlet Streams", PosX=0, PosY=0.4833, Symbol="_{in}");
41out Outlet              as streamPH                     (Brief="Outlet Stream", PosX=1, PosY=0.4782, Symbol="_{out}");
42       
43 EQUATIONS
44
45 "Flow"
46        Outlet.F = sum(Inlet.F);       
47
48 for j in [1 : NComp]
49       
50 "Composition"
51        Outlet.F*Outlet.z(j) = sum(Inlet.F*Inlet.z(j));
52       
53 end
54
55 "Vapor fraction Outlet Stream"
56        Vfrac = Outlet.v;
57
58 "Liquid fraction Outlet Stream"
59        Lfrac = 1-Vfrac;
60
61 "Heat Duty"
62        QDuty = Outlet.F*Outlet.h - sum(Inlet.F*Inlet.h);
63
64 switch Kvalues # Fix for better convergence !!!
65        case "yes":
66 "K-values Phase Equilibrium"
67        Kvalue*Outlet.x = Outlet.y;
68
69        case "no":
70 "K-values Phase Equilibrium"
71        Kvalue = 1;
72
73 end
74end
75
76
77Model heater as heater_basic
78
79 ATTRIBUTES
80        Pallete         = true;
81        Icon            = "icon/heater";       
82        Brief   = "Heater";
83        Info            =
84        "Determines thermal and phase conditions of an outlet stream";
85
86 VARIABLES
87in  InletQ              as energy_stream        (Brief ="Inlet Heat Stream", PosX=0.1662, PosY=1, Symbol="_{out}");
88
89 EQUATIONS
90 "Net Duty"
91        InletQ.Q = QDuty;
92end
93
94Model cooler as heater_basic
95
96 ATTRIBUTES
97        Pallete         = true;
98        Icon            = "icon/cooler";       
99        Brief   = "Cooler";
100        Info            =
101        "Determines thermal and phase conditions of an outlet stream";
102
103 VARIABLES
104in  InletQ              as energy_stream        (Brief ="Inlet Heat Stream", PosX=0.8245, PosY=1, Symbol="_{out}");
105
106 EQUATIONS
107 "Net Duty"
108        InletQ.Q = -QDuty;
109end
Note: See TracBrowser for help on using the repository browser.