Make pedestal model and internal boundary conditions mutually exclusive. - #2444
Merged
Merged
Conversation
copybara-service
Bot
force-pushed
the
test_977401745
branch
6 times, most recently
from
September 11, 2026 16:42
ee80423 to
055d3f6
Compare
copybara-service
Bot
force-pushed
the
test_977401745
branch
from
September 19, 2026 17:45
055d3f6 to
494a80e
Compare
Internal boundary conditions (IBC) represent prescribed or modeled edge boundary conditions. Previously, when both a pedestal model and user-defined IBC were active, `_calc_coeffs_full` attempted to `.merge()` them. If the IBC region extended inward past the pedestal top, this caused discontinuous profiles and unphysical wells/spikes (e.g. cold IBC values pinning the edge, then pedestal model the pedestal, but a wide IBC still pinning values inboard). This change refactors IBC construction and makes IBC and pedestal models mutually exclusive. It makes the pragmatic assumption that a profile_conditions IBC should be used for the edge region only, and therefore either one of pedestal or profile_conditions IBC should be active at a given time. There is no real use-case for internal IBC. Introduces: `internal_boundary_conditions.builder.build_internal_boundary_conditions`, serving as a single source of truth for constructing the active `InternalBoundaryConditions` object and resolving mutual exclusivity. Removes redundant hacky logic in transport_coefficients_builder related to two_point_mask construction. The two_point_mask is extracted from the IBC with the existing method. PiperOrigin-RevId: 984468634
copybara-service
Bot
force-pushed
the
test_977401745
branch
from
September 19, 2026 17:58
494a80e to
c0fae2d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make pedestal model and internal boundary conditions mutually exclusive.
Internal boundary conditions (IBC) represent prescribed or modeled edge boundary conditions. Previously, when both a pedestal model and user-defined IBC were active,
_calc_coeffs_fullattempted to.merge()them. If the IBC region extended inward past the pedestal top, this caused discontinuous profiles and unphysical wells/spikes (e.g. cold IBC values pinning the edge, then pedestal model the pedestal, but a wide IBC still pinning values inboard).This change refactors IBC construction and makes IBC and pedestal models mutually exclusive. It makes the pragmatic assumption that a profile_conditions IBC should be used for the edge region only, and therefore either one of pedestal or profile_conditions IBC should be active at a given time. There is no real use-case for internal IBC.
Introduces:
internal_boundary_conditions.builder.build_internal_boundary_conditions, serving as a single source of truth for constructing the activeInternalBoundaryConditionsobject and resolving mutual exclusivity.Removes redundant hacky logic in transport_coefficients_builder related to two_point_mask construction. The two_point_mask is extracted from the IBC with the existing method.