3D Grid code used in PH5023 Monte Carlo Radiation Transport (MCRT) techniques @ St Andrews University
Either:
-
Open a Terminal and run this command:
wget https://github.com/lewisfish/3DGridCode/archive/refs/tags/3DGridCode.zip
or:
- Download the code from this link and upload it to Jupyter Lab.
Note if you've not used a Terminal before or need a refresher this link provides a nice intorduction to the Terminal basics.
The next step is to open a Terminal (if not already open) and change directory (cd dir
where dir is the directory to change to) to the codes location and unzip it (unzip 3DGridCode.zip
)
Next change directory into the unzip folder and type make
into your terminal to compile the code.
Finally to run the code, type ./mcgrid
.
Each time you make a change to the code, you need to recompile then run the code (make
then ./mcgrid
).
First Download the code from this [link](wget https://github.com/lewisfish/3DGridCode/archive/refs/tags/3DGridCode.zip)
Then open a terminal and change directories to the codes location and unzip it.
Then type fpm run --profile release
to compile and run the code.
Details on installing FPM on your platform can be found here.
Check version, or whether installed, by opening terminal and typing make --version
and gfortran --version
Mac: Install the xcode developer tools, found here. If make is still not installed, open terminal and type xcode-select - - install
.
Linux (Debian): Open a terminal and install by typing sudo apt-get install build-essential
.
Mac: Homebrew offers an easy install via brew install gcc
. The binaries can be installed directly from the gfortran maintainers, and additional info can be found here.
Linux (Debian): Open a terminal and install by typing sudo apt install gfortran
.
More details on GFortran may be found here.
Fortran can also be used on Windows, we recommend using the Windows subsytem for Linux (WSL), more information on this here. Other ways of installing Fortran can be found here.
Code was adapted and heavily modified from K. Woods code found here.
This code (3DGridCode) formed the basis of the following research projects:
Depth Penetration of Light into Skin as a Function of Wavelength from 200 to 1000 nm
Development of a Predictive Monte Carlo Radiative Transfer Model for Ablative Fractional Skin Lasers
Imaging in thick samples, a phased Monte Carlo radiation transfer algorithm
Simulation of Intraoperative PDT for Glioblastoma using Monte Carlo Radiative Transport
The gridMCRT source code and related files and documentation are distributed under a permissive free software license (MIT).