Giter VIP home page Giter VIP logo

pyavl's Introduction

Josh Anibal's Github Profile

banner

Bio

I am an aerospace engineering with experience in aircraft design and scientific computing. My research has focused on gradient-based shape optimization using computational fluid dynamics (CFD) in addition to the developement of CFD solvers. I am also interested in nonlinear and linear solvers, high-performance computing, and next-generation aircraft design

Other profiles

For more information and preprints of my research papers see my website or ResearchGate

Contact info

email: {my username}@umich.edu

pyavl's People

Contributors

joanibal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pyavl's Issues

run_opt example

Hello @joanibal ,

I'm trying to run the run_opt example without success - CL and CM constraints are not matched.

I have installed openmdao 3.30.0 and pyoptsparse 2.20.2 on Ubuntu 20.04.

Find attached my example folder with additional outputs/reports.

OpenMdao is new to me, so I have no clue what's going wrong and it would be very nice if
you can give some help.

Thanks in advance.

John

Opti.zip

License?

Hello @joanibal could you please advise what the license is for this package?
Thanks in advance

Fix windows builds - link error

On Windows the build repeatedly fails at the linking stage with the following error.

"gfortran"  -o libavl.cp39-win_amd64.pyd libavl.cp39-win_amd64.pyd.p/meson-generated_.._libavlmodule.c.obj libavl.cp39-win_amd64.pyd.p/meson-generated_.._libavl-f2pywrappers.f.obj libavl.cp39-win_amd64.pyd.p/src_aero.f.obj libavl.cp39-win_amd64.pyd.p/src_aic.f.obj libavl.cp39-win_amd64.pyd.p/src_ainput.f.obj libavl.cp39-win_amd64.pyd.p/src_airutil.f.obj libavl.cp39-win_amd64.pyd.p/src_amake.f.obj libavl.cp39-win_amd64.pyd.p/src_amass.f.obj libavl.cp39-win_amd64.pyd.p/src_amode.f.obj libavl.cp39-win_amd64.pyd.p/src_aoper.f.obj libavl.cp39-win_amd64.pyd.p/src_aoutput.f.obj libavl.cp39-win_amd64.pyd.p/src_asetup.f.obj libavl.cp39-win_amd64.pyd.p/src_atpforc.f.obj libavl.cp39-win_amd64.pyd.p/src_atrim.f.obj libavl.cp39-win_amd64.pyd.p/src_autil.f.obj libavl.cp39-win_amd64.pyd.p/src_avl.f.obj libavl.cp39-win_amd64.pyd.p/src_cdcl.f.obj libavl.cp39-win_amd64.pyd.p/src_getvm.f.obj libavl.cp39-win_amd64.pyd.p/src_hidden.f.obj libavl.cp39-win_amd64.pyd.p/src_matrix-lapackdp.f.obj libavl.cp39-win_amd64.pyd.p/src_second.f.obj libavl.cp39-win_amd64.pyd.p/src_sgutil.f.obj libavl.cp39-win_amd64.pyd.p/src_spline.f.obj libavl.cp39-win_amd64.pyd.p/src_userio.f.obj libavl.cp39-win_amd64.pyd.p/src_eispack.f.obj libavl.cp39-win_amd64.pyd.p/306a480927d86681adc867cd3f47a3309803b56d_.._.._f2py_src_fortranobject.c.obj "-Lc:/rtools40/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0" "-LC:/rtools40/ucrt64/lib/gcc/x86_64-w64-mingw32/10.3.0" "-Lc:/rtools40/ucrt64/bin/../lib/gcc" "-LC:/rtools40/ucrt64/lib/gcc" "-Lc:/rtools40/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/lib/../lib" "-LC:/rtools40/ucrt64/x86_64-w64-mingw32/lib" "-Lc:/rtools40/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../lib" "-LC:/rtools40/ucrt64/lib" "-Lc:/rtools40/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/lib" "-Lc:/rtools40/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../.." "-Wl,--allow-shlib-undefined" "-shared" "-Wl,--start-group" "-Wl,--out-implib=libavl.cp39-win_amd64.dll.a" "-lucrt" "-static" "lib_fortranobject.a" "-mcmodel=medium" "c:/opt/64/lib/libopenblas_v0.3.20-571-g3dec11c6-gcc_10_3_0.dll.a" "-defaultlib:advapi32" "c:/rtools40/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/libgfortran.a" "-defaultlib:advapi32" "C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\python.3.9.13\tools\python39.dll" "-lgfortran" "-lm" "-Wl,--end-group"
    c:/rtools40/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/lib/../lib/dllcrt2.o: in function `_CRT_INIT':
    D:/a/rtools-testing/rtools-testing/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtdll.c:122:(.text+0x4d): relocation truncated to fit: IMAGE_REL_AMD64_REL32 against symbol `__imp_Sleep' defined in .idata$5 section in c:/rtools40/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/lib/../lib\libkernel32.a(dqoks01409.o)
    D:/a/rtools-testing/rtools-testing/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtdll.c:90:(.text+0xc2): relocation truncated to fit: IMAGE_REL_AMD64_REL32 against symbol `__imp_Sleep' defined in .idata$5 section in c:/rtools40/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/lib/../lib\libkernel32.a(dqoks01409.o)
    libavl.cp39-win_amd64.pyd.p/meson-generated_.._libavlmodule.c.obj:libavlmodule.c:(.text+0x17ef): relocation truncated to fit: IMAGE_REL_AMD64_REL32 against symbol `__imp_PyArg_ParseTupleAndKeywords' defined in .idata$5 section in d000001.o
    libavl.cp39-win_amd64.pyd.p/meson-generated_.._libavlmodule.c.obj:libavlmodule.c:(.text+0x17fb): relocation truncated to fit: IMAGE_REL_AMD64_REL32 against symbol `__imp_PyErr_Occurred' defined in .idata$5 section in d000014.o
    libavl.cp39-win_amd64.pyd.p/meson-generated_.._libavlmodule.c.obj:libavlmodule.c:(.text+0x1831): relocation truncated to fit: IMAGE_REL_AMD64_REL32 against symbol `__imp_Py_BuildValue' defined in .idata$5 section in d000045.o
    libavl.cp39-win_amd64.pyd.p/meson-generated_.._libavlmodule.c.obj:libavlmodule.c:(.text+0x187f): relocation truncated to fit: IMAGE_REL_AMD64_REL32 against symbol `__imp_PyArg_ParseTupleAndKeywords' defined in .idata$5 section in d000001.o
    libavl.cp39-win_amd64.pyd.p/meson-generated_.._libavlmodule.c.obj:libavlmodule.c:(.text+0x188b): relocation truncated to fit: IMAGE_REL_AMD64_REL32 against symbol `__imp_PyErr_Occurred' defined in .idata$5 section in d000014.o
    libavl.cp39-win_amd64.pyd.p/meson-generated_.._libavlmodule.c.obj:libavlmodule.c:(.text+0x18c1): relocation truncated to fit: IMAGE_REL_AMD64_REL32 against symbol `__imp_Py_BuildValue' defined in .idata$5 section in d000045.o
    libavl.cp39-win_amd64.pyd.p/meson-generated_.._libavlmodule.c.obj:libavlmodule.c:(.text+0x190f): relocation truncated to fit: IMAGE_REL_AMD64_REL32 against symbol `__imp_PyArg_ParseTupleAndKeywords' defined in .idata$5 section in d000001.o
    libavl.cp39-win_amd64.pyd.p/meson-generated_.._libavlmodule.c.obj:libavlmodule.c:(.text+0x191b): relocation truncated to fit: IMAGE_REL_AMD64_REL32 against symbol `__imp_PyErr_Occurred' defined in .idata$5 section in d000014.o
    libavl.cp39-win_amd64.pyd.p/meson-generated_.._libavlmodule.c.obj:libavlmodule.c:(.text+0x1951): additional relocation overflows omitted from the output
  
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    INFO: autodetecting backend as ninja
    INFO: calculating backend command to run: C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-r5a546wj\overlay\Scripts\ninja.EXE
    error: subprocess-exited-with-error

Based on this stack overflow post this issue is related to translating 64 bit memory address to 32 bit addresses.
The linker relocates data in the .o based on its new memory address in the linked program.
A similar operation (R_X86_64_PC32) occurs in the linux .o files so the operation itself may not be the issue.

I tried..

  • additional linking flags
    • '-mcmodel=medium'
    • '-Wl,--image-base,0x10000000'
  • additional compiler args
    • '-fomit-frame-pointer' based on AVL make file
    • '-mcmodel=medium'

So possible next steps

  • compile AVL by itself on Windows using the included make file
    • create a windows virtual machine on your laptop
  • interactive debugging of the failed build using ssh (action here)

Read Error when loading AVL Input File

An issue occured when reading a geofile exported from AeroSandbox. AVL has no
problem to read the components.

The error message is:

GeoFile : airplane.avl
Traceback (most recent call last):
File "run_opt_Twist.py", line 92, in
prob.setup(mode='rev')
File "/home/john/.local/lib/python3.8/site-packages/openmdao/core/problem.py", line 1031, in setup
model._setup(model_comm, mode, self._metadata)
File "/home/john/.local/lib/python3.8/site-packages/openmdao/core/group.py", line 735, in _setup
self._setup_procs(self.pathname, comm, mode, self._problem_meta)
File "/home/john/.local/lib/python3.8/site-packages/openmdao/core/group.py", line 640, in _setup_procs
subsys._setup_procs(subsys.pathname, sub_comm, mode, prob_meta)
File "/home/john/.local/lib/python3.8/site-packages/openmdao/core/group.py", line 585, in _setup_procs
self.setup()
File "/home/john/.local/lib/python3.8/site-packages/pyavl/om_wrapper.py", line 31, in setup
avl = AVLSolver(geo_file=geom_file, mass_file=mass_file, debug=False)
File "/home/john/.local/lib/python3.8/site-packages/pyavl/pyAVL.py", line 303, in init
self._init_surf_data()
File "/home/john/.local/lib/python3.8/site-packages/pyavl/pyAVL.py", line 334, in _init_surf_data
raise RuntimeError("nasec is not the same for all sections")
RuntimeError: nasec is not the same for all sections
Reading body shape from file: airplane.avl.fuse0

I've send you the related files by e-mail.

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.