|
[Sponsors] |
November 25, 2013, 12:39 |
using C_VOF
|
#1 |
New Member
anonymous
Join Date: Nov 2013
Posts: 9
Rep Power: 13 |
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) } } |
|
November 26, 2013, 03:12 |
|
#2 |
Senior Member
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 17 |
You are searching for cells with vof == 0.5 exactly. Maybe there is no cell which matches this strict requirement but certainly there will be some with 0.49<C_VOF<0.51.
Cheers |
|
November 26, 2013, 04:54 |
|
#3 |
New Member
anonymous
Join Date: Nov 2013
Posts: 9
Rep Power: 13 |
Thank you very much for your reply!
No, this cells don't exist too. However, it works if I specify the range of C_VOF from 0.000001 to 0.999999 . But also not always as well... it somehow depends on time-step size and number of iterations per step. For example if I set up time-step 0,05 sec and 5 iterations per step then it works, but if i set up time-step 0.05 and 20 iterations it doesn't. ... and this doesn't make any sense to me. Any ideas? |
|
July 20, 2020, 16:30 |
|
#4 |
New Member
Sagar Nikam
Join Date: Nov 2019
Posts: 1
Rep Power: 0 |
Hi,
Did you manage to solve the problem? I am facing a similar problem. If you solved the problem can you please guide me? Thank you |
|
|
|