Skip to content

Use log10 in relevant SCM closures and update transient regime calculation - #33307

Open
kyriv-lab wants to merge 16 commits into
idaholab:nextfrom
kyriv-lab:logarithm_33306
Open

Use log10 in relevant SCM closures and update transient regime calculation#33307
kyriv-lab wants to merge 16 commits into
idaholab:nextfrom
kyriv-lab:logarithm_33306

Conversation

@kyriv-lab

@kyriv-lab kyriv-lab commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This PR resolves issue #33306 and #33340

Comment thread modules/subchannel/src/scmclosures/SCMMixingChengTodreas.C Outdated
@GiudGiud GiudGiud changed the title Use log10 in SCM closures for #33306 Use log10 in relevant SCM closures Jul 10, 2026
@moosebuild

moosebuild commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Job Documentation, step Docs: sync website on b6d5aa2 wanted to post the following:

View the site here

This comment will be updated on new commits.

@kyriv-lab
kyriv-lab force-pushed the logarithm_33306 branch 5 times, most recently from eb841c5 to 1d8193a Compare July 14, 2026 16:26
@moosebuild

Copy link
Copy Markdown
Contributor

Job Precheck on 6ed7d6a : invalidated by @kyriv-lab

@kyriv-lab
kyriv-lab requested review from GiudGiud and grmnptr July 14, 2026 21:50
@grmnptr

grmnptr commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Was this indexing issue behind the nonconverging results?

@kyriv-lab

Copy link
Copy Markdown
Contributor Author

Was this indexing issue behind the nonconverging results?

No, that was just a small bug i found. It didn't have a big effect in the simulation results.

@moosebuild

Copy link
Copy Markdown
Contributor

Job Precheck, step Clang format on ccfef2c 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/docs/PRs/33307/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 39a256e00a85a2f74af288429d3a32a29c346ea3

@GiudGiud

Copy link
Copy Markdown
Contributor

No, that was just a small bug i found. It didn't have a big effect in the simulation results.

you need to create an issue for this too and reference it in the commit

@kyriv-lab
kyriv-lab force-pushed the logarithm_33306 branch 2 times, most recently from 924e79b to 171a67b Compare July 15, 2026 21:36
@kyriv-lab kyriv-lab changed the title Use log10 in relevant SCM closures Use log10 in relevant SCM closures and update transient regime calculation Jul 16, 2026
@kyriv-lab

Copy link
Copy Markdown
Contributor Author
Regold comparison against devel

Compared the current gold files on this branch against devel.

There are 19 gold CSV files different from devel.

Gold file Largest absolute change Largest relative change
XX09_SS_SHRT17_out.csvDP_SubchannelDelta +2373.02mdot-35 -11.61%
test19_explicit_out.csvDP_SubchannelDelta +24078.50mdot-8 -46.28%
test19_implicit_out.csvDP_SubchannelDelta +24340.12mdot-8 -47.76%
test19_monolithic_out.csvDP_SubchannelDelta +24266.02mdot-8 -47.45%
borishanskii.csvPin_Temp_1_Center +4.48 C+0.60%
dittus_boelter.csvPin_Temp_1_Center -4.78 C-1.00%
dittus_boelter_Presser.csvPin_Temp_1_Center -5.02 C-1.03%
dittus_boelter_Weisman.csvPin_Temp_1_Center -4.32 C-0.93%
gnielinski.csvPin_Temp_2_Outlet -4.34 C-0.52%
graber-rieger.csvPin_Temp_2_Outlet -4.33 C-0.52%
kazimi-carelli.csvPin_Temp_2_Outlet -4.33 C-0.52%
schad-modified.csvPin_Temp_2_Outlet -4.33 C-0.52%
FFM-3A_out.csvchannel 6 -2.06-0.24%
FFM-5B_high_out.csvchannel 7 -2.24-0.35%
FFM-5B_low_out.csvchannel 2 +9.77+1.20%
test_ORNL_19_out.csvDP_SubchannelDelta +5.46T2 +0.088%
2X6_ss_out.csvmdot8 -1.36e-6mdot7 -0.013%
toshiba_37_pin_out.csvDP_SubchannelDelta +261.29+2.81%
psbt_out.csvtotal_pressure_drop -3.97-0.0016%

The largest changes are in the sodium-19pin/SFR cases. Those show a sizable mass-flow redistribution, with mdot-8 changing by about 47%, and pressure drop increasing by about 28%.

The HTC correlation cases change by about 4-5 C, generally around 0.5-1.0%.

Most validation temperature changes are smaller. The largest validation relative change outside the sodium/SFR mass-flow redistribution is toshiba_37_pin_out.csv, where DP_SubchannelDelta increases by about 2.81%.

@GiudGiud GiudGiud self-assigned this Jul 17, 2026
@moosebuild

moosebuild commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

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

Framework coverage

Coverage did not change

Modules coverage

Subchannel

7829c6 #33307 b6d5aa
Total Total +/- New
Rate 93.29% 93.27% -0.02% 100.00%
Hits 6411 6432 +21 169
Misses 461 464 +3 0

Diff coverage report

Full coverage report

Full coverage reports

Reports

This comment will be updated on new commits.

@kyriv-lab

Copy link
Copy Markdown
Contributor Author

VTB patch: idaholab/virtual_test_bed#838

@kyriv-lab
kyriv-lab marked this pull request as ready for review July 17, 2026 21:51

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a7abb8efe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread modules/subchannel/src/problems/SubChannel1PhaseProblem.C
@moosebuild

Copy link
Copy Markdown
Contributor

Job Conda moose linux on 1a7abb8 : invalidated by @kyriv-lab

@kyriv-lab
kyriv-lab force-pushed the logarithm_33306 branch 2 times, most recently from a836907 to 71f74c2 Compare August 4, 2026 21:09
kyriv-lab and others added 11 commits August 20, 2026 15:21
The old negative_htc_error case used wire_diameter=0.003 to try to force a non-physical Gnielinski HTC. After correcting the Cheng-Todreas logarithm to base 10, that geometry no longer reaches the HTC guard first; it instead drives the coupled solve into invalid mixing or negative enthalpy. The requested wire is also larger than the pin-to-pin gap for this benchmark geometry, so the input is invalid before any friction, mixing, or HTC closure should run.

Add an early SCMTriAssemblyMeshGenerator validation that requires pitch to exceed pin diameter and requires dwire to be no larger than pitch - pin_diameter. Use MOOSE's fuzzy floating-point comparison so benchmark geometries where dwire equals the pin-to-pin gap are accepted. Rename the regression test to invalid_wire_diameter_error and make it expect this geometry error directly.
The sodium-19pin SFR tests used Gnielinski for the duct HTC closure while using Dittus-Boelter for the pins. With the HTC positivity guard active, the low-Pr sodium duct calculation can produce a non-physical Gnielinski HTC after the subchannel solve has converged, causing the explicit, implicit, and monolithic tests to exit with an error instead of reaching CSVDiff.

Switch the duct HTC closure in all three sodium-19pin inputs to Dittus-Boelter, matching the existing pin HTC closure. The successful duct closure choices produce identical reported coolant/pin temperatures for these tests because duct_heat_flux is zero, so Dittus-Boelter is the simplest viable closure already present in the inputs. Regenerate the corresponding CSV gold files from passing direct runs.
The base-10 logarithm corrections change the wire-wrapped Cheng-Todreas friction/mixing response and the Borishanskii HTC result. The affected tests ran to completion but failed CSVDiff because their gold files still reflected the old natural-log behavior.

Refresh the gold CSVs for the heat-transfer correlation cases, THORS blockage validation cases, ORNL-19, Toshiba-37, and the EBR-II SHRT-17 SFR problem using the outputs generated by the updated closures. This updates only baselines for tests whose numerical results changed because the intended closure formulas changed.
Store the assembly bulk Reynolds number on the subchannel problem and use it for the Updated Cheng-Todreas transition regime and interpolation parameter. Regold affected outputs.
…ngTodreas.md

Co-authored-by: Guillaume Giudicelli <guillaume.giudicelli@gmail.com>
@kyriv-lab
kyriv-lab marked this pull request as draft August 24, 2026 20:00
@kyriv-lab
kyriv-lab marked this pull request as ready for review August 24, 2026 21:40
@kyriv-lab

Copy link
Copy Markdown
Contributor Author

@grmnptr please review.

@kyriv-lab
kyriv-lab force-pushed the logarithm_33306 branch 2 times, most recently from 15ebb13 to 737a1c3 Compare August 25, 2026 14:59
@moosebuild

Copy link
Copy Markdown
Contributor

Job Test, step Results summary on b6d5aa2 wanted to post the following:

Framework test summary

Compared against 7829c60 in job civet.inl.gov/job/4094367.

No change

Modules test summary

Compared against 7829c60 in job civet.inl.gov/job/4094367.

Removed tests

Test Time (s) Memory (MB)
subchannel/test:scmclosures/friction_updated_cheng_todreas.invalid_corner_wire_correction 0.75 110.52
subchannel/validation/areva_FCTF.PNNL-12_ss SKIP 0.00

Added tests

Test Time (s) Memory (MB)
subchannel/test:problems/heat_transfer_correlations.EBR-II_SHRT-17_SS/invalid_wire_diameter_error 0.60 65.30
subchannel/validation/areva_FCTF.FCTF_ss SKIP 0.00

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.

4 participants