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

Contents of /trunk/models/kchittur/pg352version4.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, 9 months ago) by kchittur
File MIME type: text/x-ascend
File size: 875 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
10 P1S/100000.0{Pa} = exp(A1 - B1/(T/1.0{K} - 273.15 + C1));
11 P2S/100000.0{Pa} = exp(A2 - B2/(T/1.0{K} - 273.15 + C2));
12
13 x1 + x2 = 1.0;
14 y1 + y2 = 1.0;
15
16 x1*P1S = y1*P;
17 x2*P2S = y2*P;
18
19 METHODS
20 METHOD default_self;
21 END default_self;
22 METHOD values;
23 A1 := 14.2724; B1 := 2945.47; C1 := 224.0;
24 A2 := 14.2043; B2 := 2972.64; C2 := 209.0;
25 FIX A1; FIX B1; FIX C1; FIX A2; FIX B2; FIX C2;
26 END values;
27
28 METHOD parta;
29 FIX T; FIX x1;
30 x1 := 0.6;
31 T := 348.15 {K};
32 END parta;
33 METHOD partb;
34 FIX P; FIX x1;
35 x1 := 0.1;
36 P := 70.0 {kPa};
37 END partb;
38 METHOD doparta;
39 RUN ClearAll;
40 RUN values;
41 RUN parta;
42 END doparta;
43 METHOD dopartb;
44 RUN ClearAll;
45 RUN values;
46 RUN partb;
47 END dopartb;
48
49
50 END example101;

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