Skip to content

feat: Add automatic elevation propagation#89

Merged
dietmarw merged 12 commits intoOpenSimHub:masterfrom
dietmarw:feat/elevationPropagation
Apr 13, 2026
Merged

feat: Add automatic elevation propagation#89
dietmarw merged 12 commits intoOpenSimHub:masterfrom
dietmarw:feat/elevationPropagation

Conversation

@dietmarw-se
Copy link
Copy Markdown
Collaborator

Introduces elevation handling and propagation mechanism across the OpenHPL library.

ref: #45

Key changes include:

  • Elevation Mechanism: is supported by a new Elevation record which uses an overconstrained equalityConstraint for more reliable elevation propagation throughout the system.
  • Centralized Display Control: Adds a showElevation parameter to the Data record, enabling global control over the display of elevation on connectors in the icon layer.

dietmarw added 12 commits April 10, 2026 16:55
The elevation gets automatically propagated via the connects
Relocates elevation equations (`o.z = i.z` or `o.z = i.z - H`) from the `equation` section to the `initial equation` section for most components. This ensures elevation values are determined once at initialization and then propagated through the connected topology, simplifying model structure and potentially improving simulation performance.

Introduces a `fixElevation` parameter for source and sink models (e.g., `Reservoir`, `VolumeFlowSource`). This parameter allows users to either:
- Enforce a fixed absolute elevation (`z_0`) at the outlet (when `fixElevation` is true, default).
- Allow the outlet elevation to be determined by the connected topology (when `fixElevation` is false), enabling more flexible model configurations where elevation propagates into these components.
The previous variant did not allow for parallel connections.
@dietmarw-se dietmarw-se requested a review from dietmarw April 10, 2026 15:00
@dietmarw-se dietmarw-se added the feature New feature or request label Apr 10, 2026
@github-actions github-actions bot added the feat label Apr 10, 2026
@dietmarw dietmarw added this to the v3.1.0 milestone Apr 13, 2026
@dietmarw dietmarw merged commit 0b2415a into OpenSimHub:master Apr 13, 2026
4 checks passed
@dietmarw dietmarw deleted the feat/elevationPropagation branch April 13, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants