Viscosity UDF and Fluent Viscoisty model gives different results for same model?

  • Last Post 29 March 2019
BeginerModel posted this 28 March 2019

Hi All,


I am examining many different viscosity models through UDF's and have come across a problem. I have written a UDF for the Carreau model even though it is included in fluent, yet when I run 2 identical simulations, one with my UDf and one with fluent inbuilt Carreau model, they give different results, which makes me think I am using these Viscosity UDF's wrong for other models that aren't in Fluent. My UDF is below, is there a reason why this doesnt replicate the Carreau model in Fluent?

/* Carreau (p=2) Viscosity Model */


#include "udf.h"


float muinf=0.00345;

float mu0=0.056;

float lambda=3.313;

float p=2;

float n=0.3568;




real diff;

real shear;

real prod;

real power;

real visco;






return visco;



rwoolhou posted this 29 March 2019

Check the maths in the UDF and write out both the model equations and what you've used in the UDF. I'd also tend to use real over float in the definitions.