source: branches/newlanguage/eml/heat_exchangers/heater.mso @ 157

Last change on this file since 157 was 139, checked in by gerson bicca, 16 years ago

updated models for the new language

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 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* Model of a Heater and Cooler
17*
18*       Streams:
19*               * Inlet(Ninlet) streams ....    at least one material stream
20*               * Outlet stream             ....        one material stream
21*
22*       Purpose:
23*               * Determines thermal and phase conditions of outlet stream
24*
25*----------------------------------------------------------------------
26* Author: Gerson Balbueno Bicca
27* $Id: heater.mso 139 2007-01-29 15:50:41Z bicca $
28*--------------------------------------------------------------------*#
29
30using "streams.mso";
31
32Model Heater_Cooler_Basic
33
34ATTRIBUTES
35        Pallete         = false;
36        Brief           = "Heater or Cooler Basic Equations";
37        Info            =
38        "write some information";
39       
40PARAMETERS
41        outer PP                as Plugin               (Brief="Physical Properties");
42        outer   NComp   as Integer              (Brief="Number of Components");
43        Ninlet                          as Integer              (Brief="Number of Inlet Streams",Lower=1);
44       
45VARIABLES
46        in  Inlet(Ninlet)       as stream                       (Brief="Inlet Streams");
47        out Outlet              as liquid_stream        (Brief="Outlet Stream");
48        Q                                       as power                        (Brief = "Heat Transfer");
49        Vfrac                                   as fraction                     (Brief = "Vapor fraction Outlet Stream");
50        Lfrac                                   as fraction                     (Brief = "Liquid fraction Outlet Stream");
51       
52EQUATIONS
53
54"Flow"
55        Outlet.F = sum(Inlet.F);       
56       
57for j in [1 : NComp]
58       
59"Composition"
60        Outlet.F*Outlet.z(j) = sum(Inlet.F*Inlet.z(j));
61       
62end
63
64"Vapor fraction Outlet Stream"
65        Vfrac = Outlet.v;
66
67"Liquid fraction Outlet Stream"
68        Lfrac = 1-Vfrac;
69       
70end
71
72Model Heater            as Heater_Cooler_Basic
73
74ATTRIBUTES
75        Pallete         = true;
76        Brief           = "Heater";
77        Info            =
78        "write some information";
79       
80EQUATIONS
81
82"Heat Duty"
83        Q = Outlet.F*Outlet.h-sum(Inlet.F*Inlet.h);
84       
85end
86
87Model Cooler            as Heater_Cooler_Basic
88       
89ATTRIBUTES
90        Pallete         = true;
91        Brief           = "Cooler";
92        Info            =
93        "write some information";
94       
95EQUATIONS
96
97"Heat Duty"
98        Q = sum(Inlet.F*Inlet.h)- Outlet.F*Outlet.h;
99       
100end
Note: See TracBrowser for help on using the repository browser.