feat(cfd-python): expose blake threshold and giersiepen models via PyO3#265
feat(cfd-python): expose blake threshold and giersiepen models via PyO3#265ryancinsight wants to merge 1 commit intomainfrom
Conversation
- Add `CavitationRegimeClassifier` binding to `cfd-python` (exposing `blake_threshold` and `blake_critical_radius`). - Add `GiersiepenModel` binding to `cfd-python` (exposing `calculate_damage`). - Make `bubble_model`, `ambient_pressure`, `acoustic_pressure`, and `acoustic_frequency` public in `cfd-core`'s `CavitationRegimeClassifier`. - Remove TODO tags from `validation/cross_validate_rust_python.py` and replace them with actual `cfd_python` cross-validation tests that compare Python analytical values against Rust implementation. All tests pass with < 0.01% error. - Add `venv/`, `.venv/`, and `__pycache__/` to `.gitignore`. Co-authored-by: ryancinsight <55164720+ryancinsight@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request integrates key computational fluid dynamics (CFD) physics models, specifically the Blake threshold for cavitation and the Giersiepen model for hemolysis, into the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
📝 WalkthroughWalkthroughThis pull request expands Python API surface through PyO3 bindings for cavitation regime classification and hemolysis modeling, increases visibility of cavitation classifier fields from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
validation/cross_validate_rust_python.py (1)
236-239:⚠️ Potential issue | 🟡 MinorRemove outdated "NEXT STEP" guidance.
The summary still includes guidance about adding cross-validation tests, but these tests were just implemented in this PR. This text is now outdated and misleading.
🧹 Proposed fix to update summary
3. ✓ Giersiepen Hemolysis - Python: validation/validate_cavitation_hemolysis.py line 160-168 - Rust: crates/cfd-core/src/physics/hemolysis/giersiepen.rs - Formula: D = C×τ^α×t^β -NEXT STEP: Add explicit cross-validation tests that: - - Call Rust via cfd_python with same inputs - - Compare outputs to Python calculations - - Assert < 0.01% difference +Cross-validation tests above compare Rust vs Python with <0.01% tolerance. """)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@validation/cross_validate_rust_python.py` around lines 236 - 239, The file contains an outdated "NEXT STEP: Add explicit cross-validation tests..." guidance string in the summary; remove that obsolete line so the module/class/function summary no longer suggests work that's already done (search for the exact "NEXT STEP: Add explicit cross-validation tests" text and delete it), leaving current documentation and any remaining summary text accurate and up to date (ensure no other occurrences remain).
🧹 Nitpick comments (2)
.gitignore (1)
42-46: Remove the duplicated ignore patterns.Lines 45-46 repeat entries already added on Lines 42-43, so they don't change ignore behavior and just add noise.
♻️ Proposed cleanup
.venv/ __pycache__/ venv/ -.venv/ -__pycache__/🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.gitignore around lines 42 - 46, The .gitignore contains duplicate patterns (".venv/", "__pycache__/", "venv/") repeated twice; remove the second occurrences so each ignore pattern appears only once (e.g., delete the redundant lines that repeat ".venv/", "__pycache__/", "venv/") leaving a single set of those entries to reduce noise and keep the file clean.crates/cfd-python/src/hemolysis.rs (1)
36-42: Consider enriching__repr__with model parameters.The current representation is minimal. For debugging and interactive use, it could be helpful to include the model constants.
♻️ Optional enhancement for richer representation
fn __str__(&self) -> String { "GiersiepenModel()".to_string() } fn __repr__(&self) -> String { - self.__str__() + "GiersiepenModel(C=3.62e-5, α=2.416, β=0.785)".to_string() }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@crates/cfd-python/src/hemolysis.rs` around lines 36 - 42, The __repr__ currently returns the same minimal string as __str__ ("GiersiepenModel()"); update GiersiepenModel::__repr__ to include the model's parameter values (e.g., the struct fields/constants) so that repr shows a concise, unambiguous snapshot like GiersiepenModel{param1: x, param2: y}. Locate the GiersiepenModel impl where fn __str__ and fn __repr__ are defined and build a formatted string in __repr__ that reads the model's fields (use the actual field names from the struct) and returns that string instead of delegating to __str__.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@validation/cross_validate_rust_python.py`:
- Around line 187-209: Remove unnecessary f-string prefixes on print statements
that contain no placeholders: change prints like print(f" Located in:
crates/..."), print(f" Cross-validation:"), print(f" ✓ MATCH for all test
cases (<0.01% diff)"), and print(f" Skipping test: GiersiepenModel not found in
cfd_python") to plain string prints. Locate the block guarded by
hasattr(cfd_python, 'GiersiepenModel') around the GiersiepenModel usage and the
loop over test_cases (which calls giersiepen_python and model.calculate_damage)
and update only the string literals to remove the leading f for consistency and
clarity. Ensure any print that still needs interpolation (e.g., the mismatch
message using {tau}, {t}, etc.) remains an f-string.
- Around line 131-148: The print statements that use f-strings but contain no
placeholders should be normal strings: update the prints in the
CarreauYasudaBlood cross-validation block (the " Cross-validation:", the
success message " ✓ MATCH for all shear rates (<0.01% diff)" and the skip
message " Skipping test: CarreauYasudaBlood not found in cfd_python") to remove
the leading f prefix while keeping the gamma character in the mismatch message
intact; locate the block guarded by hasattr(cfd_python, 'CarreauYasudaBlood')
and adjust the print calls so only the mismatch line that formats
mu_python/mu_rust remains an f-string and other static messages use plain string
literals.
- Around line 84-88: The two print statements that use f-strings but contain no
placeholders should be converted to plain strings: update the print in the
branch that prints " Cross-validation: ✓ MATCH (<0.01% diff)" and the print in
the else that prints " Skipping test: CavitationRegimeClassifier not found in
cfd_python" to remove the leading f prefix (leave the other print that uses
{rc_error} and {pb_error} unchanged); locate these prints near the
cross-validation logic in cross_validate_rust_python.py (the prints used
alongside CavitationRegimeClassifier handling) and replace f"..." with "..." so
static analysis Ruff F541 is satisfied.
- Around line 60-61: Remove the unrelated outer hasattr(cfd_python,
'CavitySolver2D') guard so the Blake threshold test only checks for
CavitationRegimeClassifier; modify the block around the
CavitationRegimeClassifier check (the code that currently sits under the
CavitySolver2D if) to directly use if hasattr(cfd_python,
'CavitationRegimeClassifier') and shift the corresponding else clause
indentation to match that check (ensure the expected test/skip behavior is
preserved for the CavitationRegimeClassifier branch).
---
Outside diff comments:
In `@validation/cross_validate_rust_python.py`:
- Around line 236-239: The file contains an outdated "NEXT STEP: Add explicit
cross-validation tests..." guidance string in the summary; remove that obsolete
line so the module/class/function summary no longer suggests work that's already
done (search for the exact "NEXT STEP: Add explicit cross-validation tests" text
and delete it), leaving current documentation and any remaining summary text
accurate and up to date (ensure no other occurrences remain).
---
Nitpick comments:
In @.gitignore:
- Around line 42-46: The .gitignore contains duplicate patterns (".venv/",
"__pycache__/", "venv/") repeated twice; remove the second occurrences so each
ignore pattern appears only once (e.g., delete the redundant lines that repeat
".venv/", "__pycache__/", "venv/") leaving a single set of those entries to
reduce noise and keep the file clean.
In `@crates/cfd-python/src/hemolysis.rs`:
- Around line 36-42: The __repr__ currently returns the same minimal string as
__str__ ("GiersiepenModel()"); update GiersiepenModel::__repr__ to include the
model's parameter values (e.g., the struct fields/constants) so that repr shows
a concise, unambiguous snapshot like GiersiepenModel{param1: x, param2: y}.
Locate the GiersiepenModel impl where fn __str__ and fn __repr__ are defined and
build a formatted string in __repr__ that reads the model's fields (use the
actual field names from the struct) and returns that string instead of
delegating to __str__.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 98965a34-0029-457e-be24-50e09daeed10
📒 Files selected for processing (6)
.gitignorecrates/cfd-core/src/physics/cavitation/regimes/classifier.rscrates/cfd-python/src/cavitation.rscrates/cfd-python/src/hemolysis.rscrates/cfd-python/src/lib.rsvalidation/cross_validate_rust_python.py
| if hasattr(cfd_python, 'CavitySolver2D'): | ||
| # Check if the required API is exposed |
There was a problem hiding this comment.
Redundant check for CavitySolver2D before CavitationRegimeClassifier.
The outer hasattr(cfd_python, 'CavitySolver2D') check appears unrelated to the Blake threshold test. This may be a copy-paste artifact. The test should only check for CavitationRegimeClassifier.
🐛 Proposed fix to remove unrelated check
if has_cfd_python:
print(f"\nRust implementation:")
print(f" Located in: crates/cfd-core/src/physics/cavitation/regimes.rs")
- if hasattr(cfd_python, 'CavitySolver2D'):
- # Check if the required API is exposed
- if hasattr(cfd_python, 'CavitationRegimeClassifier'):
+ # Check if the required API is exposed
+ if hasattr(cfd_python, 'CavitationRegimeClassifier'):And adjust the corresponding else clause indentation.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@validation/cross_validate_rust_python.py` around lines 60 - 61, Remove the
unrelated outer hasattr(cfd_python, 'CavitySolver2D') guard so the Blake
threshold test only checks for CavitationRegimeClassifier; modify the block
around the CavitationRegimeClassifier check (the code that currently sits under
the CavitySolver2D if) to directly use if hasattr(cfd_python,
'CavitationRegimeClassifier') and shift the corresponding else clause
indentation to match that check (ensure the expected test/skip behavior is
preserved for the CavitationRegimeClassifier branch).
| print(f" Cross-validation: ✓ MATCH (<0.01% diff)") | ||
| else: | ||
| print(f" Cross-validation: ✗ MISMATCH (Rc err: {rc_error:.4f}%, Pb err: {pb_error:.4f}%)") | ||
| else: | ||
| print(f" Skipping test: CavitationRegimeClassifier not found in cfd_python") |
There was a problem hiding this comment.
Remove unnecessary f prefix from strings without placeholders.
Static analysis (Ruff F541) correctly identifies f-strings that contain no placeholders. These should be plain strings.
🧹 Proposed fix for lines 84 and 88
if rc_error < 0.01 and pb_error < 0.01:
- print(f" Cross-validation: ✓ MATCH (<0.01% diff)")
+ print(" Cross-validation: ✓ MATCH (<0.01% diff)")
else:
print(f" Cross-validation: ✗ MISMATCH (Rc err: {rc_error:.4f}%, Pb err: {pb_error:.4f}%)")
else:
- print(f" Skipping test: CavitationRegimeClassifier not found in cfd_python")
+ print(" Skipping test: CavitationRegimeClassifier not found in cfd_python")📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| print(f" Cross-validation: ✓ MATCH (<0.01% diff)") | |
| else: | |
| print(f" Cross-validation: ✗ MISMATCH (Rc err: {rc_error:.4f}%, Pb err: {pb_error:.4f}%)") | |
| else: | |
| print(f" Skipping test: CavitationRegimeClassifier not found in cfd_python") | |
| print(" Cross-validation: ✓ MATCH (<0.01% diff)") | |
| else: | |
| print(f" Cross-validation: ✗ MISMATCH (Rc err: {rc_error:.4f}%, Pb err: {pb_error:.4f}%)") | |
| else: | |
| print(" Skipping test: CavitationRegimeClassifier not found in cfd_python") |
🧰 Tools
🪛 Ruff (0.15.5)
[error] 84-84: f-string without any placeholders
Remove extraneous f prefix
(F541)
[error] 88-88: f-string without any placeholders
Remove extraneous f prefix
(F541)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@validation/cross_validate_rust_python.py` around lines 84 - 88, The two print
statements that use f-strings but contain no placeholders should be converted to
plain strings: update the print in the branch that prints " Cross-validation: ✓
MATCH (<0.01% diff)" and the print in the else that prints " Skipping test:
CavitationRegimeClassifier not found in cfd_python" to remove the leading f
prefix (leave the other print that uses {rc_error} and {pb_error} unchanged);
locate these prints near the cross-validation logic in
cross_validate_rust_python.py (the prints used alongside
CavitationRegimeClassifier handling) and replace f"..." with "..." so static
analysis Ruff F541 is satisfied.
| if hasattr(cfd_python, 'CarreauYasudaBlood'): | ||
| blood = cfd_python.CarreauYasudaBlood() | ||
| print(f" Cross-validation:") | ||
|
|
||
| all_match = True | ||
| for gamma_dot in test_shear_rates: | ||
| mu_python = carreau_yasuda_python(gamma_dot) | ||
| mu_rust = blood.apparent_viscosity(gamma_dot) | ||
| error_pct = abs(mu_rust - mu_python) / mu_python * 100 | ||
|
|
||
| if error_pct > 0.01: | ||
| all_match = False | ||
| print(f" Mismatch at γ̇ = {gamma_dot}: Python={mu_python*1000:.4f}, Rust={mu_rust*1000:.4f} (err: {error_pct:.2f}%)") | ||
|
|
||
| if all_match: | ||
| print(f" ✓ MATCH for all shear rates (<0.01% diff)") | ||
| else: | ||
| print(f" Skipping test: CarreauYasudaBlood not found in cfd_python") |
There was a problem hiding this comment.
Remove unnecessary f prefixes; gamma character is acceptable.
Lines 133, 146, and 148 have f-strings without placeholders. The ambiguous gamma character (γ̇) at line 143 is intentional scientific notation for shear rate and should be kept.
🧹 Proposed fix for f-string issues
if hasattr(cfd_python, 'CarreauYasudaBlood'):
blood = cfd_python.CarreauYasudaBlood()
- print(f" Cross-validation:")
+ print(" Cross-validation:")
all_match = True
for gamma_dot in test_shear_rates:
mu_python = carreau_yasuda_python(gamma_dot)
mu_rust = blood.apparent_viscosity(gamma_dot)
error_pct = abs(mu_rust - mu_python) / mu_python * 100
if error_pct > 0.01:
all_match = False
print(f" Mismatch at γ̇ = {gamma_dot}: Python={mu_python*1000:.4f}, Rust={mu_rust*1000:.4f} (err: {error_pct:.2f}%)")
if all_match:
- print(f" ✓ MATCH for all shear rates (<0.01% diff)")
+ print(" ✓ MATCH for all shear rates (<0.01% diff)")
else:
- print(f" Skipping test: CarreauYasudaBlood not found in cfd_python")
+ print(" Skipping test: CarreauYasudaBlood not found in cfd_python")📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if hasattr(cfd_python, 'CarreauYasudaBlood'): | |
| blood = cfd_python.CarreauYasudaBlood() | |
| print(f" Cross-validation:") | |
| all_match = True | |
| for gamma_dot in test_shear_rates: | |
| mu_python = carreau_yasuda_python(gamma_dot) | |
| mu_rust = blood.apparent_viscosity(gamma_dot) | |
| error_pct = abs(mu_rust - mu_python) / mu_python * 100 | |
| if error_pct > 0.01: | |
| all_match = False | |
| print(f" Mismatch at γ̇ = {gamma_dot}: Python={mu_python*1000:.4f}, Rust={mu_rust*1000:.4f} (err: {error_pct:.2f}%)") | |
| if all_match: | |
| print(f" ✓ MATCH for all shear rates (<0.01% diff)") | |
| else: | |
| print(f" Skipping test: CarreauYasudaBlood not found in cfd_python") | |
| if hasattr(cfd_python, 'CarreauYasudaBlood'): | |
| blood = cfd_python.CarreauYasudaBlood() | |
| print(" Cross-validation:") | |
| all_match = True | |
| for gamma_dot in test_shear_rates: | |
| mu_python = carreau_yasuda_python(gamma_dot) | |
| mu_rust = blood.apparent_viscosity(gamma_dot) | |
| error_pct = abs(mu_rust - mu_python) / mu_python * 100 | |
| if error_pct > 0.01: | |
| all_match = False | |
| print(f" Mismatch at γ̇ = {gamma_dot}: Python={mu_python*1000:.4f}, Rust={mu_rust*1000:.4f} (err: {error_pct:.2f}%)") | |
| if all_match: | |
| print(" ✓ MATCH for all shear rates (<0.01% diff)") | |
| else: | |
| print(" Skipping test: CarreauYasudaBlood not found in cfd_python") |
🧰 Tools
🪛 Ruff (0.15.5)
[error] 133-133: f-string without any placeholders
Remove extraneous f prefix
(F541)
[warning] 143-143: String contains ambiguous γ (GREEK SMALL LETTER GAMMA). Did you mean y (LATIN SMALL LETTER Y)?
(RUF001)
[error] 146-146: f-string without any placeholders
Remove extraneous f prefix
(F541)
[error] 148-148: f-string without any placeholders
Remove extraneous f prefix
(F541)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@validation/cross_validate_rust_python.py` around lines 131 - 148, The print
statements that use f-strings but contain no placeholders should be normal
strings: update the prints in the CarreauYasudaBlood cross-validation block (the
" Cross-validation:", the success message " ✓ MATCH for all shear rates
(<0.01% diff)" and the skip message " Skipping test: CarreauYasudaBlood not
found in cfd_python") to remove the leading f prefix while keeping the gamma
character in the mismatch message intact; locate the block guarded by
hasattr(cfd_python, 'CarreauYasudaBlood') and adjust the print calls so only the
mismatch line that formats mu_python/mu_rust remains an f-string and other
static messages use plain string literals.
| print(f" Located in: crates/cfd-core/src/physics/hemolysis/models.rs") | ||
|
|
||
| if hasattr(cfd_python, 'GiersiepenModel'): | ||
| model = cfd_python.GiersiepenModel() | ||
| print(f" Cross-validation:") | ||
|
|
||
| all_match = True | ||
| for tau, t in test_cases: | ||
| damage_python = giersiepen_python(tau, t) | ||
| damage_rust = model.calculate_damage(tau, t) | ||
|
|
||
| # Note: Rust model might return slightly different results based on float precision or slight variations in constants | ||
| # so we use a reasonable tolerance | ||
| error_pct = abs(damage_rust - damage_python) / damage_python * 100 | ||
|
|
||
| if error_pct > 0.01: | ||
| all_match = False | ||
| print(f" Mismatch at τ={tau}, t={t}: Python={damage_python:.6f}, Rust={damage_rust:.6f} (err: {error_pct:.2f}%)") | ||
|
|
||
| if all_match: | ||
| print(f" ✓ MATCH for all test cases (<0.01% diff)") | ||
| else: | ||
| print(f" Skipping test: GiersiepenModel not found in cfd_python") |
There was a problem hiding this comment.
Remove unnecessary f prefixes from strings without placeholders.
🧹 Proposed fix for f-string issues in TEST 3
print(f"\nRust implementation:")
- print(f" Located in: crates/cfd-core/src/physics/hemolysis/models.rs")
+ print(" Located in: crates/cfd-core/src/physics/hemolysis/models.rs")
if hasattr(cfd_python, 'GiersiepenModel'):
model = cfd_python.GiersiepenModel()
- print(f" Cross-validation:")
+ print(" Cross-validation:")
all_match = True
for tau, t in test_cases:
damage_python = giersiepen_python(tau, t)
damage_rust = model.calculate_damage(tau, t)
# Note: Rust model might return slightly different results based on float precision or slight variations in constants
# so we use a reasonable tolerance
error_pct = abs(damage_rust - damage_python) / damage_python * 100
if error_pct > 0.01:
all_match = False
print(f" Mismatch at τ={tau}, t={t}: Python={damage_python:.6f}, Rust={damage_rust:.6f} (err: {error_pct:.2f}%)")
if all_match:
- print(f" ✓ MATCH for all test cases (<0.01% diff)")
+ print(" ✓ MATCH for all test cases (<0.01% diff)")
else:
- print(f" Skipping test: GiersiepenModel not found in cfd_python")
+ print(" Skipping test: GiersiepenModel not found in cfd_python")🧰 Tools
🪛 Ruff (0.15.5)
[error] 187-187: f-string without any placeholders
Remove extraneous f prefix
(F541)
[error] 191-191: f-string without any placeholders
Remove extraneous f prefix
(F541)
[error] 207-207: f-string without any placeholders
Remove extraneous f prefix
(F541)
[error] 209-209: f-string without any placeholders
Remove extraneous f prefix
(F541)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@validation/cross_validate_rust_python.py` around lines 187 - 209, Remove
unnecessary f-string prefixes on print statements that contain no placeholders:
change prints like print(f" Located in: crates/..."), print(f"
Cross-validation:"), print(f" ✓ MATCH for all test cases (<0.01% diff)"), and
print(f" Skipping test: GiersiepenModel not found in cfd_python") to plain
string prints. Locate the block guarded by hasattr(cfd_python,
'GiersiepenModel') around the GiersiepenModel usage and the loop over test_cases
(which calls giersiepen_python and model.calculate_damage) and update only the
string literals to remove the leading f for consistency and clarity. Ensure any
print that still needs interpolation (e.g., the mismatch message using {tau},
{t}, etc.) remains an f-string.
Expose physics functions to cfd-python to close out TODO gaps in the validation script and cross-validate Rust/Python implementations.
PR created automatically by Jules for task 14562815834805710155 started by @ryancinsight
High-level PR Summary
This PR exposes Blake threshold cavitation calculations and Giersiepen hemolysis models from the Rust
cfd-corelibrary to Python via PyO3 bindings. The changes add two new Python wrapper classes (CavitationRegimeClassifierandGiersiepenModel) and updates the validation script to cross-validate the Rust and Python implementations, replacing TODO comments with actual test cases that verify numerical equivalence between the two implementations.⏱️ Estimated Review Time: 5-15 minutes
💡 Review Order Suggestion
.gitignorecrates/cfd-core/src/physics/cavitation/regimes/classifier.rscrates/cfd-python/src/hemolysis.rscrates/cfd-python/src/cavitation.rscrates/cfd-python/src/lib.rsvalidation/cross_validate_rust_python.pySummary by CodeRabbit