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

UDF helppppp please....

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 9, 2006, 01:04
Default UDF helppppp please....
  #1
Matt
Guest
 
Posts: n/a
I am a beginner in C, I need to simulate a fire. Transient solution. A guru (cg) wrote me the below UDF for linearly increasing energy source with time. I need to turn on the fan after two minutes fire starts,how can i do that, any help would be greatly appreciated...

fan BC is just simple constant input. it will make a jump start...i hope it would work.

#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; }

  Reply With Quote

Old   October 13, 2006, 10:05
Default Re: UDF helppppp please....
  #2
LWoodsend
Guest
 
Posts: n/a
Just add a boolean compare for the calculation to start such as:

if (time >= 2*60)

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

else

{ real source = 0 }
  Reply With Quote

Old   October 14, 2006, 01:38
Default Re: UDF helppppp please....
  #3
Matt
Guest
 
Posts: n/a
Thank you so much LWoodsend. My question was not clear enough, i meant to turn on the fan at time=120 sec. Fan is simply define by constant pressure jump in BC (Fan BC). Yesterday, i just waited for solution to come up to 30 sec and then i stopped and changed the BC from interior to fan. i just wanna do it fancy way again appreciated ur help, have great weekend!
  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
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 07:37
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01


All times are GMT -4. The time now is 13:56.