Skip to content

Split fluid and TLSPH time integration to allow for TLSPH substeps #794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

efaulhaber
Copy link
Member

@efaulhaber efaulhaber commented May 7, 2025

With high tensile modulus, TLSPH typically requires much smaller time steps than the fluid solver. The vast majority of particles are typically fluid particles, so allowing larger fluid time steps by decoupling the TLSPH time integration greatly improves performance.

Here are benchmarks using RDPK3SpFSAL35 with adaptive time stepping for both the fluid and the solid.
I simulated an elastic plate in a fluid channel in 2D. Flexural rigidity is constant, which means a thinner plate must be stiffer to obtain the same flexural rigidity. A higher resolution is also required for a thinner plate, which drastically increases runtime for thin plates.
The table shows time steps and runtime for 1s of simulation time. The last column shows the percentage of total runtime taken by the TLSPH time integration sub-steps. The benchmarks were run on a 72-core Nvidia Grace ARM CPU.

Thickness Modulus Fluid Particles Solid Particles Time Steps Time Steps Splitting Runtime Runtime Splitting Speedup TLSPH Integration Runtime
10 mm 5.5e7 80k 700 26k 2.5k 640s 82s 7.8× 31%
5 mm 4.4e8 300k 2k 160k 4.3k 3.6h 9.7m 22× 36%
2 mm 6.8e9 2M 10k 2.2M 14k 330h 3.1h 110× 38%
1 mm 5.5e10 8M 35k 14M 31k 400d 34h 280× 46%

I would like to simulate a carbon fiber plate, which has a realistic thickness of 0.5-1mm and a modulus of 1.4e11. It is clear from this table that this will be impossible without split integration (400d vs 34h runtime for a plate that is still too thick).

For such a problem, we get a 300x speedup just with the standard configuration. We can use 450x larger time steps for the fluid in the last row. We can definitely speed this up even more by using specialized time integration for TLSPH, maybe even implicit time integration. This is all trivial with this PR.

@efaulhaber efaulhaber self-assigned this May 12, 2025
Copy link

codecov bot commented May 28, 2025

Codecov Report

Attention: Patch coverage is 17.12329% with 121 lines in your changes missing coverage. Please review.

Project coverage is 69.28%. Comparing base (785ade6) to head (da28e75).

Files with missing lines Patch % Lines
src/callbacks/split_integration.jl 0.00% 114 Missing ⚠️
src/general/semidiscretization.jl 78.57% 6 Missing ⚠️
test/schemes/fluid/rhs.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #794      +/-   ##
==========================================
- Coverage   70.43%   69.28%   -1.16%     
==========================================
  Files         106      107       +1     
  Lines        6867     6996     +129     
==========================================
+ Hits         4837     4847      +10     
- Misses       2030     2149     +119     
Flag Coverage Δ
unit 69.28% <17.12%> (-1.16%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

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