
[Sponsors] 
How to plot time vs distance traveled by the interface interFoam 

LinkBack  Thread Tools  Display Modes 
August 16, 2008, 11:15 
Hello,
Is there a easy way

#1 
Member
a a saha
Join Date: Mar 2009
Posts: 67
Rep Power: 8 
Hello,
Is there a easy way to plot time vs distance travelled by the interface (say tracking the intersection of gamma=0.5 along the axis of a 3D channel with time) by using the log/foamLog file or paraFoam. Kindly help me with your suggestions. Regards, AA Saha 

August 16, 2008, 15:05 
This is impossible unless you

#2 
Guest
Posts: n/a

This is impossible unless you modify the interFoam solver. The intersection of the gamma=0.5 contour with some axis is not necessarily unique, so without additional assumptions it cannot be written as a single time dependent function.
NB 

August 17, 2008, 06:52 
Hello Nadine,
Thanks for yo

#3 
Member
a a saha
Join Date: Mar 2009
Posts: 67
Rep Power: 8 
Hello Nadine,
Thanks for your post. Can you give some hint on modifying the interFoam solver to get the desired results. For the moment, I achieve this manually via paraFoam by creating a contour of gamma=0.5 and intergrate attribute to get the coordinate points for each time step. This seems to be very time consuming and I wish I could find a easier way to achieving the same. Kindly help me in this regard. Thanks and regards, AA Saha 

August 17, 2008, 07:33 
Basically you would have to do

#4 
Guest
Posts: n/a

Basically you would have to do the same in interFoam yourself what you are doing now in paraview.
I have no idea how your problem and solution look like. If the intersection of the gamma=0.5 contour with the channel axis is a unique point at all times, you can of course use paraview. To increase speed I suggest, you first get a 1D cut of gamma along the axis and then find gamma=0.5 instead of first creating the contour and then cutting along the axis. If your solution is not so well behaved, use some (eg. linear) interpolation algorithm within interFoam to extract the cut of the gamma GeometricField with your axis, then apply a root finding algorithm (eg. bisection) and some logic to choose those gamma=0.5 roots that you want to track. NB 

August 17, 2008, 11:41 
Hello Nadine,
Thank you ver

#5 
Member
a a saha
Join Date: Mar 2009
Posts: 67
Rep Power: 8 
Hello Nadine,
Thank you very much for your suggestions. I will give this a try and update you on the progress. Thanks and regards, AA Saha 

August 21, 2008, 01:27 
Hello Nadine,


#6 
Member
a a saha
Join Date: Mar 2009
Posts: 67
Rep Power: 8 
Hello Nadine,
 I have no idea how your problem and solution look like. If the intersection of the gamma=0.5 contour with the channel axis is a unique point at all times, you can of course use paraview. To increase speed I suggest, you first get a 1D cut of gamma along the axis and then find gamma=0.5 instead of first creating the contour and then cutting along the axis.  I have followed your suggestion given as above and could obtain the results in paraFoam. Thanks again for your valuable advise.  If your solution is not so well behaved, use some (eg. linear) interpolation algorithm within interFoam to extract the cut of the gamma GeometricField with your axis, then apply a root finding algorithm (eg. bisection) and some logic to choose those gamma=0.5 roots that you want to track.  Using paraFoam I can only use the data files written after the simulation. So I would also like to attempt the above suggestion, which may require some tweaking of the interFoam solver. This will enable me to get the results directly from the log file, if I am correct. I have not modified the interFoam solver and have only used the solver as it is. I would appreciate if you can help me out with some suggestions in this regard. Thanks and regards, AA Saha. 

August 21, 2008, 04:58 
>This will enable me to get th

#7 
Guest
Posts: n/a

>This will enable me to get the results directly from the log file, if I am correct.
Yes. You could write the position of the interface at each integration time step, not only at those writeInterval steps when the complete solution is written into the time directories. >I have not modified the interFoam solver and have only used the solver as it is. I would appreciate if you can help me out with some suggestions in this regard. You will probably have to learn several details of the OpenFOAM implementation unless somebody else comes up with a complete solution to your request. If the meaning of any of the suggested steps is unclear, please ask. But I can't do your work and tell you how to do it within interFoam. NB 

August 21, 2008, 05:48 
Hello Nadine,
Thanks for pr

#8 
Member
a a saha
Join Date: Mar 2009
Posts: 67
Rep Power: 8 
Hello Nadine,
Thanks for providing some useful hints. Now I will devote throughly a few days on knowing much more on interFoam solver and its implementation in OpenFOAM. I will update you on the progress. Thanks and regards, AA Saha 

August 26, 2010, 09:20 

#9 
Senior Member

hi asaha
could you find any way to calculate the interface distance (for example alpha = 0.5) from an specific axis ?any way to calculate interface position by time in interfoam? 

January 26, 2011, 09:05 

#10 
Senior Member

do following step in paraview
1) countour alpha isoline 0.5 2)integrate variable then in castcade choose countor 3)plotSelectionOverTime choose a point from integrate variable table then click apply! you will have interface position by time!!! 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Calculating Interface Area with InterFoam  gopala  OpenFOAM Running, Solving & CFD  14  June 8, 2015 10:18 
How to calculate liquid volume as the interface moves for interFoam Solver  asaha  OpenFOAM Running, Solving & CFD  25  October 21, 2009 04:34 
Plot drag coefficient against Y(distance)  edwin  FLUENT  0  February 4, 2008 10:41 
time plot  nirupam rohatgi  FLUENT  0  June 11, 2007 03:20 
How to plot interface shape between two phases.  Manoj Kumar  FLUENT  6  March 3, 2005 16:47 