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

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

heater/Cooler icon changed

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 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.
[1]14*----------------------------------------------------------------------
15* Author: Gerson Balbueno Bicca
16* $Id: heater.mso 546 2008-06-27 17:34:14Z bicca $
17*--------------------------------------------------------------------*#
18
[325]19using "streams";
[1]20
[325]21Model heater_basic
[139]22
[325]23 ATTRIBUTES
24        Pallete         = false;
[358]25        Brief   = "Basic model for Heater or Cooler Operation";
[139]26        Info            =
[358]27"Determines thermal and phase conditions of an outlet stream.
28";
[316]29
[325]30 PARAMETERS
[546]31        outer PP                        as Plugin               (Brief="Physical Properties", Type="PP");
[325]32        outer NComp     as Integer      (Brief="Number of Components");
[546]33        Ninlet                          as Integer      (Brief="Number of Inlet Streams");
34        Kvalues                 as Switcher     (Brief="Option for Display Phase Equilibrium K-values",Valid=["yes","no"], Default="yes");
[325]35
36 VARIABLES
[546]37        QDuty                                   as power                                (Brief = "Actual Duty",Symbol="Q_{Duty}");
38        Vfrac                                   as fraction                     (Brief = "Vapor fraction Outlet Stream",Symbol="V_{frac}");
39        Lfrac                                           as fraction                     (Brief = "Liquid fraction Outlet Stream",Symbol="L_{frac}");
40        Kvalue(NComp)   as Real                                 (Brief = "Phase Equilibrium K-values",Symbol="K_{value}");
41        Pratio(Ninlet )                 as positive                     (Brief = "Pressure Ratio for each stream", Symbol ="P_{ratio}");       
42        Pdrop(Ninlet )          as press_delta          (Brief = "Pressure Drop for each stream", DisplayUnit = 'kPa', Symbol ="\Delta P");
43in  Inlet(Ninlet )              as stream                       (Brief = "Inlet Streams", PosX=0, PosY=0.4833, Symbol="^{in}");
44out Outlet                              as streamPH                     (Brief = "Outlet Stream", PosX=1, PosY=0.4782, Symbol="^{out}");
[1]45       
[325]46 EQUATIONS
[1]47
[325]48 "Flow"
[1]49        Outlet.F = sum(Inlet.F);       
[316]50
[325]51 for j in [1 : NComp]
[1]52       
[325]53 "Composition"
[1]54        Outlet.F*Outlet.z(j) = sum(Inlet.F*Inlet.z(j));
55       
[325]56 end
[1]57
[325]58 "Vapor fraction Outlet Stream"
[135]59        Vfrac = Outlet.v;
[26]60
[325]61 "Liquid fraction Outlet Stream"
[26]62        Lfrac = 1-Vfrac;
[1]63
[325]64 "Heat Duty"
[316]65        QDuty = Outlet.F*Outlet.h - sum(Inlet.F*Inlet.h);
[139]66
[372]67 "Pressure Drop"
68        Outlet.P = Inlet.P - Pdrop;
69
70 "Pressure Ratio"
71        Outlet.P = Inlet.P * Pratio;
72       
[325]73 switch Kvalues # Fix for better convergence !!!
[319]74        case "yes":
[325]75 "K-values Phase Equilibrium"
[326]76        Kvalue*Outlet.x = Outlet.y;
[316]77
[319]78        case "no":
[325]79 "K-values Phase Equilibrium"
[319]80        Kvalue = 1;
81
[325]82 end
[1]83end
[325]84
85Model heater as heater_basic
86
87 ATTRIBUTES
88        Pallete         = true;
89        Icon            = "icon/heater";       
90        Brief   = "Heater";
91        Info            =
[358]92"Determines thermal and phase conditions of an outlet stream.
[325]93
[358]94== Specify ==
95* The Inlet streams: Any Number
96* Specify:
97**The outlet temperature and the outlet pressure or
98** The outlet temperature and the inlet energy stream or
99** The outlet pressure and the inlet energy stream
100";
101
[325]102 VARIABLES
103
[546]104in  InletQ              as energy_stream        (Brief ="Inlet Heat Stream", PosX=0.5, PosY=1, Symbol="_{out}");
105
[325]106 EQUATIONS
107 "Net Duty"
[326]108        InletQ.Q = QDuty;
[546]109
[319]110end
[1]111
[325]112Model cooler as heater_basic
113
114 ATTRIBUTES
115        Pallete         = true;
116        Icon            = "icon/cooler";       
117        Brief   = "Cooler";
118        Info            =
[358]119"Determines thermal and phase conditions of an outlet stream.
[325]120
[358]121== Specify ==
122* The Inlet streams: Any Number
123* Specify:
124**The outlet temperature and the outlet pressure or
125** The outlet temperature and the inlet energy stream or
126** The outlet pressure and the inlet energy stream
127";
128
[325]129 VARIABLES
130
[546]131in  InletQ              as energy_stream        (Brief ="Inlet Heat Stream", PosX=0.5, PosY=1, Symbol="_{out}");
132
[325]133 EQUATIONS
134 "Net Duty"
[326]135        InletQ.Q = -QDuty;
[546]136
[325]137end
Note: See TracBrowser for help on using the repository browser.