Skip to content

Releases: RuiFilipeCampos/MontyCarlo

v0.1.0-alpha.3

29 Apr 16:50
e85abcb
Compare
Choose a tag to compare
v0.1.0-alpha.3 Pre-release
Pre-release
  • Fixed the version of the pandas package

Compose that runs this release:

services:
  jupyter-notebook:
    platform: linux/amd64
    image: ghcr.io/ruifilipecampos/montycarlo:v0.1.0-alpha.3
    command: jupyter notebook --ip='0.0.0.0' --port=${MONTY_JUPYTER_PORT:-8888} --no-browser --allow-root --NotebookApp.token=${MONTY_JUPYTER_TOKEN:-''}
    ports:
      - ${MONTY_JUPYTER_PORT:-8888}:8888
    volumes:
      - ${MONTY_NOTEBOOKS:-./notebooks}:/notebooks

Instructions:

  1. docker compose up
  2. Access jupyter UI at localhost:8888
  3. Create a new folder named mat
  4. Create a notebook besides that folder
  5. Run this code:
import pyvista as pv



from MontyCarlo import *
from MontyCarlo.sources import *
from MontyCarlo.geometry.CSG import *
from MontyCarlo.plotter import Plotter

pv.set_plot_theme("dark")
pv.set_jupyter_backend('panel')

water = Mat({1:2, 8:1}, 1, name = "Water")

gold = Mat({79:1}, 1.93200000E+01, name = "Gold")


infinity = 100_000

with InfiniteVolume() as space:
    space.configure("OUTER", render = False)
    space.fill(gold) 

    with Sphere(infinity) as roi:
        roi in space
        roi.configure("limit", render = False) 
        roi.fill(water)

electron_beam = Beam(
    "electron",
    roi,   
    E = 10e6,       # initial eneryg in eV
    N = 200,     # number of particles in the source, careful with this number, might break your run and fill your ram
    pos = (0, 0, 0) # initial position 
) 


plotter = Plotter(electron_beam)
fig = plotter.new_plot()


fig.show()

v0.1.0-alpha.2

29 Apr 16:14
f90f0f5
Compare
Choose a tag to compare
v0.1.0-alpha.2 Pre-release
Pre-release

Just some workflow fixes.

Compose yml that runs this release:

services:
  jupyter-notebook:
    platform: linux/amd64
    image: ghcr.io/ruifilipecampos/montycarlo:v0.1.0-alpha.2
    command: jupyter notebook --ip='0.0.0.0' --port=${MONTY_JUPYTER_PORT:-8888} --no-browser --allow-root --NotebookApp.token=${MONTY_JUPYTER_TOKEN:-''}
    ports:
      - ${MONTY_JUPYTER_PORT:-8888}:8888
    volumes:
      - ${MONTY_NOTEBOOKS:-./notebooks}:/notebooks

v0.1-alpha.1

02 Apr 10:01
46d8abd
Compare
Choose a tag to compare
v0.1-alpha.1 Pre-release
Pre-release

This features an easy to run Jupyer notebook server (docker compose up -d) and an example notebook on how to run Monty.

Screenshot 2023-04-02 at 11 00 13

Limitations of the pre-release:

  1. Has not been tested on machines other than linux amd64;
  2. No proper documentation
  3. Major issues with interface changing algorithm, i.e. particles go crazy when they approach a surface

Hopefully I will get these resolved and do an actual release, but it is possible to do a lot with this pre-release, even without the interface changes.

Screenshot 2023-04-02 at 10 59 22

MontyCarlo v0.1a0.dev2

20 Aug 13:38
Compare
Choose a tag to compare
Pre-release

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. It can also be found in PyPI, but see below for instructions.

Changelog

  • Major bug fix: missing production of secondary electrons on the distant transverse inelastic collision of an electron projectile with an electronic shell;
  • Improved docstrings;
  • Improved code quality (legibility).

Installation

It is highly recommended that you install MontyCarlo v0.1a0.dev2 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.dev2
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)

MontyCarlo v0.1a0.dev1

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

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)

v0.0.41-pre-alpha

29 Jul 10:46
Compare
Choose a tag to compare
v0.0.41-pre-alpha Pre-release
Pre-release

this release has been yanked from PyPI

This is the first release !

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

Installation

It is highly recommended that you install MontyCarlo v0.0.41-pre-alpha 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 py39 python=3.9
conda activate py39

The installation steps are simple:

pip install MontyCarlo
python -c "import MontyCarlo"

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);
    • Electrons (class II condensed history);
    • Positrons (class II condensed history).
  • 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)