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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 25, 2013, 12:39
Default using C_VOF
  #1
New Member
 
anonymous
Join Date: Nov 2013
Posts: 9
Rep Power: 13
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

Old   November 26, 2013, 03:12
Default
  #2
Senior Member
 
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 17
coglione is on a distinguished road
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
coglione is offline   Reply With Quote

Old   November 26, 2013, 04:54
Default
  #3
New Member
 
anonymous
Join Date: Nov 2013
Posts: 9
Rep Power: 13
MichaelVS is on a distinguished road
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?

Quote:
Originally Posted by coglione View Post
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
MichaelVS is offline   Reply With Quote

Old   July 20, 2020, 16:30
Default
  #4
New Member
 
Sagar Nikam
Join Date: Nov 2019
Posts: 1
Rep Power: 0
nikamsagar45 is on a distinguished road
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
nikamsagar45 is offline   Reply With Quote

Reply


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 15:42.