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

Cell Mass flux

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 4, 2000, 17:32
Default Cell Mass flux
  #1
Sandeep Abhyankar
Guest
 
Posts: n/a
In a 2d problem with quad cells, I want to be able to calculate what is the mass flux of fluid flowing across a particular edge of the 2d cell. Is there a way to get this value by UDF's or by anything ?
  Reply With Quote

Old   May 5, 2000, 05:11
Default Re: Cell Mass flux
  #2
Alfonso Ferrandez
Guest
 
Posts: n/a
Hi Sandeep,

the following UDF allows you to calculate the flux across any thread in a 2D domain. If you want to calculate it for a single edge of a 2D Cell, I would recommend creating it as an independent 1D INTERIOR boundary condition. Then you can apply the algorithm below. Perhaps a check for the nodal coordinates of the given cell would also allow for a modification of the function below (Jonas! Another one for the repository!

/************************************************** ****************/ /* This function calculates the flux across the given boundary. */

/* We make use of Fluent Macros for this. */

/* Note that the THREAD_ID parameter is the integer value shown as ID by the Boundary Conditions... Menu. */

/* Also, you must have defined domain as a global variable:

*/

/* extern Domain *domain; */

/************************************************** ****************/

real flow_rate(int thread_id)

{

real flowrate = 0.0;

face_t face;

Thread *face_thread;

face_thread = Lookup_Thread(domain,thread_id);

begin_f_loop(face, face_thread)

{

flowrate = flowrate + F_FLUX(face, face_thread);

}

end_f_loop(face, face_thread)

return flowrate;

}

Hope it helps! AL
  Reply With Quote

Old   May 5, 2000, 09:51
Default Re: Cell Mass flux
  #3
Jonas Larsson
Guest
 
Posts: n/a
I've added this UDF to the temporary UDF library at:

ftp://ftp.cfd-online.com/fluent/

I named the file "flux_calculation.c"

As before anyone can contribute other UDF's by uploading them to:

ftp://ftp.cfd-online.com/incoming/
  Reply With Quote

Old   May 5, 2000, 09:56
Default Re: Cell Mass flux
  #4
Sandeep Abhyankar
Guest
 
Posts: n/a
Thanks a lot AL.
  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
mass flow boundary with fractional mass flux specifications ehsan_am86 CFX 2 May 19, 2011 04:02
flux around one specific cell solefire FLUENT 0 October 7, 2010 18:25
Cells with t below lower limit Purushothama Siemens 2 May 31, 2010 22:58
Creating 100 derived parts / Splitting derived parts for mass flux calculation xamo STAR-CCM+ 8 September 29, 2009 06:35
How are the mass flux and mass flow rate defined? Miles Siemens 2 November 7, 2002 09:45


All times are GMT -4. The time now is 19:43.