|
[Sponsors] |
May 28, 2014, 10:59 |
UDF to define thermal conductivity
|
#1 |
New Member
saeed
Join Date: May 2014
Posts: 1
Rep Power: 0 |
Hi all
I am looking to define the constant thermal conductivity for different temperature. I wrote as below in Microsowft Visual Studio, it got 12 errors: #include _FLUENT_UDF_H DEFINE_PROPERTY(user_k, cell, thread) { real user_k; temp = C_T(cell, thread); if (temp > 316.) user_k = 0.148; if (temp < 315. ) user_k = 0.15; else user_k = 1.5; return user_k; } Is there anyone could help me? Thanks |
|
May 29, 2014, 14:33 |
|
#2 |
Member
Join Date: Jul 2013
Posts: 80
Rep Power: 13 |
Your first line of code should be :
#include "udf.h" If you don't include this header, your code will not understand the meaning of a cell, a thread and so on. Delete this line: #include _FLUENT_UDF_H |
|
May 29, 2014, 22:08 |
|
#3 |
Senior Member
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17 |
change:
temp = C_T(cell, thread); for: real temp = C_T(cell, thread); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Simulation of a single bubble with a VOF-method | Suzzn | CFX | 21 | January 29, 2018 01:58 |
I need one simple udf code for effective thermal conductivity of nanofluid | mvf | Fluent UDF and Scheme Programming | 1 | February 10, 2017 20:05 |
Effective Thermal Conductivity | Merlin | CFX | 2 | July 23, 2015 08:10 |
UDF compiling problem | epc1 | Fluent UDF and Scheme Programming | 0 | September 25, 2012 20:36 |
Info: Short Course On Thermal Design of Electronic Equipment | Arnold Free | Main CFD Forum | 0 | August 10, 1999 11:18 |