Coder Social home page Coder Social logo

weixian001 / airfrans_pbai Goto Github PK

View Code? Open in Web Editor NEW

This project forked from extrality/naca_simulation

0.0 1.0 0.0 62 KB

Python scripts to run resolution of the Reynolds-Averaged-Navier-Stokes equations over NACA 4 and 5 digits airfoils.

License: Open Data Commons Open Database License v1.0

C++ 42.15% Python 57.85%

airfrans_pbai's Introduction

NACA_simulation

In this repository, you will find different python scripts to run incompressible or compressible Reynolds-Averaged-Simulations over NACA airfoils.

Requirements

  • OpenFOAM v2112 (You can install it by following those instructions for Ubuntu, do not forget to update your .bashrc file to automatically run OpenFOAM when launching a terminal)
  • Python 3.9.12
  • NumPy 1.23.1
  • PyYAML 6.0
  • Seaborn 0.11.2

Simulation

To launch a simulation, enter your parameters in the params.yaml file and run:

python main.py -i 0 -g 1 -v 1 -f 1

Usage

usage: main.py [-h] [-i INIT] [-g GRADIENT] [-v VTK] [-f FIGURE]

optional arguments:
  -h, --help            show this help message and exit
  -i INIT, --init INIT  Only generate the mesh (default: 0)
  -g GRADIENT, --gradient GRADIENT
                        Compute the term of the RANS equations as a post-processing (default: 0)
  -v VTK, --vtk VTK     Generate the VTK files from the simulation (default: 1)
  -f FIGURE, --figure FIGURE
                        Save an image of the airfoil in the simulation folder (default: 1)

Dataset

Those scripts have been used to generate the AirfRANS dataset proposed at the NeurIPS 2022 Datasets and Benchmarks Track conference. You can find the paper here. In particular, the script dataset_generator.py run multiple simulations by sampling Reynolds number and Angle of Attack as explained in the associated paper.

This script can be re-used to run multiple new random simulations.

Mesh parameters

The mesh is generated with the blockMesh utility available in the OpenFOAM suite. The block definition is given in the following scheme. Some of the parameters contained in the params.yaml file are for the mesh generation. Parameters are defined as:

  • L: Size of the domain in meters
  • y_h: Heigth of the first cell of the boundary layer
  • y_hd: Heigth of the furthest first cell of the trail (at vertex 1 in the scheme)
  • x_h: Width of the smallest cell at the leading edge (at vertex 8 in the scheme)
  • y_exp: Expansion ratio in the y-direction
  • x_exp: Expansion ratio in the x-direction on the airfoil (edge between vertices 8 and 11)
  • x_expd: Expansion ratio in the x-direction behind the airfoil (edge between vertices 1 and 10)

Citation

@inproceedings{
bonnet2022airfrans,
title={Airf{RANS}: High Fidelity Computational Fluid Dynamics Dataset for Approximating Reynolds-Averaged Navier{\textendash}Stokes Solutions},
author={Florent Bonnet and Jocelyn Ahmed Mazari and Paola Cinnella and Patrick Gallinari},
booktitle={Thirty-sixth Conference on Neural Information Processing Systems Datasets and Benchmarks Track},
year={2022},
url={https://openreview.net/forum?id=Zp8YmiQ_bDC}
}

airfrans_pbai's People

Contributors

florentextrality avatar

Watchers

James Cloos avatar

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.