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

UDF Contours

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 29, 2012, 01:45
Default UDF Contours
  #1
New Member
 
Varoon
Join Date: Apr 2012
Posts: 3
Rep Power: 14
varoons is on a distinguished road
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?
varoons is offline   Reply With Quote

Old   May 1, 2012, 03:59
Default
  #2
Member
 
Daniel Tanner
Join Date: Apr 2009
Posts: 54
Rep Power: 17
Daniel Tanner is on a distinguished road
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
Daniel Tanner is offline   Reply With Quote

Old   May 1, 2012, 10:09
Default
  #3
New Member
 
Varoon
Join Date: Apr 2012
Posts: 3
Rep Power: 14
varoons is on a distinguished road
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?
varoons is offline   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
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 07:37
Source Term UDF VS Porous Media Model pchoopanya Fluent UDF and Scheme Programming 1 August 28, 2013 06:12
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 11:29


All times are GMT -4. The time now is 05:37.