Giter Site home page Giter Site logo

usuaero / machupx Goto Github PK

View Code? Open in Web Editor NEW
87.0 14.0 15.0 17.11 MB

Fast and accurate aerodynamic modeling using general numerical lifting-line theory.

Home Page: https://machupx.readthedocs.io/en/latest/

License: MIT License

Python 100.00%
lifting-line-theory aerodynamics flight-mechanics mdanalysis

machupx's People

Contributors

benjaminmoulton avatar byl-rif avatar corygoates avatar doughunsaker avatar jkgoates avatar justice-schoenfeld 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

machupx's Issues

XY plane anti-symmetry

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

airfoils dependency incorrect version

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:

  1. git clone https://github.com/usuaero/MachUpX
  2. cd MachUpX
  3. pip install .

Expected behavior
Install successfully

Screenshots
image

Desktop (please complete the following information):

  • Docker Container: continuumio/anaconda3 - latest
  • macOS 10.15.5 (19F101)

set_aircraft_state does not seem to fully update the aircraft state.

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()

License of aero.go.usu.edu/mu5/

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.

aircraft_derivatives

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.

Error Plotting Distributions

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:

  1. Run any of the examples
  2. Run distributions function:

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'

Hosting MachUpX on PyPI

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.

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.