Electromagnetic field simulation with Processing

preview_player
Показать описание
I implemented the symplectic integrator with respect to a canonical pair of vector potential A and electric field E. The both vector fields A and E are defined on the link variables in the lattice of spatial discretization. The dynamics of the vector fields obey the Maxwell equation with small dissipation term for the electric field E. The code is made with Processing, the Java based IDE.
The white arrows represent E-field. The circles represent the magnetic field B ( = rot A), where colors of yellow and green are corresponding to the signs of plus and minus respectively for directions which are perpendicular to the E-plane (display plane). A motion of the mouse in the E-plane generates the electric current (red arrow). You can confirm that wave fronts move in the direction of the cross product of E x B.
I did not use what is call the Yee lattice ( a type of staggered lattice ) for E and B, but I tried to use the link variables for A and E defined on edges of a regular lattice.
Рекомендации по теме
Комментарии
Автор

I need to perfect a model. Wonder if I can send this to you to get it right or, how much is that software? I'll only need it this one time so I'm trying to find one I don't have to purchase.

mikefromspace