CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

write/read function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 19, 2006, 10:06
Default write/read function
  #1
Paul
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);

}

  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 20:45.