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

Last change on this file since 135 was 135, checked in by gerson bicca, 15 years ago

updated models and samples for the new language

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.5 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 135 2007-01-25 20:00:26Z bicca $
28*--------------------------------------------------------------------*#
29
30using "streams.mso";
31
32Model Heater_Cooler_Basic
33       
34#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
35#       Heater or Cooler Basic Equations
36#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#   
37PARAMETERS
38        outer PP                as Plugin               (Brief="Physical Properties");
39        outer   NComp   as Integer              (Brief="Number of Components");
40        Ninlet                          as Integer              (Brief="Number of Inlet Streams",Lower=1);
41       
42VARIABLES
43        in  Inlet(Ninlet)       as stream                       (Brief="Inlet Streams");
44        out Outlet              as liquid_stream        (Brief="Outlet Stream");
45        Q                                       as power                        (Brief = "Heat Transfer");
46        Vfrac                                   as fraction                     (Brief = "Vapor fraction Outlet Stream");
47        Lfrac                                   as fraction                     (Brief = "Liquid fraction Outlet Stream");
48       
49EQUATIONS
50
51"Flow"
52        Outlet.F = sum(Inlet.F);       
53       
54for j in [1 : NComp]
55       
56"Composition"
57        Outlet.F*Outlet.z(j) = sum(Inlet.F*Inlet.z(j));
58       
59end
60
61"Vapor fraction Outlet Stream"
62        Vfrac = Outlet.v;
63
64"Liquid fraction Outlet Stream"
65        Lfrac = 1-Vfrac;
66       
67end
68
69Model Heater            as Heater_Cooler_Basic
70#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
71#       Heater
72#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#   
73EQUATIONS
74
75"Heat Duty"
76        Q = Outlet.F*Outlet.h-sum(Inlet.F*Inlet.h);
77       
78end
79
80Model Cooler            as Heater_Cooler_Basic
81#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
82#       Cooler
83#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#   
84EQUATIONS
85
86"Heat Duty"
87        Q = sum(Inlet.F*Inlet.h)- Outlet.F*Outlet.h;
88       
89end
Note: See TracBrowser for help on using the repository browser.