source: branches/gui/eml/streams.mso @ 739

Last change on this file since 739 was 739, checked in by gerson bicca, 13 years ago

updates (changes in icons/models/samples)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 17.7 KB
RevLine 
[79]1#*-------------------------------------------------------------------
2* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
[1]3*
[79]4* This LIBRARY is free software; you can distribute it and/or modify
5* it under the therms of the ALSOC FREE LICENSE as available at
6* http://www.enq.ufrgs.br/alsoc.
7*
8* EMSO Copyright (C) 2004 - 2007 ALSOC, original code
9* from http://www.rps.eng.br Copyright (C) 2002-2004.
10* All rights reserved.
11*
12* EMSO is distributed under the therms of the ALSOC LICENSE as
13* available at http://www.enq.ufrgs.br/alsoc.
14*
15*--------------------------------------------------------------------
16* Model of basic streams
[1]17*----------------------------------------------------------------------
[79]18* Author: Paula B. Staudt and Rafael de P. Soares
[1]19* $Id: streams.mso 739 2009-02-27 22:18:32Z bicca $
20*---------------------------------------------------------------------*#
21
22using "types";
23
24Model stream
[117]25        ATTRIBUTES
26        Pallete = false;
27        Brief = "General Material Stream";
[123]28        Info =
[117]29        "This is the basic building block for the EML models.
30        Every model should have input and output streams derived
31        from this model.";
32       
[1]33        PARAMETERS
[117]34        outer NComp as Integer (Brief = "Number of chemical components", Lower = 1);
[1]35
36        VARIABLES
[346]37        F as flow_mol                   (Brief = "Stream Molar Flow Rate");
38        T as temperature                (Brief = "Stream Temperature");
39        P as pressure                   (Brief = "Stream Pressure");
40        h as enth_mol                   (Brief = "Stream Enthalpy");
41        v as fraction                   (Brief = "Vapourization fraction");
[523]42        z(NComp) as fraction    (Brief = "Stream Molar Fraction");
[1]43end
44
[117]45Model liquid_stream as stream
46        ATTRIBUTES
47        Pallete = false;
48        Brief = "Liquid Material Stream";
[123]49        Info =
[117]50        "Model for liquid material streams.
51        This model should be used only when the phase of the stream
52        is known ''a priori''.";
53
[1]54        PARAMETERS
[117]55        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
[1]56       
57        EQUATIONS
[117]58        "Liquid Enthalpy"
59        h = PP.LiquidEnthalpy(T, P, z);
60        "Liquid stream"
61        v = 0;
[1]62end
63
[117]64Model vapour_stream as stream
65        ATTRIBUTES
66        Pallete = false;
67        Brief = "Vapour Material Stream";
[123]68        Info =
[117]69        "Model for vapour material streams.
70        This model should be used only when the phase of the stream
71        is known ''a priori''.";
72
[1]73        PARAMETERS
[117]74        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
[1]75       
76        EQUATIONS
[117]77        "Vapour Enthalpy"
78        h = PP.VapourEnthalpy(T, P, z);
79        "Vapour stream"
80        v = 1;
[1]81end
82
[125]83Model streamPH as stream
[298]84        ATTRIBUTES
85        Brief = "Stream with built-in flash calculation";
86        Info = "
87        This model should be used when the vaporization fraction
88        is unknown.
89       
90        The built-in flash calculation will determine the stream
91        state as a function of the overall composition '''z''', the
92        pressure '''P''' and the enthalpy '''h'''.
93       
94        Additionally, the liquid composition '''x''' and the vapor
95        composition '''y''' are calculated.     
96        ";
97        Pallete = false;
98       
[125]99        PARAMETERS
100        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
101       
102        VARIABLES
[551]103        x(NComp) as fraction    (Brief = "Liquid Molar Fraction",Hidden=true);
104        y(NComp) as fraction    (Brief = "Vapour Molar Fraction",Hidden=true);
[346]105
[125]106        EQUATIONS
107        "Flash Calculation"
108        [v, x, y] = PP.FlashPH(P, h, z);
[346]109       
[125]110        "Enthalpy"
[584]111        h = (1-v)*PP.LiquidEnthalpy(T, P, x) + v*PP.VapourEnthalpy(T, P, y);
[346]112       
[125]113end
114
[562]115Model streamPHS as streamPH
116        ATTRIBUTES
117        Brief = "Stream with built-in flash calculation";
118        Info = "
119        This model should be used when the vaporization fraction
120        is unknown.
121       
122        The built-in flash calculation will determine the stream
123        state as a function of the overall composition '''z''', the
124        pressure '''P''' and the enthalpy '''h'''.
125       
[578]126        Additionally, the liquid composition '''x''', the vapor
127        composition '''y''' and the stream entropy are calculated.     
[562]128        ";
129        Pallete = false;
130       
131PARAMETERS
132        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
133       
134VARIABLES
135        s as entr_mol   (Brief = "Stream Entropy");
136
137EQUATIONS
138
139"Entropy"
140        s = (1-v)*PP.LiquidEntropy(T, P, x) +   v*PP.VapourEntropy(T, P, y);
141       
142end
143
[117]144Model sink
145        ATTRIBUTES
[321]146        Pallete = true;
[310]147        Icon = "icon/Sink";
[290]148        Brief = "Material stream sink";
149        Info = "
150        This model should be used for boundary streams when additional
151        information about the stream is desired.
[117]152
[290]153        Some of the additional informations calculated by this models are:
154         * Mass density
155         * Mass flow
156         * Mass compostions
157         * Specific volume
158         * Vapour fraction
159         * Volumetric flow
160         * Liquid and Vapour compositions
161        ";
162
[117]163        PARAMETERS
[147]164        outer PP                        as Plugin               (Brief = "External Physical Properties", Type="PP");
165        outer NComp             as Integer              (Brief = "Number of chemical components", Lower = 1);
[297]166                  M(NComp)      as molweight    (Brief = "Component Mol Weight");
[117]167       
[147]168        SET
169
170        M   = PP.MolecularWeight();
171       
[117]172        VARIABLES
[584]173        in Inlet                as stream               (Brief = "Inlet Stream", PosX=0, PosY=0.5308, Protected=true,Symbol="_{in}");
174        v                               as fraction             (Brief = "Vapourization fraction",Hidden=true);
[551]175        x(NComp)                as fraction             (Brief = "Liquid Molar Fraction",Hidden=true);
176        y(NComp)                as fraction             (Brief = "Vapour Molar Fraction",Hidden=true);
[297]177        zmass(NComp)    as fraction             (Brief = "Mass Fraction");
178        Mw                              as molweight    (Brief = "Average Mol Weight");
179        vm                              as volume_mol   (Brief = "Molar Volume");       
180        rho                             as dens_mass    (Brief = "Stream Mass Density");
181        rhom                    as dens_mol             (Brief = "Stream Molar Density");
182        Fw                              as flow_mass    (Brief = "Stream Mass Flow");
183        Fvol            as flow_vol     (Brief = "Volumetric Flow");
[501]184        T_Cdeg                  as temperature  (Brief = "Temperature in °C", Lower=-200);
[346]185
[117]186        EQUATIONS
187        "Flash Calculation"
[123]188        [v, x, y] = PP.FlashPH(Inlet.P, Inlet.h, Inlet.z);
[147]189       
190        "Average Molecular Weight"
191        Mw = sum(M*Inlet.z);
192
[297]193        "Molar Density"
194                rhom * vm = 1;
195               
196        "Mass or Molar Density"
197        rhom * Mw = rho;
[147]198
199        "Flow Mass"
200        Fw      =  Mw*Inlet.F;
201
202        "Molar Volume"
203        vm = (1-v)*PP.LiquidVolume(Inlet.T, Inlet.P, x) + v*PP.VapourVolume(Inlet.T,Inlet.P,y);
204       
205        "Volumetric Flow"
206        Fvol = Inlet.F*vm ;
207       
208        "Mass Fraction"
209        zmass = M*Inlet.z / Mw;
210       
[501]211        "Temperature in °C"
212        T_Cdeg = Inlet.T - 273.15 * 'K';
213
[117]214end
[299]215
[311]216Model simple_sink
217        ATTRIBUTES
[321]218        Pallete = true;
[311]219        Icon = "icon/Sink";
220        Brief = "Simple material stream sink";
221        Info = "
222        This model should be used for boundary streams when no additional
223        information about the stream is desired.
224        ";
225       
226        VARIABLES
[584]227        in Inlet                as stream       (Brief = "Inlet Stream", PosX=0, PosY=0.5308, Protected=true,Symbol="_{in}");
[311]228end
229
[299]230Model energy_source
231        ATTRIBUTES
[321]232        Pallete = true;
[310]233        Icon = "icon/energy_source";
[562]234        Brief = "Energy stream source";
[299]235
236        VARIABLES
[739]237        out OutletQ             as power(Brief = "Outlet energy stream", PosX=1, PosY=0.40, Symbol="_{out}");
[594]238
[299]239end
[569]240
[594]241Model work_source
242        ATTRIBUTES
243        Pallete = true;
244        Icon = "icon/work_source";
245        Brief = "Work stream source";
246
247        VARIABLES
248        out Work                as power(Brief = "Outlet work stream", PosX=1, PosY=0.46, Symbol="_{out}");
249
250end
251
[569]252Model info_stream
253        ATTRIBUTES
254        Pallete = true;
255        Icon = "icon/Info_Stream";
256        Brief = "Material stream information";
257        Info = "
258        This model should be used for middle streams when additional
259        information about the stream is desired.
260
261        Some of the additional informations calculated by this models are:
262         * Mass density
263         * Mass flow
264         * Mass compostions
265         * Specific volume
266         * Vapour fraction
267         * Volumetric flow
268         * Liquid and Vapour compositions
269         * Viscosity
270         * Heat Capacity
271         * Thermal Conductivity
272         * Temperature in Celsius Degrees
273        ";
274
275PARAMETERS
276        outer PP                        as Plugin                       (Brief = "External Physical Properties", Type="PP");
277        outer NComp     as Integer                      (Brief = "Number of chemical components", Lower = 1);
278                  M(NComp)      as molweight    (Brief = "Component Mol Weight");
279       
280SET
281
282        M   = PP.MolecularWeight();
283       
284VARIABLES
285
[739]286        in      Inlet           as stream               (Brief = "Inlet Stream", PosX=0, PosY=0.50, Protected=true , Symbol="_{in}");
287        out     Outlet          as stream               (Brief = "Outlet Stream", PosX=1, PosY=0.50, Protected=true , Symbol="_{out}");
[569]288       
289        v                                               as fraction                     (Brief = "Vapourization fraction",Hidden=true);
290        x(NComp)                        as fraction                     (Brief = "Liquid Molar Fraction",Hidden=true);
291        y(NComp)                        as fraction                     (Brief = "Vapour Molar Fraction",Hidden=true);
292       
[739]293        F(NComp)        as flow_mol             (Brief = "Component Molar Flow",Protected=true);
294        FwTotal         as flow_mass            (Brief = "Total Mass Flow",Protected=true);
295        Fw(NComp)               as flow_mass            (Brief = "Component Mass Flow",Protected=true);
296        FvolTotal           as flow_vol         (Brief = "Total Volumetric Flow",Protected=true);
[569]297        T_Cdeg                          as temperature          (Brief = "Temperature in °C", Lower=-200,Protected=true);
298
299        Mu                                      as viscosity            (Brief="Stream Viscosity",Lower=0.0001, Symbol = "\mu",Protected=true);
300        Cp                                      as cp_mol                       (Brief="Stream Molar Heat Capacity", Upper=1e10,Protected=true);       
301        K                                               as conductivity         (Brief="Stream Thermal Conductivity", Default=1.0, Lower=1e-5, Upper=500,Protected=true);
302        Mw                                      as molweight            (Brief = "Average Mol Weight",Protected=true);
303        vm                                      as volume_mol   (Brief = "Molar Volume",Protected=true);       
304        rho                                     as dens_mass            (Brief = "Stream Mass Density",Protected=true);
305        rhom                                    as dens_mol             (Brief = "Stream Molar Density",Protected=true);
306        s                                               as entr_mol             (Brief = "Stream Entropy",Protected=true);
307        zmass(NComp)    as fraction                     (Brief = "Mass Fraction",Protected=true);
308       
309EQUATIONS
310
311"Flash Calculation"
312        [v, x, y] = PP.FlashPH(Inlet.P, Inlet.h, Inlet.z);
313       
314"Average Molecular Weight"
315        Mw = sum(M*Inlet.z);
316
317"Mass Density"
318        rho * ((1-v)/PP.LiquidDensity(Inlet.T,Inlet.P,x) + v/PP.VapourDensity(Inlet.T,Inlet.P,y)) = 1;
319       
320"Mass or Molar Density"
321        rhom * Mw = rho;
322
[739]323"Total Flow Mass"
324        FwTotal =  Mw*Inlet.F;
[569]325
[739]326"Component Flow Mass"
327        Fw      =  FwTotal*zmass;
328
[569]329"Molar Volume"
330        vm = (1-v)*PP.LiquidVolume(Inlet.T, Inlet.P, x) + v*PP.VapourVolume(Inlet.T,Inlet.P,y);
331       
[739]332"Total Volumetric Flow"
333        FvolTotal = Inlet.F*vm ;
[569]334       
335"Mass Fraction"
336        zmass = M*Inlet.z / Mw;
337
338"Stream Heat Capacity"
339        Cp      =       (1-v)*PP.LiquidCp(Inlet.T, Inlet.P, x) + v*PP.VapourCp(Inlet.T,Inlet.P,y);
340
341"Stream Viscosity"
342        Mu      =       (1-v)*PP.LiquidViscosity(Inlet.T, Inlet.P, x) + v*PP.VapourViscosity(Inlet.T,Inlet.P,y);
343
344"Stream ThermalConductivity"
345        K       =       (1-v)*PP.LiquidThermalConductivity(Inlet.T, Inlet.P, x) + v*PP.VapourThermalConductivity(Inlet.T,Inlet.P,y);
346
347"Stream Overall Entropy"
348        s = (1-v)*PP.LiquidEntropy(Inlet.T, Inlet.P, x) + v*PP.VapourEntropy(Inlet.T, Inlet.P, y);
349       
350"Temperature in °C"
351        T_Cdeg = Inlet.T - 273.15 * 'K';
352
353"Outlet Flow"
354        Outlet.F = Inlet.F;
355
[739]356"Component Molar Flow"
357        F = Inlet.F*Inlet.z;
358
[569]359"Outlet Temperature"
360        Outlet.T = Inlet.T;
361
362"Outlet Pressure"
363        Outlet.P = Inlet.P;
364
365"Outlet Vapour Fraction"
366        Outlet.v = Inlet.v;
367
368"Outlet Enthalpy"
369        Outlet.h = Inlet.h;
370
371"Outlet Composition"
372        Outlet.z= Inlet.z;
373
374end
[571]375
[578]376Model source
[571]377
[576]378ATTRIBUTES
[571]379        Pallete = true;
380        Icon = "icon/Source";
381        Brief = "Material stream source";
382        Info = "
383        This model should be used for boundary streams.
384        Usually these streams are known and come from another process
385        units.
386
387        The user should specify:
388         * Total molar (mass or volumetric) flow
389         * Temperature
390         * Pressure
[576]391         * Molar or mass composition
[571]392       
393        No matter the specification set, the model will calculate some
394        additional properties:
395         * Mass density
396         * Mass flow
397         * Mass compostions
398         * Specific volume
399         * Vapour fraction
400         * Volumetric flow
401         * Liquid and Vapour compositions
402        ";
403
[576]404PARAMETERS
405        outer PP                                                as Plugin                       (Brief = "External Physical Properties", Type="PP");
406        outer NComp                             as Integer                      (Brief = "Number of chemical components", Lower = 1);
407                  M(NComp)                              as molweight    (Brief = "Component Mol Weight");
[585]408                  CompositionBasis              as Switcher             (Brief = "Molar or Mass Composition", Valid = ["Molar", "Mass"], Default="Molar");
[577]409                  ValidPhases                           as Switcher             (Brief = "Valid Phases for Flash Calculation", Valid = ["Vapour-Only", "Liquid-Only","Vapour-Liquid"], Default="Vapour-Liquid");
[571]410       
411
[576]412SET
413
[571]414        M   = PP.MolecularWeight();
415
[576]416VARIABLES
417
[584]418        out Outlet                      as stream                       (Brief = "Outlet stream", PosX=1, PosY=0.5256, Symbol="_{out}",Protected=true);
[576]419       
420        Composition(NComp) as fraction                  (Brief = "Stream Composition");
[694]421        SumOfComposition as positive                    (Brief = "Sum of Stream Composition",Protected=true);
[576]422        F                                                               as flow_mol             (Brief = "Stream Molar Flow Rate");
423        Fw                                                      as flow_mass            (Brief = "Stream Mass Flow");
424        Fvol                                    as flow_vol        (Brief = "Volumetric Flow");
425        T                                                               as temperature  (Brief = "Stream Temperature");
426        T_Cdeg                                          as temperature  (Brief = "Temperature in °C", Lower=-200);
427        P                                                               as pressure             (Brief = "Stream Pressure");
428       
[571]429        x(NComp)                        as fraction                     (Brief = "Liquid Molar Fraction",Hidden=true);
430        y(NComp)                        as fraction                     (Brief = "Vapour Molar Fraction",Hidden=true);
431       
[576]432        Mw                                              as molweight                    (Brief = "Average Mol Weight",Protected=true);
433        vm                                              as volume_mol           (Brief = "Molar Volume",Protected=true);       
434        rho                                             as dens_mass                    (Brief = "Stream Mass Density",Protected=true);
435        rhom                                            as dens_mol                     (Brief = "Stream Molar Density",Protected=true);
436       
437        zmass(NComp)            as fraction                             (Brief = "Mass Fraction",Protected=true);
438       
[571]439        EQUATIONS
440
[585]441switch CompositionBasis
[571]442
443        case "Molar":
444"Stream Molar Composition"
445        Outlet.z = Composition/sum(Composition);
446
447"Stream Mass Composition"
448        zmass = M*Outlet.z / Mw;
449
450        case "Mass":
451"Stream Mass Composition"
452        zmass = Composition/sum(Composition);
453
454"Stream Molar Composition"
[575]455        Outlet.z*sum(zmass/M) = zmass/M;
[571]456
457end
458
[577]459switch ValidPhases
[575]460       
[577]461        case "Liquid-Only":
462
463"Vapour Fraction"
464        Outlet.v = 0;
465
466"Liquid Composition"
467        x = Outlet.z;
468
469"Vapour Composition"
470        y = Outlet.z;
471
472"Overall Enthalpy"
473        Outlet.h = PP.LiquidEnthalpy(Outlet.T, Outlet.P, x);
474
475"Molar Volume"
476        vm = PP.LiquidVolume(Outlet.T, Outlet.P, x);
477
478        case "Vapour-Only":
479
480"Vapor Fraction"
481        Outlet.v = 1;
482
483"Liquid Composition"
484        x = Outlet.z;
485
486"Vapour Composition"
487        y = Outlet.z;
488
489"Overall Enthalpy"
490        Outlet.h = PP.VapourEnthalpy(Outlet.T, Outlet.P, y);
491
492"Molar Volume"
493        vm = PP.VapourVolume(Outlet.T, Outlet.P, y);
494
495
496        case "Vapour-Liquid":
497
[576]498"Flash Calculation"
[571]499        [Outlet.v, x, y] = PP.Flash(Outlet.T, Outlet.P, Outlet.z);
500
[576]501"Overall Enthalpy"
502        Outlet.h = (1-Outlet.v)*PP.LiquidEnthalpy(Outlet.T, Outlet.P, x) + Outlet.v*PP.VapourEnthalpy(Outlet.T, Outlet.P, y);
[571]503
[577]504"Molar Volume"
505        vm = (1-Outlet.v)*PP.LiquidVolume(Outlet.T, Outlet.P, x) + Outlet.v*PP.VapourVolume(Outlet.T,Outlet.P,y);
[571]506
[577]507end
508
[694]509"Sum of Composition"
510        SumOfComposition = sum(Composition);
511
[576]512"Molar Density"
[577]513        rhom * vm = 1;
514
515"Average Molecular Weight"
516        Mw = sum(M*Outlet.z);
517
[576]518"Mass or Molar Density"
[571]519        rhom * Mw = rho;
520
[576]521"Flow Mass"
[571]522        Fw      =  Mw*Outlet.F;
523
[576]524"Volumetric Flow"
[571]525        Fvol = Outlet.F*vm ;
526       
[576]527"Temperature in °C"
[571]528        T_Cdeg = Outlet.T - 273.15 * 'K';
529
[576]530"Equate Flow"
531        Outlet.F = F;
532
533"Equate Pressures"
534        Outlet.P = P;
535
536"Equate Temperatures"
537        Outlet.T = T;
538
[571]539end
[579]540
541Model simple_source
542
543ATTRIBUTES
544        Pallete = true;
545        Icon = "icon/Source";
546        Brief = "Simple Material stream source";
547        Info = "
548        This model should be used for boundary streams.
549        Usually these streams are known and come from another process
550        units.
551
552        The user should specify:
553         * Total molar flow
554         * Temperature
555         * Pressure
556         * Molar composition
557";
558
559PARAMETERS
560        outer PP                                                as Plugin                       (Brief = "External Physical Properties", Type="PP");
561        outer NComp                             as Integer                      (Brief = "Number of chemical components", Lower = 1);
562                  M(NComp)                              as molweight    (Brief = "Component Mol Weight");
563                  ValidPhases                           as Switcher             (Brief = "Valid Phases for Flash Calculation", Valid = ["Vapour-Only", "Liquid-Only","Vapour-Liquid"], Default="Vapour-Liquid");
564       
565
566SET
567
568        M   = PP.MolecularWeight();
569
570VARIABLES
571
[584]572        out Outlet                      as stream                       (Brief = "Outlet stream", PosX=1, PosY=0.5256, Symbol="_{out}",Protected=true);
[579]573       
574        MolarComposition(NComp) as fraction                     (Brief = "Stream Molar Composition");
[694]575        SumOfComposition as positive                    (Brief = "Sum of Stream Composition",Protected=true);
[579]576        F                                                               as flow_mol             (Brief = "Stream Molar Flow Rate");
577        T                                                               as temperature  (Brief = "Stream Temperature");
578        T_Cdeg                                          as temperature  (Brief = "Temperature in °C", Lower=-200);
579        P                                                               as pressure             (Brief = "Stream Pressure");
580       
581        x(NComp)                        as fraction                     (Brief = "Liquid Molar Fraction",Hidden=true);
582        y(NComp)                        as fraction                     (Brief = "Vapour Molar Fraction",Hidden=true);
583       
584
585EQUATIONS
586
[694]587"Sum of Composition"
588        SumOfComposition = sum(MolarComposition);
589       
[579]590"Stream Molar Composition"
591        Outlet.z = MolarComposition/sum(MolarComposition);
592
593
594switch ValidPhases
595       
596        case "Liquid-Only":
597
598"Vapour Fraction"
599        Outlet.v = 0;
600
601"Liquid Composition"
602        x = Outlet.z;
603
604"Vapour Composition"
605        y = Outlet.z;
606
607"Overall Enthalpy"
608        Outlet.h = PP.LiquidEnthalpy(Outlet.T, Outlet.P, x);
609
610
611        case "Vapour-Only":
612
613"Vapor Fraction"
614        Outlet.v = 1;
615
616"Liquid Composition"
617        x = Outlet.z;
618
619"Vapour Composition"
620        y = Outlet.z;
621
622"Overall Enthalpy"
623        Outlet.h = PP.VapourEnthalpy(Outlet.T, Outlet.P, y);
624
625
626        case "Vapour-Liquid":
627
628"Flash Calculation"
629        [Outlet.v, x, y] = PP.Flash(Outlet.T, Outlet.P, Outlet.z);
630
631"Overall Enthalpy"
632        Outlet.h = (1-Outlet.v)*PP.LiquidEnthalpy(Outlet.T, Outlet.P, x) + Outlet.v*PP.VapourEnthalpy(Outlet.T, Outlet.P, y);
633
634
635end
636
637"Temperature in °C"
638        T_Cdeg = Outlet.T - 273.15 * 'K';
639
640"Equate Flow"
641        Outlet.F = F;
642
643"Equate Pressures"
644        Outlet.P = P;
645
646"Equate Temperatures"
647        Outlet.T = T;
648
649end
[641]650
651Model sourceNoFlow
652
653ATTRIBUTES
654        Pallete = true;
655        Icon = "icon/SourceNoFlow";
656        Brief = "Simple Material stream source with no flow.";
657        Info = "
658        This model should be used for boundary streams.
659        Usually these streams are known and come from another process
660        units.";
661
662PARAMETERS
663        outer PP                                as Plugin                       (Brief = "External Physical Properties", Type="PP");
664        outer NComp             as Integer                      (Brief = "Number of chemical components", Lower = 1);
665
666VARIABLES
667
668        out Outlet                      as stream                       (Brief = "Outlet stream", PosX=1, PosY=0.5256, Symbol="_{out}",Protected=true);
669
670EQUATIONS
671
672"Stream Molar Composition"
673        Outlet.z = 1/NComp;
674
675"Stream Molar Enthalpy"
676        Outlet.h = 0 * 'J/mol';
677
678"Stream Temperature"
679        Outlet.T = 300 * 'K';
680
681"Stream Molar Flow"
682        Outlet.F = 0 * 'kmol/h';
683
684"Stream Pressure"
685        Outlet.P = 1 * 'atm';
686
687"Stream Vapour Fraction"
688        Outlet.v = 0;
689
690end
[672]691
692Model sinkNoFlow
693        ATTRIBUTES
694        Pallete = true;
[683]695        Icon = "icon/SinkNoFlow";
[672]696        Brief = "Simple material stream sink";
697        Info = "
698        This model should be used for seal an outlet material stream port.
699        ";
700       
701        VARIABLES
702        in Inlet                as stream       (Brief = "Inlet Stream", PosX=0, PosY=0.5308, Protected=true,Symbol="_{in}");
703
704EQUATIONS
705"Stream Molar Flow"
706        Inlet.F = 0 * 'kmol/h';
707       
708end
Note: See TracBrowser for help on using the repository browser.