CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Identify viscosity as a function of temperature in FLUENT (https://www.cfd-online.com/Forums/fluent/228695-identify-viscosity-function-temperature-fluent.html)

amrkaood July 10, 2020 10:27

Identify viscosity as a function of temperature in FLUENT
 
Dears,
How can identify the viscosity as a function of temperature in FLUENT?
By UDF or Expression
https://scontent-hbe1-1.xx.fbcdn.net...ca&oe=5F2CA547

rupak504 July 10, 2020 15:21

use DEFINE PROPERTY macro in UDF, you can find examples online.

amrkaood July 10, 2020 15:27

Unfortunately, i didn't work on a code before.
But, already i check on internet and i found this code. But, i can't modify it.
UDF that simulates solidification by specifying a temperature- dependent viscosity property ************************************************** ********************/ DEFINE_PROPERTY(cell_viscosity, c, t) { real mu_lam; real temp = C_T(c, t); if (temp > 288.) mu_lam = 5.5e-3; else if (temp > 286.) mu_lam = 143.2135 - 0.49725 * temp; else mu_lam = 1.; return mu_lam; }

rupak504 July 10, 2020 15:32

Quote:

Originally Posted by amrkaood (Post 777450)
Unfortunately, i didn't work on a code before.
But, already i check on internet and i found this code. But, i can't modify it.
UDF that simulates solidification by specifying a temperature- dependent viscosity property ************************************************** ********************/ DEFINE_PROPERTY(cell_viscosity, c, t) { real mu_lam; real temp = C_T(c, t); if (temp > 288.) mu_lam = 5.5e-3; else if (temp > 286.) mu_lam = 143.2135 - 0.49725 * temp; else mu_lam = 1.; return mu_lam; }

DEFINE_PROPERTY(cell_viscosity, c, t) { real mu_lam; real temp = C_T(c, t); mu_lam = (your expression as a function of temp); return mu_lam; }

compile this, then in materials, you can find mu_lam under viscosity tab of the selected material


All times are GMT -4. The time now is 08:59.