STEM 隨筆︰古典力學︰轉子【五】《電磁學》二

傳說知名的電磁模擬軟體

/meep

Latest Docs Build Status Python versions 2.7–3.6

Meep is a free and open-source software package for simulating electromagnetic systems via the finite-difference time-domain(FDTD) method. Meep is an acronym for MIT Electromagnetic Equation Propagation.

Features

  • Free and open-source software under the GNU GPL.
  • Complete scriptability via Python, Scheme, or C++ APIs.
  • Simulation in 1d, 2d, 3d, and cylindrical coordinates.
  • Distributed memory parallelism on any system supporting the MPI standard.
  • Portable to any Unix-like operating system such as Linux, macOS, and FreeBSD.
  • Precompiled binary packages of latest builds and official releases available via Conda
  • Arbitrary anisotropic electric permittivity ε and magnetic permeability μ, along with dispersive ε(ω) and μ(ω) including loss/gain, nonlinear (Kerr & Pockels) dielectric and magnetic materials, and electric/magnetic conductivities σ.
  • PML absorbing boundaries as well as Bloch-periodic and perfect-conductor boundary conditions.
  • Exploitation of symmetries to reduce the computation size — even/odd mirror planes and 90°/180° rotations.
  • Field output in the HDF5 data format.
  • Arbitrary current sources including a guided-mode launcher.
  • Materials library containing list of predefined broadband, complex refractive indices.
  • Frequency-domain solver for finding the response to a continuous-wave source.
  • Field analyses including flux spectra, near to far transformations, modal decomposition, frequency extraction, local density of states, modal volume, Maxwell stress tensor, arbitrary functions; completely programmable.

Documentation

See the manual on readthedocs for the latest documentation.

 

之命名來自

Beep the Meep

Beep the Meep is a fictional alien who appeared in the Doctor Who Weekly comic strip based on the long-running British science fiction television series Doctor Who. The cute and cuddly appearance of Beep the Meep — a round, furry biped with large, expressive eyes and long ears — belies his true nature as a malevolent, homicidal would-be conqueror and dictator.

Beep first appeared in the comic strip Doctor Who and the Star Beast, written by Pat Mills and John Wagner and drawn by Dave Gibbons, which ran in issues #19-#26 of Doctor Who Weekly. The Meeps were an advanced and peaceful race, who lived in harmony and happiness until their natures were radically altered by their planet’s orbit passing close to the Black Sun. The radiation from the black star mutated them into an aggressive, expansionist species who began to mercilessly conquer and subjugate other planets.

Eventually, the Star Council authorized the use of the Wrarth Warriors, a genetically engineered insectoid race who acted as interstellar law enforcers. The war against the Meeps came to an end with the destruction of the Meep armada at the Battle of Yarras, but Beep, the Meeps’ ruler, escaped. Beep’s ship was pursued and shot down over Earth where it crash landed in the English city of Blackcastle. Beep sought refuge with two schoolchildren, using his fuzzy appearance to masquerade as a hapless, harmless creature being hunted by the ruthless Wrarth. It was in this guise that he encountered the Fourth Doctor, who protected him from the Wrarth until Beep’s true nature was revealed to him. He hypnotised some people and tried to use them to repair his spaceship, deciding to take off in a hyper-space jump, even though this would destroy Blackpool. The Doctor then aided the Wrarth in apprehending Beep, and he was taken away to face justice.

Beep the Meep’s weapon of choice was black star radiation, which he used both as a power source for his spaceship and for brainwashing people by exposing them to it. He also usually kept an energy pistol on his person, in a pouch concealed under his fur. Beep is a memorable and popular villain, mainly due to the contrast between his appearance and his true nature, and his constant fuming at not being taken seriously because of his cute appearance. He has returned to bedevil the Doctor several times, often targeting Earth as well because of the indignities both have heaped on him.

 

當真良有以也!

雖然樹莓派 debian stretch 上也有 meep ︰

pi@raspberrypi:~ apt-cache search meep libmeep-dev - development library for using meep libmeep-lam4-8 - library for using parallel (OpenMPI) version of meep libmeep-lam4-dev - development library for using parallel (OpenMPI) version of meep libmeep-mpi-default-dev - development library for using parallel (OpenMPI) version of meep libmeep-mpi-default8 - library for using parallel (OpenMPI) version of meep libmeep-mpich2-8 - library for using parallel (OpenMPI) version of meep libmeep-mpich2-dev - development library for using parallel (OpenMPI) version of meep libmeep-openmpi-dev - development library for using parallel (OpenMPI) version of meep libmeep-openmpi8 - library for using parallel (OpenMPI) version of meep libmeep8 - library for using meep meep - software package for FDTD simulation meep-lam4 - software package for FDTD simulation, parallel (OpenMPI) version meep-mpi-default - software package for FDTD simulation, parallel (OpenMPI) version meep-mpich2 - software package for FDTD simulation, parallel (OpenMPI) version meep-openmpi - software package for FDTD simulation, parallel (OpenMPI) version libmeep-lam4-7 - library for using parallel (OpenMPI) version of meep libmeep-mpi-default7 - library for using parallel (OpenMPI) version of meep libmeep-mpich2-7 - library for using parallel (OpenMPI) version of meep libmeep-openmpi7 - library for using parallel (OpenMPI) version of meep libmeep7 - library for using meep libmeep-lam4-6 - library for using parallel (OpenMPI) version of meep libmeep-mpi-default6 - library for using parallel (OpenMPI) version of meep libmeep-mpich2-6 - library for using parallel (OpenMPI) version of meep libmeep-openmpi6 - library for using parallel (OpenMPI) version of meep libmeep6 - library for using meep pi@raspberrypi:~ 

 

初步借

/pymeep

pyMEEP

This is a Python package for running simulations MEEP (http://ab-initio.mit.edu/wiki/index.php/Meep). It creates a .ctl file, runs it, and does some postprocessing and plotting. It is a very simplified adaption of pyMPB with some additional features.

 

範例驗證 MPI NG︰

==================================
=========== MEEP OUTPUT ===========
==================================

Using MPI version 3.1, 16 processes
source:, x-position, y-position, width/sqrt(3) (in y), depth (in z)
source:, -7.0, 0, 3.0000000000000004, 2.4000000000000004
fluxplane:, 0, x-position, y-position, width/sqrt(3) (in y), depth (in z)
fluxplane:, 1, -8.0, 0, 1.0, 0.8
-----------
Initializing structure...
Working in 3D dimensions.
Computational cell is 18 x 8 x 6 with resolution 12
     block, center = (0,0,0)
          size (1e+20,1.73205,0.8)
          axes (1,0,0), (0,1,0), (0,0,1)
          dielectric constant epsilon diagonal = (4.03407,4.03407,4.03407)
Halving computational cell along direction z
meep: Meep must be configured/compiled with MPB for add_eigenmode_source
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 13 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
finished on: 2018-07-01 15:40:33.079790 (duration: 0:00:13.192499)
returncode: 1
pi@raspberrypi:~/pymeep/examples/Sim3d_solid_waveguide_res012_dpml010 $ 

 

實在無奈的很呦☂祇得暇時嘗試編譯嘍☻