1 | #*------------------------------------------------------------------- |
---|
2 | * Model of a Batch Distillation (or Differential Distilation) |
---|
3 | *-------------------------------------------------------------------- |
---|
4 | * |
---|
5 | * Streams: |
---|
6 | * * a liquid inlet stream |
---|
7 | * * a vapour outlet stream |
---|
8 | * * a inlet stream |
---|
9 | * |
---|
10 | * Assumptions: |
---|
11 | * * perfect mixing of both phases |
---|
12 | * * thermodynamics equilibrium |
---|
13 | * * no liquid entrainment in the vapour stream |
---|
14 | * |
---|
15 | * Specify: |
---|
16 | * * the inlet stream |
---|
17 | * * the liquid inlet stream |
---|
18 | * * the molar flow of the vapour outlet stream |
---|
19 | * |
---|
20 | * Initial: |
---|
21 | * * the distillator temperature (T) |
---|
22 | * * the distillator liquid level (Ll) |
---|
23 | * * (NoComps - 1) compositions in the distillator |
---|
24 | * or in the OutletV |
---|
25 | * |
---|
26 | * |
---|
27 | *---------------------------------------------------------------------- |
---|
28 | * Author: Maurício Carvalho Maciel |
---|
29 | * $Id: batch_dist.mso 1 2006-06-20 17:33:53Z rafael $ |
---|
30 | *--------------------------------------------------------------------*# |
---|
31 | using "streams"; |
---|
32 | |
---|
33 | Model Diff_Dist |
---|
34 | |
---|
35 | PARAMETERS |
---|
36 | ext PP as CalcObject (Brief = "External Physical Properties"); |
---|
37 | ext NComp as Integer (Brief = "Number of chemical components", Lower = 1); |
---|
38 | Across as area (Brief="Cross Section Area"); |
---|
39 | V as volume (Brief="Total volume"); |
---|
40 | |
---|
41 | VARIABLES |
---|
42 | in Inlet as stream; #(Brief="Feed stream"); |
---|
43 | in InletL as stream; #(Brief="Liquid inlet stream"); |
---|
44 | out OutletV as stream_therm; #(Brief="Vapour outlet stream"); |
---|
45 | |
---|
46 | M(NComp) as mol (Brief="Molar Holdup in the distillator"); |
---|
47 | ML as mol (Brief="Molar liquid holdup"); |
---|
48 | MV as mol (Brief="Molar vapour holdup"); |
---|
49 | E as energy (Brief="Total Energy holdup on distillator"); |
---|
50 | volL as volume_mol (Brief="Liquid Molar Volume"); |
---|
51 | volV as volume_mol (Brief="Vapour Molar volume"); |
---|
52 | Level as length (Brief="Level of liquid phase", Default=1, Lower=0); |
---|
53 | T as temperature (Brief="Temperature on distillator"); |
---|
54 | P as pressure (Brief="Pressure on distillator"); |
---|
55 | x(NComp) as fraction (Brief = "Molar Fraction of the Liquid of the distillator"); |
---|
56 | h as enth_mol (Brief="Molar Enthalpy of the liquid of the distillator"); |
---|
57 | Q as heat_rate (Brief="Heat supplied"); |
---|
58 | |
---|
59 | EQUATIONS |
---|
60 | |
---|
61 | "Component Molar Balance" |
---|
62 | diff(M)= Inlet.F*Inlet.z + InletL.F*InletL.z - OutletV.F*OutletV.z; |
---|
63 | |
---|
64 | "Energy Balance" |
---|
65 | diff(E) = Inlet.F*Inlet.h + InletL.F*InletL.h - OutletV.F*OutletV.h + Q; |
---|
66 | |
---|
67 | "Molar Holdup" |
---|
68 | M = ML*x + MV*OutletV.z; |
---|
69 | |
---|
70 | "Energy Holdup" |
---|
71 | E = ML*h + MV*OutletV.h - P*V; |
---|
72 | |
---|
73 | "Mol fraction normalisation" |
---|
74 | sum(x)=1.0; |
---|
75 | sum(x)=sum(OutletV.z); |
---|
76 | |
---|
77 | "Liquid Volume" |
---|
78 | volL = PP.LiquidVolume(T, P, x); |
---|
79 | |
---|
80 | "Vapour Volume" |
---|
81 | volV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); |
---|
82 | |
---|
83 | "Chemical Equilibrium" |
---|
84 | PP.LiquidFugacityCoefficient(T, P, x)*x = |
---|
85 | PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z; |
---|
86 | |
---|
87 | "Mechanical Equilibrium" |
---|
88 | P = OutletV.P; |
---|
89 | |
---|
90 | "Thermal Equilibrium" |
---|
91 | T = OutletV.T; |
---|
92 | |
---|
93 | "Geometry Constraint" |
---|
94 | V = ML*volL + MV*volV; |
---|
95 | |
---|
96 | "Level of liquid phase" |
---|
97 | Level = ML*volL/Across; |
---|
98 | |
---|
99 | "vaporization fraction " |
---|
100 | OutletV.v = 1.0; |
---|
101 | |
---|
102 | "Enthalpy" |
---|
103 | h = PP.LiquidEnthalpy(T, P, x); |
---|
104 | |
---|
105 | end |
---|
106 | |
---|
107 | |
---|
108 | |
---|