|
[Sponsors] |
May 5, 2018, 22:19 |
Fluent udf "DEFINE_PROFILE" parallelization
|
#1 |
New Member
David
Join Date: Nov 2017
Posts: 14
Rep Power: 9 |
Hi Everyone,
I am using udf "DEFINE_PROFILE" to get a boundary layer velocity profile for the inlet of my computational domain. My udf is very simple and works perfect in Serial Mode. Then, I followed the examples in UDF manual and tried to parallelize my udf. It seems that the face_loop in the udf is only able to loop in one partition (see the lower section of the parallel plot, which gives correct values), and values of the upper section are not assigned correctly. Sorry, I don't know why I cannot attach these images, please click them serial mode profile: https://drive.google.com/file/d/1kQb...ew?usp=sharing parallel mode profile: https://drive.google.com/file/d/1gO0...ew?usp=sharing Here is my udf: Code:
DEFINE_PROFILE(inlet_u_profile,t,i) { real xf[ND_ND]; face_t f; float blasiusU[] = { ...blasius values... }; /* store blasius profile data */ #if !RP_HOST begin_f_loop(f,t) { F_PROFILE(f,t,i) = blasiusU[f]; } end_f_loop(f,t) #endif } Thanks in advance. Dv Last edited by uconcorde; May 5, 2018 at 22:28. Reason: insert image |
|
May 7, 2018, 03:47 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Code:
float blasiusU[] = { ...blasius values... }; /* store blasius profile data */ But in the parallel case, Fluent will (apparently) take a different order. So your approach does not work. The normal approach for this: describe the profile as a function of x (or whatever coordinate that varies). Code:
float blasiusU(float x) { if (x<0.03) { /*just an example function */ return(0.2-x); } else if x<0.6 { return(0.173-0.1*x); } else { return(0.113); } } DEFINE_PROFILE(inlet_u_profile,t,i) { #if !RP_HOST real xf[ND_ND]; face_t f; begin_f_loop(f,t) { F_CENTROID(xf,f,t); F_PROFILE(f,t,i) = blasiusU(xf[0]); } end_f_loop(f,t) #endif } |
|
Tags |
parallel, profile boundary, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem running fluent with udf on batch | tobi b. | Fluent UDF and Scheme Programming | 3 | April 14, 2016 14:54 |
implementing UDF for fluent in workbench for running multiple simulations | faizan_habib7 | Fluent UDF and Scheme Programming | 0 | March 18, 2016 23:29 |
Running UDF with Supercomputer | roi247 | FLUENT | 4 | October 15, 2015 14:41 |
fluent UDF external library lapack problem | Rick | FLUENT | 0 | May 7, 2008 11:16 |
UDF problem caused by various version of Fluent | Yurong | FLUENT | 3 | January 15, 2006 11:57 |