CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF help (https://www.cfd-online.com/Forums/fluent/42411-udf-help.html)

Matt September 28, 2006 08:18

UDF help
 
Hi all: I am modelling a fire and I have a volumetric heat source inreasing linerly with time upto 15th minute where released heat rate is 5 MW. I have never written a PDF before and i am a beginner in C. So your advices would be appreciated. -Matt

Seeker Phil September 28, 2006 13:55

Re: UDF help
 
As most other users will tell you, you got to read the manual.

Use the UDF that defines a profile. You can put a check for the flow time and when the logic is true it will stop increasing the temperature.

cg September 28, 2006 16:32

Re: UDF help
 
or you could use...

#include "udf.h"

DEFINE_SOURCE(energy_source,c,t,dS,eqn) {

real time = CURRENT_TIME;

real source = 100. * time; /* units of Watts/m3 */

dS[eqn] = 0.;

return source; }

Matt September 29, 2006 01:10

Re: UDF help
 
thank you much Phil and cg, appreciated..


All times are GMT -4. The time now is 00:43.