CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

using C_VOF

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   November 25, 2013, 11:39
Default using C_VOF
  #1
New Member
 
anonymous
Join Date: Nov 2013
Posts: 9
Rep Power: 12
MichaelVS is on a distinguished road
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)
}
}
MichaelVS is offline   Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



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