CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Fluent UDF and Scheme Programming (
-   -   parallelize udf (viscosity)? (

Lilly February 18, 2013 10:48

parallelize udf (viscosity)?
Dear all,

I read the section of the user guide dealing with the parallelization of udfs, but I am pretty confused afterwards and still have some questions concerning the parallelization:
  • I wrote an udf describing a non Newtonian viscosity (generalized power law) and don't really understand whether I have to parallelize this special udf
  • If I have to parallelize it, what exactly do I have to include
It would be really nice if somebody could help me!
Thank you in advance!

C.C February 18, 2013 11:27

I implemeted the non-newtonian behavior in my case using an UDF:


real viscosity,gamma;
return viscosity;

then I interpreted it in Fluent and after that in the materials properties i have an option to change the materials properties where i can chose User defined function and select the udf file. In my case it is correctly interpreted.
I hope it can help you...

sbaffini February 19, 2013 05:08

In your case you don't have to worry about parallelization because your UDF is local, for each cell only local (e.g., from the same cell) information is used. In theory, the computation of the strain rate magnitude involves neighbor cells but, as it is already provided by Fluent with a macro, you don't have to take care of it.

Tipically, this also happens with DEFINE_PROFILE macros.

Lilly February 28, 2013 04:35

Thank you C.C and thank you sbaffini!
Your answers were really helpful for me!

Why did you use #include"mem.h" instead of #include "udf.h", C.C?

All times are GMT -4. The time now is 16:00.