Methodology:
1. Simulation framework: (details)
To enable Monte Carlo simulations, OpenMC was installed on a Windows-based system using
the Windows Subsystem for Linux (WSL 2) to emulate a Linux environment. Following
Microsoft’s WSL installation guide, Ubuntu 22.04 was deployed, and system packages were
updated via terminal commands (sudo apt update & sudo apt upgrade ). Miniconda was then
installed to manage computational dependencies, with the environment initialized
using wget and bash scripts. A dedicated Conda environment (openmc-env) was created with
Python 3.10, OpenMC, and Jupyter Lab, ensuring reproducibility through the conda-
forge channel. Cross-section nuclear data (ENDF/B-VIII.0 library) was downloaded and
configured by setting the OPENMC_CROSS_SECTIONS environment variable in
the .bashrc file. Validation steps included launching Jupyter Lab to test OpenMC imports (import
openmc) and verifying cross-section integrity with openmc-check-cross-sections. This workflow
ensured compatibility with the voxelized breast phantom and reproducibility of dose
calculations, adhering to established practices for Monte Carlo simulations in medical physics.
Steps for installing OpenMC in windows ( to clarify how you will write it )
1- WSL ( windows sub-system Linx ) installation either using commands or 2- Check the
website (Windows Terminal installation | Microsoft Learn)
3- Set password and folder name !
From the terminal install miniconda
4- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
5- bash Miniconda3-latest-Linux-x86_64.sh
license agreement yes , yes for option initiating conda and make the changes
6- test with command conda inite
website https://linuxbeast.com/blog/install-ubuntu-20-04-or-22-04-in-wsl-2-on-windows-10/
sudo apt upgrade
sudo apt update
OpenMC installation with conda
First, add the conda-forge channel with:
conda config --add channels conda-forge
Then create and activate a new conda environment called openmc-env in which to install
OpenMC.
conda create -n openmc-env openmc python=3.10 jupyterlab
lunch jupyter lab from the terminal
test with import openmc
download cross section library and sit the XLM file path to the folder
   2. Material definition:
Material Definitions and Breast Phantom Configuration
The voxelized breast phantom geometry was adapted from the computational model developed
by Ma et al. (2011), which provides anatomically realistic tissue distributions. Material
compositions were defined using OpenMC's Python API with rigorous attention to elemental
constituents
The method for defining materials can be found in the official OpenMC documentation available
here
.https://docs.openmc.org/en/stable/usersguide/materials.html#common-errors
Breast component ( skin, adipose ,muscle , fibroglandular tissue (the no. of glandular tissue are
50)
Base Tissue Materials:
      Skin (m1) : materials included in the skin
       wo: it means weight present
      Adipose (m2):
   Muscle (m3):
   Fibroglandular tissue (m100 – m149)
    A total of 50 materials (ID: m100–m149) were created to model density variations:
   Hydrogen decreased from 11.93% to 10.22% ( we will write that each material range
    from to ) and it is better to make it as schedule
   Carbon decreased from 63.21% to 18.80%
   Oxygen increased from 23.74% to 67.31%
   Density ranged from 0.921 to 1.0388 g/cm³
   All these materials included biologically relevant trace elements: Na, K, Ca, Fe, Zn, and
    in some cases Iodine (I127), based on glandularity.
    Example:
    Air (m255)
     Composition: Nitrogen (75.2%), Oxygen (23.2%), Argon (1.3%), Carbon
     Density: 0.00123 g/cm³
    Material Registration in OpenMC
     All 54 materials were instantiated in OpenMC and registered to an XML file for use
     during the simulation. The ENDF/B-VII.1 cross-section library was linked for accurate
     photon-matter interaction modeling.
3.   Region definitions:
    small cube region was defined using six planes (X, Y, Z).
    Cube dimensions: 0.2 cm × 0.2 cm × 0.2 cm.
    Purpose: geometric reference or auxiliary setup.
    lattice region was created using six planes ( we should mention that the shape is
     compressed breast)
    Approximate size: 13 cm × 10 cm × 4 cm.
    Represents the full voxel breast phantom volume.
    An air sphere was defined with a radius of 70 cm (diameter 140 cm).
    Centered at (0, 0, 0).
    Boundary condition set as vacuum.
    Any space inside the sphere but outside the lattice is considered air.
    The space outside the sphere acts as a particle absorber to realistically terminate photon
     trajectories.
   4. Universe Assignments for Tissue Materials:
      Each tissue material was assigned to a dedicated universe in OpenMC.
      Universes were created for:
            o Skin tissue (u1)
            o Adipose tissue (u2)
            o Muscle tissue (u3)
            o Fibroglandular tissues (u100 to u149)
            o Air (u255)
      Each universe contains a single cell filled with the corresponding material.
      The common spatial region for all these universes was defined as inside the air sphere
       (radius = 70 cm).
      This structure allowed voxel-wise assignment of materials within the phantom during the
       lattice construction.
example:
   5. Lattice Setup:
      )This section describes the entire process implemented in the code, but it is not
      necessary to include all the details here. If possible, the explanation can be
      summarized, and the full code may be placed in the appendix(
    A function named read_fill_card was created to read an external file (fill_zh.xml)
      containing the voxel lattice filling instructions.
    The function reads each line of the file and splits it into individual elements (either
      numbers or repeat commands).
    If an element contains the letter 'r', it indicates a repetition (e.g., "5r" means to repeat the
      last number 5 times).
    The function automatically expands the repetitions and converts all elements into a single
      flat list of integers.
    A 3D array (openmc_universes) was initialized with dimensions 65 (X) × 49 (Y) × 21 (Z)
      to store the universe IDs.
    All elements in the array were initially set to 0, preparing it for later population.
    Three nested for loops were used to iterate over the Z, Y, and X directions, respectively.
   During iteration, universe IDs were sequentially assigned from the previously read list
    (array).
   Each universe ID was dynamically linked to the corresponding pre-defined universe
    object using eval('u' + str(array[i])).
   In the Y direction, 48 - y was used instead of y to correctly flip the vertical orientation for
    OpenMC's coordinate system.
   The universes (u1, u2, ..., u149, u255) were already defined earlier, each representing a
    different tissue type.
   As a result, each voxel in the phantom was accurately filled with the appropriate tissue
    material based on external phantom data.
6. Lattice Construction and Geometry Setup:
   A new empty universe (outer_universe) was created to serve as the root environment for
    the model.
   A 3D rectangular lattice (lat3d) was defined using openmc.RectLattice, named "Breast
    Phantom".
   The lower-left corner of the lattice was set at coordinates (-6.39990 cm, -4.79990 cm, -
    1.99990 cm), matching the phantom volume.
   The pitch (spacing) between voxels was set to (0.2 cm, 0.2 cm, 0.2 cm) along the X, Y,
    and Z axes, corresponding to the voxel size.
   The universes filling the lattice (lat3d.universes) were assigned from the previously
    created 3D array (openmc_universes).
   The outer region of the lattice was assigned to u255, which represents air, to handle any
    particles leaving the phantom boundaries.
   A lattice cell (cell_lat) was created to embed the lattice inside the larger bounding region
    (region_lattice).
      An additional air cell (cell_in) was created to fill the inside of the bounding sphere but
       outside the lattice (region_air1).
      Another outer air cell (cell_out) was created to fill the space outside the bounding sphere
       (region_out).
      A root universe (root) was created containing the three main cells: the lattice cell, the
       inner air cell, and the outer air cell.
      Finally, the complete geometry was assembled into an openmc.Geometry object
       (my_geometry) and exported to an XML file using export_to_xml().
7. Volume Calculation of Each Universe in the Phantom:
      Imported necessary libraries: numpy for array operations and csv for saving results.
      Set voxel_array to the previously loaded lattice filling array.
      Defined voxel size as (0.20 cm, 0.20 cm, 0.20 cm) representing the dimensions of each
       voxel.
      Defined the function calculate_volumes(voxel_array, voxel_size) which:
           o Computes the volume of a single voxel (voxel_volume = 0.008 cm³).
           o Identifies all unique universe IDs and counts the number of voxels associated with
               each universe.
           o Calculates the total volume for each universe by multiplying the count by the
               voxel volume.
           o Returns a dictionary with universe IDs as keys and corresponding volumes as
               values.
      Called the function to calculate the volumes for the entire voxelized phantom.
      Printed the volume of each universe in a clear formatted output.
      Saved the universe ID and corresponding volume values into a CSV file named
       volumes.csv.
       )make it as schedule )
      Universe 1: Volume = 45.752 cm³
      Universe 3: Volume = 41.720 cm³
      Universe 100: Volume = 0.040 cm³
      Universe 101: Volume = 0.056 cm³
      Universe 102: Volume = 0.080 cm³
      Universe 103: Volume = 0.048 cm³
   Universe 104: Volume = 0.096 cm³
   Universe 105: Volume = 0.208 cm³
   Universe 106: Volume = 0.416 cm³
   Universe 107: Volume = 0.544 cm³
   Universe 108: Volume = 0.616 cm³
   Universe 109: Volume = 0.640 cm³
   Universe 110: Volume = 0.920 cm³
   Universe 111: Volume = 1.088 cm³
   Universe 112: Volume = 1.648 cm³
   Universe 113: Volume = 2.136 cm³
   Universe 114: Volume = 3.264 cm³
   Universe 115: Volume = 6.032 cm³
   Universe 116: Volume = 10.024 cm³
   Universe 117: Volume = 23.056 cm³
   Universe 118: Volume = 61.632 cm³
   Universe 119: Volume = 74.408 cm³
   Universe 120: Volume = 25.920 cm³
   Universe 121: Volume = 10.928 cm³
   Universe 122: Volume = 5.728 cm³
   Universe 123: Volume = 3.512 cm³
   Universe 124: Volume = 2.416 cm³
   Universe 125: Volume = 1.680 cm³
   Universe 126: Volume = 1.240 cm³
   Universe 127: Volume = 1.008 cm³
   Universe 128: Volume = 0.704 cm³
   Universe 129: Volume = 0.368 cm³
   Universe 130: Volume = 0.224 cm³
   Universe 131: Volume = 0.216 cm³
   Universe 132: Volume = 0.104 cm³
   Universe 133: Volume = 0.144 cm³
   Universe 134: Volume = 0.104 cm³
   Universe 135: Volume = 0.096 cm³
   Universe 136: Volume = 0.128 cm³
   Universe 137: Volume = 0.160 cm³
   Universe 138: Volume = 0.192 cm³
   Universe 139: Volume = 0.104 cm³
   Universe 140: Volume = 0.088 cm³
   Universe 141: Volume = 0.080 cm³
   Universe 142: Volume = 0.096 cm³
   Universe 143: Volume = 0.048 cm³
   Universe 144: Volume = 0.088 cm³
   Universe 145: Volume = 0.136 cm³
   Universe 146: Volume = 0.088 cm³
   Universe 147: Volume = 0.112 cm³
   Universe 148: Volume = 0.072 cm³
   Universe 149: Volume = 0.040 cm³
    Universe 255: Volume = 204.832 cm³
8. Plotting the Breast Phantom Geometry:
      A 2D visualization of the voxelized breast phantom was generated using OpenMC’s
     built-in plotting feature.
      Two different anatomical planes were selected to verify the phantom structure:
   XY Plane (Top-Down View):
         o When plotting with basis = 'xy', the phantom is viewed from above, representing
             a cross-sectional slice parallel to the compression paddle (similar to the
             imaging plane in mammography).
         o In the image, the breast appears compressed horizontally, consistent with clinical
             breast compression during mammography.
         o Different tissue regions (fibroglandular, adipose, skin, and surrounding air) are
             distinctly visible.
         o This view demonstrates how glandular and adipose tissues are distributed across
             the width and depth of the compressed breast.
   YZ Plane (Side View):
         o When plotting with basis = 'yz', the phantom is viewed from the side, showing a
             cross-section along the vertical direction.
         o This slice captures the thickness of the compressed breast from the compression
             paddle side down to the support plate.
         o The layering of tissues (fatty tissue, glandular tissue, and skin boundaries) is
             clearly visible.
         o The lateral compression and the shape of the compressed breast are confirmed in
             this view.
            References :
https://www.aesj.net/document/pnst002/147-152.pdf
https://docs.openmc.org/en/stable/usersguide/materials.html#common-errors