source: trunk/sample/miscellaneous/Sample_Properties.mso

Last change on this file was 982, checked in by Argimiro Resende Secchi, 7 years ago
File size: 3.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*--------------------------------------------------------------------
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
26using "streams";
27
28Model Prop
29       
30VARIABLES
31
32Mu                      as viscosity    (Brief="Stream Viscosity");
33Cp                      as cp_mol               (Brief="Stream Molar Heat Capacity");
34K                       as conductivity (Brief="Stream Thermal Conductivity");
35rho                     as dens_mass    (Brief="Stream Density");       
36Fracao      as fraction     (Brief="Stream Fraction");
37
38end
39
40Model propriedades
41       
42PARAMETERS
43outer   NComp as Integer(Brief = "Number of chemical components", Lower = 1);
44outer   PP    as Plugin (Brief = "External Physical Properties",Type="PP");
45       
46VARIABLES
47M(NComp)        as molweight    (Brief="Component Mol Weight");
48Stream          as streamPH;
49PropLiquido as Prop;
50PropVapor   as Prop;
51
52EQUATIONS
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);
85end
86
87
88FlowSheet SampleStreams
89       
90PARAMETERS
91
92PP      as Plugin (Type ="PP", LiquidModel = "PR",VapourModel  = "PR",
93                                Components      = ["methanol"]);
94        NComp           as Integer;
95
96SET
97
98NComp                   = PP.NumberOfComponents;
99
100DEVICES
101
102Thermo as propriedades;
103
104SPECIFY
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
111OPTIONS
112
113        Dynamic = false;
114       
115end
Note: See TracBrowser for help on using the repository browser.