Skip to content

MontyCarlo v0.1a0.dev1

Pre-release
Pre-release
Compare
Choose a tag to compare
@RuiFilipeCampos RuiFilipeCampos released this 02 Aug 10:19
55bf224

Monty Carlo is only available on 64-bit machines, python versions 3.7, 3.8 and 3.9, and on Windows/macos systems.

This is a pre-alpha development release.

Changelog

  • Introduced proper versioning.
  • Introduced first unit tests.
  • Fixed compatibility issues with macos.
  • Fixed major bug: database files for the simulation of electrons/positrons elastic scattering were getting corrupted.
  • Material creation now has a somewhat cleaner output.
  • Added documentation (work in progress).

Installation

It is highly recommended that you install MontyCarlo v0.1a0.dev1 on a conda virtual environment containing one of the following python versions, and nothing else: 3.7, 3.8 or 3.9. If you don't have anaconda you can download it from here.

Open an anaconda prompt and run the commands:

conda create --name myco39 python=3.9
conda activate myco39

The installation steps are simple:

pip install MontyCarlo==0.1a0.dev1
python -c "import MontyCarlo"

If you have a previous installation of MyCo, you must delete the environment first and then re-do the previous installation steps.

conda env remove --name myco39

A first run !

Once you've installed MontyCarlo, clone the following repository: https://github.com/RuiFilipeCampos/MyCo-EXAMPLE1

Inside this repository folder simply run:

python main.py

Have fun exploring high energy particle tracks in a 3d environment!

Available Features:

  • Construction of any material via a stochiometric formula and density water = Mat({1:2, 8:1}, 1);
  • Constructed materials are automatically cached in the folder your_project\mat.
  • Only spheres are available. This will remain as such until all this has been thoroughly tested:
    • Constructive Solid Geometry (CSG) using the | & and - operators;
    • linear transformations on the volumes (translation and rotation);
    • bounding volume hierarchy (BVH) constructed with the aid of the user;
    • a syntatic indication of the BVH using with statements;
    • a new method of particle transport that greatly accelerates the simulation of electrons and positrons;
  • The volumes surfaces are rendered and cached in your_project/geo;
  • Three particles are available:
    • Photons (analogue simulation);
      • Compton Scattering;
      • Rayleigh Scattering;
      • Photoelectric Effect;
      • Pair Production;
      • Triplet Production;
    • Electrons (class II condensed history);
      • Elastic Scattering;
      • Bremstrahlung Production;
      • Impact Ionization and Excitation;
    • Positrons (class II condensed history);
      • Elastic Scattering;
      • Bremstrahlung Production;
      • Impact Ionization and Excitation;
      • Anihilation;
  • The simulation is coupled (e.g. supports secondary particle creation)
  • Supports simulation of post-ionization relaxation effects;
  • Two particle sources are available:
    • Isotropic point source: emits particles from a point with randomized directions - IsotropicPoint
    • Directional point source: emits particles from a point towards a specified direction - Beam
  • Automated database download on first import;
  • 3d plotting of particle trajectories;
  • 3d plotting of the constructed geometry;
  • simultaneous plotting of both geometry and trajectories;
  • One tally is available:
    • Z_TALLY - calculates PDD's
  • Automatic generation of *.html output files (work in progress though)