- **OpenFOAM Paraview & paraFoam**
(*http://www.cfd-online.com/Forums/openfoam-paraview/*)

- - **How to plot time vs distance traveled by the interface interFoam**
(*http://www.cfd-online.com/Forums/openfoam-paraview/61126-how-plot-time-vs-distance-traveled-interface-interfoam.html*)

Hello,
Is there a easy way 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 3-D channel with time) by using the log/foamLog file or paraFoam. Kindly help me with your suggestions. Regards, AA Saha |

This is impossible unless you 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 |

Hello Nadine,
Thanks for yoHello 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 |

Basically you would have to doBasically 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 |

Hello Nadine,
Thank you verHello 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 |

Hello Nadine,
-----------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. |

>This will enable me to get th>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 |

Hello Nadine,
Thanks for prHello 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 |

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? |

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!!! |

All times are GMT -4. The time now is 20:45. |