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

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

added nozzles pressure drop for double pipe heat exchanger model

  • Property svn:executable set to *
File size: 33.8 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        M(NComp)        as molweight    (Brief="Component Mol Weight");
203       
204        FlowDirection   as Switcher     (Brief="Flow Direction",Valid=["counter","cocurrent"],Default="cocurrent");
205       
206        HotSide                                 as Switcher     (Brief="Flag for Fluid Alocation ",Valid=["outer","inner"],Default="outer");
207        innerFlowRegime         as Switcher     (Brief="Inner Flow Regime ",Valid=["laminar","transition","turbulent"],Default="laminar");
208        outerFlowRegime         as Switcher     (Brief="Outer Flow Regime ",Valid=["laminar","transition","turbulent"],Default="laminar");
209
210        InnerLaminarCorrelation         as Switcher     (Brief="Heat Transfer Correlation in Laminar Flow for the Inner Side",Valid=["Hausen","Schlunder"],Default="Hausen");
211        InnerTransitionCorrelation  as Switcher         (Brief="Heat Transfer Correlation in Transition Flow for the Inner Side",Valid=["Gnielinski","Hausen"],Default="Gnielinski");
212        InnerTurbulentCorrelation   as Switcher (Brief="Heat Transfer Correlation in Turbulent Flow for the Inner Side",Valid=["Petukhov","SiederTate"],Default="Petukhov");
213
214        OuterLaminarCorrelation         as Switcher             (Brief="Heat Transfer Correlation in Laminar Flow for the Outer Side",Valid=["Hausen","Schlunder"],Default="Hausen");
215        OuterTransitionCorrelation  as Switcher         (Brief="Heat Transfer Correlation in Transition Flow for the OuterSide",Valid=["Gnielinski","Hausen"],Default="Gnielinski");
216        OuterTurbulentCorrelation   as Switcher         (Brief="Heat Transfer Correlation in Turbulent Flow for the Outer Side",Valid=["Petukhov","SiederTate"],Default="Petukhov");
217
218        Pi                              as constant             (Brief="Pi Number",Default=3.14159265, Symbol = "\pi");
219        DoInner         as length                       (Brief="Outside Diameter of Inner Pipe",Lower=1e-6);
220        DiInner as length                       (Brief="Inside Diameter of Inner Pipe",Lower=1e-10);
221        DiOuter as length                       (Brief="Inside Diameter of Outer pipe",Lower=1e-10);
222        Lpipe           as length                       (Brief="Effective Tube Length of one segment of Pipe",Lower=0.1, Symbol = "L_{pipe}");
223        Kwall           as conductivity         (Brief="Tube Wall Material Thermal Conductivity",Default=1.0, Symbol = "K_{wall}");
224        Rfi                     as positive                     (Brief="Inside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
225        Rfo                     as positive                     (Brief="Outside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
226
227Donozzle_Inner          as length               (Brief="Inner Side Outlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
228Dinozzle_Inner          as length               (Brief="Inner Side Inlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
229
230Donozzle_Outer          as length               (Brief="Outer Side Outlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
231Dinozzle_Outer  as length               (Brief="Outer Side Inlet Nozzle Diameter",Default = 0.036,Lower=10e-6);
232
233InnerKinlet             as positive                     (Brief="Inner Side Inlet Nozzle Pressure Loss Coeff",Default=1.1);
234InnerKoutlet    as positive                     (Brief="Inner Side Outlet Nozzle Pressure Loss Coeff",Default=0.7);
235
236OuterKinlet             as positive                     (Brief="Outer Side Inlet Nozzle Pressure Loss Coeff",Default=1.1);
237OuterKoutlet    as positive                     (Brief="Outer Side Outlet Nozzle Pressure Loss Coeff",Default=0.7);
238
239VARIABLES
240
241in  InletInner          as stream               (Brief="Inlet Inner Stream", PosX=0, PosY=0.5225, Symbol="_{inInner}");
242in  InletOuter          as stream               (Brief="Inlet Outer Stream", PosX=0.2805, PosY=0, Symbol="_{inOuter}");
243
244out OutletInner         as streamPH     (Brief="Outlet Inner Stream", PosX=1, PosY=0.5225, Symbol="_{outInner}");
245out OutletOuter         as streamPH     (Brief="Outlet Outer Stream", PosX=0.7264, PosY=1, Symbol="_{outOuter}");
246
247        Details         as Details_Main                 (Brief="Some Details in the Heat Exchanger", Symbol=" ");
248        Inner                   as Main_DoublePipe      (Brief="Inner Side of the Heat Exchanger", Symbol="_{Inner}");
249        Outer                   as Main_DoublePipe      (Brief="Outer Side of the Heat Exchanger", Symbol="_{Outer}");
250
251        Lincr(Npoints)          as length               (Brief = "Incremental Tube Length", Symbol = "L_{incr}");
252
253SET
254
255#"Number of incremental points"
256        Npoints  = N+1;
257
258#"Component Molecular Weight"
259        M  = PP.MolecularWeight();
260
261#"Pi Number"
262        Pi      = 3.14159265;
263
264#"Inner Pipe Cross Sectional Area for Flow"
265        Inner.HeatTransfer.As=0.25*Pi*DiInner*DiInner;
266
267#"Outer Pipe Cross Sectional Area for Flow"
268        Outer.HeatTransfer.As=0.25*Pi*(DiOuter*DiOuter - DoInner*DoInner);
269
270#"Inner Pipe Hydraulic Diameter for Heat Transfer"
271        Inner.HeatTransfer.Dh=DiInner;
272       
273#"Outer Pipe Hydraulic Diameter for Heat Transfer"
274        Outer.HeatTransfer.Dh=(DiOuter*DiOuter-DoInner*DoInner)/DoInner;
275
276#"Inner Pipe Hydraulic Diameter for Pressure Drop"
277        Inner.PressureDrop.Dh=DiInner;
278       
279#"Outer Pipe Hydraulic Diameter for Pressure Drop"
280        Outer.PressureDrop.Dh=DiOuter-DoInner;
281
282EQUATIONS
283
284"Outer  Stream Average Temperature"
285        Outer.Properties.Average.T(1:N) = 0.5*Outer.HeatTransfer.Tlocal(1:N) + 0.5*Outer.HeatTransfer.Tlocal(2:Npoints);
286
287"Inner Stream Average Temperature"
288        Inner.Properties.Average.T(1:N)  = 0.5*Inner.HeatTransfer.Tlocal(1:N) + 0.5*Inner.HeatTransfer.Tlocal(2:Npoints);
289       
290"Outer Stream Average Pressure"
291        Outer.Properties.Average.P(1:N) = 0.5*Outer.PressureDrop.Plocal(1:N) + 0.5*Outer.PressureDrop.Plocal(2:Npoints);
292       
293"Inner Stream Average Pressure"
294        Inner.Properties.Average.P(1:N) = 0.5*Inner.PressureDrop.Plocal(1:N) + 0.5*Inner.PressureDrop.Plocal(2:Npoints);
295
296"Inner Stream Wall Temperature"
297        Inner.Properties.Wall.Twall =   0.5*Outer.Properties.Average.T + 0.5*Inner.Properties.Average.T;
298
299"Outer Stream Wall Temperature"
300        Outer.Properties.Wall.Twall =   0.5*Outer.Properties.Average.T + 0.5*Inner.Properties.Average.T;
301
302"Outer Stream Average Molecular Weight"
303        Outer.Properties.Average.Mw = sum(M*InletOuter.z);
304
305"Inner Stream Average Molecular Weight"
306        Inner.Properties.Average.Mw = sum(M*InletInner.z);
307
308
309if InletInner.v equal 0
310
311then
312"Inlet Mass Density Inner Stream"
313        Inner.Properties.Inlet.rho              =       PP.LiquidDensity(InletInner.T,InletInner.P,InletInner.z);
314
315"Outlet Mass Density Inner Stream"
316        Inner.Properties.Outlet.rho     =       PP.LiquidDensity(OutletInner.T,OutletInner.P,OutletInner.z);
317
318else
319"Inlet Mass Density Inner Stream"
320        Inner.Properties.Inlet.rho              =       PP.VapourDensity(InletInner.T,InletInner.P,InletInner.z);
321       
322"Outlet Mass Density Inner Stream"
323        Inner.Properties.Outlet.rho     =       PP.VapourDensity(OutletInner.T,OutletInner.P,OutletInner.z);
324
325end
326
327if InletOuter.v equal 0
328
329then
330"Inlet Mass Density Outer Stream"
331        Outer.Properties.Inlet.rho              =               PP.LiquidDensity(InletOuter.T,InletOuter.P,InletOuter.z);
332
333"Outlet Mass Density Outer Stream"
334        Outer.Properties.Outlet.rho     =               PP.LiquidDensity(OutletOuter.T,OutletOuter.P,OutletOuter.z);
335
336else
337"Inlet Mass Density Outer Stream"
338        Outer.Properties.Inlet.rho              =               PP.VapourDensity(InletOuter.T,InletOuter.P,InletOuter.z);
339       
340"Outlet Mass Density Outer Stream"
341        Outer.Properties.Outlet.rho     =               PP.VapourDensity(OutletOuter.T,OutletOuter.P,OutletOuter.z);
342
343end
344
345for i in [1:N]
346
347if InletInner.v equal 0
348       
349        then   
350
351"Average Heat Capacity Inner Stream"
352        Inner.Properties.Average.Cp(i)  =       PP.LiquidCp(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z);
353
354"Average Mass Density Inner Stream"
355        Inner.Properties.Average.rho(i)         =       PP.LiquidDensity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z);
356
357"Average Viscosity Inner Stream"
358        Inner.Properties.Average.Mu(i)  =       PP.LiquidViscosity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z);
359
360"Average        Conductivity Inner Stream"
361        Inner.Properties.Average.K(i)           =       PP.LiquidThermalConductivity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z);
362
363"Viscosity Inner Stream at wall temperature"
364        Inner.Properties.Wall.Mu(i)             =       PP.LiquidViscosity(Inner.Properties.Wall.Twall(i),Inner.Properties.Average.P(i),InletInner.z);
365
366        else
367
368"Average Heat Capacity InnerStream"
369        Inner.Properties.Average.Cp(i)  =       PP.VapourCp(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z);
370
371"Average Mass Density Inner Stream"
372        Inner.Properties.Average.rho(i)         =       PP.VapourDensity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z);
373
374"Average Viscosity Inner Stream"
375        Inner.Properties.Average.Mu(i)  =       PP.VapourViscosity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z);
376
377"Average Conductivity Inner Stream"
378        Inner.Properties.Average.K(i)           =       PP.VapourThermalConductivity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z);
379
380"Viscosity Inner Stream at wall temperature"
381        Inner.Properties.Wall.Mu(i)             =       PP.VapourViscosity(Inner.Properties.Wall.Twall(i),Inner.Properties.Average.P(i),InletInner.z);
382
383end
384
385if InletOuter.v equal 0
386
387        then
388
389"Average Heat Capacity Outer Stream"
390        Outer.Properties.Average.Cp(i)  =               PP.LiquidCp(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z);
391
392"Average Mass Density Outer Stream"
393        Outer.Properties.Average.rho(i) =               PP.LiquidDensity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z);
394
395"Average Viscosity Outer Stream"
396        Outer.Properties.Average.Mu(i)  =               PP.LiquidViscosity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z);   
397
398"Average Conductivity Outer Stream"
399        Outer.Properties.Average.K(i)   =               PP.LiquidThermalConductivity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z);
400
401"Viscosity Outer Stream at wall temperature"
402        Outer.Properties.Wall.Mu(i)             =               PP.LiquidViscosity(Outer.Properties.Wall.Twall(i),Outer.Properties.Average.P(i),InletOuter.z); 
403
404
405        else
406
407"Average Heat Capacity Outer Stream"
408        Outer.Properties.Average.Cp(i)  =               PP.VapourCp(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z);
409
410"Average Mass Density Outer Stream"
411        Outer.Properties.Average.rho(i) =               PP.VapourDensity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z);
412
413"Average Viscosity Outer Stream"
414        Outer.Properties.Average.Mu(i)  =               PP.VapourViscosity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z);
415
416"Average Conductivity Outer Stream"
417        Outer.Properties.Average.K(i)   =               PP.VapourThermalConductivity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z);
418
419"Viscosity Outer Stream at wall temperature"
420        Outer.Properties.Wall.Mu(i)             =               PP.VapourViscosity(Outer.Properties.Wall.Twall(i),Outer.Properties.Average.P(i),InletOuter.z);
421
422end
423
424end
425
426switch HotSide
427
428        case "outer":
429
430switch FlowDirection
431
432        case "cocurrent":
433        "Energy Balance Outer Stream in cocurrent flow"
434                Details.Q(1:N) = InletOuter.F*(Outer.HeatTransfer.Enth(1:N) - Outer.HeatTransfer.Enth(2:Npoints));
435               
436        case "counter":
437        "Energy Balance Outer Stream in counter flow"
438                Details.Q(1:N) = InletOuter.F*(Outer.HeatTransfer.Enth(2:Npoints) - Outer.HeatTransfer.Enth(1:N));
439               
440end
441
442"Energy Balance Inner Stream"
443        Details.Q(1:N) = -InletInner.F*(Inner.HeatTransfer.Enth(1:N)    -       Inner.HeatTransfer.Enth(2:Npoints));
444
445        when InletInner.T > InletOuter.T switchto "inner";
446
447        case "inner":
448
449"Energy Balance Hot Stream"
450        Details.Q(1:N) = InletInner.F*(Inner.HeatTransfer.Enth(1:N)-Inner.HeatTransfer.Enth(2:Npoints));
451
452switch FlowDirection
453
454        case "cocurrent":
455        "Energy Balance Cold Stream in cocurrent flow"
456                Details.Q(1:N) = -InletOuter.F*(Outer.HeatTransfer.Enth(1:N) - Outer.HeatTransfer.Enth(2:Npoints));
457               
458        case "counter":
459        "Energy Balance Cold Stream in counter flow"
460                Details.Q(1:N) = -InletOuter.F*(Outer.HeatTransfer.Enth(2:Npoints) - Outer.HeatTransfer.Enth(1:N));
461               
462end
463
464        when InletInner.T < InletOuter.T switchto "outer";
465
466end
467
468"Flow Mass Inlet Inner Stream"
469        Inner.Properties.Inlet.Fw               =  sum(M*InletInner.z)*InletInner.F;
470
471"Flow Mass Outlet Inner Stream"
472        Inner.Properties.Outlet.Fw              =  sum(M*OutletInner.z)*OutletInner.F;
473
474"Flow Mass Inlet Outer Stream"
475        Outer.Properties.Inlet.Fw               =  sum(M*InletOuter.z)*InletOuter.F;
476
477"Flow Mass Outlet Outer Stream"
478        Outer.Properties.Outlet.Fw      =  sum(M*OutletOuter.z)*OutletOuter.F;
479
480"Molar Balance Outer Stream"
481        OutletOuter.F = InletOuter.F;
482       
483"Molar Balance Inner Stream"
484        OutletInner.F = InletInner.F;
485
486"Outer Stream Molar Fraction Constraint"
487        OutletOuter.z=InletOuter.z;
488       
489"InnerStream Molar Fraction Constraint"
490        OutletInner.z=InletInner.z;
491
492"Total Exchange Surface Area for one segment of pipe"
493        Details.A=Pi*DoInner*Lpipe;
494
495"Pipe Initial Length from Left to Right - OBS: Left: Always Inlet inner side"
496        Lincr(1) = 0*'m';
497
498for i in [1:N]
499
500"Incremental Length"
501        Lincr(i+1) = i*abs(Lpipe)/N;
502
503end
504
505for i in [1:N]
506
507switch innerFlowRegime
508       
509        case "laminar":
510       
511"Inner Side Friction Factor for Pressure Drop - laminar Flow"
512        Inner.PressureDrop.fi(i)*Inner.PressureDrop.Re(i) = 16;
513       
514        when Inner.PressureDrop.Re(i) > 2300 switchto "transition";
515
516        case "transition":
517       
518"using Turbulent Flow - to be implemented"
519        (Inner.PressureDrop.fi(i)-0.0035)*(Inner.PressureDrop.Re(i)^0.42) = 0.264;
520
521        when Inner.PressureDrop.Re(i) < 2300 switchto "laminar";
522        when Inner.PressureDrop.Re(i) > 10000 switchto "turbulent";
523
524        case "turbulent":
525
526"Inner Side Friction Factor - Turbulent Flow"
527        (Inner.PressureDrop.fi(i)-0.0035)*(Inner.PressureDrop.Re(i)^0.42) = 0.264;
528
529        when Inner.PressureDrop.Re(i) < 10000 switchto "transition";
530       
531end     
532
533end
534
535for i in [1:N]
536
537switch outerFlowRegime
538       
539        case "laminar":
540       
541"Outer Side Friction Factor - laminar Flow"
542        Outer.PressureDrop.fi(i)*Outer.PressureDrop.Re(i) = 16;
543       
544        when Outer.PressureDrop.Re(i) > 2300 switchto "transition";
545
546        case "transition":
547       
548"using Turbulent Flow - Transition Flow must be implemented"
549        (Outer.PressureDrop.fi(i)-0.0035)*(Outer.PressureDrop.Re(i)^0.42) = 0.264;
550
551        when Outer.PressureDrop.Re(i) < 2300 switchto "laminar";
552        when Outer.PressureDrop.Re(i) > 10000 switchto "turbulent";
553
554        case "turbulent":
555
556"Outer Side Friction Factor - Turbulent Flow"
557        (Outer.PressureDrop.fi(i)-0.0035)*(Outer.PressureDrop.Re(i)^0.42) = 0.264;
558
559        when Outer.PressureDrop.Re(i) < 10000 switchto "transition";
560       
561end
562
563end
564
565for i in [1:N]
566
567switch innerFlowRegime
568       
569        case "laminar":
570       
571"Inner Side Friction Factor for Heat Transfer - laminar Flow"
572        Inner.HeatTransfer.fi(i)   = 1/(0.79*ln(Inner.HeatTransfer.Re(i))-1.64)^2;
573       
574switch InnerLaminarCorrelation
575       
576        case "Hausen":
577
578"Nusselt Number"
579        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));
580       
581        case "Schlunder":
582
583"Nusselt Number"
584        Inner.HeatTransfer.Nu(i) = (49.027896+4.173281*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i)*(DiInner/Lpipe))^(1/3);
585
586end
587       
588        when Inner.HeatTransfer.Re(i) > 2300 switchto "transition";
589       
590        case "transition":
591       
592"Inner Side Friction Factor for Heat Transfer - transition Flow"
593        Inner.HeatTransfer.fi(i)   = 1/(0.79*ln(Inner.HeatTransfer.Re(i))-1.64)^2;
594       
595switch InnerTransitionCorrelation
596       
597        case "Gnielinski":
598       
599"Nusselt Number"
600        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);
601
602        case "Hausen":
603
604"Nusselt Number"
605        Inner.HeatTransfer.Nu(i) =0.116*(Inner.HeatTransfer.Re(i)^(0.667)-125)*Inner.HeatTransfer.PR(i)^(0.333)*(1+(DiInner/Lpipe)^0.667);
606       
607end
608
609        when Inner.HeatTransfer.Re(i) < 2300 switchto "laminar";
610        when Inner.HeatTransfer.Re(i) > 10000 switchto "turbulent";
611
612        case "turbulent":
613
614switch InnerTurbulentCorrelation
615       
616        case "Petukhov":
617       
618"Inner Side Friction Factor for Heat Transfer - turbulent Flow"
619        Inner.HeatTransfer.fi(i)   = 1/(1.82*log(Inner.HeatTransfer.Re(i))-1.64)^2;
620
621"Nusselt Number"
622        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);
623       
624        case "SiederTate":
625
626"Nusselt Number"
627        Inner.HeatTransfer.Nu(i) = 0.027*(Inner.HeatTransfer.PR(i))^(1/3)*(Inner.HeatTransfer.Re(i))^(4/5);
628
629"Inner Side Friction Factor for Heat Transfer - turbulent Flow"
630        Inner.HeatTransfer.fi(i)   = 1/(1.82*log(Inner.HeatTransfer.Re(i))-1.64)^2;
631       
632end
633       
634        when Inner.HeatTransfer.Re(i) < 10000 switchto "transition";
635       
636end
637
638end
639
640for i in [1:N]
641
642switch outerFlowRegime
643       
644        case "laminar":
645       
646"Outer Side Friction Factor for Heat Transfer - laminar Flow"
647        Outer.HeatTransfer.fi(i)   = 1/(0.79*ln(Outer.HeatTransfer.Re(i))-1.64)^2;
648       
649switch OuterLaminarCorrelation
650       
651        case "Hausen":
652
653"Nusselt Number"
654        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));
655       
656        case "Schlunder":
657
658"Nusselt Number"
659        Outer.HeatTransfer.Nu(i) = (49.027896+4.173281*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i)*(Outer.HeatTransfer.Dh/Lpipe))^(1/3);
660
661end
662       
663        when Outer.HeatTransfer.Re(i) > 2300 switchto "transition";
664       
665        case "transition":
666       
667switch OuterTransitionCorrelation
668       
669        case "Gnielinski":
670
671"Outer Side Friction Factor for Heat Transfer - transition Flow"
672        Outer.HeatTransfer.fi(i)   = 1/(0.79*ln(Outer.HeatTransfer.Re(i))-1.64)^2;
673
674"Nusselt Number"
675        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);
676
677        case "Hausen":
678
679"Nusselt Number"
680        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);
681
682
683"Outer Side Friction Factor for Heat Transfer - transition Flow"
684        Outer.HeatTransfer.fi(i)   = 1/(0.79*ln(Outer.HeatTransfer.Re(i))-1.64)^2;
685       
686end
687       
688        when Outer.HeatTransfer.Re(i) < 2300 switchto "laminar";
689        when Outer.HeatTransfer.Re(i) > 10000 switchto "turbulent";
690       
691        case "turbulent":
692       
693switch OuterTurbulentCorrelation
694       
695        case "Petukhov":
696
697"Outer Side Friction Factor for Heat Transfer - turbulent Flow"
698        Outer.HeatTransfer.fi(i)   = 1/(1.82*log(Outer.HeatTransfer.Re(i))-1.64)^2;
699       
700"Nusselt Number"
701        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);
702       
703        case "SiederTate":
704
705"Nusselt Number"
706        Outer.HeatTransfer.Nu(i) = 0.027*(Outer.HeatTransfer.PR(i))^(1/3)*(Outer.HeatTransfer.Re(i))^(4/5);
707
708"Outer Side Friction Factor for Heat Transfer - turbulent Flow"
709        Outer.HeatTransfer.fi(i)   = 1/(1.82*log(Outer.HeatTransfer.Re(i))-1.64)^2;
710       
711end
712
713        when Outer.HeatTransfer.Re(i) < 10000 switchto "transition";
714
715end
716
717end
718
719"Inner Pipe Film Coefficient"
720        Inner.HeatTransfer.hcoeff = (Inner.HeatTransfer.Nu*Inner.Properties.Average.K/DiInner)*Inner.HeatTransfer.Phi;
721
722"Outer Pipe Film Coefficient"
723        Outer.HeatTransfer.hcoeff= (Outer.HeatTransfer.Nu*Outer.Properties.Average.K/Outer.HeatTransfer.Dh)*Outer.HeatTransfer.Phi;
724
725"Outer Pipe Phi correction"
726        Outer.HeatTransfer.Phi = (Outer.Properties.Average.Mu/Outer.Properties.Wall.Mu)^0.14;
727       
728"Inner Pipe Phi correction"
729        Inner.HeatTransfer.Phi  = (Inner.Properties.Average.Mu/Inner.Properties.Wall.Mu)^0.14;
730
731"Outer Pipe Prandtl Number"
732        Outer.HeatTransfer.PR = ((Outer.Properties.Average.Cp/Outer.Properties.Average.Mw)*Outer.Properties.Average.Mu)/Outer.Properties.Average.K;
733
734"Inner Pipe Prandtl Number"
735        Inner.HeatTransfer.PR = ((Inner.Properties.Average.Cp/Inner.Properties.Average.Mw)*Inner.Properties.Average.Mu)/Inner.Properties.Average.K;
736
737"Outer Pipe Reynolds Number for Heat Transfer"
738        Outer.HeatTransfer.Re = (Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean*Outer.HeatTransfer.Dh)/Outer.Properties.Average.Mu;
739
740"Outer Pipe Reynolds Number for Pressure Drop"
741        Outer.PressureDrop.Re = (Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean*Outer.PressureDrop.Dh)/Outer.Properties.Average.Mu;
742
743"Inner Pipe Reynolds Number for Heat Transfer"
744        Inner.HeatTransfer.Re = (Inner.Properties.Average.rho*Inner.HeatTransfer.Vmean*Inner.HeatTransfer.Dh)/Inner.Properties.Average.Mu;
745
746"Inner Pipe Reynolds Number for Pressure Drop"
747        Inner.PressureDrop.Re = Inner.HeatTransfer.Re;
748
749"Outer Pipe Velocity"
750        Outer.HeatTransfer.Vmean*(Outer.HeatTransfer.As*Outer.Properties.Average.rho)  = Outer.Properties.Inlet.Fw;
751
752"Inner Pipe Velocity"
753        Inner.HeatTransfer.Vmean*(Inner.HeatTransfer.As*Inner.Properties.Average.rho)  = Inner.Properties.Inlet.Fw;
754
755"Overall Heat Transfer Coefficient Clean"
756        Details.Uc*((DoInner/(Inner.HeatTransfer.hcoeff*DiInner) )+(DoInner*ln(DoInner/DiInner)/(2*Kwall))+(1/(Outer.HeatTransfer.hcoeff)))=1;
757
758"Overall Heat Transfer Coefficient Dirty"
759        Details.Ud*(Rfi*(DoInner/DiInner) +  Rfo + (DoInner/(Inner.HeatTransfer.hcoeff*DiInner) )+(DoInner*ln(DoInner/DiInner)/(2*Kwall))+(1/(Outer.HeatTransfer.hcoeff)))=1;
760
761"Total Duty"
762        Details.Qtotal = sum(Details.Q);
763
764switch HotSide
765
766        case "outer":
767
768"Incremental Duty"
769        Details.Q = Details.Ud*Pi*DoInner*(Lpipe/N)*(Outer.Properties.Average.T - Inner.Properties.Average.T);
770
771        when InletInner.T > InletOuter.T switchto "inner";
772
773        case "inner":
774
775"Incremental Duty"
776        Details.Q = Details.Ud*Pi*DoInner*(Lpipe/N)*(Inner.Properties.Average.T - Outer.Properties.Average.T);
777
778        when InletInner.T < InletOuter.T switchto "outer";
779
780end
781
782for i in [2:N]
783
784"Incremental Enthalpy Inner Stream"
785        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);
786
787"Incremental Enthalpy Outer Stream"
788        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);
789
790end
791
792"Enthalpy of Inner Side - Inlet Boundary"
793        Inner.HeatTransfer.Enth(1) = InletInner.h;
794
795"Enthalpy of inner Side - Outlet Boundary"
796        Inner.HeatTransfer.Enth(Npoints) = OutletInner.h;
797
798"Temperature of Inner Side - Inlet Boundary"
799        Inner.HeatTransfer.Tlocal(1) = InletInner.T;
800
801"Temperature of Inner Side - Outlet Boundary"
802        Inner.HeatTransfer.Tlocal(Npoints) = OutletInner.T;
803
804"Pressure of Inner Side - Inlet Boundary"
805        Inner.PressureDrop.Plocal(1) = InletInner.P;
806
807"Pressure of Inner Side - Outlet Boundary"
808        Inner.PressureDrop.Plocal(Npoints) = OutletInner.P;
809
810switch FlowDirection
811
812        case "cocurrent":
813
814"Enthalpy of Outer Side - Inlet Boundary"
815        Outer.HeatTransfer.Enth(1) = InletOuter.h;
816
817"Enthalpy of Outer Side - Outlet Boundary"
818        Outer.HeatTransfer.Enth(Npoints) = OutletOuter.h;
819
820"Temperature of Outer Side - Inlet Boundary"
821        Outer.HeatTransfer.Tlocal(1) = InletOuter.T;
822
823"Temperature of Outer Side - Outlet Boundary"
824        Outer.HeatTransfer.Tlocal(Npoints) = OutletOuter.T;
825
826"Pressure of Outer Side - Inlet Boundary"
827        Outer.PressureDrop.Plocal(1) = InletOuter.P;
828
829"Pressure of Outer Side - Outlet Boundary"
830        Outer.PressureDrop.Plocal(Npoints) = OutletOuter.P;
831
832        case "counter":
833
834"Enthalpy of Outer Side - Inlet Boundary"
835        Outer.HeatTransfer.Enth(Npoints) = InletOuter.h;
836
837"Enthalpy of Outer Side - Outlet Boundary"
838        Outer.HeatTransfer.Enth(1) = OutletOuter.h;
839
840"Temperature of Outer Side - Inlet Boundary"
841        Outer.HeatTransfer.Tlocal(Npoints) = InletOuter.T;
842
843"Temperature of Outer Side - Outlet Boundary"
844        Outer.HeatTransfer.Tlocal(1) = OutletOuter.T;
845
846"Pressure of Outer Side - Inlet Boundary"
847        Outer.PressureDrop.Plocal(Npoints) = InletOuter.P;
848
849"Pressure of Outer Side - Outlet Boundary"
850        Outer.PressureDrop.Plocal(1) = OutletOuter.P;
851
852end
853
854switch FlowDirection
855
856        case "cocurrent":
857
858"Total Pressure Drop Outer Stream"
859        Outer.PressureDrop.Pdrop  = Outer.PressureDrop.Pd_fric(Npoints)+Outer.PressureDrop.Pdnozzle_in+Outer.PressureDrop.Pdnozzle_out;
860
861"Outer Pipe Pressure Drop for friction"
862        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);
863
864"Outer Pipe Pressure Drop for friction"
865        Outer.PressureDrop.Pd_fric(1) = 0*'kPa';
866
867for i in [1:N]
868   
869"Outer Pipe Local Pressure"# FIXME: NOZZLE PRESSURE DROP MUST BE ADDED
870        Outer.PressureDrop.Plocal(i+1) =        Outer.PressureDrop.Plocal(1) - Outer.PressureDrop.Pd_fric(i+1);
871
872end
873
874        case "counter":
875
876"Total Pressure Drop Outer Stream"
877        Outer.PressureDrop.Pdrop  = Outer.PressureDrop.Pd_fric(1)+Outer.PressureDrop.Pdnozzle_in+Outer.PressureDrop.Pdnozzle_out;
878
879
880for i in [1:N]
881
882"Outer Pipe Pressure Drop for friction"                 
883        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));
884
885end
886
887"Outer Pipe Pressure Drop for friction"
888        Outer.PressureDrop.Pd_fric(Npoints) = 0*'kPa';
889
890for i in [1:N]
891   
892"Outer Pipe Local Pressure"# FIXME: NOZZLE PRESSURE DROP MUST BE ADDED
893        Outer.PressureDrop.Plocal(i) =  Outer.PressureDrop.Plocal(Npoints) - Outer.PressureDrop.Pd_fric(i+1);
894
895end
896
897end
898
899"Total Pressure Drop Inner Stream"
900        Inner.PressureDrop.Pdrop  = Inner.PressureDrop.Pd_fric(Npoints)+Inner.PressureDrop.Pdnozzle_in+Inner.PressureDrop.Pdnozzle_out;
901       
902"Inner Pipe Pressure Drop for friction"
903        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);
904
905"Inner Pipe Pressure Drop for friction"
906        Inner.PressureDrop.Pd_fric(1) = 0*'kPa';
907
908for i in [1:N]
909
910"Inner Pipe Local Pressure"# FIXME: NOZZLE PRESSURE DROP MUST BE ADDED
911        Inner.PressureDrop.Plocal(i+1) =        Inner.PressureDrop.Plocal(1) - Inner.PressureDrop.Pd_fric(i+1);
912
913end
914
915
916"Velocity Inner Side Inlet Nozzle"
917        Inner.PressureDrop.Vnozzle_in   = Inner.Properties.Inlet.Fw/(Inner.Properties.Inlet.rho*(0.25*Pi*Dinozzle_Inner^2));
918
919"Velocity Inner Side Outlet Nozzle"
920        Inner.PressureDrop.Vnozzle_out  = Inner.Properties.Outlet.Fw/(Inner.Properties.Outlet.rho*(0.25*Pi*Donozzle_Inner^2));
921
922"Velocity Outer Side Inlet Nozzle"
923        Outer.PressureDrop.Vnozzle_in   = Outer.Properties.Inlet.Fw/(Outer.Properties.Inlet.rho*(0.25*Pi*Dinozzle_Outer^2));
924
925"Velocity Outer Side Outlet Nozzle"
926        Outer.PressureDrop.Vnozzle_out  = Outer.Properties.Outlet.Fw/(Outer.Properties.Outlet.rho*(0.25*Pi*Donozzle_Outer^2));
927
928"Pressure Drop Inner Side Inlet Nozzle"
929        Inner.PressureDrop.Pdnozzle_in  = 0.5*InnerKinlet*Inner.Properties.Inlet.rho*Inner.PressureDrop.Vnozzle_in^2;
930
931"Pressure Drop Inner Side Outlet Nozzle"
932        Inner.PressureDrop.Pdnozzle_out = 0.5*InnerKoutlet*Inner.Properties.Outlet.rho*Inner.PressureDrop.Vnozzle_out^2;
933
934"Pressure Drop Outer Side Inlet Nozzle"
935        Outer.PressureDrop.Pdnozzle_in  = 0.5*OuterKinlet*Outer.Properties.Inlet.rho*Outer.PressureDrop.Vnozzle_in^2;
936
937"Pressure Drop Outer Side Outlet Nozzle"
938        Outer.PressureDrop.Pdnozzle_out = 0.5*OuterKoutlet*Outer.Properties.Outlet.rho*Outer.PressureDrop.Vnozzle_out^2;
939
940"Inner Side Inlet Nozzle rho-V^2"
941        Inner.PressureDrop.RVsquare_in = Inner.Properties.Inlet.rho*(Inner.PressureDrop.Vnozzle_in)^2;
942
943"Inner Side Outlet Nozzle rho-V^2"
944        Inner.PressureDrop.RVsquare_out = Inner.Properties.Outlet.rho*(Inner.PressureDrop.Vnozzle_out)^2;
945
946"Outer Side Inlet Nozzle rho-V^2"
947        Outer.PressureDrop.RVsquare_in = Outer.Properties.Inlet.rho*(Outer.PressureDrop.Vnozzle_in)^2;
948
949"Outer Side Outlet Nozzle rho-V^2"
950        Outer.PressureDrop.RVsquare_out = Outer.Properties.Outlet.rho*(Outer.PressureDrop.Vnozzle_out)^2;
951
952end
Note: See TracBrowser for help on using the repository browser.