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

UDF for describing non-newtonian behaviour of fiber suspension

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By shib
  • 1 Post By coglione

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 11, 2010, 09:02
Default UDF for describing non-newtonian behaviour of fiber suspension
  #1
New Member
 
Join Date: Apr 2010
Posts: 10
Rep Power: 16
shib is on a distinguished road
Hi,

I’m trying to model a fiber suspension in fluent by creating an UDF for the viscosity of the fluid. When the shear is low I want to use a Bingham model to describe the viscosity and when the flow becomes turbulent the viscosity should be equal to the turbulent viscosity.
This is how the Bingham model I’m working with looks like:

mu_a=mu+tau_0/gamma

mu_a=apparent viscosity (=effective viscosity?)

tau=stress tensor
mu=shear viscosity
gamma=second invariant of the rate of strain tensor (=shear rate?)
tau_0=yield stress


Since the function is not valid for gamma=0 I’m using an exponential regularization model:

mu_a=mu+(1-exp(-m*gamma))*tau_0/gamma

The code looks like this:

#include "udf.h"

DEFINE_PROPERTY(cell_viscosity,c,t)
{
real mu_a;
real gamma=C_STRAIN_RATE_MAG(c,t);
real tau_0=200;
real mu_t=1;
real m=200;
real mu=0.001;
real gamma_t;

gamma_t=tau_0/(mu_t-mu);

if (gamma<gamma_t)
mu_a=mu+(1-exp(-m*gamma))*tau_0/gamma;
else
mu_a=mu_t;

return mu_a;
}

1. One thing I’m wondering about is how it works when I define the viscosity. I understand that the effective viscosity is a sum of the laminar and turbulent viscosity. When I use the “DEFINE_PROPERTY(cell_viscosity,c,t)” function in my code does it define the total effective viscosity for the fluid or just the laminar or the turbulent viscosity?

2. Also I’m not sure if I’ve defined the shear rate (second invariant of the rate-of strain tensor, gamma) correctly. Does anyone know if it’s correct?

3. Are there any other problems with the code or does it look ok (this is the first time I've written an UDF so I'm not sure I've used the right syntax and structure)?

Thanks for the help!
jotac likes this.

Last edited by shib; June 11, 2010 at 09:34.
shib is offline   Reply With Quote

Old   June 14, 2010, 03:57
Default
  #2
Senior Member
 
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 17
coglione is on a distinguished road
Hello shib,

1)
hooking your code in the material property panel you will define the molecular (=laminar) viscosity.
That is, if turbulence is on Fluent will automatically compute a turbulent viscosity and sum up both to get the effective viscosity even in your laminar Bingham region.
Looking at the turbulence-panel, there is an option to set the turbulent viscosity explicitly using a udf. I think that is what you need to suppress turbulent viscosity being added in your low-shear Bingham region.

2) yes, C_SRAIN_RATE_MAG gives the second invariant as needed

cheers
jotac likes this.
coglione is offline   Reply With Quote

Old   June 15, 2010, 16:18
Default
  #3
New Member
 
Join Date: Apr 2010
Posts: 10
Rep Power: 16
shib is on a distinguished road
Thanks Max! I managed to get some pretty good results when I set the turbulent viscosity to 0.

Does anyone know how to plot the viscosity and the shear rate in CFD-post?
shib 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
Fiber Suspension Solver laminar AdvaniFolgarTucker model kerstin OpenFOAM Running, Solving & CFD 6 October 28, 2020 09:03
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 07:37
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


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