source: mso/eml/heat_exchangers/Mheatex.mso @ 78

Last change on this file since 78 was 78, checked in by Paula Bettio Staudt, 16 years ago

Updated heat_exchangers files header

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.8 KB
RevLine 
[78]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*---------------------------------------------------------------------
[26]17* Model of a Multistream Heat Exchanger
[1]18*
[26]19*       Streams:
20*               * Inlet(Ninlet) streams ....    at least one material stream
21*               * Outlet stream             ....        one material stream
[1]22*
[26]23*       Purpose:
24*               * Determines thermal and phase conditions of outlet stream
[1]25*
26*----------------------------------------------------------------------
27* Author: Gerson Balbueno Bicca
28* $Id: Mheatex.mso 78 2006-12-08 19:29:10Z paula $
29*--------------------------------------------------------------------*#
[45]30
[1]31using "streams.mso";
32
[45]33Model Inlet_Main_Stream         
[26]34#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
[45]35#       Inlet Streams
[26]36#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
[1]37PARAMETERS
[45]38
39        Ncold   as Integer      (Brief="Number of Inlet Cold Streams",Lower=1);
40        Nhot    as Integer      (Brief="Number of Inlet Hot Streams",Lower=1);
[1]41       
42VARIABLES
43
[45]44        Hot  (Nhot)     as stream;# Inlet Hot Streams
45        Cold (Ncold)    as stream;# Inlet Cold Streams
[1]46       
47end
48
[45]49Model Outlet_Main_Stream       
[26]50#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
[1]51#       Outlet Streams
[26]52#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
[45]53PARAMETERS
54
55        Ncold   as Integer      (Brief="Number of Inlet Cold Streams",Lower=1);
56        Nhot    as Integer      (Brief="Number of Inlet Hot Streams",Lower=1);
57       
[1]58VARIABLES
59
[45]60        Hot  (Nhot)     as stream_therm;# Outlet Hot Streams
61        Cold (Ncold)    as stream_therm;# Outlet Cold Streams
[1]62       
63end
64
65Model Mheatex
[26]66#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
[1]67#       Multistream Heat Exchanger Basic Calculation
[26]68#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
[1]69PARAMETERS
70
[45]71ext PP          as CalcObject   (Brief="Physical Properties");
72ext     NComp   as Integer              (Brief="Number of Components");
73        HE              as CalcObject   (Brief="Cold Box Calculations",File="heatex");
[1]74        Side    as Integer              (Brief="Flow Direction",Lower=0,Upper=1);
[45]75        Ncold   as Integer              (Brief="Number of Inlet Cold Streams",Lower=1);
76        Nhot    as Integer              (Brief="Number of Inlet Hot Streams",Lower=1);
77       
[1]78VARIABLES
79
80in  Inlet       as Inlet_Main_Stream;           # Inlet Hot Streams
81out Outlet      as Outlet_Main_Stream;          # Outlet Hot Streams
82
83        Q       as power                (Brief="Heat Transfer");
84        LMTD    as temp_delta   (Brief="Logarithmic Mean Temperature Difference");
85        UA      as positive     (Unit="W/K");
[45]86
87SET
88
89Side = HE.FlowDir();
90
91Inlet.Ncold  = Ncold;
92Outlet.Ncold = Ncold;
93
94Inlet.Nhot  = Nhot ;
95Outlet.Nhot = Nhot ;
96
97
[1]98EQUATIONS
99
100"Hot Flow"
101        Outlet.Hot.F = Inlet.Hot.F;     
102
103"Cold Flow"
104        Outlet.Cold.F = Inlet.Cold.F;
105       
106"Hot Composition"
107        Outlet.Hot.z = Inlet.Hot.z;
108       
109"Cold Composition"
110        Outlet.Cold.z = Inlet.Cold.z;
111       
112"Vapourisation Fraction Hot Stream"
113        Outlet.Hot.v = Inlet.Hot.v;             
114       
115"Vapourisation Fraction Cold Stream"
116        Outlet.Cold.v = Inlet.Cold.v;   
117       
118"Heat Duty Hot Stream"
119        Q =  sum(Inlet.Hot.F*(Inlet.Hot.h- Outlet.Hot.h));
120       
121"Heat Duty Cold Stream"
122        Q = -sum(Inlet.Cold.F*(Inlet.Cold.h- Outlet.Cold.h));
123       
124"Heat Duty"
125        Q=UA*LMTD;
126
[26]127#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
[1]128#       Flow Direction
[26]129#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
130
[1]131if Side equal 0
132       
133        then
134"Cocurrent Flow LMTD"
135        LMTD = HE.CocurrentLMTD(max(Inlet.Hot.T),min(Outlet.Hot.T),min(Inlet.Cold.T),max(Outlet.Cold.T));
136       
137        else
138"Counter Flow LMTD"
139        LMTD = HE.CounterLMTD(max(Inlet.Hot.T),min(Outlet.Hot.T),max(Inlet.Cold.T),min(Outlet.Cold.T));
140       
141end
142
143end
Note: See TracBrowser for help on using the repository browser.