MECSim Download |
Docker download for MECSim
The is the bleeding edge version of the docker image for MECSim and its associated analytics tools. A docker image is a self contained bundle of the operating system, software (python etc) and codes needed to run MECSim without needing to install everything by hand. Previous versions of the code are available here. For experienced users the continually updated code repository can be found here.
The software can be installed by:
(1) Install docker for your operating system
(2) Download the MECSim docker image zip file to desired location. Note for those using windows 10 home or previous versions that you should put it under your user directory as below
(3) Unzip the MECSimDockerImage.zip file and change directory into the MECSimDockerImage
(4) Load the docker image by running the load_docker_image.bat file
(5) (optional) Cleanup by deleting the GZ file used to store the image, e.g. del mecsim_docker_image.tar.gz
(6) Test by running a single MECSim model
(7) Check directory structure is like below
There should now be a default input file called Master.inp in the input directory
As well as the results from the model run previously in the output directory
(8) Test the MECSim analytics python codes. These take the form of jupyter notebooks which will be run inside the docker container but will be visible via your browser.
To view and edit these notebooks copy and paste the link into your browser
The directories and files listed in the jupyter notebook interface are mapped onto the directories on your local machine (wherever the docker was run from)
The python directory contains all analytics notebooks which have the file extension .ipynb
(9) Setup the mechanism using the Master.sk file in the script/ directory. For user guides and other help see the documentation/ directory.
Note the convention of labelling any parameters with $somename
(10) Return to the jupyter notebooks running in your browser and open a script generating notebook. Either GenerateScript.ipynb or RandomlySampleRange.ipynb.
(11) Edit the parameter names and ranges for any variables ensuring that all names ($somename) match between the notebook and the previously edited Master.sk text file.
(12) Run the notebook by selecting run all from the cell drop down menu item
The notebook will and assuming no errors in the python code will output the total number of MECSim simulations that will be run
(12) Open a new command prompt and go to the working directory. Note that the notebook we just ran has now output two new files; run_mechsim_script.sh and Settings.inp. These contain a guide to the MECSim analytics tools for how to automatically run the MECSim software.
(12) Run the run_mechsim_script.bat
which will output details regarding the docker build date and notes on converting the jupyter notebooks to standard python (.py) files
in addition to any warnings regarding the input mechanism files and the percentage that has been completed.
Assuming no errors are encountered (which terminate the loop) then it will finally output a Bayesian analysis summary (depending on settings in the notebook used to generate the script).
(13) (optional but recommended) Return to the jupyter notebooks in the browser and open the BayesianAnalysis.ipynb notebook.
Run all and the final output is the probability for the (default) experimental data being fit by simulations with particular parameters (default of kzero and ezero)
The overall work flow for using MECSim and MECSim analytics can be visualised as