|
[Sponsors] |
How to track water surface height in a VOF channel flow |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 6, 2017, 09:44 |
How to track water surface height in a VOF channel flow
|
#1 |
New Member
Join Date: Nov 2017
Posts: 15
Rep Power: 9 |
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 |
|
December 28, 2017, 05:12 |
|
#2 |
New Member
Join Date: Sep 2010
Location: Wuhan, China
Posts: 23
Rep Power: 16 |
Hello,
I have the same problem as you posted. Have you solved it? |
|
December 28, 2017, 17:23 |
|
#3 |
Member
Daniel Edebro
Join Date: Feb 2016
Location: Gothenburg
Posts: 41
Rep Power: 10 |
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.
|
|
December 31, 2017, 15:15 |
|
#4 |
New Member
Join Date: Nov 2017
Posts: 15
Rep Power: 9 |
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 |
|
January 5, 2018, 07:39 |
|
#5 |
Member
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 10 |
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 |
|
May 21, 2018, 04:53 |
|
#6 | |
New Member
陕西
Join Date: Apr 2018
Posts: 4
Rep Power: 8 |
Quote:
|
||
May 22, 2018, 06:19 |
|
#7 |
Member
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 10 |
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 |
|
May 22, 2018, 08:01 |
|
#8 | |
New Member
陕西
Join Date: Apr 2018
Posts: 4
Rep Power: 8 |
Quote:
|
||
May 24, 2018, 04:54 |
|
#9 |
Member
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 10 |
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 |
|
May 24, 2018, 04:58 |
|
#10 | |
New Member
陕西
Join Date: Apr 2018
Posts: 4
Rep Power: 8 |
Quote:
|
||
|
|
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 |