Repository navigation
Fix structure-fluid interaction force - #1348
Conversation
efaulhaber
left a comment
There was a problem hiding this comment.
Codex Review
Centralize fluid momentum-force calculations so structure-fluid interactions reuse the same pressure, viscosity, and adhesion logic; exclude shifting terms from forces applied to structures; and add force-conservation coverage for fluid-structure pairs.
This is an AI-generated code review. Please verify the findings and summary before acting on them.
Review generated by codex-pr-review
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1348 +/- ##
==========================================
+ Coverage 90.51% 90.61% +0.10%
==========================================
Files 143 143
Lines 11439 11492 +53
==========================================
+ Hits 10354 10414 +60
+ Misses 1085 1078 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/run-gpu-tests |
Bring in the remaining 30 upstream commits up to 3c5005e on top of the 40 commits on this branch. This completes the follow-up to d1448a5, which stopped at 6a56a72. Upstream changes that affected refinement: - `drift!`, `kick!` and related code moved from semidiscretization.jl to general/ode_rhs.jl and general/time_integration.jl (trixi-framework#1060) - `add_momentum_equation` is shared by the fluid and structure interactions (trixi-framework#1348, trixi-framework#1338) - `almostzero` is now a function of the smoothing length (trixi-framework#1349) - The quadratic term in `ArtificialViscosityMonaghan` changed sign (trixi-framework#1295). The refinement viscosity methods wrap `add_dv_viscosity`, so they pick up the fix without changes. - Custom quantity code moved to src/custom_quantities - TimerOutputs 1.2 and TrixiBase 0.2 are now required. Existing environments need `Pkg.update`, because `Pkg.resolve` keeps the old pinned versions and fails. Conflicts resolved: - src/TrixiParticles.jl - src/general/semidiscretization.jl - src/schemes/boundary/open_boundary/rhs.jl - src/schemes/fluid/entropically_damped_sph/rhs.jl - src/schemes/fluid/weakly_compressible_sph/rhs.jl - src/util.jl Adaptations beyond the conflict markers: - Keep upstream's EDAC `add_momentum_equation` and `pressure_evolution!` unchanged, and add methods that also take both kernel gradients and the refinement. Without refinement, they forward to the upstream methods. With refinement, they apply the scaled pressures and `beta`. - Replace `evaluate_pressure_terms` with `scaled_pressures`. Compute `beta` and the shifting velocity in the refinement methods, so that the EDAC loop no longer passes them around. - Move `set_zero!(du_ode)` into `drift!` in general/ode_rhs.jl. - Remove the `::AbstractSystem` restriction from `initial_smoothing_length`. Upstream's `check_smoothing_kernel_fsi` also calls it with boundary models. - Replace the local `sqrt(eps(h_w^2))` threshold in the refinement wall boundary code with `almostzero(h_w)`. The threshold is now `sqrt(eps(typeof(h_w))) * h_w`. This is the same order of magnitude but not identical, and it only matters for particles almost exactly on top of each other. - Use upstream's "Skip neighbors" comment in the open boundary and WCSPH rhs. - Double `particle_spacing` in taylor_green_vortex_2d_refinement.jl from 0.025 to 0.05.
No description provided.