CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Paraview & paraFoam

How to plot time vs distance traveled by the interface interFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 16, 2008, 12:15
Default Hello, Is there a easy way
  #1
Member
 
a a saha
Join Date: Mar 2009
Posts: 67
Rep Power: 7
asaha is on a distinguished road
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
asaha is offline   Reply With Quote

Old   August 16, 2008, 16:05
Default This is impossible unless you
  #2
nadine
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
  Reply With Quote

Old   August 17, 2008, 07:52
Default Hello Nadine, Thanks for yo
  #3
Member
 
a a saha
Join Date: Mar 2009
Posts: 67
Rep Power: 7
asaha is on a distinguished road
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
asaha is offline   Reply With Quote

Old   August 17, 2008, 08:33
Default Basically you would have to do
  #4
nadine
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
  Reply With Quote

Old   August 17, 2008, 12:41
Default Hello Nadine, Thank you ver
  #5
Member
 
a a saha
Join Date: Mar 2009
Posts: 67
Rep Power: 7
asaha is on a distinguished road
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 is offline   Reply With Quote

Old   August 21, 2008, 02:27
Default Hello Nadine, -----------
  #6
Member
 
a a saha
Join Date: Mar 2009
Posts: 67
Rep Power: 7
asaha is on a distinguished road
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.
asaha is offline   Reply With Quote

Old   August 21, 2008, 05:58
Default >This will enable me to get th
  #7
nadine
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
  Reply With Quote

Old   August 21, 2008, 06:48
Default Hello Nadine, Thanks for pr
  #8
Member
 
a a saha
Join Date: Mar 2009
Posts: 67
Rep Power: 7
asaha is on a distinguished road
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
asaha is offline   Reply With Quote

Old   August 26, 2010, 10:20
Default
  #9
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,077
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
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 is online now   Reply With Quote

Old   January 26, 2011, 09:05
Default
  #10
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,077
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
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!!!
nimasam is online now   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 09:36.