Giter VIP home page Giter VIP logo

pytornado's People

Contributors

aarondettmann 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

Watchers

 avatar  avatar  avatar  avatar

pytornado's Issues

Validation of results

The following zip file contains runs for PyTornado. The results do not match with Matlab Tornado (lift force). The geometries for Py and Matlab are attached. Also the state files for Py are attached - can be replicated in Matlab.
There seems to be a difference in Py and Matlab's implementations. Please check.

DeittertUAV2.zip

Divergence on some panels when using an angle of sideslip

I think I mention this issue a few weeks ago, here's more details about it.

In the CPACS file attached I calculated some points with different angle of attack and sideslip (see the aeromap "test_Aeromap_30points_aoa_aos"). For some value couples the aerodynamic coefficient are extremely high, in this case for:

  • aoa = -2 and aos= 4,5 and 6 degree
  • aoa = 0 and aos = 6 degree

I try to change the panel discretization, the coefficient values change but the problem is still the same.

I plotted the pressure coefficient for one of this configuration and we can see that it diverges on some cells. I imagine it could due to the fact that the wake of these cells "touch" other cells of the tail...

issue_with_aos

D150_PyTornado_aos_issue.zip

Panel Wise data related

I am getting the forces in the panelwise.dat file. Can you tell me how to extract the location of that force acting on the wing/location on the panel? I want to do the FEA for the wing and get the panel-wise forces so that I can apply that in my model of FEA.

INSTALLATION ISSUE

Dear all,

I have followed the instructions about the installation of PyTornado but the software does not work.

Within the root folder of the code (where the setup.py is placed) from the terminal I have wrote the following commad:

pipi install --user .

At the end of the installation process, the following message appeared on the terminal:

Successfully built pytornado
Installing collected packages: pytornado
Successfully installed pytornado-0.5.4

So it seems that the installation was succesfull but when I try to perform the tutorial example (described at the "Getting Started" page of the documentation) the software does not work, The folder "pytornado" and the plot of results are not created.

First of all, I was expecting to see an executable file created after the installation/compiling process but no such file was created. This sounds strange. Does anybody know if an executable of the software should have been created through the installation process?

To launch the software, I have found the pytornado.bat file within the following path:

pytornado-master/src/bin

that is equivalent to run the script _pytornado_exe.py on the terminal.

Please help me!!

Thanks,

Giacomo

Relative position of control surface

The "eta and xsi" convention for control surfaces is confusing. Can you please say as to what will the values for eta and psi for a simple flap control surface for a single -wing configuration?

Saving Lattice and Collocation Points

Is it possible to make available the lattice and collocation points in a file (like a *.csv file or matlab *.mat file)?
Can it be saved as (wing-number,row,column,x-coord/y-coord/z-coord)?

Calculating Moments

For calculating moments, do you compute the moments due to force at each collocation point and add them up or do you add up the forces and multiply with the moment arm (distance to quarter-chord)?
This also beings me back to the question on forces and moments of UVLM being exactly the same as steady VLM?

Issue using geometry-definition instead of vertices-definition

Hi there,
I tried to define my airplane with the geometry definition instead of vertices as winglets are easier to define this way, but somehow this does not work. PyTornado thinks that I have provided vertices, allthough I didn't (I double checked).
It jumps into loops which should only be used when vertices are provided, e.g. .local/lib/python3.8/site-packages/pytornado/objects/aircraft.py", line 1081 or so. See the content of my terminal below.

First error message was:

moritz@ThinkPad-L460:~/Documents/Akaflieg/fs36_pytornado/pytornado$ pytornado -vcr settings/template.json
[2020-12-04 18:25:10 INFO] @ pytornado.stdfun.run | ========== pytornado 0.5.4 ==========
[2020-12-04 18:25:10 INFO] @ pytornado.fileio.native.aircraft | Reading aircraft model from file '.../fs36.json'...
Traceback (most recent call last):
  File "/home/moritz/.local/bin/pytornado", line 104, in <module>
    main()
  File "/home/moritz/.local/bin/pytornado", line 79, in main
    stdrun.standard_run(args)
  File "/home/moritz/.local/lib/python3.8/site-packages/pytornado/stdfun/run.py", line 99, in standard_run
    aircraft = io.cpacs.aircraft.load(settings) if settings.aircraft_is_cpacs else io.native.aircraft.load(settings)
  File "/home/moritz/.local/lib/python3.8/site-packages/pytornado/fileio/native/aircraft.py", line 81, in load
    for key, value in segment_entry['vertices'].items():
KeyError: 'vertices'

I then changed the part in /.../lib/python3.8/site-packages/pytornado/fileio/native/aircraft.py so that it only jumps into it if there are vertices definded but still an error remains:


moritz@ThinkPad-L460:~/Documents/Akaflieg/fs36_pytornado/pytornado$ pytornado -vcr settings/template.json
[2020-12-04 17:59:35 INFO] @ pytornado.stdfun.run | ========== pytornado 0.5.4 ==========
[2020-12-04 17:59:35 INFO] @ pytornado.fileio.native.aircraft | Reading aircraft model from file '.../fs36.json'...
[2020-12-04 17:59:35 INFO] @ pytornado.objects.aircraft | Checking reference values...
[2020-12-04 17:59:35 INFO] @ pytornado.objects.aircraft | Checking vertex coordinates...
[2020-12-04 17:59:35 INFO] @ pytornado.objects.aircraft | Checking geometric properties...
[2020-12-04 17:59:35 INFO] @ pytornado.objects.aircraft | Checking airfoil properties...
[2020-12-04 17:59:35 INFO] @ pytornado.objects.aircraft | Checking discretisation properties...
[2020-12-04 17:59:35 INFO] @ pytornado.objects.aircraft | Reference points provided: a, b, c, d
[2020-12-04 17:59:35 INFO] @ pytornado.objects.aircraft | --> Point A = nan
[2020-12-04 17:59:35 INFO] @ pytornado.objects.aircraft | --> Point B = nan
[2020-12-04 17:59:35 INFO] @ pytornado.objects.aircraft | --> Point C = nan
[2020-12-04 17:59:35 INFO] @ pytornado.objects.aircraft | --> Point D = nan
Traceback (most recent call last):
  File "/home/moritz/.local/bin/pytornado", line 104, in <module>
    main()
  File "/home/moritz/.local/bin/pytornado", line 79, in main
    stdrun.standard_run(args)
  File "/home/moritz/.local/lib/python3.8/site-packages/pytornado/stdfun/run.py", line 99, in standard_run
    aircraft = io.cpacs.aircraft.load(settings) if settings.aircraft_is_cpacs else io.native.aircraft.load(settings)
  File "/home/moritz/.local/lib/python3.8/site-packages/pytornado/fileio/native/aircraft.py", line 118, in load
    aircraft.generate()
  File "/home/moritz/.local/lib/python3.8/site-packages/pytornado/objects/aircraft.py", line 264, in generate
    wing.generate()
  File "/home/moritz/.local/lib/python3.8/site-packages/pytornado/objects/aircraft.py", line 398, in generate
    segment.generate()
  File "/home/moritz/.local/lib/python3.8/site-packages/pytornado/objects/aircraft.py", line 1087, in generate
    d_x = self.vertices['d'][0] - self.vertices['a'][0]
IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed

Thank you very much for your help, would be great if I could use PyTornado for my work on the glider prototype fs36!

Using PyTornado

Aren't results from PyTornado more accurate than Matlab Tornado?
I have the lattice structure from Matlab Tornado. I don't know how to use PyTornado. Can you help me out here?

Error while installing PyTornado

 ERROR: Command errored out with exit status 1:
     command: 'C:\Users\Guset User\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\GUSETU~1\\AppData\\Local\\Temp\\pip-install-kscujy3m\\pytornado\\setup.py'"'"'; __file__='"'"'C:\\Users\\GUSETU~1\\AppData\\Local\\Temp\\pip-install-kscujy3m\\pytornado\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\GUSETU~1\AppData\Local\Temp\pip-install-kscujy3m\pytornado\pip-egg-info'
         cwd: C:\Users\GUSETU~1\AppData\Local\Temp\pip-install-kscujy3m\pytornado\
    Complete output (9 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\GUSETU~1\AppData\Local\Temp\pip-install-kscujy3m\pytornado\setup.py", line 90, in <module>
        packages=find_packages(where=PACKAGE_DIR),
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\site-packages\setuptools\__init__.py", line 71, in find
        convert_path(where),
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1776.0_x64__qbz5n2kfra8p0\lib\distutils\util.py", line 112, in convert_path
        raise ValueError("path '%s' cannot end with '/'" % pathname)
    ValueError: path 'src/lib/' cannot end with '/'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Damping derivatives calculations

It would be nice to have "damping derivatives" results for the three main axis rotation rates (p,q,r). They can be stored in the CPACS file @ .../AeroMap[i]/aeroPerformanceMap/dampingDerivatives

Lift Force

In Matlab Tornado (or PyTornado) the total lift force is calculated across all surfaces or only the first wing? Is CL calculated using this lift force?

Steady versus Unsteady VLM

Aaron
Won't there be a significant difference in force values between steady and the settled values of unsteady VLM?
Bharath

Overflow or memory access error in aerodynamic coefficients on Windows 10

An overflow or memory access bug is suspected. Error has been produced on a Windows 10 system.

To produce the error:

pytornado --make-example
cd .\pytornado\
pytornado -cv .\settings\template.json

This results in the following output in the terminal:

...
[... INFO] @ pytornado.aero.vlm | Pre-allocating vortex-lattice method results...
[... INFO] @ pytornado.aero.vlm | Computing results...
[... INFO] @ pytornado.aero.vlm | --> Fx = -1.946e+02
[... INFO] @ pytornado.aero.vlm | --> Fy = 5.098e-303
[... INFO] @ pytornado.aero.vlm | --> Fz = 2.640e+191
[... INFO] @ pytornado.aero.vlm | --> FD = 9.208e+189
[... INFO] @ pytornado.aero.vlm | --> FC = 3.216e+188
[... INFO] @ pytornado.aero.vlm | --> FL = 2.638e+191
[... INFO] @ pytornado.aero.vlm | --> Mx =  2.987e+04
[... INFO] @ pytornado.aero.vlm | --> My = -8.648e+03
[... INFO] @ pytornado.aero.vlm | --> Mz =  2.434e+02
[... INFO] @ pytornado.aero.vlm | --> Cx = -0.0032
[... INFO] @ pytornado.aero.vlm | --> Cy =  0.0000
[... INFO] @ pytornado.aero.vlm | --> Cz = 4310306740840105872775157176533500182972667108823184633752001996355399438874484340618455714533441059567706923708553457554295700209043653152099537955380622521171057660745443235315704659968.0000
[... INFO] @ pytornado.aero.vlm | --> CD = 150335899498269576655863479651962660742841077021561704229376396038930950201837543382292880495493340690535301539664628119739663865405568958486362087680254127115330982352353254559038046208.0000
[... INFO] @ pytornado.aero.vlm | --> CC = 5249845292713624069719902860462242867569000306230662345032365277126063483659274284128215418080097234452624254302997207576214439027144596626746912936561974047363242453064521820342845440.0000
[... INFO] @ pytornado.aero.vlm | --> CL = 4307681018434176543373051804779323747877346502938677146351055080694483419506094723372216748148945969541284248274213973140867640278446549213080788307699969439225737815503343307869365731328.0000
[... INFO] @ pytornado.aero.vlm | --> Cl =  0.0975
[... INFO] @ pytornado.aero.vlm | --> Cm = -0.0706
[... INFO] @ pytornado.aero.vlm | --> Cn =  0.0008
[... INFO] @ pytornado.plot.makeplots | Generating results plot...
[... INFO] @ pytornado.stdfun.run | pytornado 0.5.1 terminated

These values are obviously wrong. Same values can be found in the results file if written to disc.

All variables for global forces/moment and corresponding coefficients should be checked.

Pytornado Command doesn't do anything

I've sucessfully installed the program but it dosent do anything. I followed the steps in "getting started" section but nothing happens and no error occurs. Problably it is important for be known, I'm in windows 11.

Fix CL calulations

It would be nice to have the possibility to make a PyTornado analysis at fix a CL value and get the angle of attack value as an output. It could also be useful for FSI calculation to be sure to always have the correct lift value.

Aerodynamic Coeffecients

I have a doubt.
Scenario: Aircraft 6 dof dynamics is given
Requirement: Integrate ODEs to find position of aircraft (initial conditions given). For this we need aerodynamic coefficients. These coefficients aren't fixed in time since wind speed is changing.
Question: Is it enough to find steady state coefficient at different velocities or do I need to take the transient response of the coefficients (unsteady VLM)? Do you know any unsteady VLM solvers available online?

With control surface deflection

I am trying to run an analysis with flap deflection (in UVLM). I find that the forces and moments are different from PyTornado. My questions: When we have control surface deflection, can we treat the whole wing as a single unit? A single unit of a deformed crooked surface? Is this how PyTornado does it? Are there any wake points in the hinge?
Thanks

Fix MacOS installation and testing

Compilation on MacOS fails. Running pip install -e . yields

     ERROR: Command errored out with exit status 1:
     command: .../bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'...pytornado/setup.py'"'"'; __file__='"'"'...pytornado/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: ...pytornado/
    Complete output (25 lines):
    running develop
    running egg_info
    writing src/lib/pytornado.egg-info/PKG-INFO
    writing dependency_links to src/lib/pytornado.egg-info/dependency_links.txt
    writing requirements to src/lib/pytornado.egg-info/requires.txt
    writing top-level names to src/lib/pytornado.egg-info/top_level.txt
    reading manifest file 'src/lib/pytornado.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'src/lib/pytornado.egg-info/SOURCES.txt'
    running build_ext
    building 'pytornado.aero.c_vlm' extension
    creating build
    creating build/temp.macosx-10.7-x86_64-3.6
    creating build/temp.macosx-10.7-x86_64-3.6/src
    creating build/temp.macosx-10.7-x86_64-3.6/src/lib
    creating build/temp.macosx-10.7-x86_64-3.6/src/lib/pytornado
    creating build/temp.macosx-10.7-x86_64-3.6/src/lib/pytornado/aero

    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I.../include -arch x86_64 -I.../include -arch x86_64 -Isrc/lib/pytornado/aero/ -I/usr/include/python3.6 -I.../lib/python3.6/site-packages/numpy/core/include/numpy -I.../lib/python3.6/site-packages/numpy/core/include -I.../include/python3.6m -c src/lib/pytornado/aero/c_vlm.cpp -o build/temp.macosx-10.7-x86_64-3.6/src/lib/pytornado/aero/c_vlm.o
    warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    In file included from src/lib/pytornado/aero/c_vlm.cpp:39:
    src/lib/pytornado/aero/c_vlm.h:53:10: fatal error: 'iostream' file not found
    #include <iostream>
             ^~~~~~~~~~
    1 warning and 1 error generated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: .../bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'...pytornado/setup.py'"'"'; __file__='"'"'...pytornado/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

Win 10 installation issue

`Collecting pytornado
Using cached pytornado-0.5.0.tar.gz (144 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
Traceback (most recent call last):
File "", line 36, in
File "", line 34, in
File "C:\Users\User\AppData\Local\Temp\pip-install-c3_nm0er\pytornado_5e34f62fd28a48ab821bc61f55a7b1d6\setup.py", line 90, in
packages=find_packages(where=PACKAGE_DIR),
File "c:\users\user\appdata\local\programs\python\python37\lib\site-packages\setuptools_init_.py", line 70, in find
convert_path(where),
File "c:\users\user\appdata\local\programs\python\python37\lib\distutils\util.py", line 112, in convert_path
raise ValueError("path '%s' cannot end with '/'" % pathname)
ValueError: path 'src/lib/' cannot end with '/'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.`

Installation on Windows 10

I installed ceasiompy, pytornado installed by default in conda, but pytornado not working from there. getting error:

`INFO     - ######################################################################################
    INFO     - Run module: PyTornado
    INFO     - ######################################################################################
    INFO     - Going to c:\ceasiom\ceasiompy\ceasiompy\PyTornado
    INFO     - Copy CPACS from:c:\ceasiom\ceasiompy\ceasiompy\SettingsGUI\ToolOutput\ToolOutput.xml
    INFO     - Copy CPACS to:c:\ceasiom\ceasiompy\ceasiompy\PyTornado\ToolInput\ToolInput.xml
    INFO     - Running PyTornado...
    INFO     - TIXI handle has been created.c:\ceasiom\ceasiompy\ceasiompy\PyTornado\ToolInput\ToolInput.xml
    ERROR    -

    | PyTornado was not found. CEASIOMpy cannot run an analysis.
    | Make sure that PyTornado is correctly installed. Please refer to:
    |
    | * https://github.com/airinnova/pytornado

    Traceback (most recent call last):
      File "runpytornado.py", line 93, in import_pytornado
        module_name = import_module(module_name)
      File "C:\Miniconda3\envs\ceasiompy\lib\importlib\__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'pytornado.objects'

    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "runpytornado.py", line 360, in <module>
        main()
      File "runpytornado.py", line 325, in main
        cpacs_settings = get_pytornado_settings(cpacs_in_path)
      File "runpytornado.py", line 132, in get_pytornado_settings
        ps = import_pytornado('pytornado.objects.settings')
      File "runpytornado.py", line 102, in import_pytornado
        raise ModuleNotFoundError(err_msg)
    ModuleNotFoundError:

    | PyTornado was not found. CEASIOMpy cannot run an analysis.
    | Make sure that PyTornado is correctly installed. Please refer to:
    |
    | * https://github.com/airinnova/pytornado

    Traceback (most recent call last):
      File "workflowcreator.py", line 443, in <module>
        run_workflow(Opt)
      File "workflowcreator.py", line 330, in run_workflow
        wkf.run_subworkflow(Opt.module_pre, Opt.cpacs_path)
      File "c:\ceasiom\ceasiompy\ceasiompy\utils\workflowfunctions.py", line 146, in run_subworkflow
        raise ValueError('An error ocured in the module '+ module)
    ValueError: An error ocured in the module PyTornado`

Then I installed pytornado as described in https://pytornado.readthedocs.io/en/latest/user_guide/installation.html
After successful installation, when I run "pytornado" on command line getting the error:

'pytornado' is not recognized as an internal or external command,
operable program or batch file.

How to sort?

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.