Skip to content

Tolerate floating-point rounding in friction pressure-drop assert#3

Open
MatthiasBSchaefer wants to merge 1 commit into
masterfrom
MatthiasBSchaefer-PR4791
Open

Tolerate floating-point rounding in friction pressure-drop assert#3
MatthiasBSchaefer wants to merge 1 commit into
masterfrom
MatthiasBSchaefer-PR4791

Conversation

@MatthiasBSchaefer

@MatthiasBSchaefer MatthiasBSchaefer commented Jul 13, 2026

Copy link
Copy Markdown

Backport of modelica#4791 into this fork

Summary by CodeRabbit

  • Bug Fixes
    • Improved validation of nominal pressure-drop parameters by accounting for small numerical rounding differences.
    • Prevented valid configurations from being rejected due to insignificant floating-point precision errors.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

SimpleFriction now validates dpNominal against an epsilon-adjusted dpNomMin threshold during initialization.

Changes

Friction parameter validation

Layer / File(s) Summary
Relax nominal pressure-drop assertion
Modelica/Thermal/FluidHeatFlow/BaseClasses/SimpleFriction.mo
The initialization assertion changes from dpNominal >= dpNomMin to a comparison against dpNomMin*(1 - 100*Modelica.Constants.eps).

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: relaxing the friction pressure-drop assertion to tolerate floating-point rounding.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch MatthiasBSchaefer-PR4791

Comment @coderabbitai help to get the list of available commands.

@MSL-RegressionTesting-CI MSL-RegressionTesting-CI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MSL-RegressionTesting-CI MSL-RegressionTesting-CI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MSL-RegressionTesting-CI MSL-RegressionTesting-CI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MSL-RegressionTesting-CI MSL-RegressionTesting-CI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MSL-RegressionTesting-CI MSL-RegressionTesting-CI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MSL-RegressionTesting-CI MSL-RegressionTesting-CI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MSL-RegressionTesting-CI MSL-RegressionTesting-CI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MSL-RegressionTesting-CI MSL-RegressionTesting-CI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MSL-RegressionTesting-CI MSL-RegressionTesting-CI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MSL-RegressionTesting-CI MSL-RegressionTesting-CI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MSL-RegressionTesting-CI MSL-RegressionTesting-CI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

2 participants