|
[Sponsors] |
November 3, 2009, 07:53 |
UDF for inlet gas impulse
|
#1 |
Member
CJ
Join Date: Jun 2009
Posts: 34
Rep Power: 16 |
Here is a problem I have met recently and I hope I make it clear here.
There are mixed gases at the inlet, including air and NH3(ammonia). Air is supposed to be at stationary motion, while NH3 is injected only from the 2nd second to 2.5 second (lasting for 0.5 seconds) with mass fraction 0.01. Therefore, ammonia can be regarded as the tracer. I tried to write the UDF shown below, while I still don't have a very clear clue how to set the ammonia as the tracer and air as the steady flow. Hopefully I can get some of advice!Thanks a lot! #include "udf.h" DEFINE_PROFILE(inlet_tracer,thread,nv) { face_t f; real flow_time = RP_Get_Real("flow-time"); begin_f_loop (f,thread) { if(flow_time<2) F_PROFILE(f,thread,nv)=0; if(flow_time>=2&&flow_time<=2.5) F_PROFILE(f,thread,nv)=0.01; else if(flow_time>2.5) F_PROFILE(f,thread,nv)=0; } end_f_loop (f,thread) } |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 05:21 |
Gas phase velocity in DPM Drag UDF | Hanz | Fluent UDF and Scheme Programming | 0 | June 2, 2009 14:08 |
REAL GAS UDF | brian | FLUENT | 6 | September 11, 2006 08:23 |
Real gas model with UDF | Ed | FLUENT | 4 | September 18, 2003 10:42 |
Gas pressure question | Dan Moskal | Main CFD Forum | 0 | October 24, 2002 22:02 |