|
[Sponsors] |
January 17, 2012, 00:38 |
Macro to access MEAN volume fraction
|
#1 |
New Member
Join Date: Jun 2011
Posts: 18
Rep Power: 15 |
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 |
|
January 17, 2012, 04:25 |
|
#2 |
Member
Join Date: Nov 2011
Location: Czech Republic
Posts: 97
Rep Power: 15 |
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.
|
|
January 17, 2012, 10:24 |
|
#3 |
Senior Member
shoeb khan
Join Date: Nov 2011
Posts: 179
Rep Power: 15 |
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 |
|
January 18, 2012, 01:21 |
|
#4 |
New Member
Join Date: Jun 2011
Posts: 18
Rep Power: 15 |
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.
|
|
January 18, 2012, 04:25 |
|
#5 | |
Senior Member
shoeb khan
Join Date: Nov 2011
Posts: 179
Rep Power: 15 |
Quote:
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 |
||
January 25, 2012, 04:56 |
|
#6 |
New Member
Join Date: Jun 2011
Posts: 18
Rep Power: 15 |
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 |
|
January 25, 2012, 09:50 |
|
#7 |
Senior Member
shoeb khan
Join Date: Nov 2011
Posts: 179
Rep Power: 15 |
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 10:40. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Variation in volume fraction | Pravesh Kumar | FLUENT | 5 | November 6, 2013 01:48 |
[blockMesh] BlockMesh FOAM warning | gaottino | OpenFOAM Meshing & Mesh Conversion | 7 | July 19, 2010 15:11 |
interDyMFoam - change in volume fraction | gopala | OpenFOAM Running, Solving & CFD | 0 | April 27, 2009 11:46 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 12:55 |
volume fraction, Mass fraction and Bulk Mass flow | Dr.jones | CFX | 1 | January 25, 2006 05:32 |