[83] | 1 | #*------------------------------------------------------------------- |
---|
| 2 | * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. |
---|
[1] | 3 | * |
---|
[83] | 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 model streams |
---|
| 17 | *-------------------------------------------------------------------- |
---|
| 18 | * |
---|
| 19 | * This sample file needs VRTherm DEMO (www.vrtech.com.br) to run. |
---|
| 20 | * |
---|
[1] | 21 | *---------------------------------------------------------------------- |
---|
| 22 | * Author: Rafael de Pelegrini Soares |
---|
| 23 | * $Id: sample_streams.mso 83 2006-12-08 20:29:34Z paula $ |
---|
| 24 | *--------------------------------------------------------------------*# |
---|
| 25 | |
---|
| 26 | using "streams"; |
---|
| 27 | |
---|
| 28 | FlowSheet SampleStreams |
---|
| 29 | PARAMETERS |
---|
| 30 | NComp as Integer(Default=5); |
---|
| 31 | |
---|
| 32 | DEVICES |
---|
| 33 | s1 as stream; |
---|
| 34 | |
---|
| 35 | SPECIFY |
---|
| 36 | s1.F = 10 * "kmol/h"; |
---|
| 37 | s1.T = 300 * "K"; |
---|
| 38 | s1.P = 1 * "atm"; |
---|
| 39 | s1.z = 1/NComp; |
---|
| 40 | s1.h = 5 * "J/kmol"; |
---|
| 41 | s1.v = 0.0; |
---|
| 42 | |
---|
| 43 | OPTIONS |
---|
| 44 | mode = "steady"; |
---|
| 45 | end |
---|
| 46 | |
---|
| 47 | FlowSheet SampleStreamsTherm |
---|
| 48 | PARAMETERS |
---|
| 49 | PP as CalcObject(Brief="Physical Properties", File="vrpp"); |
---|
| 50 | NComp as Integer; |
---|
| 51 | |
---|
| 52 | SET |
---|
[83] | 53 | PP.LiquidModel = "IdealLiquid"; |
---|
| 54 | PP.VapourModel = "Ideal"; |
---|
| 55 | PP.Components = [ "isobutane", "benzene", "ethanol" ]; |
---|
[1] | 56 | NComp = PP.NumberOfComponents; |
---|
| 57 | |
---|
| 58 | DEVICES |
---|
| 59 | sl as stream_therm; |
---|
| 60 | sv as stream_therm; |
---|
| 61 | |
---|
| 62 | SPECIFY |
---|
| 63 | sl.F = 10 * "kmol/h"; |
---|
| 64 | sl.T = 300 * "K"; |
---|
| 65 | sl.P = 100 * "kPa"; |
---|
| 66 | sl.z = [0.24596, 0.370278, 0.383762]; |
---|
| 67 | sl.v = 0.0; #liquid stream |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | sv.F = 10 * "kmol/h"; |
---|
| 71 | #sv.h = 20248 * "J/mol"; |
---|
| 72 | sv.T = 300 * "K"; |
---|
| 73 | sv.P = 100 * "kPa"; |
---|
| 74 | #sv.z = [0.824212, 0.12577, 0.0500176]; |
---|
| 75 | sv.v = 1.0; #vapor stream |
---|
| 76 | |
---|
[71] | 77 | EQUATIONS |
---|
[1] | 78 | "Liquid-Vapour equilibrium" |
---|
| 79 | PP.VapourFugacityCoefficient(sv.T, sv.P, sv.z) * sv.z = |
---|
| 80 | PP.LiquidFugacityCoefficient(sl.T, sl.P, sl.z) * sl.z; |
---|
| 81 | |
---|
| 82 | OPTIONS |
---|
| 83 | #mode = "steady"; |
---|
| 84 | end |
---|