/[ascend]/trunk/models/johnpye/fprops/python/fprops.i
ViewVC logotype

Contents of /trunk/models/johnpye/fprops/python/fprops.i

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2264 - (show annotations) (download)
Thu Aug 5 09:25:55 2010 UTC (13 years, 10 months ago) by jpye
File size: 1342 byte(s)
A basic fprops_sat_p function working now.
Need to add p_t, T_t data to all materials.
1 %module fprops
2
3 %{
4 #include "../carbondioxide.h"
5 #include "../water.h"
6 #include "../ammonia.h"
7 #include "../hydrogen.h"
8 #include "../nitrogen.h"
9 #include "../methane.h"
10 #include "../helmholtz.h"
11 #include "../sat.h"
12 #include "../solve_ph.h"
13 %}
14
15 %include exception.i
16
17 %immutable helmholtz_data_water;
18 %immutable helmholtz_data_carbondioxide;
19 %immutable helmholtz_data_ammonia;
20 %immutable helmholtz_data_nitrogen;
21 %immutable helmholtz_data_hydrogen;
22 %immutable helmholtz_data_methane;
23
24 %include "../helmholtz.h"
25
26 %apply double *OUTPUT {double *p_sat};
27 %apply double *OUTPUT {double *T_sat};
28 %apply double *OUTPUT {double *rho_f};
29 %apply double *OUTPUT {double *rho_g};
30 %include "../sat.h"
31 %clear double *p_sat;
32 %clear double *T_sat;
33 %clear double *rho_f;
34 %clear double *rho_g;
35
36 %apply double *OUTPUT {double *T};
37 %apply double *OUTPUT {double *rho};
38 int fprops_solve_ph(double p, double h, double *T, double *rho, int use_guess, const HelmholtzData *D);
39 %clear double *T;
40 %clear double *rho;
41
42
43 %exception;
44
45 %include "../carbondioxide.h"
46 %include "../water.h"
47 %include "../ammonia.h"
48 %include "../hydrogen.h"
49 %include "../nitrogen.h"
50 %include "../methane.h"
51
52 /*
53 If you're not using SCons, then try something like...
54 swig -python fprops.i
55 gcc -I /usr/include/python2.5 -shared fprops_wrap.c ../helmholtz.c ../ideal.c ../water.c -o _fprops.so
56 */

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