|
[Sponsors] |
November 25, 2013, 11:39 |
using C_VOF
|
#1 |
New Member
anonymous
Join Date: Nov 2013
Posts: 9
Rep Power: 12 |
Dear Colleagues,
I need your help in using C_VOF macro. In my project I need to capture the interface between two fluids (C_VOF=0.5) and assign to the cells on the interface the values I would like to (for example temperature). The problem is that I cannot select the cells with C_VOF = 0.5 . The udf works if I select cells with C_VOF=1 or 0, but not with the interface. How could I make it? Here is my udf #include "udf.h" #include "sg_mphase.h" DEFINE_ADJUST(scan3,d) { Thread *t; Thread **pt; cell_t c; int zone_ID=2; Thread *mixture_thread = Lookup_Thread(d,zone_ID); pt = THREAD_SUB_THREADS(mixture_thread); thread_loop_c(t,d) { begin_c_loop(c,t) if (C_VOF(c,pt[1])==0.5) /* pt0 - air, pt1 - ls */ { C_T(c,pt[1])=1500; } end_c_loop(c,t) } } |
|
|
|