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

UDF!where find the variables for phase velocities

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 29, 2001, 21:58
Default UDF!where find the variables for phase velocities
  #1
eric
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 two-phases 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
  Reply With Quote

Old   August 2, 2001, 05:20
Default Re: UDF!where find the variables for phase veloci
  #2
Tobias Hirsch
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 udf-file. 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
  Reply With Quote

Old   August 2, 2001, 05:46
Default Re: UDF!where find the variables for phase veloci
  #3
eric
Guest
 
Posts: n/a
Thanks greatly.

  Reply With Quote

Old   August 3, 2001, 07:16
Default Re: UDF!where find the variables for phase veloci
  #4
eric
Guest
 
Posts: n/a
I have not find the viables for the pure velocities of the two phases yet.

where...
  Reply With Quote

Old   August 3, 2001, 07:21
Default Re: UDF!where find the variables for phase veloci
  #5
Tobias Hirsch
Guest
 
Posts: n/a
With which multiphase model are you working? Volume of Fluid, Cavitation or algebraic slip?
  Reply With Quote

Old   August 3, 2001, 08:45
Default Re: UDF!where find the variables for phase veloci
  #6
eric
Guest
 
Posts: n/a
I use the algebraic slip model to simulate the water-sediment two-phase flow.

Thanks greatly!

  Reply With Quote

Old   August 3, 2001, 09:11
Default Re: UDF!where find the variables for phase veloci
  #7
Tobias Hirsch
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_m-ph1

where u_ph1 is the velocity of phase1, u_m is the mixture velocity and u_m-ph1 is the diffusion velocity. The diffusion velocity can be calculated from the slip velocity u_slip via

u_m-ph1 = (1-c_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 udf-file:

#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...

  Reply With Quote

Old   August 4, 2001, 10:25
Default Re: UDF!where find the variables for phase veloci
  #8
eric
Guest
 
Posts: n/a
thanks greatly.

I believe I would get benefit from your ideas..

Regards,
  Reply With Quote

Old   April 15, 2020, 14:30
Default Please share UDF file
  #9
New Member
 
Abhi
Join Date: Jan 2018
Posts: 27
Rep Power: 8
abhilasht is on a distinguished road
Quote:
Originally Posted by Tobias Hirsch
;97946
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_m-ph1

where u_ph1 is the velocity of phase1, u_m is the mixture velocity and u_m-ph1 is the diffusion velocity. The diffusion velocity can be calculated from the slip velocity u_slip via

u_m-ph1 = (1-c_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 udf-file:

#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...

Can you please share UDF file for this.
abhilasht is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


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 09:20
PHI file structure Eugene Phoenics 9 November 2, 2001 23:00


All times are GMT -4. The time now is 20:14.