Commit 3ef275b
Fix IBM force: accumulate from both predictor AND corrected velocity
Cd was ~3x too low because only the predictor IBM call contributed to
force accumulation. At quasi-steady state u* inside body ≈ 0 (IBM zeroed
it last step), so predictor contribution is tiny. The missing force is
from the second IBM call: u^{n+1} = u*_IBM - dt*grad(p) inside body is
non-zero due to pressure correction; re-zeroing it gives the pressure drag.
Fix: add reset_force_accumulator() (called once per step in solver.cpp),
change both apply_forcing calls to ADD to last_Fx_/Fy_/Fz_. Total force
= predictor correction + pressure correction = full IBM drag.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 798c7ad commit 3ef275b
File tree
4 files changed
+34
-17
lines changed- include
- src
- tests
4 files changed
+34
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
257 | 263 | | |
258 | 264 | | |
259 | 265 | | |
| |||
262 | 268 | | |
263 | 269 | | |
264 | 270 | | |
265 | | - | |
266 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
267 | 275 | | |
268 | 276 | | |
269 | 277 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | 278 | | |
274 | 279 | | |
275 | 280 | | |
| |||
362 | 367 | | |
363 | 368 | | |
364 | 369 | | |
365 | | - | |
366 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
367 | 373 | | |
368 | 374 | | |
369 | 375 | | |
| |||
390 | 396 | | |
391 | 397 | | |
392 | 398 | | |
393 | | - | |
394 | | - | |
395 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
396 | 402 | | |
397 | 403 | | |
398 | 404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1751 | 1751 | | |
1752 | 1752 | | |
1753 | 1753 | | |
1754 | | - | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
1755 | 1757 | | |
| 1758 | + | |
1756 | 1759 | | |
1757 | 1760 | | |
1758 | 1761 | | |
| |||
2220 | 2223 | | |
2221 | 2224 | | |
2222 | 2225 | | |
2223 | | - | |
2224 | | - | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
2225 | 2229 | | |
2226 | 2230 | | |
2227 | 2231 | | |
2228 | | - | |
| 2232 | + | |
| 2233 | + | |
2229 | 2234 | | |
2230 | | - | |
| 2235 | + | |
2231 | 2236 | | |
2232 | 2237 | | |
2233 | 2238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
144 | | - | |
| 143 | + | |
| 144 | + | |
145 | 145 | | |
| 146 | + | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| |||
0 commit comments