|
[Sponsors] |
October 9, 2006, 01:04 |
UDF helppppp please....
|
#1 |
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; } |
|
October 13, 2006, 10:05 |
Re: UDF helppppp please....
|
#2 |
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 } |
|
October 14, 2006, 01:38 |
Re: UDF helppppp please....
|
#3 |
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!
|
|
|
|
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 |