-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import numpy as np | ||
from pprint import pprint | ||
import mcdc | ||
|
||
# ============================================================================= | ||
# Set model | ||
# ============================================================================= | ||
# Infinite medium with isotropic plane surface at the center | ||
# Based on Ganapol LA-UR-01-1854 (AZURV1 benchmark) | ||
# Effective scattering ratio c = 1.1 | ||
|
||
# Set materials | ||
m = mcdc.material( | ||
capture=np.array([1.0 / 3.0]), | ||
scatter=np.array([[1.0 / 3.0]]), | ||
fission=np.array([1.0 / 3.0]), | ||
nu_p=np.array([2.3]), | ||
) | ||
|
||
# Set surfaces | ||
s1 = mcdc.surface("plane-x", x=-1e10, bc="reflective") | ||
s2 = mcdc.surface("plane-x", x=1e10, bc="reflective") | ||
|
||
# Set cells | ||
mcdc.cell(+s1 & -s2, m) | ||
|
||
# ============================================================================= | ||
# Set source | ||
# ============================================================================= | ||
# Isotropic pulse at x=t=0 | ||
|
||
mcdc.source(point=[0.0, 0.0, 0.0], isotropic=True, time=[1e-10, 1e-10]) | ||
|
||
# ============================================================================= | ||
# Set tally, setting, and run mcdc | ||
# ============================================================================= | ||
|
||
mcdc.tally.mesh_tally( | ||
scores=["flux"], | ||
x=np.linspace(-20.5, 20.5, 202), | ||
t=np.linspace(0.0, 20.0, 21), | ||
) | ||
|
||
# Setting | ||
mcdc.setting(N_particle=30) | ||
mcdc.time_census(np.linspace(0.0, 20.0, 21)[1:-1]) | ||
mcdc.population_control() | ||
|
||
# Run | ||
mcdc.run() |