|
[Sponsors] |
Viscosity UDF Gives different Results to fluent Model? |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
Dave
Join Date: Mar 2019
Posts: 34
Rep Power: 6 ![]() |
Hi All.
I am examining many different viscosity models through UDF's in Fluent. I have written a UDF for the Carreau model even though it is in Fluent. When I run 2 identical simulations, one using my UDF for Carreau Viscosity, the other using Fluents inbuilt model, they give different results. This is implying my UDF's are not working as intended, and are likely wrong for the other models. Is there a reaosn why this UDF doesnt implement the Carreau model? (both models use the same values for max/min shear visco, lambda and n.) Could this be because of the rounding errors in my code? Would it be more accurate to use "double" instead of "float"? /* 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; DEFINE_PROPERTY(cell_viscosity,c,t) { real diff; real shear; real prod; real power; real visco; diff=(mu0-muinf); prod=((lambda)*(C_STRAIN_RATE_MAG(c,t))); shear=(1+(pow(prod,p))); power=((n-1)/(p)); visco=((muinf)+(diff)*(pow(shear,power))); return visco; } Last edited by bloodflow; March 28, 2019 at 10:54. |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,259
Rep Power: 33 ![]() ![]() |
Quote:
best regards |
||
![]() |
![]() |
![]() |
Tags |
carreau, fluent, udf, viscosity |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Use of k-epsilon and k-omega Models | Jade M | Main CFD Forum | 40 | January 27, 2023 07:18 |
How to solve UDF compilation problems in Fluent. | pakk | Fluent UDF and Scheme Programming | 16 | September 10, 2018 02:48 |
standard wall function UDF fluent (k-omega model) | alinik | Fluent UDF and Scheme Programming | 0 | April 27, 2017 18:05 |
Fluent Radiation/porous media | Schmitt pierre-Louis | FLUENT | 26 | September 1, 2016 10:29 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 06:20 |