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

write/read function

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools 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

Thread Tools
Display Modes

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 On
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 07:42
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 05:37
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 00:35
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00


All times are GMT -4. The time now is 03:48.