Repository navigation
Example/pipe cht - #42
Merged
Merged
Conversation
examples/pipe_cht/pipe1d.py: co-simulation FMU of a pipe discretised into N axial segments, to be coupled to a (3D) solid solver. Per segment it takes the wall temperature and returns the bulk fluid temperature and heat transfer coefficient (Robin coupling), plus wall heat flux, outlet temperature, total heat, Re, Nu and pressure drop. - implicit upwind finite volume energy equation: one O(N) sweep per step, stable for any communication step; reverse flow supported - Nu = 3.66 laminar / Gnielinski turbulent, Petukhov friction - cht_demo.py couples it to an axisymmetric steel-wall conduction model (heated middle third) through the same set/doStep/get loop a CHT driver uses; also runs the built FMU through FMPy with --fmu - README with the coupling scheme, parameters, inputs/outputs and model Tests: analytic constant-wall-temperature solution (laminar and turbulent), steady-state energy conservation, reverse-flow symmetry, Nusselt values, demo energy balance, model description arrays, and the built FMU run through the FMI C API matching the Python model. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X8Wmw797DJpgrMFmT6n8CG
N (UInt64, causality structuralParameter) sizes every per-segment array via <Dimension valueReference=N>. Setting it (in Configuration Mode, or on the Python class) reallocates the arrays through a property setter, so the resolution no longer requires editing the script and rebuilding. - cht_demo.py: --segments option; sets N through Configuration Mode for --fmu - README: N parameter and the configuration-mode call sequence - tests: N through the slave API, convergence with N against the analytic solution, model description dimensions, and the built FMU run through the FMI C API with N = 35 set in Configuration Mode Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X8Wmw797DJpgrMFmT6n8CG
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.
No description provided.