Skip to content
This repository was archived by the owner on Nov 5, 2021. It is now read-only.

Repository files navigation

John D Hunter Excellence in Plotting 2020

This repository contains my submission for the John D Hunter Excellence in Plotting 2020 contest. Inside there are files related to the simulation that I carried out, the rendering of the animation which is my submission, and some supporting material.

  • jdh.mx3: This is the configuration file for the Mumax3 micromagnetic simulator that I used to simulate the domain wall motion. It contains material parameters derived from work that was done at Tampere University in a study of domain wall motion and Barkhausen noise in disordered magnetic materials.
  • xy.png: This is a set of axes used in the animation before the simulation begins. In the animation, it is used to indicate the size of the simulated film. I overlayed it on top of the animation using blender. It was generated using Inkscape.
  • mktimer.py: No matter how hard I tried I couldn't get blender to overlay a text timer to display the simulation time at the current frame as the simulation played out. So instead I made this script, which uses Python to generate images of a simulation timer in the top left of a transparent 2560x1440 image. I generated one timer-image for each frame of the animation that I needed, and used blender to overlay these timer images on top of the final render.
  • preprocess.py: This script converts the binary .ovf files generated by mumax to a single numpy array, and stores the array in a .npy file, which is faster and more straightforward to load into blender.
  • abstract.md: This is the description of the animation that I submitted.

Blender Scripts

These Python scripts were all run inside blender.

  • populate_cones.py: This script generates the array of cones which represent magnetization at each point in the simulation space. Then, the orientation of each cone is animated at every output simulation time. Additionally, the color of each cone is animated for each frame, using Matplotlib's RdBu_r colormap to map the z-component of the magnetization to the material color.
  • flip_cones.py: Due to the way in which the orientation of objects between keyframes is determined, in certain cases blender incorrectly determines the rotation of objects. This script identifies incorrectly rotated cones and corrects their rotation.
  • demo_rotate.py: This script is used at the beginning of the animation during before the simulation data is shown. It is used to color the cone at (0, 0) during the part where it rotates up and down.

Blender Files

  • jdh.blend: Blend file that contains the cones which represent the magnetization data from the simulation, the lighting, and the camera. The majority of the animation was created here.
  • jdh_post.blend: Blend file that I used to do the final video editing. Most of the final overlay was done here, with the exception of the simulation timer and the axes lines.

Data

The data produced by the simulation was ~8 Gb uncompressed, ~5 Gb compressed with zstd. I therefore couldn't upload it to GitHub and have instead uploaded it to Google Drive here.

About

My entry for the John D Hunter Excellence in Plotting Award (2020)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages