Skip to content

Use conservative Akinci pair forces across resolutions - #1266

Draft
svchb wants to merge 14 commits into
trixi-framework:mainfrom
svchb:surface-tension/akinci-normal-force-normalization
Draft

Use conservative Akinci pair forces across resolutions#1266
svchb wants to merge 14 commits into
trixi-framework:mainfrom
svchb:surface-tension/akinci-normal-force-normalization

Conversation

@svchb

@svchb svchb commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • use the smaller compact-support radius of each Akinci particle pair so both directed neighborhood searches activate the same interactions
  • form dimensionless local normals as N_i = h_i * n_i
  • weight the normal-difference force with the harmonic pair mass 2 * m_a * m_b / (m_a + m_b)
  • preserve the published equal-mass, equal-smoothing-length result while conserving pairwise linear momentum for unequal masses and smoothing lengths
  • apply the shared support to cohesion-only and combined Akinci fluid-fluid interactions
  • document this as a same-material rule; a physical multiphase model must provide an explicit pair coefficient and pair reference density

Stack

Depends on #1261. Fork branches cannot be selected as bases for pull requests into the upstream repository, so this PR targets main and temporarily shows the preceding commits.

Review-only diff: svchb/TrixiParticles.jlOpen@fix/akinci-free-surface-correction...surface-tension/akinci-normal-force-normalization

Formulation

For raw color gradient n_i, define the dimensionless Akinci normal N_i = h_i * n_i. The same-material curvature pair force is

F_ab = -sigma * (2 * m_a * m_b / (m_a + m_b)) * (N_a - N_b).

This reduces to the existing Akinci expression at equal resolution. The minimum pair support ensures that an active pair is present in both directed interaction passes. Coefficient averaging is intentionally not introduced because it would hide unresolved multiphase physics.

Verification

  • complete unit test target passed
  • aggregate surface-tension tests: 178/178
  • unequal-mass and unequal-smoothing-length momentum regression passed
  • shared-support cutoff regression passed
  • JuliaFormatter 2.1.1 and per-layer git diff --check passed

Stack Order

  1. Harden surface tension model configuration #1258 - surface-tension configuration hardening
  2. Clarify and visualize SPH surface normals #1279 - surface-normal scoping, explanation, and visualization
  3. Implement multicolor surface normals and threshold handling #1280 - multicolor gradients and threshold handling
  4. Add dimensionally consistent 2D Akinci kernels #1259 - dimensionally consistent 2D Akinci kernels
  5. Fix Akinci free-surface correction with continuity density #1261 - required WCSPH and EDAC free-surface correction support
  6. Use conservative Akinci pair forces across resolutions #1266 - conservative adaptive-resolution Akinci pair forces
  7. Add Akinci surface tension support to IISPH #1267 - Akinci surface tension and correction support in IISPH

Supporting views: #1262 is the aggregate implementation view, #1263 is validation, and #1253 is the historical umbrella.

All focused PRs target upstream main because GitHub cannot use contributor-fork branches as upstream PR bases. Each PR links a fork comparison that isolates its own review layer.

@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.05300% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.54%. Comparing base (a720b1d) to head (f9af415).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/schemes/fluid/surface_normal_sph.jl 90.24% 4 Missing ⚠️
src/preprocessing/particle_packing/system.jl 50.00% 3 Missing ⚠️
src/schemes/fluid/surface_tension.jl 94.91% 3 Missing ⚠️
src/general/semidiscretization.jl 81.81% 2 Missing ⚠️
src/schemes/fluid/fluid.jl 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1266      +/-   ##
==========================================
+ Coverage   90.39%   90.54%   +0.15%     
==========================================
  Files         138      139       +1     
  Lines       11322    11556     +234     
==========================================
+ Hits        10234    10463     +229     
- Misses       1088     1093       +5     
Flag Coverage Δ
total 90.54% <95.05%> (+0.15%) ⬆️
unit 78.09% <93.28%> (+0.61%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@svchb
svchb force-pushed the surface-tension/akinci-normal-force-normalization branch from 010429d to 4108e86 Compare August 14, 2026 12:46
@svchb
svchb force-pushed the surface-tension/akinci-normal-force-normalization branch from 4108e86 to 21c513d Compare August 14, 2026 12:53
@svchb
svchb force-pushed the surface-tension/akinci-normal-force-normalization branch from 21c513d to 4f4171d Compare August 14, 2026 16:04
@svchb svchb changed the title Normalize the Akinci normal force by neighbor volume Use conservative Akinci pair forces across resolutions Aug 14, 2026
@svchb
svchb force-pushed the surface-tension/akinci-normal-force-normalization branch from 4f4171d to f8e5eb3 Compare August 14, 2026 16:12
@svchb
svchb force-pushed the surface-tension/akinci-normal-force-normalization branch from f8e5eb3 to f9af415 Compare August 14, 2026 17:13
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