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

UDF to define thermal conductivity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 28, 2014, 10:59
Default UDF to define thermal conductivity
  #1
New Member
 
saeed
Join Date: May 2014
Posts: 1
Rep Power: 0
saeed.sedigh is on a distinguished road
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
saeed.sedigh is offline   Reply With Quote

Old   May 29, 2014, 14:33
Default
  #2
Member
 
Join Date: Jul 2013
Posts: 80
Rep Power: 13
upeksa is on a distinguished road
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
upeksa is offline   Reply With Quote

Old   May 29, 2014, 22:08
Default
  #3
Senior Member
 
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17
macfly is on a distinguished road
change:
temp = C_T(cell, thread);

for:
real temp = C_T(cell, thread);
macfly is offline   Reply With Quote

Reply


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


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


All times are GMT -4. The time now is 14:32.