CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

GHow to define UDF for Density in Ansys Fluent? and How to remove Error?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 30, 2019, 08:26
Default GHow to define UDF for Density in Ansys Fluent? and How to remove Error?
  #1
New Member
 
Azim Memon
Join Date: Jul 2019
Posts: 12
Rep Power: 6
Azim07 is on a distinguished road
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



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?????
Attached Images
File Type: png udf.PNG (5.4 KB, 7 views)
File Type: png 1.PNG (7.0 KB, 3 views)
Azim07 is offline   Reply With Quote

Old   July 31, 2019, 00:58
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 33
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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
AlexanderZ is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 03:35.