1 | #*------------------------------------------------------------------- |
---|
2 | * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. |
---|
3 | * |
---|
4 | * This LIBRARY is free software; you can distribute it and/or modify |
---|
5 | * it under the therms of the ALSOC FREE LICENSE as available at |
---|
6 | * http://www.enq.ufrgs.br/alsoc. |
---|
7 | * |
---|
8 | * EMSO Copyright (C) 2004 - 2007 ALSOC, original code |
---|
9 | * from http://www.rps.eng.br Copyright (C) 2002-2004. |
---|
10 | * All rights reserved. |
---|
11 | * |
---|
12 | * EMSO is distributed under the therms of the ALSOC LICENSE as |
---|
13 | * available at http://www.enq.ufrgs.br/alsoc. |
---|
14 | * |
---|
15 | *-------------------------------------------------------------------- |
---|
16 | * Sample file for physical properties |
---|
17 | *-------------------------------------------------------------------- |
---|
18 | * |
---|
19 | * This sample file needs VRTherm DEMO (www.vrtech.com.br) to run. |
---|
20 | * |
---|
21 | *---------------------------------------------------------------------- |
---|
22 | * Author: Gerson B. Bicca |
---|
23 | * $Id: Sample_Properties.mso 89 2006-12-11 15:26:11Z paula $ |
---|
24 | *--------------------------------------------------------------------*# |
---|
25 | |
---|
26 | using "streams"; |
---|
27 | |
---|
28 | Model Prop |
---|
29 | |
---|
30 | VARIABLES |
---|
31 | |
---|
32 | Mu as viscosity (Brief="Stream Viscosity"); |
---|
33 | Cp as cp_mol (Brief="Stream Molar Heat Capacity"); |
---|
34 | K as conductivity (Brief="Stream Thermal Conductivity"); |
---|
35 | rho as dens_mass (Brief="Stream Density"); |
---|
36 | Fracao as fraction (Brief="Stream Fraction"); |
---|
37 | |
---|
38 | end |
---|
39 | |
---|
40 | Model propriedades |
---|
41 | |
---|
42 | PARAMETERS |
---|
43 | outer NComp as Integer(Brief = "Number of chemical components", Lower = 1); |
---|
44 | outer PP as Plugin (Brief = "External Physical Properties",Type="PP"); |
---|
45 | |
---|
46 | VARIABLES |
---|
47 | M(NComp) as molweight (Brief="Component Mol Weight"); |
---|
48 | Stream as streamPH; |
---|
49 | PropLiquido as Prop; |
---|
50 | PropVapor as Prop; |
---|
51 | |
---|
52 | EQUATIONS |
---|
53 | "Molecular Weight" |
---|
54 | M = PP.MolecularWeight(); |
---|
55 | |
---|
56 | "Liquid Heat Capacity" |
---|
57 | PropLiquido.Cp = PP.LiquidCp(Stream.T,Stream.P,Stream.z); |
---|
58 | |
---|
59 | "Vapour Heat Capacity" |
---|
60 | PropVapor.Cp = PP.VapourCp(Stream.T,Stream.P,Stream.z); |
---|
61 | |
---|
62 | "Liquid Mass Density" |
---|
63 | PropLiquido.rho = PP.LiquidDensity(Stream.T,Stream.P,Stream.z); |
---|
64 | |
---|
65 | "Vapour Mass Density" |
---|
66 | PropVapor.rho = PP.VapourDensity(Stream.T,Stream.P,Stream.z); |
---|
67 | |
---|
68 | "Liquid Viscosity" |
---|
69 | PropLiquido.Mu = PP.LiquidViscosity(Stream.T,Stream.P,Stream.z); |
---|
70 | |
---|
71 | "Vapour Viscosity" |
---|
72 | PropVapor.Mu = PP.VapourViscosity(Stream.T,Stream.P,Stream.z); |
---|
73 | |
---|
74 | "Liquid Conductivity" |
---|
75 | PropLiquido.K = PP.LiquidThermalConductivity(Stream.T,Stream.P,Stream.z); |
---|
76 | |
---|
77 | "Vapour Conductivity" |
---|
78 | PropVapor.K = PP.VapourThermalConductivity(Stream.T,Stream.P,Stream.z); |
---|
79 | |
---|
80 | "Liquid Fraction" |
---|
81 | PropLiquido.Fracao = 1-PP.VapourFraction(Stream.T,Stream.P,Stream.z); |
---|
82 | |
---|
83 | "Vapour Fraction" |
---|
84 | PropVapor.Fracao = PP.VapourFraction(Stream.T,Stream.P,Stream.z); |
---|
85 | end |
---|
86 | |
---|
87 | |
---|
88 | FlowSheet SampleStreams |
---|
89 | |
---|
90 | PARAMETERS |
---|
91 | |
---|
92 | PP as Plugin (Type ="PP", LiquidModel = "PR",VapourModel = "PR", |
---|
93 | Components = ["methanol"]); |
---|
94 | NComp as Integer; |
---|
95 | |
---|
96 | SET |
---|
97 | |
---|
98 | NComp = PP.NumberOfComponents; |
---|
99 | |
---|
100 | DEVICES |
---|
101 | |
---|
102 | Thermo as propriedades; |
---|
103 | |
---|
104 | SPECIFY |
---|
105 | |
---|
106 | Thermo.Stream.F = 10 * 'kmol/h'; |
---|
107 | Thermo.Stream.T = 300 * 'K'; |
---|
108 | Thermo.Stream.P = 100 * 'kPa'; |
---|
109 | Thermo.Stream.z = [1]; |
---|
110 | |
---|
111 | OPTIONS |
---|
112 | |
---|
113 | Dynamic = false; |
---|
114 | |
---|
115 | end |
---|