|
[Sponsors] |
December 12, 2011, 17:45 |
time dependent energy source term
|
#1 |
New Member
Join Date: Mar 2011
Posts: 1
Rep Power: 0 |
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; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
source term for energy source from a wall surface | rahulsharma | FLUENT | 0 | February 1, 2010 03:00 |
UDF for energy source | mauricio sanchez | FLUENT | 0 | August 30, 2005 16:56 |
Why FVM for high-Re flows? | Zhong Lei | Main CFD Forum | 23 | May 14, 1999 14:22 |
linearization of radiative energy source term | Nuray Kayakol | Main CFD Forum | 0 | May 7, 1999 09:11 |