Skip to content

3D Grid code used in PH5023 Monte Carlo Radiation Transport (MCRT) techniques @ St Andrews University

License

Notifications You must be signed in to change notification settings

lewisfish/3DGridCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3DGridCode

3DGridCode

3D Grid code used in PH5023 Monte Carlo Radiation Transport (MCRT) techniques @ St Andrews University

How to run

Using Jupyter Lab and Make

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).

Using Fortran Package Manager (FPM)

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.

Installing Make & GFortran

Check version, or whether installed, by opening terminal and typing make --version and gfortran --version

Make

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.

GFortran

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.

Windows

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.

References

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

License

The gridMCRT source code and related files and documentation are distributed under a permissive free software license (MIT).

About

3D Grid code used in PH5023 Monte Carlo Radiation Transport (MCRT) techniques @ St Andrews University

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •