/********************************************************************* UDF for applying the Casson Non-newtonian fluid model By Chiyu Jiang, Cornell University 04-23-2015 **********************************************************************/ #include "udf.h" #define Hct 0.4 #define mu_p 0.00145 DEFINE_PROPERTY(casson_viscosity,c,t) { real mu_casson; real gamma = C_STRAIN_RATE_MAG(c,t); real N_inf = sqrt(mu_p*pow((1-Hct),-0.25)); real mu_inf = sqrt(pow((0.625*Hct),3)); if(gamma!=0){ mu_casson = pow(mu_inf,2)/gamma+2*mu_inf*N_inf/sqrt(gamma)+pow(N_inf,2);} else{ mu_casson = 0.0035; } return mu_casson; }