CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF: How to use Macro C_VOF() (https://www.cfd-online.com/Forums/fluent/48780-udf-how-use-macro-c_vof.html)

Sam July 15, 2008 04:08

UDF: How to use Macro C_VOF()
 
Hi, every one:

I have defined a 2D immiscible liquid-liquid flow flied in a square box. I used the VOF model. I wanna identify the interface between the two liquids, so I used the following code to identify the interface:

cell_t c; Thread *t;

begin_c_loop(c,t) {

real vof;

vof=C_VOF(c,t);

if (vof>0.&& vof<1.)

{

}

However, when the UDF load to the fluent and iterating, there were errors

ACESS_VIOLATION

So I doubt that the using of the C_VOF has limitation. Could anyone who konws about this? Thank you very much!!

mohsen zendehbad March 3, 2010 07:30

you should first access the sub thread related to that phase, you should put that thread as an input of your C_VOF(), find the function THREAD_SUB_THREADS() in fluent documentation.

Bernhard March 3, 2010 08:49

Why don't create an iso-surface of your vof variable with value 0.5, then there is no need for using an UDF.


All times are GMT -4. The time now is 07:25.