
[Sponsors] 
February 5, 2007, 09:31 
"Define_Profile" UDF for parallel solver

#1 
Guest
Posts: n/a

Hi
I'm trying to make a simulation using a parabolic velocity profile (detailed at the end of this message) and in order to reduce computing time, I want to use Fluent parallel solver. This UDF works using Fluent serial solver but it doesn't work anymore when I choose the parallel solver. Could anybody help me to rewrite this "Define Profile" UDF for Fluent parallel solver? Thanks Antoine  #include "udf.h" DEFINE_PROFILE(parabole,thread,nv) { real x[ND_ND]; real r ; real vmax ; face_t f; begin_f_loop (f,thread) { r=10; vmax=0.001; F_CENTROID(x,f,thread); F_PROFILE(f,thread,nv)=vmax*(1.((x[1]*x[1])/(r*r))); } end_f_loop(f,thread) } 

February 7, 2007, 00:15 
Re: "Define_Profile" UDF for parallel solver

#2 
Guest
Posts: n/a

you should modify this udf for parallel solver...see fluent udf help


February 7, 2007, 02:33 
Re: "Define_Profile" UDF for parallel solver

#3 
Guest
Posts: n/a

try like this:
#include "udf.h" DEFINE_PROFILE(parabole,thread,nv) { #if !RP_HOST real x[ND_ND]; real r ; real vmax ; face_t f; begin_f_loop (f,thread) { r=10; vmax=0.001; F_CENTROID(x,f,thread); F_PROFILE(f,thread,nv)=vmax*(1.((x[1]*x[1])/(r*r))); } end_f_loop(f,thread) #endif } 

February 7, 2007, 13:04 
Re: "Define_Profile" UDF for parallel solver

#4 
Guest
Posts: n/a

Thank you very much for your answer. I tried the udf you send but I still have the error below from Fluent, even if the udf has been compiled without problem (sorry, part of the message is in french; it means that Fluent doesn't find the path to udf library). Do you have an idea of its origin?
Opening library "libudf"... Primitive Error at Node 0: open_udf_library: Le chemin d'accès spécifié est introuvable. Primitive Error at Node 1: open_udf_library: Le chemin d'accès spécifié est introuvable. Error: open_udf_library: Le fichier spécifié est introuvable. Error Object: #f Thank you for your help Antoine 

February 7, 2007, 13:31 
Re: "Define_Profile" UDF for parallel solver

#5 
Guest
Posts: n/a

check the following folder libudf/lnx86 you should have a 3d_host, 3d_node and a 3d folders (if you are using the 3d version of fluent). if youd don't see this three directories, what you can do is either make the directories 3d_host and 3d_node go back one level (now you are in the libudf directory) and launch the following commands:
touch src/* make "FLUENT_ARCH=lnx86" (assuming you are using the linux version of FLUENT) Then try again the parallel case. The second way is to launch the parallel version of fluent, read your case and data and recompile the UDF. Hope this help 

February 9, 2007, 20:09 
Re: "Define_Profile" UDF for parallel solver

#6 
Guest
Posts: n/a

Sorry to give an answer so late... Thank you for you answer, it guided me toward the solution. I'm running Fluent on Window and the compilation with the multiprocessor machine wasn't complete because the environment variable for the "sed" command wasn't defined. I finally tried to compile manually the udf as you suggested me, and as I didn't find how to define the environment variable for the sed command, I simply copied the sed.exe (which is located in the same file as the fluent.exe) to each udf file (3d_host and 3d_node) to compile. The command nmake permitted then to compile without problem.
Thank you Bogdan for having helped me to solve successfully my problem. Best regards Antoine 

February 5, 2012, 03:36 
How to define velocity profile

#7 
New Member
Hamdi
Join Date: Oct 2011
Posts: 3
Rep Power: 6 
Dear users
I would like to ask you how can I define the velocity profile and temperature profile at the ilet by defining the V profile equation and T profile equation? I read something about the UDF but how, I don't know? Is there any helper? TQ so much 

February 26, 2013, 05:22 

#8  
Senior Member
rkhr
Join Date: May 2011
Posts: 226
Rep Power: 7 
Hi Bogdan,
I am using DEFINE_EXECUTE_AT_END in parallel to save outlet flow but it doesnt work properly.in serial I dont have any problem do you think it is because of the function or there is other reason? thanks in advance!! Kanarya Quote:


June 23, 2015, 10:23 

#9 
Member
Lida
Join Date: Apr 2015
Posts: 37
Rep Power: 2 
Hi
I have the same problem with compiling my UDF. I can compile it in series mode but not in parallel mode. I don't know how to modify it. i will be thankful if anyone could help me do it. my UDF is as follows: #include "udf.h" #include "math.h" DEFINE_PROFILE(unsteady_velocity_profile, t, i) { real current_time; real x[ND_ND]; real y; real z; real a; real n; real Umax; real Umean; real R; face_t f; current_time = CURRENT_TIME; begin_f_loop(f, t) { F_CENTROID(x,f,t); y=x[1]; z=x[2]; n=7; R=0.254; /* m */ Umean=10; /* m/s */ Umax=Umean*(((n+1)*(2*n+1))/(2*pow(n,2))); a=pow((pow(y,2)+pow(z,2)),0.5); if (current_time < 10) { F_PROFILE(f,t,i)=Umax*pow((1sqrt(pow(z,2)+pow(y,2))/R),(1/n)); } else { F_PROFILE(f,t,i)=0; } } end_f_loop(f, t) } 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Getting too many iterations by velocity solving (aborting). Changing U  Solver?  suitup  OpenFOAM Running, Solving & CFD  0  January 20, 2010 08:45 
why the solver reject it? Anyone with experience?  bearcat  CFX  6  April 28, 2008 14:08 
DEFINE_GEOM UDF Problems  Pat  FLUENT  0  August 14, 2003 13:16 
Error during Solver  cfd guy  CFX  4  May 8, 2001 06:04 
UDF : Chemical Reaction in Catalytic Converter  adhimac  FLUENT  1  March 27, 2001 14:04 