Skip to content

Rebuild GLC block on native BVP1D#28

Merged
milanofthe merged 2 commits into
mainfrom
refactor/glc-native-bvp
Jun 25, 2026
Merged

Rebuild GLC block on native BVP1D#28
milanofthe merged 2 commits into
mainfrom
refactor/glc-native-bvp

Conversation

@milanofthe

Copy link
Copy Markdown
Member

Rebuilds the GLC bubble-column gas-liquid contactor as a subclass of the native pathsim.blocks.BVP1D block instead of a Function that hand-rolls scipy.integrate.solve_bvp.

  • GLC(BVP1D): the constructor seeds the parent with the Malara (1995) right-hand side and boundary conditions; the four block inputs supply the per-evaluation boundary data. Dimensionless groups are computed from the input inside the collocation callbacks (cached per operating point).
  • Warm-starting and solve-skip-on-unchanged-input now come for free from the native block.
  • Block IO is unchanged: same 4 input ports, same 8 dimensional output ports (c_T_out, y_T2_out, eff, P_out, Q_l, Q_g_out, n_T_out_liquid, n_T_out_gas). A thin update override post-processes the BVP solution into the dimensional ports; results() exposes the full result dict.
  • New test file tests/tritium/test_glc.py (10 tests), including bit-exact equivalence against an independent scipy.solve_bvp reference (C-C and O-C) and a Simulation run.

Requires pathsim with the max_nodes BVP1D parameter (pathsim#230, merged) since the GLC mesh refines past scipy's default cap of 1000 nodes.

@milanofthe milanofthe merged commit 27b677c into main Jun 25, 2026
2 checks passed
@milanofthe milanofthe deleted the refactor/glc-native-bvp branch June 25, 2026 05:38
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.

1 participant