Releases: RuiFilipeCampos/MontyCarlo
v0.1.0-alpha.3
- 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:
docker compose up
- Access jupyter UI at
localhost:8888
- Create a new folder named
mat
- Create a notebook besides that folder
- 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
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
This features an easy to run Jupyer notebook server (docker compose up -d
) and an example notebook on how to run Monty.
Limitations of the pre-release:
- Has not been tested on machines other than linux amd64;
- No proper documentation
- 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.
MontyCarlo v0.1a0.dev2
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;
- Constructive Solid Geometry (CSG) using the
- 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;
- Photons (analogue simulation);
- 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
- Isotropic point source: emits particles from a point with randomized directions -
- 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
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;
- Constructive Solid Geometry (CSG) using the
- 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;
- Photons (analogue simulation);
- 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
- Isotropic point source: emits particles from a point with randomized directions -
- 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
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;
- Constructive Solid Geometry (CSG) using the
- 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
- Isotropic point source: emits particles from a point with randomized directions -
- 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)