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

simulating Heat flux

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 14, 2012, 04:27
Default simulating Heat flux
  #1
New Member
 
B Aram
Join Date: Aug 2012
Posts: 9
Rep Power: 4
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, 22:26
Default
  #2
Senior Member
 
Syavash
Join Date: Apr 2010
Location: Tehran, Karaj
Posts: 217
Rep Power: 8
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, 02:53
Default
  #3
New Member
 
B Aram
Join Date: Aug 2012
Posts: 9
Rep Power: 4
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
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
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 19:01
Total heat transf. rate vs Total surface heat flux Renato Sousa FLUENT 0 August 22, 2005 10:34
Sign of Heat Flux at wall Kyung FLUENT 1 June 3, 2005 12:35


All times are GMT -4. The time now is 19:47.