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

Macro to access MEAN volume fraction

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 16, 2012, 23:38
Default Macro to access MEAN volume fraction
  #1
New Member
 
Join Date: Jun 2011
Posts: 18
Rep Power: 5
yashmash is on a distinguished road
Hello all,

I am running an eulerian model on Fluent using unsteady statistics. Could anyone please tell me what is the macro to access the MEAN volume fraction for a specific phase? I know from the manual that for an instantaneous case the macro is C_VOF(c,pt[n]), but i cannot find anything regarding the MEAN value.

Any help would be much appreciated,

Thanks!!

Yashmash
yashmash is offline   Reply With Quote

Old   January 17, 2012, 03:25
Default
  #2
Member
 
Join Date: Nov 2011
Location: Czech Republic
Posts: 94
Rep Power: 4
Sixkillers is on a distinguished road
I don't if such macro exists, but there is possibility to compute mean fraction by your own. You can iterate through all cells in you domain and determine volume that is occupied by particular phase and then divide it by total volume.
Sixkillers is offline   Reply With Quote

Old   January 17, 2012, 09:24
Default
  #3
Senior Member
 
shoeb khan
Join Date: Nov 2011
Posts: 179
Rep Power: 4
shk12345 is on a distinguished road
if you need the mean volume fraction
go to reports>>volume intergral>>volume average >>phases
and there you can see the phase volume in your domain

regards
shk
shk12345 is offline   Reply With Quote

Old   January 18, 2012, 00:21
Default
  #4
New Member
 
Join Date: Jun 2011
Posts: 18
Rep Power: 5
yashmash is on a distinguished road
thanks guys but what I'm looking for is the MACRO for TIME AVERAGED or MEAN value of volume fraction so I can use it in my UDF.
yashmash is offline   Reply With Quote

Old   January 18, 2012, 03:25
Default
  #5
Senior Member
 
shoeb khan
Join Date: Nov 2011
Posts: 179
Rep Power: 4
shk12345 is on a distinguished road
Quote:
Originally Posted by yashmash View Post
thanks guys but what I'm looking for is the MACRO for TIME AVERAGED or MEAN value of volume fraction so I can use it in my UDF.
All the udf in fluent calculates the value to the cell centered value .
you cannot get the mean value with udf in an entire domain . you have to calculate the value using some loop function inside your udf.

regards
shk
shk12345 is offline   Reply With Quote

Old   January 25, 2012, 03:56
Default
  #6
New Member
 
Join Date: Jun 2011
Posts: 18
Rep Power: 5
yashmash is on a distinguished road
Hi Shoeb,

I was hoping you could help me with the following UDF. I am running a time dependent eulerian model with 3 phases. My udf is to store into a UDS the time-averaged volume fraction of one of the phases. However the values that are returned are the time-averaged volume fractions divided by a constant (constant is 74). I have no idea why this happens!
Please see my UDF below:

#include "udf.h"
#define Rtio2 4260
DEFINE_ON_DEMAND(TiO2_loading_gm3)
{
Thread *thread_ti;
Thread *t;
Thread *mix_thread;
cell_t c;
real vof_ti = 0;
Domain *d;
d = Get_Domain(3);
/* Loop over all cell threads in the domain */

thread_loop_c(thread_ti,d)
{
/*thread_ti = THREAD_SUB_THREAD(mix_thread, 3);*/
/* Loop over all cells */
begin_c_loop(c,thread_ti)
{
vof_ti = C_STORAGE_R(c,thread_ti,SV_VOF_MEAN);

C_UDSI(c, thread_ti, 0) = vof_ti;
}
end_c_loop(c,thread_ti)

}
}

Your assistance is much appreciated,

Thanks,

Yash
yashmash is offline   Reply With Quote

Old   January 25, 2012, 08:50
Default
  #7
Senior Member
 
shoeb khan
Join Date: Nov 2011
Posts: 179
Rep Power: 4
shk12345 is on a distinguished road
hi
the problem may be i am saying may be
that the domain udf has to be 2 for 3rd phase as domain id starts from 0 1 and 2 for phase 1 2 and 3.

kindly make the changes and see whether the simulation is working fine.

also try to use the subthread for the thread of the phase of which you want the value for the vof of the fluid.
Thread *subthread=THREAD_SUB_THREAD(mix_thread, p_d_index);

Regards
Shk

Last edited by shk12345; January 25, 2012 at 09:40.
shk12345 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
Variation in volume fraction Pravesh Kumar FLUENT 5 November 6, 2013 00:48
BlockMesh FOAM warning gaottino OpenFOAM Native Meshers: blockMesh 7 July 19, 2010 14:11
interDyMFoam - change in volume fraction gopala OpenFOAM Running, Solving & CFD 0 April 27, 2009 10:46
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55
volume fraction, Mass fraction and Bulk Mass flow Dr.jones CFX 1 January 25, 2006 04:32


All times are GMT -4. The time now is 10:01.