This repository contains the Python codes for webbased-visualization for mechanics principles, via Bokeh. It contains different prototypes for web apps for the visualization of mechanics examples for the lectures of the Chair of Structural Mechanics, Prof. Müller, TUM (Technical University of Munich).
The use of this repository is only suggested for developers. If you are only interested in using the completed apps, please visit the following website: http://www.bm.bgu.tum.de/lehre/interactive-apps/.
For the math apps visit https://www.groups.ma.tum.de/en/algebra/karpfing/buecher/videoanimationen-interaktive-apps/.
Before starting developing, please take a look at our Wiki. We use two different bokeh servers for different groups of apps, in order to avoid conflicts: most of the apps run on one server, some have to run on a second server since they interfere with other apps and might brake them.
This repository contains one folder for each app, with a main file and subfunction-files. The following files are important for running the server:
(.cmd is used for Windows and .sh is used for Linux. From a .sh file you can create the .exe file with the "Bat to Exe Converter" on the server)
All apps run on one physical server which provides a different port for each bokeh server.
We use a Windows server, therefore we use powershell and cmd scripts.
appnames.conf
the list of the names of apps that are completed and ready to run on the first bokeh serverappnames_all.conf
the list of the names of all apps. Autogenerated by runningdir * /AD /B > appnames_all.conf
viacmd
. Need to manually remove the following folders:.git AppOverviewPage shared
. Need to manually add all folders fromappnames_math.conf
.appnames_testing.conf
the list of the names of the apps that are completed and ready to run on the second bokeh serverappnames_math.conf
the list of the names of the math apps that are completed and ready to run on another bokeh serverbokehrunner.ps1
runs a bokeh server hosting most of the bokeh appsbokehrunner_all.ps1
runs a bokeh server hosting all bokeh apps from Port 443bokehrunner_testing.ps1
runs another bokeh server hosting critical bokeh apps (might interfere with other apps if used on the same bokeh server)bokehrunner_math.ps1
runs a bokeh server hosting math bokeh appsserver.conf
for configuration of the server, it contains the IP address of the server, the server port and the bokeh ports (which can be multiple)server_autorun.cmd
calls the files for running the bokeh servers (.ps1 files)server_shutdown.cmd
kills the processes for restart
AppOverviewPage/
contains screenshots of the apps for a webpage, such as the overview page of the Chair of Structural Mechanicsshared/
contains custom LaTeX support for some bokeh objects like sliders and labelsMath_Apps/
interactive math apps provided for the Department of Mathematics<other>/
different bokeh apps in directory format (see Bokeh User Guide).gitignore
the files or file extensions listed here are not committed to GitHub when changed locally
We provide access to the apps through a bokeh server (https://docs.bokeh.org) in directory format (see http://bokeh.pydata.org/en/latest/docs/user_guide/server.html#directory-format).
The server can be run in two modes:
- online mode: provide access to apps through the internet.
- offline mode: run the server locally
- install Anaconda with Python version defined in the Wiki: https://www.anaconda.com/distribution/
- install Git
- Linux: see https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
- Windows: see https://git-for-windows.github.io/
- For Windows we also suggest a desktop version of GitHub: see https://desktop.github.com/
- clone this repository
- Windows with GitHub Desktop: File -> Clone Repository
- Linux from command line:
git clone https://github.com/ChairOfStructuralMechanicsTUM/Mechanics_Apps.git
- Windows with git bash:
git clone https://github.com/ChairOfStructuralMechanicsTUM/Mechanics_Apps.git
- install additional Python packages (bokeh, nodejs, flexx, twisted)
Windows: If you chose to install Anaconda for all users, right click >> Run as administrator. - configure the server with
server.conf
to your own server settings. If you want to run the server locally, just use the existing configuration. If you want to run the server online, insert the global ip address and make sure that the server port is open to the world wide web. - In
appnames.conf
write the folder names of the apps you want to run on the server.
-
Local running (If you just want to run a single app locally)
- open a command window and navigate to the repository folder
- enter
bokeh serve --show Directory_name
- for example:
bokeh serve --show Diffraction
- the browser should open automatically and show the app. You can also directly access localhost:Port (For example localhost:5006/Diffraction) if your browser does not open automatically.
-
Web running (If you want to publish several apps to the web)
- add the app to the file
appnames.conf
- run
server_autorun.exe
- Navigate to Global_IP:Port in your browser (or the corresponding IP address set in
server.conf
). For example: 127.0.0.1:5006 - In our case, we use a proxy name for the IP:Port, which is apps.bm.bgu.tum.de:5006 in order to display a more appropriate website name.
- add the app to the file
For more information and contacts, please consult the Wiki.
- 1) Tensile testing / Zugversuch (eb,rr)
- 2) Transverse strain / Querdehnung (eb,rr)
- 3) Double-supported beam with point load / Balken (ad)
- 4) Maxwell's reciprocity theorem / Reziprozitätssatz von Maxwell (ad, me)
- 5) Buckling / Knickung (ad, me)
- 6) Funicular / Seilbahn (br)
- 7) Polar moment of inertia / Polares Flächenträgheitsmoment ()
- 8) Combined moment of inertia / Zusammenges. Flächenträgheitsmoment ()
- 9) Combined center of mass moment / Zusammenges. Schwerpunktsmoment ()
- 10) Maypole / Maibaum ()
- 11) Vector addition (rem, cfm)
- 12) Couple-moment (rem, cfm)
- 13) Moment is a free vector (rem, cfm)
- 14) Balken (ad, sk)
- 1) Damped oscillator / Federpendel (eb, qa, ft)
- 2) Pendulum / Schwerependel (eb, ft)
- 3) Base-excited oscillator / Fusspunkterregter Schwinger (eb, kb)
- 4) Tuned mass damper / Schwingungstilger (eb, rd)
- 5) Instant centre of rotation / Momentanpol der Leiter (Leiter) (ak, vu)
- 6) Coriolis force/Drehscheibe-Corioliskraft (eb,ag)
- 7) Boat with three swimmers / Boot mit drei Schwimmern (ma,ag)
- 8) Collision / Stoss (ma,ag)
- 9) Rollercoaster (eb)
- 10) Stopping distances (eb)
- 11) Projectiles / Wurfgeschoss (eb)
- 12) Rolling Condition / Abrollbedingungen (eb)
- 13) Rolling test / Rollversuch (eb, me)
- 14) Instant centre of rotation of the cupoler / Momentanpol der Koppel ()
- 15) Drop tube / Fallturm ()
- 16) Low-pressure area / Tiefdruck (ma)
- 17) Angular momentum / Drallerhaltung (ma, cfm)
- 1) Euler-Bernoulli Vibrations with analytical solutions (me)
- 2) 2D cantilever beam (ma, cfm, sk)
- 3) Seismic three DOF structure (ma)
- 4) Shock Response Spectra (rem)
- 5) Dynamic seismic three DOF structure (mb, ft)
- 1) Diffraction (br)
- 2) Vibroacoustic plates (rd)
- 1) Sampling (br, me)
- 2) Wavelet-Transform (kb)
- Francesca Taddei (ft), @FrancescaTaddei
- Quirin Aumann (qa), @qaumann
- Moritz Becker (mb)
- Julian Freisinger (jf)
- Matthias Miksch (mm)
- Franziska Weber (fw)
- Hannes Englert (he)
- Corinna Schmausser (cs)
- Felix Schneider (fs)
- Matthias Passek (mp)
- Aditi Kumawat (ak)
Please comply with the Development Guideline
- Matthias Ebert, me, @m3bert
- Qiaozhi Gao, qg, @QiaozhiGao
- Martin Hefel, mh, @MartinHefel
- Viola Li, vl, @ViolaM151
- Emily Bourne, eb
- Moustafa Alsayed Ahmad, ma
- Abraham Duplaa, ad
- Benjamin Rüth, br
- Ravil Dorozhinskii, rd
- Vyshakh Unnikrishnan, vu
- Carmen Font Mata, cfm
- Khaled Boulbrachene, kb
- Rishith Ellath Meethal, rem
- Irfan Haider, ih
- Sascha Kubisch, sk, @ga96wec
- Ramsubramanian Pazhanisamy, rp , [@ge73vil] (https://github.com/ge73vil)