Giter VIP home page Giter VIP logo

pygasflow's Introduction

pygasflow

PyPI version Install with conda Documentation Status Binder

pygasflow is a Python package that provides a few handful functions to quickly perform:

  • Quasi-1D ideal gasdynamic (perfect gas). The following solvers are implemented:

    • isentropic_solver (or ise).
    • fanno_solver (or fan).
    • rayleigh_solver (or ray).
    • shockwave_solver (or ss) for normal and oblique shock waves.
    • conical_shockwave_solver (or css).
    • De_Laval_solver and the nozzles sub-module, containing functions and classes to understand convergent-divergent nozzles, Rao's TOP nozzles (Thrust Optmizie Parabolic), Minimum Length nozzle with Method of Characteristics. Nozzles can be used to quickly visualize their geometric differences or to solve the isentropic expansion with the De_Laval_Solver class.
  • Aerothermodynamic computations (pygasflow.atd module):

    • Correlations to estimate boundary layer thickness, heat flux and wall shear stress over a flat plate or a stagnation region.
    • Newtonian Flow Theory to estimate the pressure distribution around objects and their aerodynamic characteristics.

The following charts has been generated with the functions included in this package:

Installation

The repository is avaliable on PyPi:

pip install pygasflow

And also on Conda:

conda install -c davide_sd pygasflow 

Usage

The easiest way is to call a solver. Let's say you need to solve an isentropic flow:

from pygasflow import isentropic_solver
help(isentropic_solver)
isentropic_solver("m", 2, to_dict=True)
# {'m': 2.0,
#  'pr': 0.12780452546295096,
#  'dr': 0.2300481458333117,
#  'tr': 0.5555555555555556,
#  'prs': 0.24192491286747442,
#  'drs': 0.36288736930121157,
#  'trs': 0.6666666666666667,
#  'urs': 2.3515101530718505,
#  'ars': 1.6875000000000002,
#  'ma': 30.000000000000004,
#  'pm': 26.379760813416457}

Should a solver not be sufficient for your use case, feel free to explore the code implemented inside each flow's type, maybe you'll find a function that suits your needs.

Please:

  • take a look at the notebooks contained in the examples folder. You can also try this package online with Binder. Binder
  • visit the documentation page.
  • If you find any errors, open an issue or submit a pull request!

pygasflow's People

Contributors

davide-sd avatar dependabot[bot] 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.