usuaero / airfoildatabase Goto Github PK
View Code? Open in Web Editor NEWA Python module for modeling airfoils
License: MIT License
A Python module for modeling airfoils
License: MIT License
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.
AirfoilDatabase/airfoil_db/airfoil.py
Lines 2129 to 2139 in f018674
Kind regards,
Sam
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
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
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.
I'd add a section to the polynomial JSON file related to the R^2 value and/or RMS value of the fits.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.