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).
Run the example.ipynb
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
Use git,
copy the url from above, open the terminal and type
git clone URL
Note it will be cloned to current working directory.
Download normally from the above icon,extract it into any location.
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.
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.
Open terminal in the location where you have cloned/downloaded and Type
jupyter lab
Open the example.ipynb
And RUN!!!
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])
w=z^2 (origin is the square [-1.5, 1.5] x [-1.5, 1.5])
w=z^3 (origin is the square [-1.5, 1.5] x [-1.5, 1.5])
w=tan (z/2) (origin is the square [-3.14, 3.14] x [-3.14, 3.14])
w=2xy + i*(ysin(x) - xsin(y)) (origin is the square [-5, 5] x [-5, 5])
w=(z+1)/(i-z) (origin is an annulus with radii 3 and 7)
w=z+1/z (circle boundary, center at (-0.08, 0.08), radius = 1.08)
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.
- Error outputs if incomplete/wrong function entered, and also disappears if corrected in Jupyter.
- Standalone pip package with just output graph.
- Improve Documentation.