Skip to content

Add support for CSAS-Shift sequence (csas5-shift, csas6-shift)#2

Merged
yannrichet-asnr merged 3 commits intomainfrom
copilot/add-cass-shift-support
Oct 21, 2025
Merged

Add support for CSAS-Shift sequence (csas5-shift, csas6-shift)#2
yannrichet-asnr merged 3 commits intomainfrom
copilot/add-cass-shift-support

Conversation

Copy link
Contributor

Copilot AI commented Oct 21, 2025

Overview

This PR adds support for the CSAS-Shift sequence as described in the SCALE CSAS-Shift manual. CSAS-Shift integrates the Shift Monte Carlo solver into the Criticality Safety Analysis Sequence (CSAS) framework, providing improved performance and scalability for criticality safety calculations.

What is CSAS-Shift?

CSAS-Shift uses the Shift Monte Carlo radiation transport solver instead of KENO for criticality calculations. It offers:

  • Improved performance - Faster solutions with better parallel scaling
  • Full KENO compatibility - Supports both KENO V.a and KENO-VI geometries
  • Simple transition - Users just change =csas5 or =csas6 to =csas5-shift or =csas6-shift

Changes Made

New Model: Scale-shift

  • Created .fz/models/Scale-shift.json with output variables matching Scale-keno
  • Parses k-eff, energy of lethargy, nubar, and mean free path from CSAS-Shift output
  • Uses same variable syntax (&(variable)) and comment character (') as other models

New Calculator

  • Created .fz/calculators/Scale-shift.sh to execute SCALE with CSAS-Shift sequences
  • Validates successful completion by checking for "Congratulations" message
  • Supports both =csas5-shift and =csas6-shift input formats
  • Created .fz/calculators/Localhost_Scale-shift.json for local execution

Example and Documentation

  • Added examples/Scale-shift/godiva.inp showing csas6-shift usage
  • Updated README.md with:
    • Scale-shift in supported calculation types
    • Output variables documentation
    • Usage examples with the fz Python API
    • Input file format example highlighting the difference from regular CSAS
  • Updated CHANGELOG.md with new features

Testing

  • Extended test suite to validate Scale-shift model, calculator, and example files
  • All tests passing ✓
  • CodeQL security scan: 0 vulnerabilities ✓

Usage Example

import fz

# Run CSAS-Shift calculation with varying sphere radius
results = fz.fzr(
    input_path="examples/Scale-shift/godiva.inp",
    input_variables={"r": [8.5, 8.6, 8.7, 8.741, 8.8, 8.9, 9.0]},
    model="Scale-shift",
    calculators="Localhost_Scale-shift",
    results_dir="godiva_shift_results"
)

print(results[['r', 'mean_keff', 'sigma_keff']])

Input File Format

Simply replace =csas6 with =csas6-shift in existing KENO input files:

'Input generated by GeeWiz SCALE 6.0.2
=csas6-shift
godiva
ce_v7_endf
read composition
 uranium     1 den=18.742 1 293
                                 92234 1.0202
                                 92235 93.7112
                                 92238 5.2686   end
end composition
read geometry
global unit 1
 sphere 10    &(r)
 media 1 1 10
 boundary 10
end geometry
end data
end

Compatibility

  • Compatible with SCALE 6.2+
  • Follows the same patterns as existing Scale-keno, Scale-tsunami, and Scale-xsdrnpm models
  • No breaking changes to existing functionality

Closes #[issue_number]

Original prompt

add support for CASS-shift sequence, described in https://scale-manual.ornl.gov/CSAS-Shift.html


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits October 21, 2025 10:05
… documentation

Co-authored-by: yannrichet-asnr <148193180+yannrichet-asnr@users.noreply.github.com>
Co-authored-by: yannrichet-asnr <148193180+yannrichet-asnr@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for CASS-shift sequence Add support for CSAS-Shift sequence (csas5-shift, csas6-shift) Oct 21, 2025
Copilot AI requested a review from yannrichet-asnr October 21, 2025 10:09
@yannrichet-asnr yannrichet-asnr marked this pull request as ready for review October 21, 2025 11:36
@yannrichet-asnr yannrichet-asnr merged commit ffd6ff0 into main Oct 21, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments