|
[Sponsors] |
April 29, 2012, 02:45 |
UDF Contours
|
#1 |
New Member
Varoon
Join Date: Apr 2012
Posts: 3
Rep Power: 14 |
I have written the following code to display the pressure contour using user define memory.
#include "udf.h" DEFINE_ON_DEMAND(wall_pressure) { face_t f; Domain *domain=Get_Domain(1); int ID = 8; /* Zone ID for wall zone */ Thread *t = Lookup_Thread(domain, ID); begin_f_loop(f, t) { F_UDMI(f,t,0) = F_P(f,t); Message("pressure %e\n",F_UDMI(f,t,0)); } end_f_loop(f, t) } But the contour displays only zeros, i even tried to replace F_P(f,t) with 300 but i still end up getting the same zero result. Could you let me know the reason behind the result? |
|
May 1, 2012, 04:59 |
|
#2 |
Member
Daniel Tanner
Join Date: Apr 2009
Posts: 54
Rep Power: 18 |
I think you have to use C_UDMI, F_UDMI does not provide that function.
This was covered on a post some time ago that may be useful. http://www.cfd-online.com/Forums/flu...cent-wall.html |
|
May 1, 2012, 11:09 |
|
#3 |
New Member
Varoon
Join Date: Apr 2012
Posts: 3
Rep Power: 14 |
Daniel,
Thanks. I was able to figure it out and get the code executed. But i have landed up with another problem. I am calculating the differential of few parameters with respect to x and y using UDF. When i use C_T_G(c,t)[0] which is the dT/dx, i get Fluent execution errors. The code is getting compiled but while executing on demand function, i get this error. I have included mem.h in my code also. Would it be possible for you to let me know the reason behind it? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 08:37 |
Source Term UDF VS Porous Media Model | pchoopanya | Fluent UDF and Scheme Programming | 1 | August 28, 2013 07:12 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 23:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 22:38 |
I need UDF help. | S.Whitney | FLUENT | 0 | October 15, 2007 12:29 |