# pygasflow
[![PyPI version](https://badge.fury.io/py/pygasflow.svg)](https://badge.fury.io/py/pygasflow)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/pygasflow.svg)](https://anaconda.org/conda-forge/pygasflow)
[![Documentation Status](https://readthedocs.org/projects/pygasflow/badge/?version=latest)](https://pygasflow.readthedocs.io/en/latest/?badge=latest)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Davide-sd/pygasflow/HEAD)
[![](https://img.shields.io/static/v1?label=Github%20Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/Davide-sd)
**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:
<div>
<img src="https://raw.githubusercontent.com/Davide-sd/pygasflow/master/imgs/isentropic.png" width=250/>
<img src="https://raw.githubusercontent.com/Davide-sd/pygasflow/master/imgs/fanno.png" width=250/>
<img src="https://raw.githubusercontent.com/Davide-sd/pygasflow/master/imgs/rayleigh.png" width=250/>
<img src="https://raw.githubusercontent.com/Davide-sd/pygasflow/master/imgs/mach-beta-theta.png" width=250/>
<img src="https://raw.githubusercontent.com/Davide-sd/pygasflow/master/imgs/conical-flow.png" width=250/>
<img src="https://raw.githubusercontent.com/Davide-sd/pygasflow/master/imgs/shock-reflection.png" width=250/>
</div>
## Installation
The repository is avaliable on PyPi:
```
pip install pygasflow
```
And also on Conda:
```
conda install conda-forge::pygasflow
```
## Usage
The easiest way is to call a solver. Let's say you need to solve an isentropic flow:
```python
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](examples/) folder. You can also try this package online with Binder. [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Davide-sd/pygasflow/HEAD)
* visit the [documentation page](https://pygasflow.readthedocs.io/en/latest/).
* If you find any errors, open an issue or submit a pull request!
Raw data
{
"_id": null,
"home_page": "https://github.com/Davide-sd/pygasflow",
"name": "pygasflow",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "gasdynamic shockwave fanno rayleigh isentropic flow perfect gas",
"author": "Davide Sandona",
"author_email": "sandona.davide@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e1/9b/6eef083b3cf6b6d79d23dee8c66c4d8e2f7271bd52c63bed3a44392b4bf0/pygasflow-1.2.2.tar.gz",
"platform": null,
"description": "# pygasflow\n\n[![PyPI version](https://badge.fury.io/py/pygasflow.svg)](https://badge.fury.io/py/pygasflow)\n[![Conda Version](https://img.shields.io/conda/vn/conda-forge/pygasflow.svg)](https://anaconda.org/conda-forge/pygasflow)\n[![Documentation Status](https://readthedocs.org/projects/pygasflow/badge/?version=latest)](https://pygasflow.readthedocs.io/en/latest/?badge=latest)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Davide-sd/pygasflow/HEAD)\n[![](https://img.shields.io/static/v1?label=Github%20Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/Davide-sd)\n\n**pygasflow** is a Python package that provides a few handful functions to quickly perform:\n\n* Quasi-1D ideal gasdynamic (perfect gas). The following solvers are implemented:\n * ``isentropic_solver`` (or ``ise``).\n * ``fanno_solver`` (or ``fan``).\n * ``rayleigh_solver`` (or ``ray``).\n * ``shockwave_solver`` (or ``ss``) for normal and oblique shock waves.\n * ``conical_shockwave_solver`` (or ``css``).\n * ``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.\n\n* Aerothermodynamic computations (``pygasflow.atd`` module):\n * Correlations to estimate boundary layer thickness, heat flux and wall shear stress over a flat plate or a stagnation region.\n * Newtonian Flow Theory to estimate the pressure distribution around objects and their aerodynamic characteristics.\n\nThe following charts has been generated with the functions included in this package:\n<div>\n<img src=\"https://raw.githubusercontent.com/Davide-sd/pygasflow/master/imgs/isentropic.png\" width=250/>\n<img src=\"https://raw.githubusercontent.com/Davide-sd/pygasflow/master/imgs/fanno.png\" width=250/>\n<img src=\"https://raw.githubusercontent.com/Davide-sd/pygasflow/master/imgs/rayleigh.png\" width=250/>\n<img src=\"https://raw.githubusercontent.com/Davide-sd/pygasflow/master/imgs/mach-beta-theta.png\" width=250/>\n<img src=\"https://raw.githubusercontent.com/Davide-sd/pygasflow/master/imgs/conical-flow.png\" width=250/>\n<img src=\"https://raw.githubusercontent.com/Davide-sd/pygasflow/master/imgs/shock-reflection.png\" width=250/>\n</div>\n\n\n## Installation\n\nThe repository is avaliable on PyPi:\n\n```\npip install pygasflow\n```\n\nAnd also on Conda:\n\n```\nconda install conda-forge::pygasflow\n```\n\n\n## Usage\n\nThe easiest way is to call a solver. Let's say you need to solve an isentropic flow:\n\n```python\nfrom pygasflow import isentropic_solver\nhelp(isentropic_solver)\nisentropic_solver(\"m\", 2, to_dict=True)\n# {'m': 2.0,\n# 'pr': 0.12780452546295096,\n# 'dr': 0.2300481458333117,\n# 'tr': 0.5555555555555556,\n# 'prs': 0.24192491286747442,\n# 'drs': 0.36288736930121157,\n# 'trs': 0.6666666666666667,\n# 'urs': 2.3515101530718505,\n# 'ars': 1.6875000000000002,\n# 'ma': 30.000000000000004,\n# 'pm': 26.379760813416457}\n```\n\nShould 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.\n\nPlease:\n\n* take a look at the notebooks contained in the [examples](examples/) folder. You can also try this package online with Binder. [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Davide-sd/pygasflow/HEAD)\n* visit the [documentation page](https://pygasflow.readthedocs.io/en/latest/).\n* If you find any errors, open an issue or submit a pull request!\n",
"bugtrack_url": null,
"license": "GNU GPL v3",
"summary": "Ideal Gasdynamics utilities for Python 3.6+",
"version": "1.2.2",
"project_urls": {
"Homepage": "https://github.com/Davide-sd/pygasflow"
},
"split_keywords": [
"gasdynamic",
"shockwave",
"fanno",
"rayleigh",
"isentropic",
"flow",
"perfect",
"gas"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c5b503e0856ec1c6e7e23d3fda55bd211f2a66d185a2160f50aad8de1e7b1d62",
"md5": "31e3ef184a5a42db05ff79eb0a4d0f7b",
"sha256": "d2e675b0fcd7fa380f6219278aab72199da0e6d7613c0a7944161b4239403ac7"
},
"downloads": -1,
"filename": "pygasflow-1.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "31e3ef184a5a42db05ff79eb0a4d0f7b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 112990,
"upload_time": "2024-11-06T14:30:31",
"upload_time_iso_8601": "2024-11-06T14:30:31.060618Z",
"url": "https://files.pythonhosted.org/packages/c5/b5/03e0856ec1c6e7e23d3fda55bd211f2a66d185a2160f50aad8de1e7b1d62/pygasflow-1.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e19b6eef083b3cf6b6d79d23dee8c66c4d8e2f7271bd52c63bed3a44392b4bf0",
"md5": "a095bec6fc957bda82c92de8d3ddb081",
"sha256": "638fda7d1a54c469febadb76c3a8cad8a8179cdab320059f1a637277f7a76ce6"
},
"downloads": -1,
"filename": "pygasflow-1.2.2.tar.gz",
"has_sig": false,
"md5_digest": "a095bec6fc957bda82c92de8d3ddb081",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 100519,
"upload_time": "2024-11-06T14:30:32",
"upload_time_iso_8601": "2024-11-06T14:30:32.695148Z",
"url": "https://files.pythonhosted.org/packages/e1/9b/6eef083b3cf6b6d79d23dee8c66c4d8e2f7271bd52c63bed3a44392b4bf0/pygasflow-1.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-06 14:30:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Davide-sd",
"github_project": "pygasflow",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "pygasflow"
}