
[Sponsors] 
July 29, 2001, 20:58 
UDF！where find the variables for phase velocities

#1 
Guest
Posts: n/a

For the single flow, the velocity variables in the three directions could express as C_U(c,thread), C_V(c,thread) and C_W(c,thread). However, in the twophases flows, where find the variables for the phase velocities?
I guess they could be expressed as C_U(c,thread,i), but I could not confirm it. Any help would be appreciated! eric 

August 2, 2001, 04:20 
Re: UDF！where find the variables for phase veloci

#2 
Guest
Posts: n/a

I am working with the Algebraic Slip model with two phases. The define statements for the access to the variables can be found in the src directory of your Fluent installation. There you should look at the file sg_mphase.h. Normally you should include this file via #include "sg_mgphase.h" into your source code. Since this did not work I just copied the needed define statements to the beginning of my udffile. Some examples:
#define C_RHO_PHASE(c,t,phase) C_STORAGE_R(c,t,SV_PHASE_RHO+phase) #define C_SLIP_U(c,t) C_STORAGE_R(c,t,SV_SLIP_U) #define C_SLIP_V(c,t) C_STORAGE_R(c,t,SV_SLIP_V) #define C_VOF(c,t,phase) C_STORAGE_R(c,t,SV_VOF_0+phase) This gives you access on rho, slip velcoities and volume fraction. I did not use the pure velocities but You will find them in this file or perhaps in the file mem.h 

August 2, 2001, 04:46 
Re: UDF！where find the variables for phase veloci

#3 
Guest
Posts: n/a

Thanks greatly.


August 3, 2001, 06:16 
Re: UDF！where find the variables for phase veloci

#4 
Guest
Posts: n/a

I have not find the viables for the pure velocities of the two phases yet.
where... 

August 3, 2001, 06:21 
Re: UDF！where find the variables for phase veloci

#5 
Guest
Posts: n/a

With which multiphase model are you working? Volume of Fluid, Cavitation or algebraic slip?


August 3, 2001, 07:45 
Re: UDF！where find the variables for phase veloci

#6 
Guest
Posts: n/a

I use the algebraic slip model to simulate the watersediment twophase flow.
Thanks greatly! 

August 3, 2001, 08:11 
Re: UDF！where find the variables for phase veloci

#7 
Guest
Posts: n/a

Ok. In the algebraic slip model Fluent works with the mixture values, that means mixture velocity, mixture density. It does not store the values of the velocities of the different phases. To calculate these velocities you can access to
1. mixture velocity C_U(c,t), C_V().... 2. slip velocity C_SLIP_U(c,t), C_SLIP_V(c,t),.. The velocity of the phases can be obtained from u_ph1 = u_m + u_mph1 where u_ph1 is the velocity of phase1, u_m is the mixture velocity and u_mph1 is the diffusion velocity. The diffusion velocity can be calculated from the slip velocity u_slip via u_mph1 = (1c_ph1) * u_slip with the mass fraction c_ph1 = alpha_ph1 * rho_ph1 / rho_m The last two equations are valid if you use only two phases. For more phases see the Fluent manual. So when you need the velocities of the separate phases you have to calculate them in this way. To have access to all variables you should add thiese lines to the head of your udffile: #define C_RHO_PHASE(c,t,phase) C_STORAGE_R(c,t,SV_PHASE_RHO+phase) #define C_SLIP_U(c,t) C_STORAGE_R(c,t,SV_SLIP_U) #define C_SLIP_V(c,t) C_STORAGE_R(c,t,SV_SLIP_V) #define C_VOF(c,t,phase) C_STORAGE_R(c,t,SV_VOF_0+phase) Another tip: When you calculate some values via udf and you load your case and data file, some values are not updated automatically or updated using the default Fluent law but not your own udf. You have to perform one iteration with the udf to display the correct values. Have much fun with the algebraic slip model. I also have problems with this... 

August 4, 2001, 09:25 
Re: UDF！where find the variables for phase veloci

#8 
Guest
Posts: n/a

thanks greatly.
I believe I would get benefit from your ideas.. Regards, 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug  unoder  OpenFOAM Installation  11  January 30, 2008 21:30 
multiphase UDF, variables for phase velocities  Kerem  FLUENT  4  March 27, 2006 08:20 
PHI file structure  Eugene  Phoenics  9  November 2, 2001 23:00 