|
[Sponsors] |
April 19, 2006, 10:06 |
write/read function
|
#1 |
Guest
Posts: n/a
|
I am currently trying to create a UDF using windows operating sytem. The code I have creeated thus far is below. The idea is that in order to find out k the total system change in pressure is needed. Since I know the inlet pressure I turn the function on at the end of the chambre so that k can be calculated P1-P2 /1.004e6 . Then the value is written and then read into another equation during the next iteration.
It is not interpreted properly. Is there anyone who can offer some advice. if (x[2]>=8.89) k = (2.56e5-(C_P(cell,thread))/(1.004e6)); k++; printf("k=%d\n",k); DEFINE_RW_FILE(writer,fp); printf; fprintf(fp"%d",k); else k = DEFINE_RW_FILE(reader,fp); printf; fscanf(fp,"%d",&k); } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compile problem | ivanyao | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 09:31 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 06:42 |
latest OpenFOAM-1.6.x from git failed to compile | phsieh2005 | OpenFOAM Bugs | 25 | February 9, 2010 04:37 |
Error with Wmake | skabilan | OpenFOAM Installation | 3 | July 28, 2009 00:35 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 14:00 |