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

simulating Heat flux

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 14, 2012, 05:27
Default simulating Heat flux
  #1
New Member
 
B Aram
Join Date: Aug 2012
Posts: 9
Rep Power: 13
landa is on a distinguished road
Hi
i want to define solar radiation as a heat flux BC for my problem. i have its average quantity per month (in w/m^2) for a year and i want to define it for fluent. i think i should use define_profile but i'm not good at prgramming especialy in c and also i'm newbie in defining udf.
can someone please kindly share a sample udf program for me?
thanks in advance
landa is offline   Reply With Quote

Old   August 14, 2012, 23:26
Default
  #2
Senior Member
 
Syavash Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 17
syavash is on a distinguished road
Quote:
Originally Posted by landa View Post
Hi
i want to define solar radiation as a heat flux BC for my problem. i have its average quantity per month (in w/m^2) for a year and i want to define it for fluent. i think i should use define_profile but i'm not good at prgramming especialy in c and also i'm newbie in defining udf.
can someone please kindly share a sample udf program for me?
thanks in advance

Hi landa,

You may reffere to Fluent UDF manual. There are some good examples on Define_profile in there. You just need to copy one of thouse and pase it in a C file. Then you can change the F_profile value depending on your need. It's so simple, Just take a look and make it!
Good luck
syavash is offline   Reply With Quote

Old   August 15, 2012, 03:53
Default
  #3
New Member
 
B Aram
Join Date: Aug 2012
Posts: 9
Rep Power: 13
landa is on a distinguished road
i did so. can u please kindly take a look at it to see whether it has any problem.
this program includes heat flux for 3 days

#include"udf.h"
DEFINE_PROFILE(flux,th,i)
{
face_t f;
begin_f_loop(f,th)
{
if(CURRENT_TIME <= 86400.0 )
F_PROFILE(f,th,i) = 300.0;
elseif(CURRENT_TIME <= 172800.0 && CURRENT_TIME > 86400.0 )
F_PROFILE(f,th,i) = 310 ;
elseif(CURRENT_TIME <= 259200.0 && CURRENT_TIME > 172800.0 )
F_PROFILE(f,th,i) = 320 ;
else (CURRENT_TIME <= 345600.0 && CURRENT_TIME > 259200.0 )
F_PROFILE(f,th,i) = 330 ;
}
end_f_loop(f,th);
}
landa 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Total heat transf. rate vs Total surface heat flux Renato Sousa FLUENT 1 April 14, 2020 04:27
Sign of Heat Flux at wall Kyung FLUENT 2 February 26, 2016 17:25
Negative Heat Flux shashank312 FLUENT 3 December 9, 2011 18:00
heat flux as a function of angle uncle_salty FLUENT 2 November 11, 2009 19:03
Basic question: UDF for wall heat flux Carl FLUENT 1 August 5, 2006 20:01


All times are GMT -4. The time now is 11:31.