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

UDF for time dependent heat flux

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 23, 2015, 13:00
Question UDF for time dependent heat flux
  #1
New Member
 
Join Date: Dec 2015
Posts: 2
Rep Power: 0
rontgen5 is on a distinguished road
Hello!

I am very new to ANSYS. I am modeling a simple conduction + convection model. Although the heat source in this is more like a PULSE. In a 300 msec cycle, a heat pulse of 10 msec long is sent at 50th msec. All the time except for the pulse duration is for cooling.

I have written an UDF, that can be seen below (with my negligible knowledge of writing an UDF). When I try to interpret it, I am getting an errors: 1. line 35arse error, 2. f_loop_last: undeclared variable. I am not able to understand the cause of these errors. I tried looking at other threads, but I still couldn't understand what's wrong.

Can some one please have a look and give me some kind of feedback?

I highly appreciate your time, thank you very much.


Code:

# include "udf.h"
# include "unsteady.h"

DEFINE_EXECUTE_AT_END (execute_loop)
{
face_t f;
Thread *t;
real c_time=0.0000;
real q;
c_time=CURRENT_TIME;

if (c_time<0.05)
{
q=0;
}

if ((c_time>=0.05)&&(c_time<=0.06))
{
q=10000;
}

if (c_time>0.06)
{
q=0;
}

DEFINE_PROFILE(HeatPulse, t, i)
{
begin_f_loop (f,t)
F_PROFILE(f,t,i) = q;
end_f_loop(f,t)
}
}
rontgen5 is offline   Reply With Quote

 

Tags
fluent, heat flux, udf


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
UDF for a time varying heat flux boundary condition B.Hamada Fluent UDF and Scheme Programming 9 August 8, 2018 12:51
temperature dependent heat flux on wall tjliang OpenFOAM Running, Solving & CFD 0 December 8, 2014 09:37
Variable heat flux with UDF with respect to Duct Area famon FLUENT 1 November 25, 2014 09:42
Problem in UDF time dependent vloumetric heat source eng_yasser_2020 Fluent UDF and Scheme Programming 0 March 30, 2014 08:07
Space- and time-dependant heat flux via UDF flotus1 Fluent UDF and Scheme Programming 4 September 10, 2012 08:00


All times are GMT -4. The time now is 10:23.