CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Help on accessing volume fraction in mixture model (

achuneka April 20, 2009 14:14

Help on accessing volume fraction in mixture model
I am writing a UDF that involves volume fraction for Unsteady RANS simulation with cavitation model turned on.

I define a user defined memory variable and use the following snippet of code to access it.

........ /* All the definitions */

d=Get_Domain(3); /* Vapor Phase domain

(This is just to show how I access C_VOF.. I perform some other operations on it)

I get the value of C_UDMI(c,t,1) as 0 everywhere when the volume fraction of phase 2 varies from 0 to 0.4.

Can someone please help me on the same. Thanks

achuneka April 20, 2009 15:03

I think the problem is with C_UDMI, since I can modify the values of volume fraction using C_VOF variable.

I guess the problem is def of C_UDMI for the mixture domain. Is there any way to define a C_UDMI for a phase ?

achuneka April 20, 2009 15:57

I found something strange.
The initial contours of void fraction show the values in the range of 0 to 0.4

C_UDMI(c,t,1)=C_VOF(c,t); /* >>>>> Over here C_VOF(c,t) is approx 0
C_VOF(c,t) = 1 ; /** Some arbit modification

Now if I check out the contours of volume fraction for phase 2 it shows 1 everywhere... !

So somehow C_VOF does not get the initial data on void fraction....
Am i doing something obviuosly wrong ? pls let me know ..

cfdpinku April 21, 2009 11:30

hello aditya,
i hope you are aware that there are some special multiphase macros avaialble.
i am sure your required domain is not passing with get_domain.
can you please try once with domain_sub_domain.... you can find more details on this in UDF manual.
i hope fluent support can help you on this.

achuneka April 21, 2009 13:02

But the fact that I am able to modify the value of volume fraction of phase 2 through the same loop means that I am passing the phase domain to the loop. Somehow the current values are not being accessed.

I have contacted Fluent support.. Hope they help me on it

cfdpinku April 22, 2009 11:42

i hope domain_id =3 what you have used is picked from define->phases, for vapour phase. since domain id are not necessarily sequential. if this is correct, would you mind sharing sample case with me. i can help you on that. i have tested at my end it works fine.

achuneka April 23, 2009 13:30


Cannot upload the file over here. Exeeds the file limit
Can you please pm me your email ed ? The total size is around 4 mb


asifnazir September 4, 2009 06:21

hi u should go into subdomain thread then it work

asifnazir September 4, 2009 06:22

THREAD_SUB_THREAD look this macro from the manual

All times are GMT -4. The time now is 03:11.