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

UDF for inlet gas impulse

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 3, 2009, 08:53
Smile UDF for inlet gas impulse
  #1
Member
 
CJ
Join Date: Jun 2009
Posts: 34
Rep Power: 8
solefire is on a distinguished road
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)
}
solefire is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
mass flow in is not equal to mass flow out saii CFX 2 September 18, 2009 08:07
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


All times are GMT -4. The time now is 18:37.