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

Time and Temperature dependant heat source term

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By blackmask

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 15, 2018, 02:19
Default Time and Temperature dependant heat source term
  #1
New Member
 
Join Date: Sep 2018
Posts: 6
Rep Power: 8
Farsys is on a distinguished road
Dear all
I'm new with fluent macros and i was wondering is there a way to write a both time and temperature dependant heat source term?
i have already used a time dependant one but what i wanted to know is that is it possible to use a temperature dependent term in my code or not,,

Tnx in advance
Farsys is offline   Reply With Quote

Old   September 15, 2018, 03:53
Default
  #2
Senior Member
 
Join Date: Aug 2011
Posts: 421
Blog Entries: 1
Rep Power: 22
blackmask will become famous soon enough
Yes, you can. Check the fluent UDF manual on C_T macro.
blackmask is offline   Reply With Quote

Old   September 16, 2018, 03:51
Default
  #3
New Member
 
Join Date: Sep 2018
Posts: 6
Rep Power: 8
Farsys is on a distinguished road
Dear blackmask
thanks for your reply but is it possible to use C_T macro for a solid zone?
Farsys is offline   Reply With Quote

Old   September 17, 2018, 10:14
Smile
  #4
New Member
 
Join Date: Sep 2018
Posts: 6
Rep Power: 8
Farsys is on a distinguished road
#include "udf.h"
#define C1 -6.097e+05
#define C2 113.6
#define C3 2187
#define C4 0.004097
#define C5 -0.276
DEFINE_SOURCE(heat_gen,cell,thread,dS,eqn)
{
real source;
real time;
time = CURRENT_TIME;
source =C1+C2*time+C3*C_T(cell,thread)+C4*pow(time,2)+C5* time*C_T(cell,thread)
dS[eqn] = 0;
return source;

}

I have used this code for a time & temperature dependent heat source but when i compile it i get C:/Users/Farshad/AppData/Local/Temp/osso.c.7728.0.c: line 13: parse error.
i dont know what's wrong with it,can anyone help me out please?
Farsys is offline   Reply With Quote

Old   September 17, 2018, 20:03
Default
  #5
Senior Member
 
Join Date: Aug 2011
Posts: 421
Blog Entries: 1
Rep Power: 22
blackmask will become famous soon enough
You missed a ";" at the end of line 13.
Farsys likes this.
blackmask is offline   Reply With Quote

Old   September 18, 2018, 07:28
Smile
  #6
New Member
 
Join Date: Sep 2018
Posts: 6
Rep Power: 8
Farsys is on a distinguished road
God bless you dear blackmask what a simple mistake...

thanks for answering me
Farsys 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
Ansys CFX problem: unexpected very high temperatures in premix laminar combustion faizan_habib7 CFX 4 February 1, 2016 17:00
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32
UDF Scalar Code: HT 1 Greg Perkins FLUENT 8 October 20, 2000 12:40
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 13, 2000 23:03
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 11, 2000 03:43


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