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

UDF, air flow through a cell----get velocity in

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 6, 2010, 14:02
Default UDF, air flow through a cell----get velocity in
  #1
lig
New Member
 
Gloria
Join Date: Feb 2010
Posts: 16
Rep Power: 16
lig is on a distinguished road
Hi,All,

I am simulating particle-laden air flow through a porous zone. The source term in the transport equation need the velocity and concentration of the air when it flow into a cell. In another word, only two sides of a cell are needed in the calculation in a 2D case---- x, y velocity/concentration when flow direction is opposite to the normal direction of a face.

The current code I wrote as followed (part of the code) has 4 source output values (2D). Could you help me to correct it? Thank a lot.

c_face_loop(c,t,i)
{

ft=C_FACE_THREAD(c,t,i);
f=C_FACE(c,t,i);
c0=F_C0(f,ft);
tc0=THREAD_T0(ft);
c1=F_C1(f,ft);
tc1=THREAD_T1(ft);
scalar=C_UDSI(c0,tc0,7);
F_AREA(Af,f,ft);


NV_D(vel,=,C_U(c0,tc0),C_V(c0,tc0),C_W(c0,tc0));
flowrate=NV_DOT(vel,Af);

source = scalar*CEcell*flowrate/C_VOLUME(c,t);
dS[eqn] = CEcell*flowrate/C_VOLUME(c,t);
Message ("source_7=%g,%g\n",source);

}
return source;
lig is offline   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
UDF for Heat Exchanger model francois louw FLUENT 2 July 16, 2010 03:21
Influece of wall velocity in the main flow marvin CFX 0 March 22, 2008 03:05
Comet - air velocity Tony Campbell Siemens 3 November 10, 2004 03:37
flow simulation across a small fan jane luo Main CFD Forum 15 April 12, 2004 18:49
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 06:13


All times are GMT -4. The time now is 04:22.