CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   GHow to define UDF for Density in Ansys Fluent? and How to remove Error? (https://www.cfd-online.com/Forums/fluent/219522-ghow-define-udf-density-ansys-fluent-how-remove-error.html)

Azim07 July 30, 2019 07:26

GHow to define UDF for Density in Ansys Fluent? and How to remove Error?
 
2 Attachment(s)
i want to define the density in the in the form of Equation by UDF in ansys fluent of the following equation.

rho = 885/(0.0008(temp-321.35)+1)

i have written the following UDF

https://www.cfd-online.com/Forums/at...1&d=1564485750

and it shows the following Error

https://www.cfd-online.com/Forums/at...1&d=1564485883

How can i solve this problem or any other way i can simply Define UDf in Easy way?????

AlexanderZ July 30, 2019 23:58

next time put here code, not picture

you've defined temperature as
Code:

real temp = C_T(c,t);
but later in equation you are using t (which is thread actually) but not temp

change t to temp in equation

best regards


All times are GMT -4. The time now is 19:29.