|
[Sponsors] |
January 19, 2017, 04:44 |
Exporting Contour Plots
|
#1 |
New Member
Josh Dyson
Join Date: Mar 2011
Posts: 21
Rep Power: 15 |
Dear Foamers,
I'm currently writing up the results from a Rayleigh-Taylor interface problem. I can quite easily show the interface in paraview. However when I present them I'd like to ensure all plots have the same aspect ratio, show the same amount of geometry and ideally on a grid plot. My original thought was to export the contours as CSV files and plot the points in excel. However with openfoam's left to right cell sorting I can't think of a way to get the points in a useful order to plot. Does anyone know of some sort of method to do this? Alternatively, does anyone how to ensure that in a paraview screenshot I can show the exact same geometry dimensions? The comparisons I want to make are across grid resolutions like the below image, but the location of the top of the interface will vary which I'd like to show Thanks in advance! |
|
January 19, 2017, 05:05 |
|
#2 | |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
Quote:
"For any given point, its two adjacent points are the two points that are closest to that given point." So, loop over all points, compute the distance to all other points, and sort based on that distance. Something like: Code:
Choose a random point p pPrev=null; While(not done) smallestDistance = inf nextPointIndex=-1; For all points q unequal to p and pPrev newD = d(p,q) if(smallestDistance > newD){ smallestDistance = newD nextPointIndex = index of q } endfor sort q[nextPointIndex] next to p set pPrev = p set p = q[nextPointIndex] endwhile Make a state-file which shows exactly what you want to see. Then, load that state file for each case and export the visualisation. (Do this without moving the camera after loading the case file!) |
||
January 20, 2017, 03:09 |
|
#3 |
New Member
Josh Dyson
Join Date: Mar 2011
Posts: 21
Rep Power: 15 |
Thanks for your suggestion. I was hoping not to have to write a script, but in the end it wasn't so bad to do it in matlab.
|
|
January 20, 2017, 04:01 |
|
#4 |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
||
January 20, 2017, 04:06 |
|
#5 |
New Member
Josh Dyson
Join Date: Mar 2011
Posts: 21
Rep Power: 15 |
||
September 15, 2021, 17:12 |
|
#6 |
New Member
Edgar Alejandro Martínez Ojeda
Join Date: Jul 2019
Posts: 20
Rep Power: 7 |
You can use fluidfoam as a way to export the fields and plot them using Python. I made a YouTube video on how to use it, perhaps it may help you: https://www.youtube.com/watch?v=wFZeFDUQflQ
|
|
Tags |
contour, paraview |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
generating 2d-planar contour plots from a contour plot on a curved surface | alinik | CFX | 3 | May 21, 2016 07:17 |
Exporting Contour plots for report | paddywhacker | Visualization & Post-Processing | 1 | March 26, 2014 08:27 |
vector plots and contour plots do not match | swati_mohanty | FLUENT | 1 | August 26, 2010 06:53 |
drawing of contour plots | chinthakindi | Main CFD Forum | 1 | April 27, 2004 05:33 |
Local surface contour line plots | Nandu | FLUENT | 0 | November 10, 2003 00:26 |