|
[Sponsors] |
Viscosity UDF Gives different Results to fluent Model? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 28, 2019, 08:52 |
Viscosity UDF Gives different Results to fluent Model?
|
#1 |
Member
Sebi
Join Date: Mar 2019
Posts: 49
Rep Power: 7 |
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 11:54. |
|
March 28, 2019, 21:11 |
|
#2 | |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Quote:
best regards |
||
Tags |
carreau, fluent, udf, viscosity |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Use of k-epsilon and k-omega Models | Jade M | Main CFD Forum | 40 | January 27, 2023 08:18 |
How to solve UDF compilation problems in Fluent. | pakk | Fluent UDF and Scheme Programming | 16 | September 10, 2018 03:48 |
standard wall function UDF fluent (k-omega model) | alinik | Fluent UDF and Scheme Programming | 0 | April 27, 2017 19:05 |
Fluent Radiation/porous media | Schmitt pierre-Louis | FLUENT | 26 | September 1, 2016 11:29 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |