CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

A few SU2_EDU issues to be aware of

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 14, 2016, 04:23
Default A few SU2_EDU issues to be aware of
  #1
Disabled
 
Join Date: Jul 2015
Posts: 7
Rep Power: 11
anon_k is on a distinguished road
Hi,

I went to download SU2_EDU today, to install on a new computer. The parallel windows binary link is broken. Also, I noticed this awhile ago, but the python script you have to make the pressure plot is broke. I hacked a fix awhile back, but you may want to provide a functioning version in the download. The hack I did is as follows:

import os, time
import pandas as pd
from optparse import OptionParser
from numpy import *
from matplotlib import pyplot as plt
from matplotlib import mlab

filename = "surface_flow.csv"

# Load the csv file with the airfoil coordinate and pressure data (sorted)

data = pd.read_csv(filename)
data = data.sort('Global_Index')
data.to_csv(filename, index=False)
data = mlab.csv2rec(filename, comments='#', skiprows=0, checkrows=0)

# Plot the airfoil shape and pressure distribution

fig = plt.figure()
ax1 = fig.add_subplot(111)
ax1.plot(data.x_coord[:],data.pressure_coefficient[:],'-b',linewidth = 2.0)
ax1.set_ylim(ax1.get_ylim()[::-1])
ax1.set_xlabel(r'$x/c$', fontsize=20)
ax1.set_ylabel(r'$C_p$', fontsize=20)

ax2 = ax1.twinx()
ax2.plot(data.x_coord[:],data.y_coord[:],'-k',linewidth = 1.5)
ax2.axis('equal')
ax2.axis('off')
ax2.set_xlim([-0.02,1.02])
ax2.set_ylim([-0.1,0.7])
ax2.set_ylabel(r'$y / c$', fontsize=20)
plt.savefig('pressure_distribution.png',format='pn g')
anon_k is offline   Reply With Quote

Old   February 14, 2016, 18:19
Default
  #2
Super Moderator
 
Francisco Palacios
Join Date: Jan 2013
Location: Long Beach, CA
Posts: 404
Rep Power: 15
fpalacios is on a distinguished road
Hi,
Thanks for using SU2_EDU. This is an important piece of code for the SU2 community. But, unfortunately, it has not been well maintained since its last release. Could you be a little bit more explicit about the change that you introduced in the code. I have done a diff and this is the result

8c30,37
< filename = "surface_flow.csv"
---
> parser = OptionParser()
> parser.add_option("-f", "--file", dest="file",
> help="surface flow csv file", metavar="FILE")
> (options, args)=parser.parse_args()
>
> # Store the file name
>
> filename = options.file
33,34c62
< plt.savefig('pressure_distribution.png',format='pn g')
<
---
> plt.savefig('pressure_distribution.png',format='pn g')


Thanks,
Francisco Palacios
fpalacios is offline   Reply With Quote

Old   February 14, 2016, 22:12
Default
  #3
Disabled
 
Join Date: Jul 2015
Posts: 7
Rep Power: 11
anon_k is on a distinguished road
Quote:
Originally Posted by fpalacios View Post
Hi,
Thanks for using SU2_EDU. This is an important piece of code for the SU2 community. But, unfortunately, it has not been well maintained since its last release. Could you be a little bit more explicit about the change that you introduced in the code. I have done a diff and this is the result

8c30,37
< filename = "surface_flow.csv"
---
> parser = OptionParser()
> parser.add_option("-f", "--file", dest="file",
> help="surface flow csv file", metavar="FILE")
> (options, args)=parser.parse_args()
>
> # Store the file name
>
> filename = options.file
33,34c62
< plt.savefig('pressure_distribution.png',format='pn g')
<
---
> plt.savefig('pressure_distribution.png',format='pn g')


Thanks,
Francisco Palacios
Hi,

Unfortunately, I can't. I did that hack a long time back and don't remember what I did at this point. The edited file does work though. I can double click on it and a plot shows up. I attached a picture of the error I get when using the plot_pressure.py file provided in the SU2_EDU download. The hack I did was intended to fix that. I don't know Python at all. I only posted the code so that it might help someone figure out what is wrong with the file in the download.
Attached Images
File Type: png plot_pressure error.png (30.4 KB, 3 views)
anon_k is offline   Reply With Quote

Old   February 14, 2016, 22:29
Default
  #4
Disabled
 
Join Date: Jul 2015
Posts: 7
Rep Power: 11
anon_k is on a distinguished road
I should mention I wasn't able to figure out how to differentiate the upper and lower surfaces of the airfoil. It would be nice to be able to know which pressure curve applies to which side of the airfoil. So perhaps have them color coded. The top surface of the airfoil blue and the pressure curve for the top surface blue. The bottom surface of the airfoil red and the pressure curve for the bottom surface red. I attached a picture I got from the script I edited. You can see it isn't too useful since you don't know which curve applies to which airfoil surface.
Attached Images
File Type: png pressure_distribution.png (35.0 KB, 3 views)
anon_k is offline   Reply With Quote

Reply

Tags
su2_edu


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Issues on the simulation of high-speed compressible flow within turbomachinery dowlee OpenFOAM Running, Solving & CFD 11 August 6, 2021 07:40
Meshing issues stevepaddock2511 Siemens 1 May 31, 2017 11:39
Porous media setup issues in Fluent Bernard Van FLUENT 29 January 26, 2017 05:09
Multigrid Stability Issues ThomasHermann SU2 1 November 5, 2014 17:18
[General] Some Paraview Issues I can not solve MR_Chicho ParaView 1 September 24, 2012 06:03


All times are GMT -4. The time now is 08:48.