Add utility for initializing RCR boundary conditions - #613
Open
taeoukkim wants to merge 1 commit into
Open
Conversation
taeoukkim
requested review from
aabrown100-git and
ktbolt
and
a lite review from Copilot
August 21, 2026 22:46
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Python utility under utilities/initialize_rcr_boundary_conditions/ to compute a phase-aware initial capacitor pressure for RCR boundary conditions from an inflow .flow waveform and an svMultiPhysics solver.xml, then optionally update all detected RCR outlets’ <Initial_pressure> values.
Changes:
- Add
calculate_rcr_initial_pressure.pyto detect a single.flow, parse RCR outlets fromsolver.xml, compute periodic Pc*(0), and update<Initial_pressure>(with backup + CSV summary). - Add a README with usage, expected inputs, and output artifacts.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| utilities/initialize_rcr_boundary_conditions/calculate_rcr_initial_pressure.py | Implements flow detection, RCR parsing, Pc*(0) calculation, CSV summary, and solver.xml update/backup logic. |
| utilities/initialize_rcr_boundary_conditions/README.md | Documents requirements, CLI usage, and generated outputs for the new utility. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+522
to
+524
| old_initial_pressure=float( | ||
| initial_pressure_element.text.strip() | ||
| ), |
Comment on lines
+863
to
+864
| if output_path is None: | ||
|
|
1 task
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.
Current situation
This PR adds the Python utility requested for initializing RCR boundary
conditions in svMultiPhysics simulations.
The utility calculates a common phase-aware RCR initial capacitor pressure
using an inflow waveform and the RCR parameters defined in
solver.xml.It then updates the
Initial_pressurevalue for all detected RCR outlets.Release Notes
.flowfile in the working directory.solver.xml.solver.xml.Documentation
A README is included with requirements, usage instructions, and output files.