|
[Sponsors] |
UDF to access only one phase in mixture domain |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 4, 2020, 04:11 |
UDF to access only one phase in mixture domain
|
#1 |
Senior Member
Arun raj.S
Join Date: Jul 2011
Posts: 194
Rep Power: 14 |
Hello everyone,
I would like to access only one phase in the mixture domain. I have written the UDF. However, I do not know if my code is right? Could someone clarify? Can anyone explain what the following code is doing? I have attached only a part of code that I am interested in. Thread *t, Thread **pt; Thread **st; Domain *d, *pd, *sd; DEFINE_SOURCE --------- { mp_thread_loop_c (t, d, st) if (FLUID_THREAD_P(t)) { Thread *sp = st[phase_ID]; begin_c_loop (c, t) { if(C_T(c, t)>tsat) { source = C_VOF(c, sp)*fabs(C_T(c, t)*1000; dS[eqn] = 0.0; } else if(C_T(c, t)<=tsat) { source = -C_VOF(c, sp)*fabs(C_T(c, t)*1000; dS[eqn] = 0.0; } else { source = 0.0; dS[eqn] = 0.0; } } end_c_loop (c, t) } |
|
|
|