|October 26, 2011, 23:48||
UDF to calculate phase-averaged turbulence variables in a periodic flow
Join Date: Aug 2010
Posts: 2Rep Power: 0
I'm new to Fluent UDF. But I need to write a UDF to calculate phase-average turbulence variables in a 3D time-periodic flow. I describe it in detail as follow:
I'm simulating a full 3D stirred vessel via both RANS and LES method. Comparisons between turbulence variables will be made. It's reported that direct ensemble-averaged result will not work in this case, due to pseudo-turbulence (contribution from the periodic flow). I found some hints from the post by Lionel Larcheveque (http://www.cfd-online.com/Forums/mai...intensity.html).
For convenience, I copied that original post below:
Suppose you have a periodic signal (for instance pressure signal). You can then define a period duration D. Then divide this duration into n equal intervals of time. At any given time t, you will be able to determine in which sub-interval i you are, i.e. :
A + B*D + (i-1)*D/n < t < A + B*D + i*D/n
with A a constant and B the number of periods since the beginning of the experiment or the calculation.
For each sub-interval 1 <= i <= n :
*** compute classical statistics Mi(u)=U_i, Mi(v)=V_i, Mi(u^2) and Mi(v^2) (M means mean, _i for phase i)
*** phase fluctuations u'_i and v'_i are given by :
*** phase averaged turbulent intensity may be defined for instance by the ratio :
In practice, you have to store arrays of size n for the sums of u, v, u^2 and v^2 and for the number of samples. At each time, identify the phase number i, and then add instantaneous u, v, u^2 and v^2 data to the i th element of the related arrays and increase by 1 the number of samples for the i th phase. At the end, for each i, divide the element i by the number of samples of the i th phase to obtain phase averaged statistics.
Since I'm new UDF user, could anybody kindly help me with that or give me some advice (which macros & functions should I use)?
|phase-average, turbulence, udf|
|Thread||Thread Starter||Forum||Replies||Last Post|
|How to access only one phase in multiphase model by UDF||wersoe||Fluent UDF and Scheme Programming||1||January 4, 2017 08:11|
|UDF of two phase flow : drag coefficient||superxeonman||FLUENT||0||May 21, 2008 21:53|
|periodic two phase flow||aahh||FLUENT||1||April 3, 2005 00:47|
|How to calculate the mass flow rate with UDF ?||HP||FLUENT||0||January 10, 2005 20:38|
|How to calculate density of solid phase||zhou||Main CFD Forum||0||December 17, 1999 20:06|