/[ascend]/trunk/models/kchittur/pg352version5.a4c
ViewVC logotype

Contents of /trunk/models/kchittur/pg352version5.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1631 - (show annotations) (download) (as text)
Sun Sep 30 23:37:48 2007 UTC (12 years, 6 months ago) by kchittur
File MIME type: text/x-ascend
File size: 918 byte(s)
Z
1 REQUIRE "atoms.a4l";
2
3 MODEL example101;
4
5 A1, B1, C1, A2, B2, C2 IS_A factor;
6 P1S, P2S, P IS_A pressure;
7 T IS_A temperature;
8 x1, x2, y1, y2 IS_A fraction;
9 T_degC IS_A factor;
10
11 P1S/1000.0{Pa} = exp(A1 - B1/(T/1.0{K} - 273.15 + C1));
12 P2S/1000.0{Pa} = exp(A2 - B2/(T/1.0{K} - 273.15 + C2));
13
14 x1 + x2 = 1.0;
15 y1 + y2 = 1.0;
16
17 x1*P1S = y1*P;
18 x2*P2S = y2*P;
19
20 T_degC = T/1{K} - 273.15;
21
22 METHODS
23 METHOD default_self;
24 END default_self;
25 METHOD values;
26 A1 := 14.2724; B1 := 2945.47; C1 := 224.0;
27 A2 := 14.2043; B2 := 2972.64; C2 := 209.0;
28 FIX A1; FIX B1; FIX C1; FIX A2; FIX B2; FIX C2;
29 END values;
30
31 METHOD parta;
32 FIX T; FIX x1;
33 x1 := 0.6;
34 T := 348.15 {K};
35 END parta;
36 METHOD partb;
37 FIX P; FIX x1;
38 x1 := 0.1;
39 P := 70.0 {kPa};
40 END partb;
41 METHOD doparta;
42 RUN ClearAll;
43 RUN values;
44 RUN parta;
45 END doparta;
46 METHOD dopartb;
47 RUN ClearAll;
48 RUN values;
49 RUN partb;
50 END dopartb;
51
52
53 END example101;

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