Meep (or MEEP) is a free finite-difference time-domain  simulation software package developed at MIT to model electromagnetic systems. A number of people, including @aero, have been using it to simulate the evolution of the fields within the EM Drive.
- 1 Setup
- 2 Git Repository
- 3 Usage
- 4 Candidates for further analysis
- 5 Creating an animation from a set of images
- 6 Models & results
- 7 Runtime & performance
- 8 References
Details regarding setting up Meep for EM Drive simulations are provided below.
Most people are running Meep on Ubuntu, although @lmbfan has also managed to set it up on Windows via Cygwin.
Ubuntu Linux setup
apt-get install meep h5utils
@leomillert recommended the following:
- Meep 1.3 (compiled & installed from its sources)
- libctl 3.2.2 (compiled & installed from its sources)
- Guile 2.0.11 (id)
- Harminv 1.4 (id)
- OpenBLAS 0.2.12 (installed from its binaries)
- HDF5 1.9.224 (compiled & installed from its sources)
- h5utils 1.12.1 (id)
Amazon EC2 AMI
Due to the long computing times required to simulate the frustum until "saturation" (for lack of a better term), you may find it more convenient to run the simulation on Amazon EC2 than on your machine.
An Amazon machine image (AMI) with Meep pre-installed has been made available by @dumbo; the name is ubuntu-trusty-meep-emdrive and the AMI ID is ami-e5cbc9d5. The AMI is based on Ubuntu 14.04.2 (Trusty Tahr). Meep was installed from source using the following dependencies:
- Meep 1.3 (installed from source)
- libctl 3.2.2 (installed from source)
- Guile 2.0.9 (as provided by Ubuntu package guile-2.0)
- Harminv 1.4 (installed from source)
- OpenBLAS 0.2.14 (installed from source)
- HDF5 1.8.15 Patch 1 (installed from source)
- h5utils 1.12.1 (installed from source)
- GSL 1.16 (installed from source)
TBD: Describe here where to find a Virtualbox pre-build image.
A Virtualbox image will allow running Meep using the same setup under Linux, Windows, Mac, Solaris, and will provide an opportunity to produce exactly the same results (ie .h5 files), which will in turn allow establishing formally that a setup is correct, trough, inter alia, comparison of the hash value of said .h5 files. Currently, it is believed that .h5 files are machine-specific, and hence cannot be compared exactly. Note that this has not been demonstrated yet, and that other artifacts may lead to differences in .h5 files.
The overhead of a virtual machine is negligible compared to the benefits outlined above.
Another proposal. Use docker.
The instructions below were provided by @leomillert:
wget "https://forum.nasaspaceflight.com/index.php?action=dlattach;topic=37642.0;attach=1042821" -O NSF-1701.ctl meep NSF-1701.ctl
After completion of the execution, Meep outputs nine .h5 files (this may take a long time: see below).
2. Create CSV files
h5totxt -t 13 -0 -y -0 ex.h5 > zCopper-exy.csv
3. Open zCopper-exy.csv in a spreadsheet and aero's zCopper-exy.csv (TBD:provide location of aero csv) on another. Open a third spreadsheet that is one spreadsheet values minus the other, entry by entry. Check the highest entry (in absolute value) of the difference. If it's negligible you are good to go. If it's a value too big (greater than 10^-6), your Meep installation isn't in sync with ours, so it's of no use.
4. Now you are good to go. Make a new directory to start the tests. Copy NSF-1701.ctl there.
5. Open NSF-1701.ctl in a text editor and change a single value. For example, (set! high 10.2) means the model is 10.2 inches high. Change the 10.2 to another value and save NSF-1701.ctl with this single change. This is called sensitivity analysis. One value at a time. (set! high 10.2) was just an example, change any value of interest
meep NSF-1701.ctl h5totxt -t 13 -0 -y -0 ex.h5 > zCopper-exy.csv
6. Compare your new zCopper-exy.csv with your old one. See if there was any relevant change (do the spreadsheet comparison again). If there is no significant change in values, it means the modification made doesn't impact the behaviour of the EMDrive. This is an important information for scientists, so let us know. Otherwise, if there was a significant change, let us know if it was positive or negative and its intensity. If you don't know how, just upload the .h5 files somewhere and we will analyse it.
Candidates for further analysis
Meepers may wish to investigate variations of the reference model (NSF-1701.ctl) and report on their results. The following variations are suggested:
These parameters would benefit from sensitivity analysis:
- Property of the metallic material (for the moment copper)
- Diameter of the small base
- Diameter of the large base
- Inside material composition (air, vaccuum, ...)
- Wall thickness
An animation showing the change in each field (including the Poynting field) at some well chosen time t and slice s can help visualizing the results and determining if small changes in values affect the results significantly (or not).
Change of shape
- Shell's extended frustum design with hexagonal section
- Small holes on sides only
- Small holes on large base only
- Small holes on the complete outer hull
- Increasing resolution and/or lattice
Creating an animation from a set of images
An animation conveys more information and takes less space than individual images! Here is how to create a mp4 from a set of .pngs:
convert -antialias *.png emdrive.mp4
ffmpeg -framerate 10 -i emdrive%03d.png -s:v 1280x720 -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p emdrive.mp4
Models & results
- deuteragenie toy 2D model (TBD find ctl, movie on thread 2)
- aero bradycone 3D model (TBD find refs.)
- aero nsf 3d model (TBD find refs.)
- leo? 3d model with full synchronization and updates for Meep 1.3 syntax (TBD find refs.)
- A a 2D centered-slice model would allow for fast simulations/testing before moving up to the more time consuming 3D simulations.
Runtime & performance
TBD: Add a table with reported run times. For the moment: count on more than one hour to run the reference .ctl file on a "normal" computer.