CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   Python for postprocessing output of SU2 (https://www.cfd-online.com/Forums/su2/187188-python-postprocessing-output-su2.html)

juanbaus April 30, 2017 15:33

Python for postprocessing output of SU2
 
Hi SU2 Community,


I am new user of SU2 and I am learning to use the software by doing the quick start case from the web page. The simulation went well and I am trying to reproduce the plots from the web page. I was able to plot the NACA 0012 airfoil profile and the Cp coefficient extracting the information from the surface_flow.dat file, however I am no quite sure if I can reproduce the Far-field of the computational mesh plot and the pressure contour plot by using just python. I have read in the documentation that ParaView or Tecplot is suggested like post processing tool. However I would like to use python and maybe Julia like post-processing tool, has anybody experience or recommendations using these post-processing tools?


Thanks for your feedback,

whizkid May 1, 2017 23:43

Hello,
You may read every single line of the surface_flow.dat using python and then you can plot any variables using matplotlib. If you, for example, analyze an airfoil at different angles of attack, then you may read every single forces_breakdown.dat files using python, store CL CD CM values and again plot them with matplotlib.

Cheers

juanbaus May 1, 2017 23:59

Quote:

Originally Posted by whizkid (Post 647304)
Hello,
You may read every single line of the surface_flow.dat using python and then you can plot any variables using matplotlib. If you, for example, analyze an airfoil at different angles of attack, then you may read every single forces_breakdown.dat files using python, store CL CD CM values and again plot them with matplotlib.

Cheers


Hi Whizkid,

Thanks for your reply, in fact I have plotted some of the coefficients that you mention. However to create a surface plot is not that easy, I tried to create the contour plot for the pressure given in the QuickStart test case and the output vector for the pressure is a column vector which I think is not associated with the (x,y) grid coordinate in a contour plot. Namely I am not quite sure how this vector represents the pressure contour surfaces in the contour plot. I am using the data of flow.dat to create the plots, and the create a grid using the x and y coordinates.

Thanks,


All times are GMT -4. The time now is 02:51.