Repository navigation
Quick start
Open radcluster_code/codes/Notebooks/RadCluster_2_1.ipynb. The notebook:
- documents every control variable
- builds the C++ solver if needed
- runs the case
- prints the end-of-run summary with the conservation diagnostics
- writes a timestamped output directory
A separate cell draws all figures again from the saved data, without a new run. Another cell inspects the reaction graph of the configured case.
from radcluster_code.py_utils.simulation import RadClusterSimulation
sim = RadClusterSimulation(
I=1000, # max SIA cluster size tracked
V=1000, # max vacancy cluster size tracked
solver_mode='full_system', # 'full_system' | 'active_window'
equations='bin_moment', # 'discrete' | 'bin_moment'
cascade='fusion', # 'fusion' | 'fission'
he_kinetics='quasi_steady_state',
i_mobile=5, v_mobile=2, # largest mobile SIA / vacancy cluster
)
print(sim.material_rag.summary()) # the EUROFER-97 reaction graph
print(sim.state_layout) # vertex -> ODE-index map
results = sim.run(solver_config={
't_span': (1e-6, 1e8), # seconds
'n_points': 300,
'log_time': True,
'rtol': 1e-6, 'atol': 1e-20,
'solver_method': {'linsol': 'gmres', 'preconditioner': 'Woodbury'},
})The method run_adaptive() is the same call, with automatic expansion of the cluster-size domain when the distribution reaches the top of the grid.
The physics is selected by two independent choices.
| Choice | Values | Meaning |
|---|---|---|
equations |
discrete or bin_moment
|
one ODE per cluster size, or logarithmic bins that carry moments |
cascade |
fission or fusion
|
the cascade spectrum and the helium reduction |
The four combinations map to the physics_option strings that are used on disk: full_CD_fission, full_CD_fusion, bin_moment_CD_fission and bin_moment_CD_fusion. The constructor accepts either form.
Every run writes a directory output/YYYYMMDD_HHMMSS_<git-hash>/. See Outputs and provenance.
Material and environment parameters come from the input workbook, and any of them can be overridden for one run. See Inputs.
Using the code
The model
Project
Links