CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF DPM_BC with F_UDMI not storing data (http://www.cfd-online.com/Forums/fluent-udf/97768-udf-dpm_bc-f_udmi-not-storing-data.html)

balki February 24, 2012 09:34

UDF DPM_BC with F_UDMI not storing data
 
Hi, I'm trying to simulate 2d droplet deposition from a high temperature (2000 K) gas stream on to a cooled (500 K) heat transfer surface. I wrote an UDF (to find the fate of the droplet on the surface ie., stick/rebound), used DEFINE_DPM_BC macro to do the calculation. I applied that UDF at the tube boundaries.

When the droplet deposits, it solidifies and it adds resistence to heat transfer. So the outputs of my UDF are deposition thickness and the deposit surface temperature. Both varies along the length of the tube. I used F_UDMI & C_UDMI macro to store both outputs.

I complied the UDF without error and hooked into fluent. I created 2 user defined memories, '0' for thickness and '1' for temperature. After simulation When I went to XY plot and plotted "User defined memory 0" as Y-axis and tubes length as x-axis, it is always zero. But I'm sure both the outputs are non-zero because I could see the calculated values on the FLUENT console window.

I tried to export the data, through file->export->ascii format, same zero for UDM 0 & 1 column.

Then I tried to write my output to another file (.txt), by using the following command,

fp = fopen("thickness.txt","a")))
fprintf(fp,"%lf\n",cyl_ht);
fclose(fp);

no file was generated to my surprise. so no data.

I really really need someone's help to solve this problem. I feel my understanding on storing data is unclear. If someone could throw some light on this it is very much appreciated....

or is there any other way to extract the data calculated in UDF?

I eagerly waiting for your valuable suggestions

Krishnan

Extra info: Solving DPM, Random walk model, viscous and energy, 2d flow, FLUENT 6.3. Injection with Rosin Ramler distribution.

gorodan April 25, 2012 09:23

Hi,

I had the same problem storring F_UMDI.

Fluent apparently don't store F_UDMI into the dat file. (only C_UDMI)
That's why you find "0" value when you try to export / write / plot your F_UDMI datas.

In my case I used this macro:
C_UDMI (F_C0(face, face_thread),THREAD_T0(face_thread),i)
instead of:
F_UDMI(face, face_thread, i)
to store my face datas into the cell adjacent to the considered face

Hope it will help you :)

balki May 27, 2012 01:24

Hi Gorodan, Thank you so much for your suggestion.
Apparently it worked. I dont know why f_udmi didnt store data.
Ultimately my problem is solved.

once again thank you so much.

krishnan

Daban June 6, 2016 22:10

hey guys, i know this is out of context, but could you please help me with my problem!?
i need to export a specific data say(displacement vs flow) into a text file but i dont know how to write that in UDF fil. any suggestion?


All times are GMT -4. The time now is 07:17.