UDF for describing non-newtonian behaviour of fiber suspension
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=apparent viscosity (=effective viscosity?)
gamma=second invariant of the rate of strain tensor (=shear rate?)
Since the function is not valid for gamma=0 I’m using an exponential regularization model:
The code looks like this:
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!
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
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?
|All times are GMT -4. The time now is 19:42.|