Showing posts with label Simulation. Show all posts
Showing posts with label Simulation. Show all posts

Backupy: Backup files from local machine to NAS and cloud using backupy and python


The concept is:

Backup is important. There are many backup tools in the world. There are also a backup manager tool written in python. This page presents an example of runnning backupy.

Backup is important. There are many backup tools in the world. There are also a backup manager tool written in python. This page presents an example of runnning backupy.

TarManager: combine many pickle files into some tar files using Python


The concept is:

TarManager: combine many pickle files into some tar files using Python

This page shows how to combine many pickle files into some tar, tar.gz, or tar.xz using Python. In some simulations, we generate thousands and millions of output files for varying some parameters and some values for each parameters. The problem of such huge number of small files is the difficulty to handle on making backup to NAS, external HDD, and cloud storage services.

Combine two contourf and one colorbar into one figure using Python and matplotlib.pyplot


The result is:
Combine two contourf and one colorbar into one figure using Python and matplotlib.pyplot

This page shows how to combine two contourf and one colorbar into one figure using python and matplotlib.pyplot.

Plot contour figure from data which has large scale and plus-minus difference with minimum limit using Python and matplotlib.pyplot


The result is:

Plot contour figure from data which has large scale and plus-minus difference with minimum limit using Python and matplotlib.pyplot

This page shows my suggestion to generate contour figure from data which has large scale and plus-minus difference using python and matplotlib.pyplot. The minimum value and maximum value can be specified in this code.

Animate zoomed plot of crowded data by updating xlim using matplotlib.animation.FuncAnimation


The result is:
Animate zoomed plot of crowded data by updating xlim using matplotlib.animation.Funcanimation

This code shows how to animate the zoomed subplot of original crowded subplot using Python and matplotlib.animation.Funcanimation.

Speed up generating figures by running external python script parallelly using Python and matplotlib.pyplot


The result is:

Speed up generating figures by running external python script parallelly using Python and matplotlib.pyplot

This page shows my suggestion to process data and generate figure parallelly by running some external python script.

Plot contour figure from data which has large scale and plus-minus difference using Python and matplotlib.pyplot


The result is:

Plot contour figure from data which has large scale and plus-minus difference using Python and matplotlib.pyplot modified

This page shows my suggestion to generate contour figure from data which has large scale and plus-minus difference using python and matplotlib.pyplot.

Solve and animate single pendulum using scipy.odeint and matplotlib.animation.ArtistAnimation


The result is:

Solve and animate single pendulum using scipy.odeint and matplotlib.animation.ArtistAnimation

This page shows the example of the scipy.odeint function with solving the motion of the single pendulum. The result is converted to the animation using matplotlib.animation.ArtistAnimation.

Create animation of plt.contourf for visualize air flow past three cylinders using Python Matplotlib.pyplot and Matplotlib.animation.ArtistAnimation


The result is:

This page shows my exercise to visualize air flow past three cylinders.
The flow is calculated by commercial finite elemental method software i.e. COMSOL Multiphysics.
In this code, matplotlib.animation.ArtistAnimation function is used.

Simple way to draw electric field lines using Plotly.offline; convert from Matplotlib.pyplot


The result is:


This page shows how to draw vector field (electric field lines) using plotly. The figure is converted from matplotlib.pyplot.

Draw electric field lines with changing line color according to the electric potential



The results are:




This page shows how to draw electric force lines around point charges.
The colors of the electric force lines vary according to the electric potential in the point.

Draw flow past cylinder with continuous stream line using Python Matplotlib.pyplot


The result is:


This page shows how to plot air flow past a cylinder with continuous streamline or how to plot vecter field with continuous streamline. The air flow i.e. vecter field is calculated using COMSOL Multiphysics.

Plot electric field lines around a point charge with grounded sphere using Python Matplotlib.pyplot


The result is :


This page shows the method to draw electric field line around a point charge adjecent to a grounded sphere using method of image charges.

Simple way to draw 3D random walk using Python and Matplotlib.pyplot


The result is:

Simple way to draw 3D random walk using Python and Matplotlib.pyplot


This code shows the simple way to dray 3D random walk with colored line using python.