# parallelizing the udf for multi core machine

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

 June 8, 2011, 05:23 parallelizing the udf for multi core machine #1 Member   Aamer Shahzad Join Date: Mar 2010 Posts: 58 Rep Power: 9 Sponsored Links 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???????

 August 22, 2013, 03:03 #2 New Member   fateme Join Date: Aug 2013 Posts: 1 Rep Power: 0 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.

 August 22, 2013, 05:48 #3 Senior Member   Paritosh Vasava Join Date: Oct 2012 Location: Lappeenranta, Finland Posts: 718 Rep Power: 15 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.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Iaroslav Fluent UDF and Scheme Programming 6 March 7, 2017 14:15 Avin2407 Fluent UDF and Scheme Programming 1 March 13, 2015 03:02 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36 AndresC FLUENT 0 February 25, 2010 16:50 Justin CFX 1 February 3, 2008 18:23