UDF！where find the variables for phase velocities
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 
Re: UDF！where find the variables for phase veloci
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 
Re: UDF！where find the variables for phase veloci
Thanks greatly.

Re: UDF！where find the variables for phase veloci
I have not find the viables for the pure velocities of the two phases yet.
where... 
Re: UDF！where find the variables for phase veloci
With which multiphase model are you working? Volume of Fluid, Cavitation or algebraic slip?

Re: UDF！where find the variables for phase veloci
I use the algebraic slip model to simulate the watersediment twophase flow.
Thanks greatly! 
Re: UDF！where find the variables for phase veloci
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... 
Re: UDF！where find the variables for phase veloci
thanks greatly.
I believe I would get benefit from your ideas.. Regards, 
All times are GMT 4. The time now is 20:47. 