CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   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)

asaha August 16, 2008 11:15

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

nadine August 16, 2008 15:05

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

asaha August 17, 2008 06:52

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

nadine August 17, 2008 07:33

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

asaha August 17, 2008 11:41

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

asaha August 21, 2008 01:27

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.

nadine August 21, 2008 04:58

>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

asaha August 21, 2008 05:48

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

nimasam August 26, 2010 09:20

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?

nimasam January 26, 2011 09:05

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 22:23.