Skip to content

Commit

Permalink
add time census regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
ilhamv committed Jan 20, 2025
1 parent c31b9cd commit 035a3a4
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
Binary file added test/regression/azurv1_census/answer.h5
Binary file not shown.
50 changes: 50 additions & 0 deletions test/regression/azurv1_census/input.py
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()

0 comments on commit 035a3a4

Please sign in to comment.