source: trunk/eml/heat_exchangers/DoublePipeIncr.mso @ 962

Last change on this file since 962 was 574, checked in by Rafael de Pelegrini Soares, 14 years ago

Updated the models to work with some language constraints

  • Property svn:executable set to *
File size: 34.1 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: DoublePipeIncr.mso                                                               $
17*------------------------------------------------------------------*#
18
19using "streams";
20
21Model Properties_Average
22       
23ATTRIBUTES
24        Pallete = false;
25        Brief = "Average incremental physical properties of the streams.";
26        Info =
27        "to be documented.";
28
29PARAMETERS
30
31outer N                         as Integer      (Brief="Number of zones", Default = 2);
32
33VARIABLES
34        Mw                              as molweight                    (Brief="Average Mol Weight",Default=75, Lower=1, Upper=1e8);
35        T(N)                            as temperature          (Brief="Average  Incremental Temperature",Lower=50);
36        P(N)                            as pressure                     (Brief="Average  Incremental Pressure",Default=1, Lower=1e-10, Upper=2e4, DisplayUnit='kPa');
37        rho(N)                  as dens_mass                    (Brief="Stream Incremental Density" ,Default=1000, Lower=1e-3, Upper=5e5, Symbol = "\rho");
38        Mu(N)                   as viscosity                            (Brief="Stream Incremental Viscosity",Lower=0.0001, Symbol = "\mu");
39        Cp(N)                   as cp_mol                               (Brief="Stream Incremental Molar Heat Capacity", Upper=1e10);
40        K(N)                            as conductivity                 (Brief="Stream Incremental Thermal Conductivity", Default=1.0, Lower=1e-5, Upper=500);
41
42end
43
44Model Properties_In_Out
45       
46ATTRIBUTES
47        Pallete = false;
48        Brief = "Inlet and outlet physical properties of the streams.";
49        Info =
50        "to be documented.";
51       
52VARIABLES
53Fw              as flow_mass            (Brief="Stream Mass Flow");
54rho             as dens_mass            (Brief="Stream Density" ,Default=1000, Lower=1e-3, Upper=5e5, Symbol = "\rho");
55end
56
57Model Properties_Wall
58       
59ATTRIBUTES
60        Pallete = false;
61        Brief = "Incremental Physical properties of the streams at wall temperature.";
62        Info =
63        "to be documented.";
64
65PARAMETERS
66
67outer N                         as Integer      (Brief="Number of zones", Default = 2);
68
69VARIABLES
70        Mu(N)                   as viscosity                    (Brief="Stream Incremental Viscosity",Default=1, Lower=1e-5, Upper=1e5, Symbol = "\mu");
71        Twall(N)        as temperature  (Brief="Incremental Wall Temperature",Lower=50);
72
73end
74
75Model Physical_Properties
76       
77ATTRIBUTES
78        Pallete = false;
79        Brief = "to be documented";
80        Info =
81        "to be documented";
82       
83VARIABLES
84        Inlet                   as Properties_In_Out    (Brief="Properties at Inlet Stream", Symbol = "^{in}");
85        Average                 as Properties_Average   (Brief="Properties at Average Temperature", Symbol = "^{avg}");
86        Outlet          as Properties_In_Out            (Brief="Properties at Outlet Stream", Symbol = "^{out}");
87        Wall                            as Properties_Wall                      (Brief="Properties at Wall Temperature", Symbol = "^{wall}");
88
89end
90
91Model Details_Main
92       
93ATTRIBUTES
94        Pallete = false;
95        Brief = "to be documented";
96        Info =
97        "to be documented";
98
99PARAMETERS
100
101outer N                         as Integer      (Brief="Number of zones", Default = 2);
102
103VARIABLES
104        A                               as area                                                 (Brief="Total Exchange Surface Area");
105        Q(N)            as power                                                        (Brief="Incremental Duty", Default=7000, Lower=1e-6, Upper=1e10);
106        Qtotal          as power                                                        (Brief="Total Duty", Default=7000, Lower=1e-6, Upper=1e10);
107        Uc(N)           as heat_trans_coeff             (Brief="Incremental Overall Heat Transfer Coefficient Clean",Default=1,Lower=1e-6,Upper=1e10);
108        Ud(N)           as heat_trans_coeff             (Brief="Incremental Overall Heat Transfer Coefficient Dirty",Default=1,Lower=1e-6,Upper=1e10);
109
110end
111
112Model DoublePipe_HeatTransfer
113       
114ATTRIBUTES
115        Pallete = false;
116        Brief = "to be documented";
117        Info =
118        "to be documented";
119
120PARAMETERS
121
122As                      as area                 (Brief="Cross Sectional Area for Flow",Default=0.05,Lower=1e-8);
123Dh                      as length               (Brief="Hydraulic Diameter of Pipe for Heat Transfer",Lower=1e-8);
124outer N                         as Integer      (Brief="Number of zones", Default = 2);
125outer Npoints           as Integer      (Brief="Number of incremental points", Default = 3);
126
127VARIABLES
128
129Tlocal(Npoints)         as temperature                          (Brief="Incremental Local  Temperature",Lower=50);
130Re(N)                           as positive                                     (Brief="Incremental Reynolds Number",Default=100,Lower=1);
131hcoeff(N)                       as heat_trans_coeff             (Brief="Incremental Film Coefficient",Default=1,Lower=1e-12, Upper=1e6, DisplayUnit = 'W/m^2/K');
132fi(N)                           as fricfactor                                   (Brief="Incremental Friction Factor", Default=0.05, Lower=1e-10, Upper=2000);
133Nu(N)                           as positive                                     (Brief="Incremental Nusselt Number",Default=0.5,Lower=1e-8);
134PR(N)                           as positive                                     (Brief="Incremental Prandtl Number",Default=0.5,Lower=1e-8);
135Phi(N)                          as positive                                     (Brief="Incremental Phi Correction",Default=1,Lower=1e-3);
136Vmean(N)                as velocity                                     (Brief="Incremental Tube Velocity",Lower=1e-8);
137Enth(Npoints)           as enth_mol                             (Brief="Incremental Stream Enthalpy");
138
139end
140
141Model DoublePipe_PressureDrop
142       
143ATTRIBUTES
144        Pallete = false;
145        Brief = "to be documented";
146        Info =
147        "to be documented";
148       
149PARAMETERS
150
151Dh                      as length               (Brief="Hydraulic Diameter of Pipe for Pressure Drop",Lower=1e-6);
152outer N                         as Integer      (Brief="Number of zones", Default = 2);
153outer Npoints           as Integer      (Brief="Number of incremental points", Default = 3);
154
155VARIABLES
156
157Plocal(Npoints)         as pressure             (Brief="Incremental Local  Pressure",Default=1, Lower=1e-10, Upper=2e4, DisplayUnit='kPa');
158Pdrop                                           as press_delta  (Brief="Total Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P");
159Pd_fric(Npoints)                as press_delta  (Brief="Incremental Pressure Drop for friction",Default=0.01, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P_{fric}");
160fi(N)                                           as fricfactor           (Brief="Incremental Friction Factor", Default=0.05, Lower=1e-10, Upper=2000);
161Re(N)                                           as positive                     (Brief="Incremental Reynolds Number",Default=100,Lower=1);
162Pdnozzle_in             as press_delta          (Brief="Inlet Nozzle Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa');
163Pdnozzle_out            as press_delta          (Brief="Outlet Nozzle Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa');
164Vnozzle_in              as velocity                     (Brief="Inlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0);
165Vnozzle_out             as velocity                     (Brief="Outlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0);
166RVsquare_in             as positive                     (Brief = "Inlet Nozzle rho-V^2", Default=1, Upper=1e6, Unit = 'kg/s^2/m');
167RVsquare_out            as positive                     (Brief = "Outlet Nozzle rho-V^2", Default=1, Upper=1e6, Unit = 'kg/s^2/m');
168end     
169
170Model Main_DoublePipe
171       
172ATTRIBUTES
173        Pallete = false;
174        Brief = "to be documented";
175        Info =
176        "to be documented";
177       
178VARIABLES
179
180HeatTransfer    as DoublePipe_HeatTransfer      (Brief="Double Pipe Heat Transfer");
181PressureDrop    as DoublePipe_PressureDrop      (Brief="Double Pipe Pressure Drop");
182Properties              as Physical_Properties                          (Brief="Double Pipe Properties");
183
184end
185
186Model DoublePipeIncr
187
188ATTRIBUTES
189        Pallete         = true;
190        Icon = "icon/DoublePipe";
191        Brief           = "Incremental Double Pipe Heat Exchanger. ";
192        Info                    =
193        "Incremental approach for a single double pipe heat exchanger. ";
194
195PARAMETERS
196
197outer PP                as Plugin               (Brief="External Physical Properties", Type="PP");
198outer NComp     as Integer      (Brief="Number of Components");
199        N                       as Integer      (Brief="Number of zones", Default = 2);
200 Npoints        as Integer      (Brief="Number of incremental points", Default = 3);
201
202        CalculationApproach                             as Switcher             (Brief="Options for convergence Calculations ",Valid=["Simplified","Full"],Default="Full");
203        Qestimated                                                              as power                                (Brief="Estimated Duty", Default=70, Lower=1e-6, Upper=1e10);
204       
205        M(NComp)        as molweight    (Brief="Component Mol Weight");
206       
207        FlowDirection   as Switcher     (Brief="Flow Direction",Valid=["counter","cocurrent"],Default="cocurrent");
208       
209        HotSide                                 as Switcher     (Brief="Flag for Fluid Alocation ",Valid=["outer","inner"],Default="outer");
210        innerFlowRegime         as Switcher     (Brief="Inner Flow Regime ",Valid=["laminar","transition","turbulent"],Default="laminar");
211        outerFlowRegime         as Switcher     (Brief="Outer Flow Regime ",Valid=["laminar","transition","turbulent"],Default="laminar");
212
213        InnerLaminarCorrelation         as Switcher     (Brief="Heat Transfer Correlation in Laminar Flow for the Inner Side",Valid=["Hausen","Schlunder"],Default="Hausen");
214        InnerTransitionCorrelation  as Switcher         (Brief="Heat Transfer Correlation in Transition Flow for the Inner Side",Valid=["Gnielinski","Hausen"],Default="Gnielinski");
215        InnerTurbulentCorrelation   as Switcher (Brief="Heat Transfer Correlation in Turbulent Flow for the Inner Side",Valid=["Petukhov","SiederTate"],Default="Petukhov");
216
217        OuterLaminarCorrelation         as Switcher             (Brief="Heat Transfer Correlation in Laminar Flow for the Outer Side",Valid=["Hausen","Schlunder"],Default="Hausen");
218        OuterTransitionCorrelation  as Switcher         (Brief="Heat Transfer Correlation in Transition Flow for the OuterSide",Valid=["Gnielinski","Hausen"],Default="Gnielinski");
219        OuterTurbulentCorrelation   as Switcher         (Brief="Heat Transfer Correlation in Turbulent Flow for the Outer Side",Valid=["Petukhov","SiederTate"],Default="Petukhov");
220
221        Pi                              as constant             (Brief="Pi Number",Default=3.14159265, Symbol = "\pi");
222        DoInner         as length                       (Brief="Outside Diameter of Inner Pipe",Lower=1e-6);
223        DiInner as length                       (Brief="Inside Diameter of Inner Pipe",Lower=1e-10);
224        DiOuter as length                       (Brief="Inside Diameter of Outer pipe",Lower=1e-10);
225        Lpipe           as length                       (Brief="Effective Tube Length of one segment of Pipe",Lower=0.1, Symbol = "L_{pipe}");
226        Kwall           as conductivity         (Brief="Tube Wall Material Thermal Conductivity",Default=1.0, Symbol = "K_{wall}");
227        Rfi                     as positive                     (Brief="Inside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
228        Rfo                     as positive                     (Brief="Outside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
229
230Donozzle_Inner          as length               (Brief="Inner Side Outlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
231Dinozzle_Inner          as length               (Brief="Inner Side Inlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
232
233Donozzle_Outer          as length               (Brief="Outer Side Outlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
234Dinozzle_Outer  as length               (Brief="Outer Side Inlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
235
236InnerKinlet             as positive                     (Brief="Inner Side Inlet Nozzle Pressure Loss Coeff",Default=1.1);
237InnerKoutlet    as positive                     (Brief="Inner Side Outlet Nozzle Pressure Loss Coeff",Default=0.7);
238
239OuterKinlet             as positive                     (Brief="Outer Side Inlet Nozzle Pressure Loss Coeff",Default=1.1);
240OuterKoutlet    as positive                     (Brief="Outer Side Outlet Nozzle Pressure Loss Coeff",Default=0.7);
241
242VARIABLES
243
244in  InletInner          as stream               (Brief="Inlet Inner Stream", PosX=0, PosY=0.5225, Symbol="_{inInner}");
245in  InletOuter          as stream               (Brief="Inlet Outer Stream", PosX=0.2805, PosY=0, Symbol="_{inOuter}");
246
247out OutletInner         as streamPH     (Brief="Outlet Inner Stream", PosX=1, PosY=0.5225, Symbol="_{outInner}");
248out OutletOuter         as streamPH     (Brief="Outlet Outer Stream", PosX=0.7264, PosY=1, Symbol="_{outOuter}");
249
250        Details         as Details_Main                 (Brief="Some Details in the Heat Exchanger", Symbol=" ");
251        Inner                   as Main_DoublePipe      (Brief="Inner Side of the Heat Exchanger", Symbol="_{Inner}");
252        Outer                   as Main_DoublePipe      (Brief="Outer Side of the Heat Exchanger", Symbol="_{Outer}");
253
254        Lincr(Npoints)          as length               (Brief = "Incremental Tube Length", Symbol = "L_{incr}");
255
256SET
257
258#"Number of incremental points"
259        Npoints  = N+1;
260
261#"Component Molecular Weight"
262        M  = PP.MolecularWeight();
263
264#"Pi Number"
265        Pi      = 3.14159265;
266
267#"Inner Pipe Cross Sectional Area for Flow"
268        Inner.HeatTransfer.As=0.25*Pi*DiInner*DiInner;
269
270#"Outer Pipe Cross Sectional Area for Flow"
271        Outer.HeatTransfer.As=0.25*Pi*(DiOuter*DiOuter - DoInner*DoInner);
272
273#"Inner Pipe Hydraulic Diameter for Heat Transfer"
274        Inner.HeatTransfer.Dh=DiInner;
275       
276#"Outer Pipe Hydraulic Diameter for Heat Transfer"
277        Outer.HeatTransfer.Dh=(DiOuter*DiOuter-DoInner*DoInner)/DoInner;
278
279#"Inner Pipe Hydraulic Diameter for Pressure Drop"
280        Inner.PressureDrop.Dh=DiInner;
281       
282#"Outer Pipe Hydraulic Diameter for Pressure Drop"
283        Outer.PressureDrop.Dh=DiOuter-DoInner;
284
285EQUATIONS
286
287"Outer  Stream Average Temperature"
288        Outer.Properties.Average.T(1:N) = 0.5*Outer.HeatTransfer.Tlocal(1:N) + 0.5*Outer.HeatTransfer.Tlocal(2:Npoints);
289
290"Inner Stream Average Temperature"
291        Inner.Properties.Average.T(1:N)  = 0.5*Inner.HeatTransfer.Tlocal(1:N) + 0.5*Inner.HeatTransfer.Tlocal(2:Npoints);
292       
293"Outer Stream Average Pressure"
294        Outer.Properties.Average.P(1:N) = 0.5*Outer.PressureDrop.Plocal(1:N) + 0.5*Outer.PressureDrop.Plocal(2:Npoints);
295       
296"Inner Stream Average Pressure"
297        Inner.Properties.Average.P(1:N) = 0.5*Inner.PressureDrop.Plocal(1:N) + 0.5*Inner.PressureDrop.Plocal(2:Npoints);
298
299"Inner Stream Wall Temperature"
300        Inner.Properties.Wall.Twall =   0.5*Outer.Properties.Average.T + 0.5*Inner.Properties.Average.T;
301
302"Outer Stream Wall Temperature"
303        Outer.Properties.Wall.Twall =   0.5*Outer.Properties.Average.T + 0.5*Inner.Properties.Average.T;
304
305"Outer Stream Average Molecular Weight"
306        Outer.Properties.Average.Mw = sum(M*InletOuter.z);
307
308"Inner Stream Average Molecular Weight"
309        Inner.Properties.Average.Mw = sum(M*InletInner.z);
310
311
312if InletInner.v equal 0
313
314then
315"Inlet Mass Density Inner Stream"
316        Inner.Properties.Inlet.rho              =       PP.LiquidDensity(InletInner.T,InletInner.P,InletInner.z);
317
318"Outlet Mass Density Inner Stream"
319        Inner.Properties.Outlet.rho     =       PP.LiquidDensity(OutletInner.T,OutletInner.P,OutletInner.z);
320
321else
322"Inlet Mass Density Inner Stream"
323        Inner.Properties.Inlet.rho              =       PP.VapourDensity(InletInner.T,InletInner.P,InletInner.z);
324       
325"Outlet Mass Density Inner Stream"
326        Inner.Properties.Outlet.rho     =       PP.VapourDensity(OutletInner.T,OutletInner.P,OutletInner.z);
327
328end
329
330if InletOuter.v equal 0
331
332then
333"Inlet Mass Density Outer Stream"
334        Outer.Properties.Inlet.rho              =               PP.LiquidDensity(InletOuter.T,InletOuter.P,InletOuter.z);
335
336"Outlet Mass Density Outer Stream"
337        Outer.Properties.Outlet.rho     =               PP.LiquidDensity(OutletOuter.T,OutletOuter.P,OutletOuter.z);
338
339else
340"Inlet Mass Density Outer Stream"
341        Outer.Properties.Inlet.rho              =               PP.VapourDensity(InletOuter.T,InletOuter.P,InletOuter.z);
342       
343"Outlet Mass Density Outer Stream"
344        Outer.Properties.Outlet.rho     =               PP.VapourDensity(OutletOuter.T,OutletOuter.P,OutletOuter.z);
345
346end
347
348for i in [1:N] do
349
350if InletInner.v equal 0
351       
352        then   
353
354"Average Heat Capacity Inner Stream"
355        Inner.Properties.Average.Cp(i)  =       PP.LiquidCp(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z);
356
357"Average Mass Density Inner Stream"
358        Inner.Properties.Average.rho(i)         =       PP.LiquidDensity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z);
359
360"Average Viscosity Inner Stream"
361        Inner.Properties.Average.Mu(i)  =       PP.LiquidViscosity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z);
362
363"Average        Conductivity Inner Stream"
364        Inner.Properties.Average.K(i)           =       PP.LiquidThermalConductivity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z);
365
366"Viscosity Inner Stream at wall temperature"
367        Inner.Properties.Wall.Mu(i)             =       PP.LiquidViscosity(Inner.Properties.Wall.Twall(i),Inner.Properties.Average.P(i),InletInner.z);
368
369        else
370
371"Average Heat Capacity InnerStream"
372        Inner.Properties.Average.Cp(i)  =       PP.VapourCp(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z);
373
374"Average Mass Density Inner Stream"
375        Inner.Properties.Average.rho(i)         =       PP.VapourDensity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z);
376
377"Average Viscosity Inner Stream"
378        Inner.Properties.Average.Mu(i)  =       PP.VapourViscosity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z);
379
380"Average Conductivity Inner Stream"
381        Inner.Properties.Average.K(i)           =       PP.VapourThermalConductivity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z);
382
383"Viscosity Inner Stream at wall temperature"
384        Inner.Properties.Wall.Mu(i)             =       PP.VapourViscosity(Inner.Properties.Wall.Twall(i),Inner.Properties.Average.P(i),InletInner.z);
385
386end
387
388if InletOuter.v equal 0
389
390        then
391
392"Average Heat Capacity Outer Stream"
393        Outer.Properties.Average.Cp(i)  =               PP.LiquidCp(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z);
394
395"Average Mass Density Outer Stream"
396        Outer.Properties.Average.rho(i) =               PP.LiquidDensity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z);
397
398"Average Viscosity Outer Stream"
399        Outer.Properties.Average.Mu(i)  =               PP.LiquidViscosity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z);   
400
401"Average Conductivity Outer Stream"
402        Outer.Properties.Average.K(i)   =               PP.LiquidThermalConductivity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z);
403
404"Viscosity Outer Stream at wall temperature"
405        Outer.Properties.Wall.Mu(i)             =               PP.LiquidViscosity(Outer.Properties.Wall.Twall(i),Outer.Properties.Average.P(i),InletOuter.z); 
406
407
408        else
409
410"Average Heat Capacity Outer Stream"
411        Outer.Properties.Average.Cp(i)  =               PP.VapourCp(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z);
412
413"Average Mass Density Outer Stream"
414        Outer.Properties.Average.rho(i) =               PP.VapourDensity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z);
415
416"Average Viscosity Outer Stream"
417        Outer.Properties.Average.Mu(i)  =               PP.VapourViscosity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z);
418
419"Average Conductivity Outer Stream"
420        Outer.Properties.Average.K(i)   =               PP.VapourThermalConductivity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z);
421
422"Viscosity Outer Stream at wall temperature"
423        Outer.Properties.Wall.Mu(i)             =               PP.VapourViscosity(Outer.Properties.Wall.Twall(i),Outer.Properties.Average.P(i),InletOuter.z);
424
425end
426
427end
428
429switch HotSide
430
431        case "outer":
432
433switch FlowDirection
434
435        case "cocurrent":
436        "Energy Balance Outer Stream in cocurrent flow"
437                Details.Q(1:N) = InletOuter.F*(Outer.HeatTransfer.Enth(1:N) - Outer.HeatTransfer.Enth(2:Npoints));
438               
439        case "counter":
440        "Energy Balance Outer Stream in counter flow"
441                Details.Q(1:N) = InletOuter.F*(Outer.HeatTransfer.Enth(2:Npoints) - Outer.HeatTransfer.Enth(1:N));
442               
443end
444
445"Energy Balance Inner Stream"
446        Details.Q(1:N) = -InletInner.F*(Inner.HeatTransfer.Enth(1:N)    -       Inner.HeatTransfer.Enth(2:Npoints));
447
448        when InletInner.T > InletOuter.T switchto "inner";
449
450        case "inner":
451
452"Energy Balance Hot Stream"
453        Details.Q(1:N) = InletInner.F*(Inner.HeatTransfer.Enth(1:N)-Inner.HeatTransfer.Enth(2:Npoints));
454
455switch FlowDirection
456
457        case "cocurrent":
458        "Energy Balance Cold Stream in cocurrent flow"
459                Details.Q(1:N) = -InletOuter.F*(Outer.HeatTransfer.Enth(1:N) - Outer.HeatTransfer.Enth(2:Npoints));
460               
461        case "counter":
462        "Energy Balance Cold Stream in counter flow"
463                Details.Q(1:N) = -InletOuter.F*(Outer.HeatTransfer.Enth(2:Npoints) - Outer.HeatTransfer.Enth(1:N));
464               
465end
466
467        when InletInner.T < InletOuter.T switchto "outer";
468
469end
470
471"Flow Mass Inlet Inner Stream"
472        Inner.Properties.Inlet.Fw               =  sum(M*InletInner.z)*InletInner.F;
473
474"Flow Mass Outlet Inner Stream"
475        Inner.Properties.Outlet.Fw              =  sum(M*OutletInner.z)*OutletInner.F;
476
477"Flow Mass Inlet Outer Stream"
478        Outer.Properties.Inlet.Fw               =  sum(M*InletOuter.z)*InletOuter.F;
479
480"Flow Mass Outlet Outer Stream"
481        Outer.Properties.Outlet.Fw      =  sum(M*OutletOuter.z)*OutletOuter.F;
482
483"Molar Balance Outer Stream"
484        OutletOuter.F = InletOuter.F;
485       
486"Molar Balance Inner Stream"
487        OutletInner.F = InletInner.F;
488
489"Outer Stream Molar Fraction Constraint"
490        OutletOuter.z=InletOuter.z;
491       
492"InnerStream Molar Fraction Constraint"
493        OutletInner.z=InletInner.z;
494
495"Total Exchange Surface Area for one segment of pipe"
496        Details.A=Pi*DoInner*Lpipe;
497
498"Pipe Initial Length from Left to Right - OBS: Left: Always Inlet inner side"
499        Lincr(1) = 0*'m';
500
501for i in [1:N] do
502
503"Incremental Length"
504        Lincr(i+1) = i*abs(Lpipe)/N;
505
506end
507
508for i in [1:N] do
509
510switch innerFlowRegime
511       
512        case "laminar":
513       
514"Inner Side Friction Factor for Pressure Drop - laminar Flow"
515        Inner.PressureDrop.fi(i)*Inner.PressureDrop.Re(i) = 16;
516       
517        when Inner.PressureDrop.Re(i) > 2300 switchto "transition";
518
519        case "transition":
520       
521"using Turbulent Flow - to be implemented"
522        (Inner.PressureDrop.fi(i)-0.0035)*(Inner.PressureDrop.Re(i)^0.42) = 0.264;
523
524        when Inner.PressureDrop.Re(i) < 2300 switchto "laminar";
525        when Inner.PressureDrop.Re(i) > 10000 switchto "turbulent";
526
527        case "turbulent":
528
529"Inner Side Friction Factor - Turbulent Flow"
530        (Inner.PressureDrop.fi(i)-0.0035)*(Inner.PressureDrop.Re(i)^0.42) = 0.264;
531
532        when Inner.PressureDrop.Re(i) < 10000 switchto "transition";
533       
534end     
535
536end
537
538for i in [1:N] do
539
540switch outerFlowRegime
541       
542        case "laminar":
543       
544"Outer Side Friction Factor - laminar Flow"
545        Outer.PressureDrop.fi(i)*Outer.PressureDrop.Re(i) = 16;
546       
547        when Outer.PressureDrop.Re(i) > 2300 switchto "transition";
548
549        case "transition":
550       
551"using Turbulent Flow - Transition Flow must be implemented"
552        (Outer.PressureDrop.fi(i)-0.0035)*(Outer.PressureDrop.Re(i)^0.42) = 0.264;
553
554        when Outer.PressureDrop.Re(i) < 2300 switchto "laminar";
555        when Outer.PressureDrop.Re(i) > 10000 switchto "turbulent";
556
557        case "turbulent":
558
559"Outer Side Friction Factor - Turbulent Flow"
560        (Outer.PressureDrop.fi(i)-0.0035)*(Outer.PressureDrop.Re(i)^0.42) = 0.264;
561
562        when Outer.PressureDrop.Re(i) < 10000 switchto "transition";
563       
564end
565
566end
567
568for i in [1:N] do
569
570switch innerFlowRegime
571       
572        case "laminar":
573       
574"Inner Side Friction Factor for Heat Transfer - laminar Flow"
575        Inner.HeatTransfer.fi(i)   = 1/(0.79*ln(Inner.HeatTransfer.Re(i))-1.64)^2;
576       
577switch InnerLaminarCorrelation
578       
579        case "Hausen":
580
581"Nusselt Number"
582        Inner.HeatTransfer.Nu(i) = 3.665 + ((0.19*((DiInner/Lpipe)*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i))^0.8)/(1+0.117*((DiInner/Lpipe)*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i))^0.467));
583       
584        case "Schlunder":
585
586"Nusselt Number"
587        Inner.HeatTransfer.Nu(i) = (49.027896+4.173281*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i)*(DiInner/Lpipe))^(1/3);
588
589end
590       
591        when Inner.HeatTransfer.Re(i) > 2300 switchto "transition";
592       
593        case "transition":
594       
595"Inner Side Friction Factor for Heat Transfer - transition Flow"
596        Inner.HeatTransfer.fi(i)   = 1/(0.79*ln(Inner.HeatTransfer.Re(i))-1.64)^2;
597       
598switch InnerTransitionCorrelation
599       
600        case "Gnielinski":
601       
602"Nusselt Number"
603        Inner.HeatTransfer.Nu(i)*(1+(12.7*sqrt(0.125*Inner.HeatTransfer.fi(i))*((Inner.HeatTransfer.PR(i))^(2/3) -1))) = 0.125*Inner.HeatTransfer.fi(i)*(Inner.HeatTransfer.Re(i)-1000)*Inner.HeatTransfer.PR(i);
604
605        case "Hausen":
606
607"Nusselt Number"
608        Inner.HeatTransfer.Nu(i) =0.116*(Inner.HeatTransfer.Re(i)^(0.667)-125)*Inner.HeatTransfer.PR(i)^(0.333)*(1+(DiInner/Lpipe)^0.667);
609       
610end
611
612        when Inner.HeatTransfer.Re(i) < 2300 switchto "laminar";
613        when Inner.HeatTransfer.Re(i) > 10000 switchto "turbulent";
614
615        case "turbulent":
616
617switch InnerTurbulentCorrelation
618       
619        case "Petukhov":
620       
621"Inner Side Friction Factor for Heat Transfer - turbulent Flow"
622        Inner.HeatTransfer.fi(i)   = 1/(1.82*log(Inner.HeatTransfer.Re(i))-1.64)^2;
623
624"Nusselt Number"
625        Inner.HeatTransfer.Nu(i)*(1.07+(12.7*sqrt(0.125*Inner.HeatTransfer.fi(i))*((Inner.HeatTransfer.PR(i))^(2/3) -1))) = 0.125*Inner.HeatTransfer.fi(i)*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i);
626       
627        case "SiederTate":
628
629"Nusselt Number"
630        Inner.HeatTransfer.Nu(i) = 0.027*(Inner.HeatTransfer.PR(i))^(1/3)*(Inner.HeatTransfer.Re(i))^(4/5);
631
632"Inner Side Friction Factor for Heat Transfer - turbulent Flow"
633        Inner.HeatTransfer.fi(i)   = 1/(1.82*log(Inner.HeatTransfer.Re(i))-1.64)^2;
634       
635end
636       
637        when Inner.HeatTransfer.Re(i) < 10000 switchto "transition";
638       
639end
640
641end
642
643for i in [1:N] do
644
645switch outerFlowRegime
646       
647        case "laminar":
648       
649"Outer Side Friction Factor for Heat Transfer - laminar Flow"
650        Outer.HeatTransfer.fi(i)   = 1/(0.79*ln(Outer.HeatTransfer.Re(i))-1.64)^2;
651       
652switch OuterLaminarCorrelation
653       
654        case "Hausen":
655
656"Nusselt Number"
657        Outer.HeatTransfer.Nu(i) = 3.665 + ((0.19*((Outer.HeatTransfer.Dh/Lpipe)*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i))^0.8)/(1+0.117*((Outer.HeatTransfer.Dh/Lpipe)*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i))^0.467));
658       
659        case "Schlunder":
660
661"Nusselt Number"
662        Outer.HeatTransfer.Nu(i) = (49.027896+4.173281*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i)*(Outer.HeatTransfer.Dh/Lpipe))^(1/3);
663
664end
665       
666        when Outer.HeatTransfer.Re(i) > 2300 switchto "transition";
667       
668        case "transition":
669       
670switch OuterTransitionCorrelation
671       
672        case "Gnielinski":
673
674"Outer Side Friction Factor for Heat Transfer - transition Flow"
675        Outer.HeatTransfer.fi(i)   = 1/(0.79*ln(Outer.HeatTransfer.Re(i))-1.64)^2;
676
677"Nusselt Number"
678        Outer.HeatTransfer.Nu(i)*(1+(12.7*sqrt(0.125*Outer.HeatTransfer.fi(i))*((Outer.HeatTransfer.PR(i))^(2/3) -1))) = 0.125*Outer.HeatTransfer.fi(i)*(Outer.HeatTransfer.Re(i)-1000)*Outer.HeatTransfer.PR(i);
679
680        case "Hausen":
681
682"Nusselt Number"
683        Outer.HeatTransfer.Nu(i) =      0.116*(Outer.HeatTransfer.Re(i)^(0.667)-125)*Outer.HeatTransfer.PR(i)^(0.333)*(1+(Outer.HeatTransfer.Dh/Lpipe)^0.667);
684
685
686"Outer Side Friction Factor for Heat Transfer - transition Flow"
687        Outer.HeatTransfer.fi(i)   = 1/(0.79*ln(Outer.HeatTransfer.Re(i))-1.64)^2;
688       
689end
690       
691        when Outer.HeatTransfer.Re(i) < 2300 switchto "laminar";
692        when Outer.HeatTransfer.Re(i) > 10000 switchto "turbulent";
693       
694        case "turbulent":
695       
696switch OuterTurbulentCorrelation
697       
698        case "Petukhov":
699
700"Outer Side Friction Factor for Heat Transfer - turbulent Flow"
701        Outer.HeatTransfer.fi(i)   = 1/(1.82*log(Outer.HeatTransfer.Re(i))-1.64)^2;
702       
703"Nusselt Number"
704        Outer.HeatTransfer.Nu(i)*(1.07+(12.7*sqrt(0.125*Outer.HeatTransfer.fi(i))*((Outer.HeatTransfer.PR(i))^(2/3) -1))) = 0.125*Outer.HeatTransfer.fi(i)*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i);
705       
706        case "SiederTate":
707
708"Nusselt Number"
709        Outer.HeatTransfer.Nu(i) = 0.027*(Outer.HeatTransfer.PR(i))^(1/3)*(Outer.HeatTransfer.Re(i))^(4/5);
710
711"Outer Side Friction Factor for Heat Transfer - turbulent Flow"
712        Outer.HeatTransfer.fi(i)   = 1/(1.82*log(Outer.HeatTransfer.Re(i))-1.64)^2;
713       
714end
715
716        when Outer.HeatTransfer.Re(i) < 10000 switchto "transition";
717
718end
719
720end
721
722"Inner Pipe Film Coefficient"
723        Inner.HeatTransfer.hcoeff = (Inner.HeatTransfer.Nu*Inner.Properties.Average.K/DiInner)*Inner.HeatTransfer.Phi;
724
725"Outer Pipe Film Coefficient"
726        Outer.HeatTransfer.hcoeff= (Outer.HeatTransfer.Nu*Outer.Properties.Average.K/Outer.HeatTransfer.Dh)*Outer.HeatTransfer.Phi;
727
728"Outer Pipe Phi correction"
729        Outer.HeatTransfer.Phi = (Outer.Properties.Average.Mu/Outer.Properties.Wall.Mu)^0.14;
730       
731"Inner Pipe Phi correction"
732        Inner.HeatTransfer.Phi  = (Inner.Properties.Average.Mu/Inner.Properties.Wall.Mu)^0.14;
733
734"Outer Pipe Prandtl Number"
735        Outer.HeatTransfer.PR = ((Outer.Properties.Average.Cp/Outer.Properties.Average.Mw)*Outer.Properties.Average.Mu)/Outer.Properties.Average.K;
736
737"Inner Pipe Prandtl Number"
738        Inner.HeatTransfer.PR = ((Inner.Properties.Average.Cp/Inner.Properties.Average.Mw)*Inner.Properties.Average.Mu)/Inner.Properties.Average.K;
739
740"Outer Pipe Reynolds Number for Heat Transfer"
741        Outer.HeatTransfer.Re = (Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean*Outer.HeatTransfer.Dh)/Outer.Properties.Average.Mu;
742
743"Outer Pipe Reynolds Number for Pressure Drop"
744        Outer.PressureDrop.Re = (Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean*Outer.PressureDrop.Dh)/Outer.Properties.Average.Mu;
745
746"Inner Pipe Reynolds Number for Heat Transfer"
747        Inner.HeatTransfer.Re = (Inner.Properties.Average.rho*Inner.HeatTransfer.Vmean*Inner.HeatTransfer.Dh)/Inner.Properties.Average.Mu;
748
749"Inner Pipe Reynolds Number for Pressure Drop"
750        Inner.PressureDrop.Re = Inner.HeatTransfer.Re;
751
752"Outer Pipe Velocity"
753        Outer.HeatTransfer.Vmean*(Outer.HeatTransfer.As*Outer.Properties.Average.rho)  = Outer.Properties.Inlet.Fw;
754
755"Inner Pipe Velocity"
756        Inner.HeatTransfer.Vmean*(Inner.HeatTransfer.As*Inner.Properties.Average.rho)  = Inner.Properties.Inlet.Fw;
757
758"Overall Heat Transfer Coefficient Clean"
759        Details.Uc*((DoInner/(Inner.HeatTransfer.hcoeff*DiInner) )+(DoInner*ln(DoInner/DiInner)/(2*Kwall))+(1/(Outer.HeatTransfer.hcoeff)))=1;
760
761"Overall Heat Transfer Coefficient Dirty"
762        Details.Ud*(Rfi*(DoInner/DiInner) +  Rfo + (DoInner/(Inner.HeatTransfer.hcoeff*DiInner) )+(DoInner*ln(DoInner/DiInner)/(2*Kwall))+(1/(Outer.HeatTransfer.hcoeff)))=1;
763
764"Total Duty"
765        Details.Qtotal = sum(Details.Q);
766
767switch CalculationApproach
768       
769        case "Full":
770
771switch HotSide
772
773        case "outer":
774
775"Incremental Duty"
776        Details.Q = Details.Ud*Pi*DoInner*(Lpipe/N)*(Outer.Properties.Average.T - Inner.Properties.Average.T);
777
778        when InletInner.T > InletOuter.T switchto "inner";
779
780        case "inner":
781
782"Incremental Duty"
783        Details.Q = Details.Ud*Pi*DoInner*(Lpipe/N)*(Inner.Properties.Average.T - Outer.Properties.Average.T);
784
785        when InletInner.T < InletOuter.T switchto "outer";
786
787end
788
789        case "Simplified":
790       
791"Duty"
792        Details.Q = Qestimated/N;
793
794end
795
796for i in [2:N] do
797
798"Incremental Enthalpy Inner Stream"
799        Inner.HeatTransfer.Enth(i) = (1-InletInner.v)*PP.LiquidEnthalpy(Inner.HeatTransfer.Tlocal(i), Inner.PressureDrop.Plocal(i), InletInner.z) + InletInner.v*PP.VapourEnthalpy(Inner.HeatTransfer.Tlocal(i), Inner.PressureDrop.Plocal(i), InletInner.z);
800
801"Incremental Enthalpy Outer Stream"
802        Outer.HeatTransfer.Enth(i) = (1-InletOuter.v)*PP.LiquidEnthalpy(Outer.HeatTransfer.Tlocal(i), Outer.PressureDrop.Plocal(i), InletOuter.z) + InletOuter.v*PP.VapourEnthalpy(Outer.HeatTransfer.Tlocal(i), Outer.PressureDrop.Plocal(i), InletOuter.z);
803
804end
805
806"Enthalpy of Inner Side - Inlet Boundary"
807        Inner.HeatTransfer.Enth(1) = InletInner.h;
808
809"Enthalpy of inner Side - Outlet Boundary"
810        Inner.HeatTransfer.Enth(Npoints) = OutletInner.h;
811
812"Temperature of Inner Side - Inlet Boundary"
813        Inner.HeatTransfer.Tlocal(1) = InletInner.T;
814
815"Temperature of Inner Side - Outlet Boundary"
816        Inner.HeatTransfer.Tlocal(Npoints) = OutletInner.T;
817
818"Pressure of Inner Side - Inlet Boundary"
819        Inner.PressureDrop.Plocal(1) = InletInner.P;
820
821"Pressure of Inner Side - Outlet Boundary"
822        Inner.PressureDrop.Plocal(Npoints) = OutletInner.P;
823
824switch FlowDirection
825
826        case "cocurrent":
827
828"Enthalpy of Outer Side - Inlet Boundary"
829        Outer.HeatTransfer.Enth(1) = InletOuter.h;
830
831"Enthalpy of Outer Side - Outlet Boundary"
832        Outer.HeatTransfer.Enth(Npoints) = OutletOuter.h;
833
834"Temperature of Outer Side - Inlet Boundary"
835        Outer.HeatTransfer.Tlocal(1) = InletOuter.T;
836
837"Temperature of Outer Side - Outlet Boundary"
838        Outer.HeatTransfer.Tlocal(Npoints) = OutletOuter.T;
839
840"Pressure of Outer Side - Inlet Boundary"
841        Outer.PressureDrop.Plocal(1) = InletOuter.P;
842
843"Pressure of Outer Side - Outlet Boundary"
844        Outer.PressureDrop.Plocal(Npoints) = OutletOuter.P;
845
846        case "counter":
847
848"Enthalpy of Outer Side - Inlet Boundary"
849        Outer.HeatTransfer.Enth(Npoints) = InletOuter.h;
850
851"Enthalpy of Outer Side - Outlet Boundary"
852        Outer.HeatTransfer.Enth(1) = OutletOuter.h;
853
854"Temperature of Outer Side - Inlet Boundary"
855        Outer.HeatTransfer.Tlocal(Npoints) = InletOuter.T;
856
857"Temperature of Outer Side - Outlet Boundary"
858        Outer.HeatTransfer.Tlocal(1) = OutletOuter.T;
859
860"Pressure of Outer Side - Inlet Boundary"
861        Outer.PressureDrop.Plocal(Npoints) = InletOuter.P;
862
863"Pressure of Outer Side - Outlet Boundary"
864        Outer.PressureDrop.Plocal(1) = OutletOuter.P;
865
866end
867
868switch FlowDirection
869
870        case "cocurrent":
871
872"Total Pressure Drop Outer Stream"
873        Outer.PressureDrop.Pdrop  = Outer.PressureDrop.Pd_fric(Npoints)+Outer.PressureDrop.Pdnozzle_in+Outer.PressureDrop.Pdnozzle_out;
874
875"Outer Pipe Pressure Drop for friction"
876        Outer.PressureDrop.Pd_fric(2:Npoints) = (2*Outer.PressureDrop.fi*Lincr(2:Npoints)*Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean^2)/(Outer.PressureDrop.Dh*Outer.HeatTransfer.Phi);
877
878"Outer Pipe Pressure Drop for friction"
879        Outer.PressureDrop.Pd_fric(1) = 0*'kPa';
880
881for i in [1:N] do
882   
883"Outer Pipe Local Pressure"# FIXME: NOZZLE PRESSURE DROP MUST BE ADDED
884        Outer.PressureDrop.Plocal(i+1) =        Outer.PressureDrop.Plocal(1) - Outer.PressureDrop.Pd_fric(i+1);
885
886end
887
888        case "counter":
889
890"Total Pressure Drop Outer Stream"
891        Outer.PressureDrop.Pdrop  = Outer.PressureDrop.Pd_fric(1)+Outer.PressureDrop.Pdnozzle_in+Outer.PressureDrop.Pdnozzle_out;
892
893
894for i in [1:N] do
895
896"Outer Pipe Pressure Drop for friction"                 
897        Outer.PressureDrop.Pd_fric(i) = (2*Outer.PressureDrop.fi(i)*Lincr(1+N-i)*Outer.Properties.Average.rho(i)*Outer.HeatTransfer.Vmean(i)^2)/(Outer.PressureDrop.Dh*Outer.HeatTransfer.Phi(i));
898
899end
900
901"Outer Pipe Pressure Drop for friction"
902        Outer.PressureDrop.Pd_fric(Npoints) = 0*'kPa';
903
904for i in [1:N] do
905   
906"Outer Pipe Local Pressure"# FIXME: NOZZLE PRESSURE DROP MUST BE ADDED
907        Outer.PressureDrop.Plocal(i) =  Outer.PressureDrop.Plocal(Npoints) - Outer.PressureDrop.Pd_fric(i+1);
908
909end
910
911end
912
913"Total Pressure Drop Inner Stream"
914        Inner.PressureDrop.Pdrop  = Inner.PressureDrop.Pd_fric(Npoints)+Inner.PressureDrop.Pdnozzle_in+Inner.PressureDrop.Pdnozzle_out;
915       
916"Inner Pipe Pressure Drop for friction"
917        Inner.PressureDrop.Pd_fric(2:Npoints) = (2*Inner.PressureDrop.fi*Lincr(2:Npoints)*Inner.Properties.Average.rho*Inner.HeatTransfer.Vmean^2)/(DiInner*Inner.HeatTransfer.Phi);
918
919"Inner Pipe Pressure Drop for friction"
920        Inner.PressureDrop.Pd_fric(1) = 0*'kPa';
921
922for i in [1:N] do
923
924"Inner Pipe Local Pressure"# FIXME: NOZZLE PRESSURE DROP MUST BE ADDED
925        Inner.PressureDrop.Plocal(i+1) =        Inner.PressureDrop.Plocal(1) - Inner.PressureDrop.Pd_fric(i+1);
926
927end
928
929
930"Velocity Inner Side Inlet Nozzle"
931        Inner.PressureDrop.Vnozzle_in   = Inner.Properties.Inlet.Fw/(Inner.Properties.Inlet.rho*(0.25*Pi*Dinozzle_Inner^2));
932
933"Velocity Inner Side Outlet Nozzle"
934        Inner.PressureDrop.Vnozzle_out  = Inner.Properties.Outlet.Fw/(Inner.Properties.Outlet.rho*(0.25*Pi*Donozzle_Inner^2));
935
936"Velocity Outer Side Inlet Nozzle"
937        Outer.PressureDrop.Vnozzle_in   = Outer.Properties.Inlet.Fw/(Outer.Properties.Inlet.rho*(0.25*Pi*Dinozzle_Outer^2));
938
939"Velocity Outer Side Outlet Nozzle"
940        Outer.PressureDrop.Vnozzle_out  = Outer.Properties.Outlet.Fw/(Outer.Properties.Outlet.rho*(0.25*Pi*Donozzle_Outer^2));
941
942"Pressure Drop Inner Side Inlet Nozzle"
943        Inner.PressureDrop.Pdnozzle_in  = 0.5*InnerKinlet*Inner.Properties.Inlet.rho*Inner.PressureDrop.Vnozzle_in^2;
944
945"Pressure Drop Inner Side Outlet Nozzle"
946        Inner.PressureDrop.Pdnozzle_out = 0.5*InnerKoutlet*Inner.Properties.Outlet.rho*Inner.PressureDrop.Vnozzle_out^2;
947
948"Pressure Drop Outer Side Inlet Nozzle"
949        Outer.PressureDrop.Pdnozzle_in  = 0.5*OuterKinlet*Outer.Properties.Inlet.rho*Outer.PressureDrop.Vnozzle_in^2;
950
951"Pressure Drop Outer Side Outlet Nozzle"
952        Outer.PressureDrop.Pdnozzle_out = 0.5*OuterKoutlet*Outer.Properties.Outlet.rho*Outer.PressureDrop.Vnozzle_out^2;
953
954"Inner Side Inlet Nozzle rho-V^2"
955        Inner.PressureDrop.RVsquare_in = Inner.Properties.Inlet.rho*(Inner.PressureDrop.Vnozzle_in)^2;
956
957"Inner Side Outlet Nozzle rho-V^2"
958        Inner.PressureDrop.RVsquare_out = Inner.Properties.Outlet.rho*(Inner.PressureDrop.Vnozzle_out)^2;
959
960"Outer Side Inlet Nozzle rho-V^2"
961        Outer.PressureDrop.RVsquare_in = Outer.Properties.Inlet.rho*(Outer.PressureDrop.Vnozzle_in)^2;
962
963"Outer Side Outlet Nozzle rho-V^2"
964        Outer.PressureDrop.RVsquare_out = Outer.Properties.Outlet.rho*(Outer.PressureDrop.Vnozzle_out)^2;
965
966end
Note: See TracBrowser for help on using the repository browser.