"Define_Profile" UDF for parallel solver
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) } 
Re: "Define_Profile" UDF for parallel solver
you should modify this udf for parallel solver...see fluent udf help

Re: "Define_Profile" UDF for parallel solver
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 } 
Re: "Define_Profile" UDF for parallel solver
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 
Re: "Define_Profile" UDF for parallel solver
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 
Re: "Define_Profile" UDF for parallel solver
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 
How to define velocity profile
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 
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:

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) } 
#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; n=7; R=0.254; /* m */ Umean=10; /* m/s */ current_time = CURRENT_TIME; # if RP_NODE begin_f_loop(f, t) { F_CENTROID(x,f,t); y=x[1]; z=x[2]; 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) #endif } It might work, 
All times are GMT 4. The time now is 00:12. 