|
[Sponsors] |
May 5, 2014, 08:46 |
Help!UDF viscosity
|
#1 |
New Member
Weiliang Hou
Join Date: May 2014
Posts: 1
Rep Power: 0 |
I write a UDF viscosity code.I want to define a kind of non-newtonian fuild in laminar flow, and its viscosity is changed with time. But the viscosity is homegeneous in stirring and not shear thinning.The code is here.So I want to how I can modify this code. Thank you very much!
#include "udf.h" DEFINE_PROPERTY(cell_viscosity,c,t) { real time,vis, s_mag,n,kp; time = RP_Get_Real("flow-time"); s_mag=C_STRAIN_RATE_MAG(c,t); if(time<32400) { kp=0.095552*pow(time/3600,4)-2.5696*pow(time/3600,3)+25.13*pow(time/3600,2)-107.13*time/3600+179; n=0.000075452*pow(time/3600,6)-0.0020979*pow(time/3600,5)+0.022364*pow(time/3600,4)-0.11435*pow(time/3600,3)+0.28236*pow(time/3600,2)-0.23947*time/3600+0.214; } else { kp=3.82832; n=0.518373; } s_mag=38.211*pow(1.11,2/n)*pow(n*(pow(1.11,2/n-1)-1)/(2-n)/0.11,1/(n-1))/(pow(1.21,2/n)-1)/n; vis=kp*pow(s_mag,(n-1)); return vis; } |
|
Tags |
non-newtonian fluid, viscosity udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with divergence | TDK | FLUENT | 13 | December 14, 2018 07:00 |
Ratio of eddy viscosity to molecular viscosity : Laminar or turbulent flow? | JuPa | CFX | 7 | September 9, 2013 08:45 |
Too low temperature at combustor outlet | romekr | FLUENT | 2 | February 6, 2012 11:02 |
modelling solids viscosity in eulerian multiphase model | derkaiser | FLUENT | 1 | December 5, 2011 04:42 |
kinematic viscosity at diff temperatures,pressures | Mecobio | Main CFD Forum | 0 | November 7, 2005 13:55 |