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

parallelize udf (viscosity)?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 18, 2013, 10:48
Default parallelize udf (viscosity)?
  #1
Senior Member
 
Join Date: Feb 2011
Posts: 140
Rep Power: 15
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: 73
Rep Power: 15
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: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
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: 140
Rep Power: 15
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


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 Off
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 09: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 19:58.