CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

parallelize udf (viscosity)?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 18, 2013, 10:48
Default parallelize udf (viscosity)?
  #1
Senior Member
 
Join Date: Feb 2011
Posts: 128
Rep Power: 6
Lilly is on a distinguished road
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!
Lilly
Lilly is offline   Reply With Quote

Old   February 18, 2013, 11:27
Default
  #2
C.C
Member
 
CC
Join Date: Jun 2011
Posts: 52
Rep Power: 6
C.C is on a distinguished road
I implemeted the non-newtonian behavior in my case using an UDF:

#include"mem.h"

DEFINE_PROPERTY(viscosity_function,c,t)
{
real viscosity,gamma;
gamma=C_STRAIN_RATE_MAG(c,t);
viscosity=m*pow(gamma,b);
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...
C.C is offline   Reply With Quote

Old   February 19, 2013, 05:08
Default
  #3
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 531
Blog Entries: 14
Rep Power: 17
sbaffini will become famous soon enough
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.
sbaffini is offline   Reply With Quote

Old   February 28, 2013, 04:35
Default
  #4
Senior Member
 
Join Date: Feb 2011
Posts: 128
Rep Power: 6
Lilly is on a distinguished road
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?
Lilly is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
subgrid turbulent viscosity for UDF in LES David TAIEB FLUENT 0 April 2, 2007 08:27
Help !! UDF for second phase viscosity. yong FLUENT 2 January 24, 2007 12:11
UDF of Turbulent viscosity justin FLUENT 0 November 24, 2006 07:36
Problems with changing turbulent viscosity by UDF sarah_ron FLUENT 0 February 14, 2005 01:31
about eddy viscosity :UDF sagga FLUENT 2 January 10, 2005 22:07


All times are GMT -4. The time now is 02:59.