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

How to track water surface height in a VOF channel flow

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By annan
  • 1 Post By annan

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 6, 2017, 09:44
Default How to track water surface height in a VOF channel flow
  #1
New Member
 
Join Date: Nov 2017
Posts: 15
Rep Power: 9
rjm1982 is on a distinguished road
Hi all,

I am having some difficulty working out a satisfactory way of tracking the time-varying height of the water surface at a particular (x,y) location in a simple 2 phase (water and air) channel simulation with waves. I would like to get a time series of z_ws(t), where z_ws(t) is the vertical elevation of the water surface at a specified location. I suspect the only way to do it might be with an UDF. Does anyone have any experience with this please?

Many thanks,

R
rjm1982 is offline   Reply With Quote

Old   December 28, 2017, 05:12
Default
  #2
New Member
 
Join Date: Sep 2010
Location: Wuhan, China
Posts: 23
Rep Power: 16
qin chunqiu is on a distinguished road
Hello,
I have the same problem as you posted. Have you solved it?
qin chunqiu is offline   Reply With Quote

Old   December 28, 2017, 17:23
Default
  #3
DEd
Member
 
Daniel Edebro
Join Date: Feb 2016
Location: Gothenburg
Posts: 41
Rep Power: 10
DEd is on a distinguished road
I think I have done this at some point. Don't have fluent available at the moment but if I remember it correctly I made a line and took the integral of VOF along this line.
DEd is offline   Reply With Quote

Old   December 31, 2017, 15:15
Default
  #4
New Member
 
Join Date: Nov 2017
Posts: 15
Rep Power: 9
rjm1982 is on a distinguished road
Thanks for your reply DEd. In the end I did this by making a line (Surface-->Line), as you say. Then, with a text file for the VOF values along the line at each time step, I wrote my own post-processing code in Fortran to read the text files and then interpolate to get the position of the free surface at each time step. It does the job, and would be easy to do in Matlab or VBA too.
Thanks again,
Richard
rjm1982 is offline   Reply With Quote

Old   January 5, 2018, 07:39
Default
  #5
Member
 
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 10
annan is on a distinguished road
Hey,

Hope I'm not a bit late to answer your question, but another way would be to write a UDF to track the secondary phase volume fraction. when the value changes to let's say 0.5, you can consider that you reached the height of the interface. Then you can store those values in a UDM and exploite them afterwards.

Hope this will help.
Good luck
elvislf likes this.
annan is offline   Reply With Quote

Old   May 21, 2018, 04:53
Default
  #6
New Member
 
陕西
Join Date: Apr 2018
Posts: 4
Rep Power: 8
elvislf is on a distinguished road
Quote:
Originally Posted by annan View Post
Hey,

Hope I'm not a bit late to answer your question, but another way would be to write a UDF to track the secondary phase volume fraction. when the value changes to let's say 0.5, you can consider that you reached the height of the interface. Then you can store those values in a UDM and exploite them afterwards.

Hope this will help.
Good luck
Hi annan, I'm doing a project about two phase flow(water and vapor water) in a rotating pipe, currently I am confused about how to tract and keep the interface between those two phases, the interface information is the key for further simulation. Can U help me with that? thanks a lot
elvislf is offline   Reply With Quote

Old   May 22, 2018, 06:19
Default
  #7
Member
 
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 10
annan is on a distinguished road
Hi elvislf,

Could you please be more specific about what you want to do ? tracking the interface or finding its position can be done as I explained, by putting a condition on the volume fraction of one of the phases in a UDF, if its value reaches 0.5 than you are positionned at the interface.

Waiting for more details
Good luck

Annan
annan is offline   Reply With Quote

Old   May 22, 2018, 08:01
Default
  #8
New Member
 
陕西
Join Date: Apr 2018
Posts: 4
Rep Power: 8
elvislf is on a distinguished road
Quote:
Originally Posted by annan View Post
Hi elvislf,

Could you please be more specific about what you want to do ? tracking the interface or finding its position can be done as I explained, by putting a condition on the volume fraction of one of the phases in a UDF, if its value reaches 0.5 than you are positionned at the interface.

Waiting for more details
Good luck

Annan
Thank you for your reply, I am doing the two phase simulation inside a rotating heat pipe with Fluent and UDFs, the VOF model was used here. The 2-D symmetric model was build and the working fluid are water and water vapor. I already know that tracking the interface between vapor and liquid is the key mission in evaporation simulation, I want to realize it with UDFs, but I don't have much experience in it. So can U help me dealing with this UDF or give me some idea about it?
elvislf is offline   Reply With Quote

Old   May 24, 2018, 04:54
Default
  #9
Member
 
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 10
annan is on a distinguished road
Hello elvislf,
I can give you a sketch UDF as I don't have time to test it, but the idea is the same. At first, I'd suggest you go for a DEFINE_ON_DEMAND UDF and use it for the post-treatment of one of your converged cases, it won't stop the simulation if there is any error and won't impact your final result.

DEFINE_ON_DEMAN(track_interface)
{
Domain d = Get_Domain(1);
face_t f;
cell_t c0,c1;
Thread *tf,*t0,*t1;

thread_loop_f(tf,d)
{
begin_f_loop(f,tf)
{
t0 = THREAD_T0(tf);
c0 = F_C0(f,tf);

c1 = F_C1(f,tf);
t1 = F_C1_THREAD(f,tf);

Thread *tl0 = THREAD_SUB_THREAD(t0,1);
Thread *tl1 = THREAD_SUB_THREAD(t1,1);

if (C_VOF(c1,tl1)<0.5 && C_VOF(c0,tl0)>0.5)
{
/*You reached the interface*/
/*You can compute whatever you want to do when you are at the interface*/
}

}
end_f_loop(f,tf)
}
}

Do not hesitate to contact me in private if you have any other questions about this.

Hope this will help
Good luck
Annan
engrmansoor2534 likes this.
annan is offline   Reply With Quote

Old   May 24, 2018, 04:58
Default
  #10
New Member
 
陕西
Join Date: Apr 2018
Posts: 4
Rep Power: 8
elvislf is on a distinguished road
Quote:
Originally Posted by annan View Post
Hello elvislf,
I can give you a sketch UDF as I don't have time to test it, but the idea is the same. At first, I'd suggest you go for a DEFINE_ON_DEMAND UDF and use it for the post-treatment of one of your converged cases, it won't stop the simulation if there is any error and won't impact your final result.

DEFINE_ON_DEMAN(track_interface)
{
Domain d = Get_Domain(1);
face_t f;
cell_t c0,c1;
Thread *tf,*t0,*t1;

thread_loop_f(tf,d)
{
begin_f_loop(f,tf)
{
t0 = THREAD_T0(tf);
c0 = F_C0(f,tf);

c1 = F_C1(f,tf);
t1 = F_C1_THREAD(f,tf);

Thread *tl0 = THREAD_SUB_THREAD(t0,1);
Thread *tl1 = THREAD_SUB_THREAD(t1,1);

if (C_VOF(c1,tl1)<0.5 && C_VOF(c0,tl0)>0.5)
{
/*You reached the interface*/
/*You can compute whatever you want to do when you are at the interface*/
}

}
end_f_loop(f,tf)
}
}

Do not hesitate to contact me in private if you have any other questions about this.

Hope this will help
Good luck
Annan
Thank you for your help, I will try it. This is my e-mail: elvislf@outlook.com. Wish you all the best.
elvislf 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Water Surface Evaporation sunggun1212 FLUENT 3 January 11, 2020 05:12
VOF Free Surface height varying along the wall mohibanwar FLUENT 0 June 10, 2015 04:24
Cluster ID's not contiguous in compute-nodes domain. ??? Shogan FLUENT 1 May 28, 2014 16:03
SSIIM 2, vertical elevation of the water surface, transient water flow parameters Mummputz Main CFD Forum 6 November 18, 2012 14:39
CFX4.3 -build analysis form Chie Min CFX 5 July 13, 2001 00:19


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