/[ascend]/trunk/models/johnpye/fprops/fprops_sat_test.a4c
ViewVC logotype

Contents of /trunk/models/johnpye/fprops/fprops_sat_test.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2125 - (show annotations) (download) (as text)
Tue Dec 15 08:35:38 2009 UTC (10 years ago) by jpye
File MIME type: text/x-ascend
File size: 1031 byte(s)
Test file for solving phase criterion using QRSlv (no success yet).
1 (* test of the fluid properties routines currently implemented in helmholtz.c *)
2
3 REQUIRE "atoms.a4l";
4 REQUIRE "johnpye/thermo_types.a4c";
5 IMPORT "johnpye/fprops/helmholtz";
6
7 MODEL helmholtz_conf(
8 component IS_A symbol_constant;
9 );
10 END helmholtz_conf;
11
12
13 MODEL fprops_sat_test;
14
15 T IS_A temperature;
16 p IS_A pressure;
17 rho_f, rho_g IS_A mass_density;
18 g IS_A specific_energy;
19
20 conf IS_A helmholtz_conf('carbondioxide');
21
22 (*
23 E1: helmholtz_p(
24 T, rho_f : INPUT;
25 p : OUTPUT;
26 conf : DATA
27 );
28
29 E2: helmholtz_p(
30 T, rho_g : INPUT;
31 p : OUTPUT;
32 conf : DATA
33 );
34
35 E3: helmholtz_g(
36 T, rho_f : INPUT;
37 g : OUTPUT;
38 conf : DATA
39 );
40
41 E4: helmholtz_g(
42 T, rho_g : INPUT;
43 g : OUTPUT;
44 conf : DATA
45 );
46
47 *)
48 err[1..3] IS_A solver_var;
49 FOR i IN [1..3] CREATE
50 err[i] = 0;
51 END FOR;
52
53 sat: helmholtz_phase(
54 T, p, rho_f, rho_g : INPUT;
55 err[1], err[2], err[3] : OUTPUT;
56 conf : DATA
57 );
58
59 METHODS
60 METHOD on_load;
61 FIX T;
62 T := 250 {K};
63
64 rho_f := 1000 {kg/m^3};
65 rho_g := 10 {kg/m^3};
66 END on_load;
67
68 END fprops_sat_test;

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