usuaero / machupx Goto Github PK
View Code? Open in Web Editor NEWFast and accurate aerodynamic modeling using general numerical lifting-line theory.
Home Page: https://machupx.readthedocs.io/en/latest/
License: MIT License
Fast and accurate aerodynamic modeling using general numerical lifting-line theory.
Home Page: https://machupx.readthedocs.io/en/latest/
License: MIT License
Is your feature request related to a problem? Please describe.
A symmetry option for the x-y plane would allow the simulation of ground effect. I guess that a possible workaround is to just define an additional wing/plane that is a symmetry of the base one.
However, I need an anti-symmetry option for the x-y plane. The difference with the symmetry (slip wall) is that in the anti-symmetry case Cp is constant. This basically simulates a free-surface (e.g. sea surface) and therefore would open the door to using MachUpX for simulating hydrofoils. I believe there is no workaround for the anti-symmetry approach and the code has to be modified.
AVL does support the anti-symmetry approach (see iZsym option): http://web.mit.edu/drela/Public/web/avl/avl_doc.txt
However MachUpX is much easier to integrate in my workflow.
I think it should be a relatively simple feature to add for someone familiar with the code. As far as I understand, an anti-symmetry is the same as a symmetry but in this case the matrix of coefficients is inverted for the symmetric part. So basically, the matrix of control points of the wing has to be mirrored across the XY plane (symmetry) and then the matrix of coefficients has to be inverted for those points only. The effect of the anti-symmetry in the general circulation is taken into account but the forces for the mirrored part have to be discarded.
If the feature is implemented I am happy to perform a validation with commercial CFD software (StarCCM+) and share it here.
Describe the solution you'd like
Ideally there would be an anti-symmetry option in the input .json file. I guess that implementing an XY symmetry option is a necessary intermediate step so it will be done anyway and an option could also be added in the .json file.
Describe alternatives you've considered
As I mentioned, there is a workaround for the symmetry case, however the anti-symmetry requires some code changes.
Additional context
See AVL documentation: http://web.mit.edu/drela/Public/web/avl/avl_doc.txt
Describe the bug
During installation pip install .
throws
ERROR: Could not find a version that satisfies the requirement airfoil_db==1.4 (from MachUpX==2.3.4) (from versions: none)
ERROR: No matching distribution found for airfoil_db==1.4 (from MachUpX==2.3.4)
I narrowed it down because airfoil_db doesn't seem to be up on pip. I will just fork and get it straight from the Github package source.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Install successfully
Desktop (please complete the following information):
I recently started playing a bit with the library. I might be doing something wrong but I found the following issue.
Describe the bug
Calling set_aircraft_state
does not seem to have any effect on the resulting forces. It does, however, update the aircraft wireframe.
To Reproduce
In this example I use the base FlyingWing .json example file. I compute the aircraft forces at several pitch angles. Every iteration I call set_aircraft_state
with a new pitch angle. Fz, FL and FD are plotted at the end, showing that there is no change as a function of pitch.
import json
import machupX as MX
import matplotlib.pyplot as plt
if __name__=="__main__":
input_file = "flying_wing_input.json"
my_scene = MX.Scene(input_file)
results = []
pitches = range(30)
for pitch in pitches:
FM_results = my_scene.solve_forces(dimensional=True, non_dimensional=False, verbose=True)
print(json.dumps(FM_results["flying_wing"]["total"], indent=4))
newState = {
"type" : "aerodynamic",
"velocity" : 100,
"alpha" : 2.0,
"beta" : 0.0,
"orientation":[0,pitch,0]
}
my_scene.set_aircraft_state(newState,'flying_wing')
results.append(FM_results["flying_wing"]["total"])
# my_scene.display_wireframe(show_legend=True) # This actually displays the aircraft wireframe with the updated pitch.
ax = plt.figure().gca()
ax.plot(pitches,list(map(lambda x:x['Fz'],results)),'r-',label='Fz')
ax.plot(pitches,list(map(lambda x:x['FL'],results)),'g-',label='FL')
ax.plot(pitches,list(map(lambda x:x['FD'],results)),'b-',label='FD')
ax.set_xlabel('Pitch')
ax.set_ylabel('F')
ax.grid()
plt.show()
Hi I was wondering the license of the web version of MachUp5. It is easy to get the source code by just downloading through Chrome and mostly everything still works. I wanted to make it into a nice Desktop app that I could hookup directly with the MachUp CLI so I could get faster simulation results, however, I don't know the license and certainly would not want to infringe on any sort of Copyright so before I started I wanted to ask for approval.
MachUpX does not recognize aircraft_derivatives to be specified in the input .json file. Attempted traditional airplane example from repo:
"aircraft_derivatives is not recognized as a valid run command. Skipping..." displayed in command line.
Note: example has scene class of aero_derivatives. Based on the docs I believe it should be now aircraft_derivatives for v2.
Describe the bug
The name of the airplane appears to be hard coded to "test_plane" in the 'distributions' function.
Line 1727 of scene.py
To Reproduce
Steps to reproduce the behavior:
my_scene.distributions(filename='testplot1', make_plots=['cpx'])
Traceback (most recent call last):
File "/MachUpX-1.0-py3.7.egg/machupX/scene.py", line 1727, in distributions
for segment_name, segment_dist in dist["test_plane"].items():
KeyError: 'test_plane'
I would like use MachUpX with an existing tool chain developed for other aerodynamics solvers. It would be much easier to do that if I could simply pip install the package directly from PyPI rather than writing a custom script to install it. This would also lower the entry barrier for other interested users as well.
Because MachUpX is a pure python package I believe this can be done without too much head ache. Although, since AirfoilDatabase is a dependency, you should get that situated on PyPI first.
Since you are already using good versioning practices, I'd suggest setting up a Github action to push a new package to PyPI on releases.
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.