Giter VIP home page Giter VIP logo

airfoildatabase's People

Contributors

benjaminmoulton avatar corygoates avatar zachmontgomery avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

airfoildatabase's Issues

Ncrit command is incorrect for xfoil 6.99

Hi there,

I think the command for setting Ncrit is incorrect, at least for my version of xfoil (6.99).

It should just be a single 'N' for both surfaces, and not differentiated between top and bottom surfaces. As it currently stands, no error is thrown, but Ncrit is just not set as requested.

commands += ['VPAR',
'Xtr',
str(x_trip[0]),
str(x_trip[1]),
'NT',
str(N_crit[0]),
'NB',
str(N_crit[1]),
'',
'']

Kind regards,

Sam

Bugfix in airfoil.py line 2681

Numpy's default for linspace is 100 elements in the array but you chose to go with arrays of length 30. As a result, an IndexError is thrown when the user defines its own min/max alpha.
This line needs to be edited:

https://github.com/usuaero/AirfoilDatabase/blob/master/airfoil_db/airfoil.py#L2681

It should read:

alpha = np.linspace(linear_limits[0], linear_limits[1], 30)

The array length could also be made another kwarg if that would be useful for users.

I made a new branch and tried to push the changes. However, I do not seem to have the authorization to push. Would it be possible to get added to the list of users able to do so? Thanks!

Alex

Eppler 335 Camber Line Error

Hello,

I am creating a wing using an airfoil file (simply for the dxf output) from airfoiltools.com. I am including my files here.

When I run it I get the following error:

Traceback (most recent call last):
File "simple_wing.py", line 3, in
wings = mx.Scene("wingscene.json")
File "/home/ben/anaconda3/lib/python3.7/site-packages/machupX/scene.py", line 51, in init
self._load_params(scene_input)
File "/home/ben/anaconda3/lib/python3.7/site-packages/machupX/scene.py", line 111, in _load_params
self.add_aircraft(key, airplane_file, state=state, control_state=control_state)
File "/home/ben/anaconda3/lib/python3.7/site-packages/machupX/scene.py", line 292, in add_aircraft
self._airplanes[airplane_name] = Airplane(airplane_name, airplane_input, self._unit_sys, self, init_state=state, init_control_state=control_state, v_wind=v_wind)
File "/home/ben/anaconda3/lib/python3.7/site-packages/machupX/airplane.py", line 73, in init
self._create_airfoil_database()
File "/home/ben/anaconda3/lib/python3.7/site-packages/machupX/airplane.py", line 949, in _create_airfoil_database
self._airfoil_database[key] = Airfoil(key, airfoil_dict[key])
File "/home/ben/anaconda3/lib/python3.7/site-packages/airfoil_db/airfoil.py", line 98, in init
self._initialize_geometry()
File "/home/ben/anaconda3/lib/python3.7/site-packages/airfoil_db/airfoil.py", line 293, in _initialize_geometry
self._calc_geometry_from_points()
File "/home/ben/anaconda3/lib/python3.7/site-packages/airfoil_db/airfoil.py", line 513, in _calc_geometry_from_points
raise CamberSolverNotConvergedError(self.name, camber_error)
airfoil_db.exceptions.CamberSolverNotConvergedError: The camber line solver for Eppler_335 failed to converge. Final error: 1.1074209973441599e-10

Eppler_335.txt
Wing_inertia.zip

Add a get_fit_R2 and get_fit_RMS

maybe add some methods that will return the R^2 or RMS values of the fit so the user can see how well their fit did. I'd also recommend that when someone generates a polynomial fit, at the end of the function, these parameters are displayed to the screen, if verbosity is on of course.

PolyFits JSON output file

I'd add a section to the polynomial JSON file related to the R^2 value and/or RMS value of the fits.

airfoil.py might pick an already used random .pacc filename

in airfoil.py around line 2087
# Polar accumulation file file_id = str(np.random.randint(0, 10000)) pacc_file = "xfoil_results_{0}.pacc".format(file_id) pacc_files.append(pacc_file)

xfoil flashed a warning that it was trying to write polar results into a .pacc file with different header information. I presume it picked a random .pacc filename number that had already been used in that run.

It would be much saver to use an incremental .pacc filename addative (or perhaps name them as dof number), instead of adding a check to see if the random had already been used.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.