/PyMagneticFilament

This is a code for simulating a filament uniformly magnetized under rotating magnetic field.

Primary LanguagePythonMIT LicenseMIT

PyMagneticFilament

This is a code for simulating an uniformly magnetized filament under rotating magnetic field. For the filament, dynamic Euler-beam equation is solved

Screen Shot 2022-05-07 at 8 09 13 PM

where s is the arclength, x is the position, \rho is the mass line density, T is the tension force along the filament axis, EI is the bending rigidity, and f is the force line density.

Validation & Convergence

  • Filament implementation is validated against the Euler-Bernoulli beam solution, and script is given in filament validation. We have implemented Euler-Forward and Runge-Kutta 4 time-steppers. Although the RK4 converged to the analytical solution at the steady-state, we could not determine a stable time-step for Euler-forward.

beam_deflection_stability

  • Convergence study is done by changing the number of elements of a filament and error is compared against the Euler-Bernolli beam solution.

convergence_filament

Magnetic filament simulations

Magnetic filament simulation scripts can be found here. In this study we changed the magnetic field angular rotation speed.

2D_xy_video.mp4