Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
95b5cc9
add changes made so far
melekderman Dec 15, 2025
c6fc1a9
Merge branch 'dev' into dev-electron
ilhamv Dec 16, 2025
a50f085
minor edit
ilhamv Dec 16, 2025
2d1422b
edit variable types
ilhamv Dec 16, 2025
9a7707c
add elements to simulation object
ilhamv Dec 16, 2025
d9509a2
minor edit
ilhamv Dec 16, 2025
3d336dc
add a data placeholder in object util
ilhamv Dec 16, 2025
b40c049
revert back to using base type
ilhamv Dec 16, 2025
e00a0c3
fix: correct fundamental electron transport physics to match new refa…
melekderman Dec 18, 2025
426c516
add electron to physics __init__
ilhamv Dec 18, 2025
fd995dc
add electron to physics interface
ilhamv Dec 18, 2025
eb4c4fb
minor edits for neutron physics
ilhamv Dec 18, 2025
0ad9309
correct electron physics __init__
ilhamv Dec 18, 2025
8464233
correct electron physics interface. Also delete electron_production_xs
ilhamv Dec 18, 2025
90110fc
minor edits on electron native physics.
ilhamv Dec 18, 2025
4138526
minor adjustments to excitation and bremsstrahlung
ilhamv Dec 18, 2025
14af77a
add an example (needs to update) and refs
melekderman Dec 19, 2025
f65e0d7
change elastic scattering helpers location
melekderman Dec 19, 2025
e362d69
add slab example for Al
melekderman Dec 19, 2025
36978a9
Merge branch 'CEMeNT-PSAAP:dev' into dev-electron
melekderman Dec 20, 2025
a8eefaa
examples that Ilham uploaded
melekderman Dec 21, 2025
328834c
Merge branch 'dev-electron' of https://github.com/melekderman/MCDC in…
melekderman Dec 21, 2025
8888d4f
electron related mcdc_get and mcdc_set files
melekderman Dec 24, 2025
155ee40
some minor fixes before proceeding
melekderman Dec 24, 2025
69e7b16
add element support to material.py
melekderman Dec 24, 2025
7b624dd
Merge branch 'dev' into dev-electron
melekderman Feb 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion mcdc/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
SCORE_SPACE_MOMENT_CURRENT = 10
SCORE_TIME_MOMENT_MU_SQ = 11
SCORE_SPACE_MOMENT_MU_SQ = 12
SCORE_EDEP = 13

# Tally multipliers
MULTIPLIER_ENERGY = 0
Expand Down Expand Up @@ -99,9 +100,17 @@
REACTION_NEUTRON_FISSION = 4
REACTION_NEUTRON_FISSION_PROMPT = 5
REACTION_NEUTRON_FISSION_DELAYED = 6
#
REACTION_ELECTRON_ELASTIC_SCATTERING = 101
REACTION_ELECTRON_ELASTIC_SMALL_ANGLE = 102
REACTION_ELECTRON_ELASTIC_LARGE_ANGLE = 103
REACTION_ELECTRON_IONIZATION = 104
REACTION_ELECTRON_BREMSSTRAHLUNG = 105
REACTION_ELECTRON_EXCITATION = 106

# Particle types
PARTICLE_NEUTRON = 0
PARTICLE_ELECTRON = 1

# Data
DATA_NONE = 0
Expand Down Expand Up @@ -167,15 +176,34 @@
AXIS_Z = 2
AXIS_T = 3

# ======================================================================================
# Physics
# ======================================================================================

# Constants
LIGHT_SPEED = 2.99792458e10 # cm/s
NEUTRON_MASS = 939.565413e6 # eV/c^2
BOLTZMANN_K = 8.61733326e-5 # eV/K

# Adjustables
THERMAL_THRESHOLD_FACTOR = 400

# Neutron properties
NEUTRON_MASS = 939.565413e6 # eV/c^2

# Electron energy
ELECTRON_MASS = 510.99895069e3 # eV/c^2
ELECTRON_CUTOFF_ENERGY = 100 # eV (TODO: Is this adjustable?)
FINE_STRUCTURE_CONSTANT = 7.2973525693e-3 # ~1/137
MU_CUTOFF = 0.999999

# ======================================================================================
# Techniques
# ======================================================================================

# Weight Windows Methods
WW_USER = 0
WW_PREVIOUS = 1

# Weight Windows Modifications
WW_MIN = 0
WW_WOLLABER = 1
10 changes: 10 additions & 0 deletions mcdc/mcdc_get/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@

import mcdc.mcdc_get.tabulated_energy_angle_distribution as tabulated_energy_angle_distribution

import mcdc.mcdc_get.element as element

import mcdc.mcdc_get.electron_bremsstrahlung_reaction as electron_bremsstrahlung_reaction

import mcdc.mcdc_get.electron_elastic_scattering_reaction as electron_elastic_scattering_reaction

import mcdc.mcdc_get.electron_excitation_reaction as electron_excitation_reaction

import mcdc.mcdc_get.electron_ionization_reaction as electron_ionization_reaction

import mcdc.mcdc_get.gpu_meta as gpu_meta

import mcdc.mcdc_get.native_material as native_material
Expand Down
3 changes: 3 additions & 0 deletions mcdc/mcdc_get/electron_bremsstrahlung_reaction.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The following is automatically generated by code_factory.py

from numba import njit
3 changes: 3 additions & 0 deletions mcdc/mcdc_get/electron_elastic_scattering_reaction.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The following is automatically generated by code_factory.py

from numba import njit
3 changes: 3 additions & 0 deletions mcdc/mcdc_get/electron_excitation_reaction.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# The following is automatically generated by code_factory.py

from numba import njit
32 changes: 32 additions & 0 deletions mcdc/mcdc_get/electron_ionization_reaction.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# The following is automatically generated by code_factory.py

from numba import njit


@njit
def binding_energy(index, electron_ionization_reaction, data):
offset = electron_ionization_reaction["binding_energy_offset"]
return data[offset + index]


@njit
def binding_energy_all(electron_ionization_reaction, data):
start = electron_ionization_reaction["binding_energy_offset"]
size = electron_ionization_reaction["binding_energy_length"]
end = start + size
return data[start:end]


@njit
def binding_energy_last(electron_ionization_reaction, data):
start = electron_ionization_reaction["binding_energy_offset"]
size = electron_ionization_reaction["binding_energy_length"]
end = start + size
return data[end - 1]


@njit
def binding_energy_chunk(start, length, electron_ionization_reaction, data):
start += electron_ionization_reaction["binding_energy_offset"]
end = start + length
return data[start:end]
Loading
Loading