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

Parallel UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 29, 2011, 08:39
Default Parallel UDF
  #1
New Member
 
hisham
Join Date: May 2011
Posts: 6
Rep Power: 15
sham83 is on a distinguished road
Hi,

Can someone help me to modify my UDF below to parallel UDF. I am simulating oscillating cylinder and need to compile my UDF in Linux parallel.

#include "udf.h"

#define AA 0.03
#define TT 4.1667
#define OM (2.0*M_PI/TT)

DEFINE_CG_MOTION(updown,dt,vel,omega,time,dtime)
{
vel[1] = AA*OM*cos(OM*time);
}


thanks.

sham.
sham83 is offline   Reply With Quote

Old   May 31, 2011, 05:04
Default
  #2
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
The usual advice in the manual is to enclose the body of your udf in a directive:
Code:
#include "udf.h"

#define AA    0.03    
#define TT      4.1667 
#define OM    (2.0*M_PI/TT)    

DEFINE_CG_MOTION(updown,dt,vel,omega,time,dtime)
{
#if !RP_HOST
   vel[1] = AA*OM*cos(OM*time);    
#endif
}
But in your case, I don't think that is necessary.
dmoroian is offline   Reply With Quote

Old   May 31, 2011, 08:11
Default
  #3
New Member
 
hisham
Join Date: May 2011
Posts: 6
Rep Power: 15
sham83 is on a distinguished road
Thanks. I shall give it a try. My problem is I set up my case in Windows (serial) and run a few iterations there until it reaches a near steady solution. Then I transfer my case to Linux (parallel) and continue running there. However, when I continue my iterations there, the results (Cd and Cl) vary erratically unlike my run in Windows (serial). It runs ok and no error message given. Just the results are unexpected. Hence, I suspect the problem is in the UDF that need to be parallelize.

Would appreciate if you have more input to what my prob could be.
sham83 is offline   Reply With Quote

Old   May 31, 2011, 08:23
Default
  #4
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Then the problem is not from DEFINE_CG_MOTION. How do you compute Cd and Cl, are you using fluent reports or you wrote your own udf?
dmoroian is offline   Reply With Quote

Old   May 31, 2011, 08:39
Default
  #5
New Member
 
hisham
Join Date: May 2011
Posts: 6
Rep Power: 15
sham83 is on a distinguished road
Cl and Cd from Fluent Solve > Monitor panel.

I am simulating oscillating cylinder with dynamic mesh. I have tried the same with fixed cylinder (no UDF used) and it was fine when I transferred from Windows serial to Linux parallel and continue running it.
sham83 is offline   Reply With Quote

Old   May 31, 2011, 08:55
Default
  #6
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Some differences should appear due to different mesh after remeshing in parallel compared to serial.
dmoroian is offline   Reply With Quote

Reply

Tags
udf parallel


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
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
udf compile in parallel system tahereh FLUENT 1 December 9, 2008 10:48
Help: how to realize UDF on parallel cluster? Haoyin FLUENT 1 August 6, 2007 14:53
Parallel Fluent +UDF Jack Martinez FLUENT 0 June 28, 2007 12:19
UDF in parallel version. yobee FLUENT 0 August 17, 2004 05:12


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