conformal-maps

Code for interactive conformal mapping with python and jupyter notebook

https://github.com/im-ams/conformal-maps

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.0%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

Code for interactive conformal mapping with python and jupyter notebook

Basic Info
  • Host: GitHub
  • Owner: im-AMS
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: master
  • Homepage:
  • Size: 2.82 MB
Statistics
  • Stars: 28
  • Watchers: 2
  • Forks: 6
  • Open Issues: 1
  • Releases: 0
Created about 6 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

Girl in a jacket

Binder Documentation Status DOI Voila Web App: Binder(Binder)

Note : It is advisable to download and run the code on your local computer for better performance compared to Binder or Heroku (this repo contains directives for deployment with Heroku).

TLDR

Run the example.ipynb

Description

The Python package conformalMaps is about conformal mappings and their applications. It was made to be as interactive as possible with sliders from IPyWidgets.

The aim is to create a full package of scientific Python with release, documentation, webpage etc... The package adresses students of applied sciences, lecturers, researchers and engineers and scientists at companies and anyone who wants to visualize how complex variable mappings change plane geometries.

This code offers the possibility to visualize the geometrical change of certain geometries in the complex plane, when functions of a complex variable are applied to them. When angles between lines in the original plane (z-plane) are preserved after the mapping to the new plane (w-plane), one speaks of conformal mappings (see BC09).

A code documentation can be found on the project readthedocs page.

The conformalMaps project is listed in the Voila Gallery of standalone dashboard web Apps.

Supported Grids to transform

  • Rectangle

  • Square

  • Donut

  • Circle

  • Single circle

Run the code

Method 1

Use git,

      copy the url from above, open the terminal and type git clone URL      Note it will be cloned to current working directory.

Method 2

     Download normally from the above icon,extract it into any location.

  

How to RUN?

First install the dependencies.

It is preferable to run this notebook with Jupiter lab, with the extensions shown below.

Note if there is stutter(sudden blank and reapperance) of graph on update, it means the extensions for jupyterlab are not installed correctly.

system req: ``` Jupyter lab

        Python3.7

        modules from requirements.txt

To install all the dependecies open therminal and type the below. bash pip install -r requirements.txt

                    or

        conda install --file requirements.txt

        jupyter labextension install @jupyter-widgets/jupyterlab-manager

        jupyter nbextension enable --py widgetsnbextension

Check if jupyter lab extensions are installed jupyter labextension list you should something similar JupyterLab v3.1.8

(bla bla)

jupyterlab-plotly v5.2.2 enabled OK @jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)

(bla bla) ```

Alternatively, install the requirements and use jupyter notebook. You can also test the code in binder.

The Fun part!!

Open terminal in the location where you have cloned/downloaded and Type jupyter lab

Open the example.ipynb

And RUN!!!

GUI

gui

Examples

Here are a few preview images, that show how squares get transformed by complex variable mappings.

Caution: One of those may not be conformal, or angle preserving! In case of doubt consult the function check_analytic.

w=e^z (origin is the square [-1.5, 1.5] x [-1.5, 1.5]) e^z

w=z^2 (origin is the square [-1.5, 1.5] x [-1.5, 1.5]) z^2

w=z^3 (origin is the square [-1.5, 1.5] x [-1.5, 1.5]) z^3

w=tan (z/2) (origin is the square [-3.14, 3.14] x [-3.14, 3.14]) tanz

w=2xy + i(ysin(x) - x*sin(y)) (origin is the square [-5, 5] x [-5, 5]) MyFav

w=(z+1)/(i-z) (origin is an annulus with radii 3 and 7) lnz

w=z+1/z (circle boundary, center at (-0.08, 0.08), radius = 1.08) Joukowsky transform

Applications

In PHW33 and LG21 the conformal mapping between an eccentric annulus and a rectangle is used to solve a viscous flow problem analytically. The mapping is ilustrated by the following animation. The class RectangleToEccentricAnnulus from the module mappings helps to create a rectangle, that methods from RectangleToEccentricAnnulus map to a desired eccentric annulus. Further, ConcentricAnnulusToEccentricAnnulus illustrates relations between concentric and eccentric annuli, which are used in LG21 and LGKS23, too. See also the public github repository.

lnz

References

[BC09] Brown J.W., Churchill R.V., Complex variables and applications, Eighth edition, McGraw-Hill Book Company; 2009

[LG21] Lauer-Baré Z. and Gaertig E., Conformal Mappings with SymPy: Towards Python-driven Analytical Modeling in Physics. Lauer-Baré, Z. & Gaertig, E. In Agarwal, M., Calloway, C., Niederhut, D., & Shupe, D., editors, Proceedings of the 20th Python in Science Conference, pages 85 - 93, 2021

[LGKS23] Lauer-Baré Z., Gaertig E., Krebs J., Sleziona C. Analytical formulae in fluid power, quo vadis in times of CFD and I4.0? 13th International Fluid Power Conference, p. 866-879, 2023

[PHW33] Piercy N.A.V., Hooper M.S., Winny H.F., LIII. Viscous flow through pipes with cores, The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science, 1933

ToDos

  • Error outputs if incomplete/wrong function entered, and also disappears if corrected in Jupyter.
  • Standalone pip package with just output graph.
  • Improve Documentation.

Owner

  • Name: Aditya MS
  • Login: im-AMS
  • Kind: user
  • Location: India

Aspiring Data Scientist | Pursuing Electronics and communication Engineering.

Citation (citation.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Lauer-Bare
    given-names: Zoufine
    orcid: https://orcid.org/0000-0002-7083-6909
  - family-names: MS
    given-names: Aditya
title: ConformalMaps -  Code for interactive conformal mapping with python and jupyter notebook
version: v1.0.0
journal: GitHub
date-released: 2021-11-16
url: https://github.com/im-AMS/Conformal-Maps

GitHub Events

Total
  • Watch event: 3
  • Fork event: 1
Last Year
  • Watch event: 3
  • Fork event: 1

Dependencies

docs/requirements.txt pypi
  • matplotlib *
  • numba *
  • numpy *
  • plotly *
  • sympy *
requirements.txt pypi
  • jupyter *
  • numpy *
  • plotly *
  • sympy *
  • voila *