GithubHelp home page GithubHelp logo

mdolab / mach-aero Goto Github PK

View Code? Open in Web Editor NEW
108.0 13.0 54.0 24.36 MB

MACH: MDO of Aircraft Configurations with High fidelity

Makefile 4.75% Python 64.14% CSS 0.34% TeX 8.42% Glyph 19.64% Shell 2.71%
design-optimization geometry-parameterization flow-simulation adjoint-sensitivities mesh-deformation

mach-aero's Introduction

MACH-Aero

Documentation Status Build Status

MACH-Aero is a framework for performing aerodynamic shape optimization. It contains the following core modules:

Code repository Functionality Documentation CI Status Latest Version
baseClasses Shared class definitions Documentation Status Build Status PyPI
pySpline B-spline implementation Documentation Status Build Status GitHub release (latest by date)
pyGeo Geometry definition Documentation Status Build Status GitHub release (latest by date)
IDWarp Volume mesh warping Documentation Status Build Status GitHub release (latest by date)
ADflow CFD and adjoint solver Documentation Status Build Status GitHub release (latest by date)
pyOptSparse Optimizer wrapper Documentation Status Build Status GitHub release (latest by date)
And optional modules:
pyHyp Volume mesh generation Documentation Status Build Status GitHub release (latest by date)
multiPoint Utilities for multipoint optimization Documentation Status Build Status GitHub release (latest by date)
cgnsUtilities Utilities for CGNS mesh files Documentation Status Build Status GitHub release (latest by date)
DAFoam Alternate adjoint solver using OpenFOAM Documentation Regression Test GitHub release (latest by date)

Where is the code?

All the code for MACH-Aero are contained within the individual repositories, which you can go to by clicking on the names in the table above. To go to the documentation site for each repository, click on the badge in the documentation column of the table above.

What's in this repo then?

This repository contains the following:

  • A description of the overall framework
  • Installation instructions which are shared across the various repositories
  • Tutorials for using MACH-Aero to perform aerodynamic shape optimization

This documentation can be accessed online here. To run the tutorials, follow the installation instructions to install all the modules, then clone this repository to access the tutorial scripts. To compile the doc locally, first install dependencies via pip install -r requirements.txt, then build locally with make html.

mach-aero's People

Contributors

a-cgray avatar akleb avatar anilyil avatar arshsaja avatar bbrelje avatar bernardopacini avatar davidanderegg avatar eirikurj avatar ewu63 avatar eytanadler avatar felixluii avatar friedenhe avatar gawng avatar hajdik avatar jrram avatar marcomangano avatar shamsheersc19 avatar sseraj avatar umarsajjad1992 avatar yqliaohk 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  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

mach-aero's Issues

ImportError: libcgns.so.4.4: cannot open shared object file: No such file or directory.

Description

Hello! I am a student in aerospace engineering, and I am attempting to use the MACH-Aero framework to conduct aerodynamic optimization. Unfortunately, upon execution of a simple test file to import pyHyp in the u22-gcc-ompi-latest image, I am running into an error. I am new to Docker (and Python, largely), so I apologize if this is not a bug, but rather a user error. Any help would be appreciated!

Steps to reproduce issue

  1. Pull the u22-gcc-ompi-latest image using Docker and make a container.
  2. Attach to the running container in VSCode.
  3. In the mdolabuser folder, create and run a python script with the line "from pyhyp import pyHyp".

Current behavior

image

Update library import test to give more information

Issue

We continually receive issues where people have issues compiling MDO Lab codes and the import test of the library fails (e.g., mdolab/pyspline#48, mdolab/idwarp#74). The error message does not state what failed, just that it failed. We should try to improve the error message to make it more clear what the issue is.

Affected repositories

List of repositories that need to be updated (possibly more)

Possible solution

Instead of suppressing the import failure message, we should print the exception to stdout. I see few options.

  1. Update the existing importTest.py files. To consolidate a bit, we could add importTest.py this to baseclasses and have those repositories run that file.
  2. Drop the importTest.py and write the import test directly in the Makefile

I see the main benefit from option 1 being easier to customize error messages than straight from the Makefile. Also, by using a centralized importTest.py it makes the maintenance a bit easier. Once possible drawback is that it will create some inconsistency between packages as some have a local file e.g., pyspline, who does not depend on baseclasses.

I think the question is, do we see value in importTest.py or not, and do we want to keep that centralized.

Looking for some feedback.

Running docker image on HPC using singularity container platform

Description of feature

The cluster at my university encourages the use of singularity which is an open source container platform used by many HPC facilities. I have converted the docker image into a singularity file using the command:
singularity pull docker://mdolab/public:u22-gcc-ompi-stable

However, when I load the image into a container using the command:
singularity shell public_u22-gcc-ompi-stable.sif

I see that I have no access to the basic libraries such as "mpirun" which the docker container clearly shows. Is there any other way of converting the docker image into a singularity *.sif file that you would suggest?

If a singularity file is tested and provided that would be immensely helpful to those who would want to take MACHAero to the cluster.

Many thanks,
Russell

Issues in Plotting of Optimization History

Description

When running the wing optimization as directed in the tutorial: (https://mdolab-mach-aero.readthedocs-hosted.com/en/latest/machAeroTutorials/opt_aero.html), everything runs smoothly but when we try to visualize the optimization history using the commands listed below, we get an error:

Steps to reproduce issue

  1. python plot_optHist.py --histFile output/opt.hst --outputDir output/

Current behavior

 Expected here: /home/mdolabuser/packages/OpenVSP/python/openvsp/openvsp/vspviewer
 /home/mdolabuser/.pyenv/versions/3.11.6/lib/python3.11/site-packages/pyoptsparse/pySNOPT/pySNOPT.py:36: 
 UserWarning: snopt module could not be imported from /home/mdolabuser/.pyenv/versions/3.11.6/lib/python3.11/site- 
 packages/pyoptsparse/pySNOPT.
 snopt = try_import_compiled_module_from_path("snopt", _IMPORT_SNOPT_FROM)
 /home/mdolabuser/.pyenv/versions/3.11.6/lib/python3.11/site-packages/pyoptsparse/pyNLPQLP/pyNLPQLP.py:20: 
 UserWarning: nlpqlp module could not be imported from /home/mdolabuser/.pyenv/versions/3.11.6/lib/python3.11/site- 
 packages/pyoptsparse/pyNLPQLP.
 nlpqlp = try_import_compiled_module_from_path("nlpqlp", THIS_DIR)
 Traceback (most recent call last):
 File "/home/mdolabuser/mount/tut_implementation/wing_opt/10k_mesh_opt/plot_optHist.py", line 23, in <module>
 axes[0].plot("nMajor", "optimality", data=histValues, label="Optimality")
 File "/home/mdolabuser/.pyenv/versions/3.11.6/lib/python3.11/site-packages/matplotlib/axes/_axes.py", line 1688, in plot
 lines = [*self._get_lines(*args, data=data, **kwargs)]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/home/mdolabuser/.pyenv/versions/3.11.6/lib/python3.11/site-packages/matplotlib/axes/_base.py", line 311, in 
 __call__
 yield from self._plot_args(
           ^^^^^^^^^^^^^^^^
 File "/home/mdolabuser/.pyenv/versions/3.11.6/lib/python3.11/site-packages/matplotlib/axes/_base.py", line 454, in 
 _plot_args
 linestyle, marker, color = _process_plot_format(
                           ^^^^^^^^^^^^^^^^^^^^^
 File "/home/mdolabuser/.pyenv/versions/3.11.6/lib/python3.11/site-packages/matplotlib/axes/_base.py", line 185, in 
 _process_plot_format
 raise ValueError(errfmt.format(fmt, "two marker symbols"))
 ValueError: 'optimality' is neither a data key nor a valid format string (two marker symbols)

Expected behavior

It is expected to show the converge history of the optimization problem.

Code versions

  • Operating System: Ubuntu 20.04
  • Running on Docker
  • Mach-Aero version: mdolab/public:u22-gcc-ompi-latest

Possible bug related to the number of cores used

Discussed in #119

Originally posted by S5331107 October 26, 2023
Hello,
I am trying to run a Euler simulation (about 60k elements). However, when I run the code using more than 2 processors then it becomes extremely slow. Using 2 processors is relatively faster than using 1, but using any number of processors more than 2 makes the code extremely slow. Can it be related to the version openmpi that I am using? I'm using openmpi-4.1.5 version
Thank you

PETSC ERROR [0]

Hi, I have encountered an petsc error when I run the tutorials in the docker. When I try to run the aerodynamic analisys
python aero_run.py
the code returns me the attached error
petsc error
Could you help me to fix it?

Update package versions

Type of issue

What types of issue is it?
Select the appropriate type(s) that describe this issue

  • Documentation update

Description

Package versions in the installation guide are not fully up to date, e.g. PETSc 3.12 and OpenMPI 4.0.x.

aero_opt.py killed during "Solving ADjoint Transpose with PETSc..."

During the aerodynamic optimization tutorial, I encountered issue #96 which I resolved by replacing the pyoptsparse version with 2.10.0. However, I am now facing a new problem while using docker u22-gcc-ompi-stable. Optimization cannot proceed the following step (Solving ADjoint Transpose with PETSc...) and it is kiiled. I have increased swap memory but it did not solve the issue.

#
# Writing grid file(s):
#    output/wing_000_vol.cgns
# Grid file(s) written
#
#
# Writing volume solution file(s):
#    output/wing_000_vol.cgns
# Volume solution file(s) written
#
#
# Writing surface solution file(s):
#    output/wing_000_surf.cgns
# Surface solution file(s) written
#
#
# Writing slices file(s): 
#    output/wing_000_slices.dat
# Slices file(s) written
#
#
# Writing lift distribution file(s):
#    output/wing_000_lift.dat
# Lift distribution file(s) written
#
#
# Writing tecplot surface file(s):
#    output/wing_000_surf.plt
# Tecplot surface file(s) written
#
+-------------------------------------------------+
|
| Solution Timings:
|
| Set AeroProblem Time          :      2.515 sec
| Solution Time                 :      8.461 sec
| Write Solution Time           :      0.407 sec
| Stability Parameter Time      :      0.000 sec
|
| Total Call Time               :     11.383 sec
+--------------------------------------------------+
-> Alpha... 1.500000 
+---------------------------------------------------+
|
| Function Timings:
|
| Function AeroProblem Time     :      0.006 sec
| Function Evaluation Time      :      0.001 sec
| User Function Evaluation Time :      0.000 sec
|
| Total Function Evaluation Time:      0.007 sec
+--------------------------------------------------+
-> Alpha... 1.500000 
{'DVCon1_volume_constraint_0': 1.0000000000000275, 'DVCon1_thickness_constraints_0': array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
       1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
       1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
       1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
       1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
       1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]), 'wing_cd': 0.2013076110438874, 'wing_cl': 0.06794804493091523, 'fail': True}
funcs in obj: {'wing_cd': 0.2013076110438874, 'wing_cl': 0.06794804493091523, 'obj': 0.2013076110438874, 'cl_con_wing': -0.4320519550690848}
-> Alpha... 1.500000 
Solving adjoint: cd
-> Alpha... 1.500000 
Solving ADjoint Transpose with PETSc...
   0 KSP Residual norm 9.9073502558E-03
  10 KSP Residual norm 9.4374506920E-03
  20 KSP Residual norm 7.2158250155E-03
  30 KSP Residual norm 1.0992693836E-03
Killed
mdolabuser@1a792facbb13:~/mount/MACH-Aero-main/mytuto/opt/aero$ 


Add `checkAdjointSolutionFailure` to opt scripts

Type of issue

What types of issue is it?
Select the appropriate type(s) that describe this issue

  • New feature (non-breaking change which adds functionality)

Description

We should check the adjoint solution in addition to the primal solution check. Need to add the check to the optimization scripts, and run locally to verify.

failed optimization at low mach number 0.044 at maximization lift for single point optimization for same tutorial NACA0012

I kindly request assistance in achieving a favorable outcome for my single point optimization case. Despite dedicating an entire month to identifying my mistakes, I have been unable to pinpoint the error I made. I am hopeful that you can provide me with guidance. To this end, I have made modifications to the opt_airfoil.py code as outlined below:

image
and i have been changed on the objective function and the sensitivity function as following ;
image
and also the drag constraint as following 👍
image

I sincerely hope to receive assistance and guidance regarding my current issues. It would be greatly appreciated if you could suggest a guide book or provide tutorials on Python scripting for single point optimization and other optimization techniques. Despite my extensive reading, I have been unable to find the answers to my questions. Therefore, I kindly request your help in identifying the possible changes that I should focus on when conducting an analysis on different airfoils to address the issue of solution divergence. Your support in this matter would be invaluable to me.

Problems about ANK & NK

Description

CFD is performed on 4 nodes (112 CPUs). It starts with DADI, then ANK is started when the residual drops to e-2. But all the aerodynamic performances don't change anymore after several steps, and the CFL value drops quickly till ADflow doesn't work. It can be solved by using "Runge kutta" instead of DADI at the beginning.

When the residual drops to e-4,it switches to NK, but the NaN error occurs at the first NK step.

Please explain what causes these problems and how to solve them thoroughly.

Bug when running MACH-Aero tutorial with SLSQP

Description

There is a bug when running MACH-Aero tutorial using docker named mdolab/public:u20-gcc-ompi-stable, I would be very grateful if you could help me.
The bug is

'ValueError: failed to initialize intent(inout) array -- expected elsize=8 but got 16 -- input 'D' not compatible to 'd'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/mdolabuser/mount/opt/aero/aero_opt.py", line 245, in <module>
    sol = opt(optProb, MP.sens, storeHistory=os.path.join(args.output, "opt.hst"))
  File "/home/mdolabuser/.pyenv/versions/3.9.16/lib/python3.9/site-packages/pyoptsparse/pySLSQP/pySLSQP.py", line 218, in __call__
    slsqp.slsqp(m, meq, la, n, xs, blx, bux, ff, gg, df, dg, acc, maxit,
ValueError: failed in converting 5th argument `x' of slsqp.slsqp to C/Fortran array'

Steps to reproduce issue

Current behavior

Expected behavior

Code versions

  • Operating System:
  • Python:
  • OpenMPI:
  • CGNS:
  • PETSc:
  • Compiler:
  • This repository:

single point optimization failed to do the optimization seeking for help in this issues

airfoilopt code.txt
Dear MachAero Support Team,

I hope this message finds you well. I am currently working on an optimization project using MachAero for an airfoil with a specific shape. The optimization process runs successfully, but I am facing a challenge in obtaining the profile of the optimized airfoil.

To provide you with more details, I have modified the design variables to include only the shape FFD control variables. I will share with you the relevant sections of the code that I have used, along with the optimization results.


mycd = 0.01
# angle of attack
alpha = 1.5
# mach number
mach = 0.15
# cruising altitude
alt = 13
.
.

DVGeo.addLocalDV("shape", lower=-1.0, upper=1.0, axis="y", scale=1.0)


le = 0.001
leList = [[le, 0, le], [le, 0, 1.0 - le]]
teList = [[1.0 - le, 0, le], [1.0 - le, 0, 1.0 - le]]
.
.
DVCon.addVolumeConstraint(leList, teList, 2, 100, lower=1, scaled=True)
DVCon.addThicknessConstraints2D(leList, teList, 2, 100, lower=0.1, upper=3.0)
.
.
.
funcs["obj"] = 1/funcs[ap["cl"]]
    funcs["cd_con_" + ap.name] = funcs[ap["cd"]] - mycd
.
.
# Add objective
optProb.addObj("obj", scale=1.0)

# Add variables from the AeroProblem
ap.addVariablesPyOpt(optProb)

# Add DVGeo variables
DVGeo.addVariablesPyOpt(optProb)

# Add constraints
DVCon.addConstraintsPyOpt(optProb)
optProb.addCon("cd_con_" + ap.name, lower=0.0, upper=0.0, scale=1.0)

Here is a brief overview of the issue:

Optimization Success: The optimization terminates successfully, indicating that the process is working fine.

Profile Retrieval Issue: Despite the successful optimization, I am unable to retrieve the profile of the airfoil.

Design Variable Modification: I have narrowed down the design variables to include only the shape FFD control variables.

Objective Function Change: I have adjusted the objective function to be 1/cl to achieve maximization of the airfoil.

I kindly request your assistance in resolving this issue. If you could review the provided code snippets and share any insights or recommendations on how to obtain the airfoil profile post-optimization, it would be immensely helpful.

I understand that you may need additional details, and I am more than willing to provide any further information required. Your support in addressing this matter is greatly appreciated.

Thank you for your time and assistance.

Best regards,
ailun
Master researcher
fc_cl_
obj_
fc_cd_
out.txt

aero_opt.py: Cannot add leading edge constraints. The dimensions of the selected face are: (2, 2). For this case you must specify topID

Description

I am referring to the tutorial and executing python aero_opt.py, but the following error occurred
raceback (most recent call last): File "aero_opt.py", line 133, in <module> DVCon.addLeTeConstraints(0, "iLow") File "/home/*/dafoam/packages/miniconda/lib/python3.8/site-packages/pygeo/constraints/DVCon.py", line 2001, in addLeTeConstraints raise Error( baseclasses.utils.error.Error: +------------------------------------------------------------------------------+ | Error: Cannot add leading edge constraints. One (and exactly one) of FFD | | block dimensions on the specified face must be 2. The dimensions of the | | selected face are: (2, 2). For this case you must specify topID | +------------------------------------------------------------------------------+
I am a beginner, could you please help me solve it!Thanks!

Steps to reproduce issue

I am in directory MACH-Aero-main/tutorial/opt/aero, executing
cp ../../airfoilopt/ffd/ffd.xyz .
cp ../../aero/analysis/wing_vol.cgns .
mpirun -np 1 python aero_opt.py

Code versions

adflow 2.10.0
asn1crypto 1.3.0
certifi 2019.11.28
cffi 1.14.0
cgnsutilities 2.6.0
chardet 3.0.4
conda 4.8.2
conda-package-handling 1.6.0
cryptography 2.8
Cython 3.0a6
dafoam 3.1.1
idna 2.8
idwarp 2.6.0
mdolab-baseclasses 1.6.1
meson 0.64.0
mpi4py 3.1.3
multipoint 1.4.0
numpy 1.21.2
petsc4py 3.14.1
pip 20.0.2
pycosat 0.6.3
pycparser 2.19
pygeo 1.12.2
pyhyp 2.5.0
pyofm 1.2.0
pyOpenSSL 19.1.0
pyoptsparse 2.10.1
PySocks 1.7.1
pyspline 1.5.2
requests 2.22.0
ruamel-yaml 0.15.87
scipy 1.7.1
setuptools 45.2.0.post20200210
six 1.14.0
sqlitedict 2.1.0
tqdm 4.42.1
urllib3 1.25.8
wheel 0.34.2

Saving the Mesh after Parametrization

It is a query regarding the Aerodynamic Optimization tutorial, specific to Geometric Parametrization. The tutorial briefly explains about how FFD box is created and visualizing the deformed FFD box.

I would like to know if I can use IDWrap to save a parameterized grid file. Something like wing_vol_parameterized.cgns. It will be helpful to compare the original grid with the parameterized one.

I tried the tutorial available here but was unsuccessful since it did not utilize the FFD box method.

Thanks.

Adjust overset tutorial mesh parameters

Description

The overset tutorial adds an example M6 wing mesh. While the levels L3 through L1 work now, the number of off-wall layers is probably a bit too small. The target growth ratio for the most refined mesh should be around 1.05, currently the L1 gets a grid ratio of around 1.15.

We should probably update the number of off-wall layers. This will involve also checking the grids again and running the analyses again to update the grid convergence results, though they should not change too much.

Questions on cgns grid file; which is to be read and solved using ADFLOW

Hello,
I am new to working with cgns grid files; I would be asking couple of dumb or obvious questions, I really hope you can still answer them.

Q1. When I am generating a 2D/3D structured grid using pointwise and read it into the ADflow runscript, what would be the right solver to be selected?
I have chosen the cgns obviously, since MACH-AERO was not listed, I just want to make sure it's the right place to get started.
image

Q2 a) When I generate grid in Pointwise (for 2D), will a 2D surface mesh alone be sufficient (a single domain) or should I extrude it to a volume mesh (a block) within pointwise itself; just like how the airfoil mesh is generated in the tutorial. (https://mdolab-mach-aero.readthedocs-hosted.com/en/latest/machAeroTutorials/airfoilopt_mesh.html).

b) In continuation to first part of Q2a; or would it be prefereable to read the surface mesh into pyhyp and then generate a volume instead? which would likely help with reading grid file into the solver...

Q3. I am trying to solve for an 2D external flow of a mini-turbojet engine, as shown in the image below; the domain and grid.
CFD Domain:

mail

Grid:

image

When I try to read the cgns file into the solver I get the following error; seems like solver cannot read the grid file. :/
image
I strognly feel it has to do with the grid file format or data inside it which are not favorable to be opened and read. I am not able to get past this.! (However when I read the same grid file into Paraview it reads perefectly fine just like the other airfoil grids generated from the tutorial.)

I would really appreciate asistance with this issue!

Mesh convergence procedure discussion again

Description of feature

In the current mesh convergence study documentation, we recommend h-refinement with all flow conditions held the same.
However, in some works, like this from the 5th DPW, they do a CL-solve and plot CD and alpha w.r.t. mesh size. In fact, the 5th DPW asked everyone to do their mesh convergence at CL=0.5 (see Section IV here). The same CL matching is recommended in DPW-7 from 2022.

How do people feel about changing the docs to follow this procedure?

Potential solution

Faulty source code of SLSQP.py - airfoil_opt.py

Description

The problem is related to the Airfoil optimization MACH Aero framework of MDO Lab. While running the airfoil_opt.py code, it gives an error indicating that there is an error in the SLSQP.py

Steps to reproduce issue

Run Bash in windows. Enter the docker through bash and run the following,

  1. Run genMesh.py
  2. Run genFFD.py
  3. Run airfoil_opt.py

Current behavior

When I run "mpirun -np 4 python airfoil_opt.py | tee output.txt" in bash, the program runs properly till the following:

+-------------------------------------------------------------------------------+
|                   Sparsity structure of constraint Jacobian                   |               |
+-------------------------------------------------------------------------------+

Then it displays the following error:

ValueError: failed to initialize intent(inout) array -- expected elsize=8 but got 16 -- input 'D' not compatible to 'd'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/mdolabuser/mount/mach-aero/SA7038/airfoil_opt.py", line 270, in <module>
    sol = opt(optProb, MP.sens, storeHistory=os.path.join(args.output, "opt.hst"))
  File "/home/mdolabuser/.pyenv/versions/3.9.16/lib/python3.9/site-packages/pyoptsparse/pySLSQP/pySLSQP.py", line 218, in __call__
    slsqp.slsqp(m, meq, la, n, xs, blx, bux, ff, gg, df, dg, acc, maxit,
ValueError: failed in converting 5th argument `x' of slsqp.slsqp to C/Fortran array

Expected behavior

it should produce results similar to the results provided in the following:
https://mdolab-mach-aero.readthedocs-hosted.com/en/latest/machAeroTutorials/airfoilopt_singlepoint.html

Note:
You can excess the pySLSQP.py at:
https://github.com/mdolab/pyoptsparse/tree/main/pyoptsparse/pySLSQP

how to view overset?

I followed the tutorial, Successfully generated overlay mesh “ONERA_M6_L1.cgns” and “ONERA_M6_L1_IHC.cgns”. Then how can I view overset? I used paraview, but there is only one variable “Mach”.

mdolab docker image sudo password

I am trying to use mdolab docker image to follow the tutorials, but I can't find the sudo password for "mdolabuser" user.
Starting container as "root" user isn't helping as it apparently breaks all PATH variables, but it might just be a problem with my naive approach. I would appreciate any help.
Regards,
Simranjeet

Permission denied: [Errno 13] Permission denied

I have tried to install mach-aero by docker on Debian and when I try to run the tutorials but it always returns a permission denied as I indicated in the title.
Could it be the operating system itself which does not support the program?

bugs the simulation is not stop to do simulation for single point optimization and not terminated succussfully for SLSQP optimizer

explain the proplem what is it

I am writing to seek assistance with a problem I am facing while using the MACH-AERO software platform for single point optimization of airfoil S809. Specifically, I am trying to modify the objective function to maximize the lift while adhering to a drag constraint.

To achieve this, I have made some changes to the code. However, I am unsure about the mistakes I might have made in the process. I would greatly appreciate it if you could review the code and help me identify any errors or areas that require correction. Your expertise and guidance would be invaluable in resolving this issue.

Initially, I utilized the PreFoil Python script to generate points around the airfoil. Subsequently, I used certain parameters in the ADflow option to simulate my problem case. Despite dedicating more than a month to finding a solution, I have been unable to obtain any conclusive results.

Given your experience and knowledge in this field, I believe that your insights could significantly contribute to resolving this problem. Any assistance or suggestions you can provide would be highly appreciated.

Thank you for taking the time to consider my request. I look forward to your prompt response and guidance. Please let me know if there is any additional information or code snippets that would be helpful for you to review.

Best regards,

the s809 airfoil which i have been generated by prefoil

coords = airfoil.getSampledPts(
    200, spacingFunc=[sampling.bigeometric, sampling.polynomial], func_args=[{}, {"order": 15}]

image

the change that i have been used on the adflow solution

mycd = 0.01
# angle of attack
alpha = 1.5
# mach number
mach = 0.15
# cruising altitude
alt = 100
# rst parameters (end)

aeroOptions = {
.
.
.
   "acousticScaleFactor":0.1, 
   "ANKCharTimeStepType": "VLR",
    "NKSubSpaceSize": 600,




def objCon(funcs, printOK):
    # Assemble the objective and any additional constraints:
    funcs["obj"] = -1.0*funcs[ap["cl"]]
    funcs["cd_con_" + ap.name] = funcs[ap["cd"]] - mycd
    if printOK:
        print("funcs in obj:", funcs)
    return funcs
.
.
.
# Add objective
optProb.addObj("obj", scale=1e4)

optProb.addCon("cd_con_" + ap.name, lower=0.0, upper=0.0, scale=1.0)

the objective history during iteration like this

image

so what i should to do to fix this problem i hope i could find answer and i am sorry to bothering you .

Investigate switching to HDF5 for use with CGNS

Type of issue

What types of issue is it?
Select the appropriate type(s) that describe this issue

  • Maintenance

Description

Right now we build CGNS with ADF, but CGNS recommends HDF5 which is also becoming more popular within the scientific community. Investigate switching to use HDF5, understand the build process, pros/cons, and make a decision whether to switch. Can be done in conjunction with upgrading to CGNS 4.x

Trying to Run different airfoil (Naca0018) Instead of the airfoilopt(Naca0012)

Hello,
I see the coordinates used in the tutorial (MACH-Aero/tutorial/airfoilopt/mesh
/n0012.dat]) are in a continuous format with them starting from the leading edge and going through the trailing edge and at the last the leading edge coordinates are repeated again once again.

Because the the coordinates I am trying to work with are direcrtly from the uiuc, seling format which seem to be giving me an error and impossible to mesh.
the error being,

image

and when i try to visualize

image

I would like to know or understand how this can be done for any other airfoil or any other closed geometry curves?

https://github.com/mdolab/MACH-Aero/blob/main/tutorial/airfoilopt/mesh/n0012.dat

I would really appreciate asistance with this issue!

Add resources for CS and HPC basics

Description of feature

It would be very useful to add links to useful resources for computing science basic concepts and HPC architectures, to have a common knowledge background and help communication within and outside the lab.
Examples:

  • What are the different layers at which a specific software or coding language work?
  • How does a build process work?
  • What do lapack and blas do?
  • What is the difference between a static and dynamic library?
  • [please add more]

Add citation page for each repo docs

We should add a separate citation page for the docs of each repo, clearly explaining which papers should be cited under which situation. The README should also be updated appropriately.

Type of issue

What types of issue is it?
Select the appropriate type(s) that describe this issue

  • Documentation update

Valgrind errors

Description

Running Valgrind on MACH-Aero optimization scripts results in numerous errors from ADflow and IDWarp, such as:
Conditional jump or move depends on uninitialised value(s) and
Use of uninitialised value of size 8

This issue is to discuss:

  • What Valgrind options to use with MACH-Aero
  • Which errors can be ignored
  • Which errors should be fixed

Steps to reproduce issue

Run the MACH-Aero tutorial single point airfoil optimization with:
PYTHONMALLOC=malloc valgrind python airfoil_opt.py

Alternatively, run the ADflow adjoint test with:
PYTHONMALLOC=malloc valgrind python test_adjoint.py

The --error-limit=no option may also be helpful.

Add tutorial section on child FFD

Type of issue

  • Documentation update

Description

As per title, we are not currently providing documentation and example scripts for the use of child FFDs.
We should add a paragraph at the end of this section or create a new advanced features section in the tutorial

ADflow output is piped to SLSQP.out

Description

For some reason, when using SLSQP to run aero_opt.py, the iteration history of ADflow is piped to SLSQP.out. It's likely that this includes all Fortran outputs from ADflow.

Steps to reproduce issue

Please provide a minimum working example (MWE) if possible

  1. Run aero_opt.py with the default SLSQP optimizer

Current behavior

No ADflow iteration print out to screen. Instead, they are found in SLSQP.out.

Expected behavior

Iteration history should be printed to screen.

how do I build the shell script?

Hi,
I was installing the third party packages for mach aero. when I install PETS, I see it seems that I need to build a script. may I know how to build this and what to do after I build this. Thank you very much!

bugs on the shape of pressure distribution when i do single point optimization of the airfoil s809

Dear Developer,

I hope this letter finds you well. I am writing to request your assistance with a problem I have been experiencing for over a month now. I understand that you may be busy, but I would greatly appreciate any help you can provide.

I have been working on optimizing an airfoil S809 using Python script for Mach Aero. However, I have encountered an issue with the pressure distribution plot at the first iteration. Despite my efforts, I have been unable to find a solution to this problem .but when i increased the mach number the problem is disappear so i need to do my analysis at low mach number without sppear like this problem on the output of cp.

I have carefully analyzed the airfoil and have attached the output file of the mesh, which appears to be in good condition. The distribution around the airfoil also looks good. However, I believe the issue lies with the Python script, as it has not been optimized for Mach Aero.

I would greatly appreciate it if you could provide me with a different Python script that is optimized for Mach Aero. Even one example, such as the tutorial on NACA0012 for single point optimization, would be of immense help.

Thank you for your time and consideration. I look forward to hearing back from you soon.

Sincerely,

Ajlan jamal
master student on Yangzhue University

here the change of the script

mycl = 0.5
# angle of attack
alpha = 1.5
# mach number
mach = 0.1
# cruising altitude
alt = 100 

le = 0.001
# Add objective
optProb.addObj("obj", scale=1.0)

the output i get

image

the airfoil coordinate that i have

image
please solve for me this problem how i could solve the error on this plot just give me direct me where i should to focus my effort it will be glad for me to get like this help

Continuation of Optimization Cycle

Description of feature

A feature that allows one to continue an optimization cycle from a particular point. Let's say after optimization 39 iterations.
Where we currently are, there is a problem of electricity interruption which causes our optimization cycle to stop and we have to start from scratch.

Potential solution

If there is no current implementation, I would like to start working on one.

Reorganize overset theory

Type of issue

  • Documentation update

Description

The overset theory from #23 should be reorganized to:

  • clearly distinguish theory and debugging tips
  • integrate Ney's text document with the rest of the page
  • remove outdated and duplicate information
  • provide a complete list of possible iblank values

installation error

Hello, initially when I install openmpi, everything is ok. After I installed anaconda and when I reinstall openmpi, some error happened as follows. Could someone give me some advice? Thank you very much!

== Compiler and preprocessor tests

*** C compiler and preprocessor
checking whether make supports the include directive... yes (GNU style)
checking for gcc... icc
checking whether the C compiler works... no
configure: error: in /home/haizhou/packages/openmpi-5.0.0': configure: error: C compiler cannot create executables See config.log' for more details

Remove overly restrictive dependency versions

Type of issue

What types of issue is it?
Select the appropriate type(s) that describe this issue

  • Maintenance

Description

Right now, the various packages under MACH-Aero are all installed using setup.py. However, the dependency specification under install_requires is overly restrictive. We should specify MAJOR.MINOR versions at most, but not bugfix versions unless absolutely necessary. For general packages like Numpy, unless we are aware of specific issues, we should leave the versions as open as possible.

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.