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

parallelizing the udf for multi core machine

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 8, 2011, 05:23
Default parallelizing the udf for multi core machine
  #1
Member
 
Aamer Shahzad
Join Date: Mar 2010
Posts: 58
Rep Power: 7
aamer is on a distinguished road
Hello all.....

i have written a serial udf to give azimuth rotation to the wing. The code is as follows.

#include "udf.h"
static real psi_dot = 0.0; /* rotational velocity */
DEFINE_CG_MOTION(Re_34000ar6, dt, vel, omega, time, dtime)
{
Thread *t;
face_t f;
real gyration = 0.1927; /*second moment of area*/
real c = 0.101; /* wing chord in meters */
real t_A = 0.0269;
/* t_A is time required to accelerate wing from rest */
real pi = 3.14159;
real a;
real U = 5; /* constant velocity */
real constant = 0.35;
real psi_dot; /* rotational velocity */
real psi; /* azimuth angle */
real psi_not_dot = 25.947; /* constant rotational velocity*/


/*reset velocities*/
NV_S(vel, =, 0.0);
NV_S(omega, =, 0.0);
if (!Data_Valid_P ())
return;
if (time <= t_A)
{
psi_dot = (12.97)* (1 - cos((pi*time)/(t_A)));
psi = (12.97)* (time - ((t_A/pi)*sin((pi*time)/(t_A))));
}
else
{
psi_dot = psi_not_dot;
psi = (psi_not_dot*time)-constant;
}
a= -(psi_dot);

Message("time:%f psi:%f psi_dot:%f\n",time,psi,a);

omega[0]= 0;
omega[1]= a;
omega[2]= 0;


I have a quad core processor machine. when i try to run my case file by giving "fluent -t4", it gives me error " the current working directory c:\users\aamer is not shared, this may cause file open issues accross network" " primitive error at NOde 0: open_udf_library:the system cannot find the file specified." similar error is displayed for other nodes.



the same file works perfectly fine in parallel when there is no udf, hooked to it. so i think i have to parallelize the udf for my multi processor machine...... can anybody help me parallelize this code. any suggestions or comments???????
aamer is offline   Reply With Quote

Old   August 22, 2013, 03:03
Default
  #2
New Member
 
fateme
Join Date: Aug 2013
Posts: 1
Rep Power: 0
Fateme.e is on a distinguished road
hello aamer
I have the same problem with parallelizing of an udf!!
could you solve it?
please tell me what should i do for solving it.
thanks in advance.
Fateme.e is offline   Reply With Quote

Old   August 22, 2013, 05:48
Default
  #3
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 544
Rep Power: 12
vasava will become famous soon enough
You have to use the macros #if RP_HOST and #if RP_NODE.

Reading this (http://aerojet.engr.ucdavis.edu/flue...df/node206.htm) would help.
vasava is offline   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
solving a conduction problem in FLUENT using UDF Avin2407 Fluent UDF and Scheme Programming 1 March 13, 2015 03:02
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
Problem with UDF on a Linux machine (Red Hat) Iaroslav Fluent UDF and Scheme Programming 5 May 12, 2010 07:43
Help Parallelizing UDF AndresC FLUENT 0 February 25, 2010 16:50
Distributed Parallel on dual core remote machine Justin CFX 1 February 3, 2008 18:23


All times are GMT -4. The time now is 19:26.