Skip to content

Generic system scalar Depends on PR#328#334

Merged
simopier merged 12 commits intoidaholab:develfrom
ke7kto:generic_system_scalar
Apr 11, 2026
Merged

Generic system scalar Depends on PR#328#334
simopier merged 12 commits intoidaholab:develfrom
ke7kto:generic_system_scalar

Conversation

@ke7kto
Copy link
Copy Markdown
Collaborator

@ke7kto ke7kto commented Nov 24, 2025

Adds a generic system scalar kernel that handles the time-dependent mass balance of system components. Closes #329
Depends on PR#328

Reason

The fuel cycle examples are unwieldy and prone to copy-paste errors. Adding a custom scalar kernel will allow easier extensibility for specific component and system modeling.

Design

A new templated kernel which allows functor inputs and coupled variables to determine the residual. Assumes first-order dependence on "input" variables.

Impact

Re-implements the fuel cycle capabilities in a more explicit way.

@ke7kto
Copy link
Copy Markdown
Collaborator Author

ke7kto commented Nov 24, 2025

This should be ready-to-go, but it depends on an open PR

@moosebuild
Copy link
Copy Markdown

moosebuild commented Nov 24, 2025

Job Documentation, step Sync to remote on ec9d175 wanted to post the following:

View the site here

This comment will be updated on new commits.

@simopier
Copy link
Copy Markdown
Collaborator

simopier commented Dec 1, 2025

You can rebase this PR now that #328 is merged.

@ke7kto ke7kto force-pushed the generic_system_scalar branch from 8f25456 to 33faac6 Compare December 2, 2025 22:58
Copy link
Copy Markdown
Collaborator

@simopier simopier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ke7kto, how do you want to tackle this? Do you want to fix the tests or should I start reviewing this?

Comment thread test/tests/yttrium_hydrogen_system/gold/YHx_PCT_out.e
Comment thread test/tests/yttrium_hydrogen_system/gold/YHx_PCT_T1173_P1e3_out.csv
Comment thread test/tests/yttrium_hydrogen_system/gold/YHx_PCT_T1173_P5e4_out.csv
@simopier
Copy link
Copy Markdown
Collaborator

Need any help on this one, @ke7kto?

@ke7kto ke7kto marked this pull request as ready for review April 1, 2026 18:30
Copy link
Copy Markdown
Collaborator

@simopier simopier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This will indeed make fuel cycle simulations much easier to set up!

I left some comments throughout. Also, these two tests are failing in recover mode:

[0.588s] [ 135MB]     DIFF test:fuel_cycle_Abdou.fuel_cycle_kernel FAILED (CSVDIFF) [recover]
[0.596s] [ 101MB]     DIFF test:fuel_cycle_Abdou.fuel_cycle_kernel_AD FAILED (CSVDIFF) [recover]

which I imagine highlights an issue with _is_implicit. But the ss_kernel tests pass, so I'm not currently sure.

Comment thread doc/content/source/scalar_kernels/FuelCycleSystemScalarKernel.md Outdated
Comment thread doc/content/source/scalarkernels/FuelCycleSystemScalarKernel.md
Comment thread include/scalarkernels/FuelCycleSystemScalarKernel.h
Comment thread src/scalar_kernels/FuelCycleSystemScalarKernel.C Outdated
Comment thread src/scalar_kernels/FuelCycleSystemScalarKernel.C Outdated
Comment thread test/tests/fuel_cycle_Abdou/ss_kernel.i Outdated
Comment thread test/tests/fuel_cycle_Abdou/tests Outdated
Comment thread test/tests/fuel_cycle_Abdou/tests Outdated
Comment thread test/tests/fuel_cycle_Abdou/tests Outdated
Comment thread test/tests/fuel_cycle_Abdou/gold/ss_kernel_out.csv Outdated
@simopier simopier self-assigned this Apr 3, 2026
ke7kto and others added 3 commits April 6, 2026 14:11
Co-authored-by: Pierre-Clement Simon <pierreclement.simon@gmail.com>
Co-authored-by: Pierre-Clement Simon <pierreclement.simon@gmail.com>
… example case for the fuel cycle Abdou model and a bit more context on the usage of the is_implicit term. Adjusted the ss_implicit test to have physically meaningful inputs and go for longer with tighter tolerances so that the implicit and explicit solutions matched.
@moosebuild
Copy link
Copy Markdown

Job Precheck, step Format Check Clang on b510a23 wanted to post the following:

Your code requires style changes.

A patch was auto generated and copied here
You can directly apply the patch by running, in the top level of your repository:

curl -s https://mooseframework.inl.gov/tmap8/docs/PRs/334/clang_format/style.patch | git apply -v

Alternatively, with your repository up to date and in the top level of your repository:

git clang-format c94cbdde2a25c92d4c9413ef45131bd24200eb3a

@moosebuild
Copy link
Copy Markdown

Job Precheck, step Python: black format on b510a23 wanted to post the following:

Python black formatting

Your code requires style changes.

A patch was generated and copied here.

You can directly apply the patch by running the following at the top level of your repository:

curl -s https://mooseframework.inl.gov/tmap8/docs/PRs/334/black/black.patch | git apply -v

Alternatively, you can run the following at the top level of your repository:

black --config pyproject.toml --workers 1 .

@moosebuild
Copy link
Copy Markdown

moosebuild commented Apr 7, 2026

Job Coverage, step Generate coverage on ec9d175 wanted to post the following:

Coverage

c94cbd #334 ec9d17
Total Total +/- New
Rate 91.37% 91.74% +0.38% 100.00%
Hits 1090 1178 +88 110
Misses 103 106 +3 0

Diff coverage report

Full coverage report

This comment will be updated on new commits.

Copy link
Copy Markdown
Collaborator

@simopier simopier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor fix.
Also, could you add a section towards the end of the documentation that explains the different input files and how they connect to each other, and how to run a case?

I think this is valuable to users.

Comment thread doc/content/examples/fuel_cycle_Abdou/index.md Outdated
Co-authored-by: Pierre-Clement Simon <pierreclement.simon@gmail.com>
Copy link
Copy Markdown
Collaborator

@simopier simopier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @ke7kto, I have two comments regarding the documentation, things look great otherwise.

Comment thread test/tests/fuel_cycle_Abdou/gold/ss_kernel_implicit_out.csv
Comment thread doc/content/examples/fuel_cycle_Abdou/index.md
@moosebuild
Copy link
Copy Markdown

Job Build test summary, step Build test summary on ec9d175 wanted to post the following:

Test summary

Compared against c94cbdd in job civet.inl.gov/job/3717731.

Added tests

Test Time (s) Memory (MB)
test:fuel_cycle_Abdou.fuel_cycle_kernel 3.89 90.91
test:fuel_cycle_Abdou.fuel_cycle_kernel_AD 1.60 57.57
test:fuel_cycle_Abdou.fuel_cycle_kernel_ss 0.58 40.03
test:fuel_cycle_Abdou.fuel_cycle_kernel_implicit 0.49 49.09
test:fuel_cycle_Abdou.fuel_cycle_kernel_implicit_ss 0.35 20.83
test:fuel_cycle_Abdou.fuel_cycle_kernel_invalid_coupling 0.27 30.94
test:fuel_cycle_Abdou.fuel_cycle_kernel_inputs_mismatch 0.27 0.00

Copy link
Copy Markdown
Collaborator

@simopier simopier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you @ke7kto, this will make fuel cycle calculations much simpler to set up!

@simopier simopier merged commit 89c77c1 into idaholab:devel Apr 11, 2026
11 checks passed
@ke7kto ke7kto deleted the generic_system_scalar branch April 13, 2026 15:07
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.

Create dedicated fuel cycle relevant scalar kernel

3 participants