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

Real external temperature as free stream temperature

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 16, 2017, 05:53
Default Real external temperature as free stream temperature
  #1
Member
 
youhane kha
Join Date: Sep 2017
Posts: 36
Rep Power: 8
youhane is on a distinguished road
Hi everybody,

Please help me to solve my problem,

I want to apply a convection boundary condition to a wall, but I want to put the free stream temperature as the real external temperature that I have in a notepad file like that:



left values are hours of the day, and right values are external temperatures.

Can anyone tell me how to do that please ??!
youhane is offline   Reply With Quote

Old   September 17, 2017, 21:41
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Quote:
Originally Posted by youhane View Post
Hi everybody,

Please help me to solve my problem,

I want to apply a convection boundary condition to a wall, but I want to put the free stream temperature as the real external temperature that I have in a notepad file like that:



left values are hours of the day, and right values are external temperatures.

Can anyone tell me how to do that please ??!
Hello

Most efficient for your case if UDF function.
Read ANSYS Fluent Customization Manual
Find there 2.3.22.DEFINE_PROFILE function. You need it

Code:
#include "udf.h"
DEFINE_PROFILE(free_stream_temp,t,i)
{
real x[ND_ND]; /* this will hold the position vector */
real y;
real time;
face_t f;

time = CURRENT_TIME;  // fluent macro to get global flow time
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
F_PROFILE(f,t,i) = ***PUT HERE YOUR TIME DEPENDENT FUNCTION***;
}
end_f_loop(f,t)
}

Convert your table into time-dependent function in excel for example.

Compile this function. If you do not know how read https://www.cfd-online.com/Wiki/Fluent_FAQ

If you have no option except table read how to interpolate variables from table 3D heat source term profile

Best regards
youhane likes this.
AlexanderZ is offline   Reply With Quote

Old   September 18, 2017, 08:03
Default
  #3
Member
 
youhane kha
Join Date: Sep 2017
Posts: 36
Rep Power: 8
youhane is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
Hello

Most efficient for your case if UDF function.
Read ANSYS Fluent Customization Manual
Find there 2.3.22.DEFINE_PROFILE function. You need it

Code:
#include "udf.h"
DEFINE_PROFILE(free_stream_temp,t,i)
{
real x[ND_ND]; /* this will hold the position vector */
real y;
real time;
face_t f;

time = CURRENT_TIME;  // fluent macro to get global flow time
begin_f_loop(f,t)
{
F_CENTROID(x,f,t);
F_PROFILE(f,t,i) = ***PUT HERE YOUR TIME DEPENDENT FUNCTION***;
}
end_f_loop(f,t)
}

Convert your table into time-dependent function in excel for example.

Compile this function. If you do not know how read https://www.cfd-online.com/Wiki/Fluent_FAQ

If you have no option except table read how to interpolate variables from table 3D heat source term profile

Best regards
Thank you very much dear AlexanderZ

Your answer is extremely useful
youhane 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
Non-linear equation system (DEFINE_source) Laexzzz Fluent UDF and Scheme Programming 4 February 11, 2015 16:11
Free stream temperature in convective bc vivek bharadwaj g FLUENT 2 July 17, 2014 00:30
Problems in air flow udf - divergence PJT Fluent UDF and Scheme Programming 0 May 28, 2013 10:01
Free Stream Temperature wall boundary condition emanuele FLUENT 0 March 19, 2007 10:45
udf error Rashmi FLUENT 0 December 27, 2005 05:35


All times are GMT -4. The time now is 12:52.