/[ascend]/trunk/models/collapsingcan.a4c
ViewVC logotype

Contents of /trunk/models/collapsingcan.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1155 - (show annotations) (download) (as text)
Tue Jan 16 11:33:52 2007 UTC (17 years, 5 months ago) by johnpye
File MIME type: text/x-ascend
File size: 2229 byte(s)
More tidying up of old models. Will add roots_of_poly to the list.
1 REQUIRE "atoms.a4l";
2 REQUIRE "johnpye/thermo_types.a4c";
3
4 (*
5 Solution the Horwitz A, "The Case of the Collapsing Can", Chemical
6 Engineering Progress, Jun 1997, pp.61-65.
7
8 "A fixed-volume vessel contains one pound of saturated water vapor at 14.7
9 psia. One pound of water at 70 deg F and 14.7 psia is introduced
10 into the vessel. Assuming the entire process is adiabatic (no heat loss to
11 the surroundings), find the amount of liquid and vapor present in the
12 vessel, and the temperature and pressure in the vessel."
13
14 Model file created by John Pye, Jan 2007.
15 *)
16 MODEL collapsingcan;
17 (* Although these variables are dimensional, the way that the correlation
18 equations in the paper are writtem make it simplest to express this model
19 in non-dimensional terms *)
20 x IS_A solver_var; (* lb *)
21 y IS_A solver_var; (* lb *)
22 sv IS_A solver_var; (* ft^3 *)
23 ul IS_A solver_var; (* Btu/lb *)
24 uv IS_A solver_var; (* Btu/lb *)
25 p IS_A solver_var; (* psia *)
26 T IS_A solver_var; (* deg F *)
27
28 x * 0.016 + y * sv = 26.8; (* final volume = initial volume *)
29 x + y = 2.0; (* mass balance *)
30
31 (* The following curves were based on regression-fits to Keenen and Keyes
32 steam tables performed by the author specifically for the purpose of
33 solving this problem *)
34 38.2 + 1077 = ul * x + uv * y; (* internal energy balance *)
35 sv = 90.6607 -7.109 * p + 0.18803 * p^2; (* sv as fn of pressure *)
36 ul = 101.4992 + 7.2929 * p - 0.13267 * p^2; (* ul as fn of pressure *)
37 uv = 1060.0 + 1.25965 * p - 0.00535 * p^2; (* uv as fn of pressure *)
38 T = 133.65 + 7.2905 * p - 0.13339 * p^2; (* temperature as fn of pressure *)
39
40 METHODS
41
42 METHOD on_load;
43 RUN ClearAll;
44 END on_load;
45
46 METHOD self_test;
47 (* The following results use the solution values as published in the
48 original paper. Note that this model is tested regularly as part of the
49 ASCEND automated test suite, 'test.py'. *)
50 ASSERT abs(x - 1.1453809) < 0.0000002;
51 ASSERT abs(y - 0.85461909) < 0.00000002;
52 ASSERT abs(sv- 31.337556) < 0.000002;
53 ASSERT abs(ul- 171.66791) < 0.00002;
54 ASSERT abs(uv- 1074.8354) < 0.0002;
55 ASSERT abs(p - 12.434039) < 0.000002;
56 ASSERT abs(T - 203.67756) < 0.00002;
57 END self_test;
58
59 END collapsingcan;
60 (* :ex: set ts=4: *)

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22