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

time dependent energy source term

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 12, 2011, 16:45
Default time dependent energy source term
  #1
New Member
 
Join Date: Mar 2011
Posts: 1
Rep Power: 0
kevinz is on a distinguished road
I need to add an energy source term in a flow region. The source term is time dependent. I tried the following UDF, but it's not working. Anyone kindly offer some help?

/************************************************** ***/
/*To be defined source term is S=A*sin(2*PI*F*t)*/

#include "udf.h"
#define A 11
#define F 1000
#define PI 3.1415926

DEFINE_SOURCE(energy_source,cell,thread,dS,eqn)
{
real source;
real current_time=CURRENT_TIME;

source=A*sin(2*PI*F*current_time);
dS[eqn]=A*2*PI*F*cos(2*PI*F*current_time);

return source;
}
kevinz 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
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
source term for energy source from a wall surface rahulsharma FLUENT 0 February 1, 2010 02:00
UDF for energy source mauricio sanchez FLUENT 0 August 30, 2005 15:56
Why FVM for high-Re flows? Zhong Lei Main CFD Forum 23 May 14, 1999 13:22
linearization of radiative energy source term Nuray Kayakol Main CFD Forum 0 May 7, 1999 08:11


All times are GMT -4. The time now is 18:50.