Repository navigation
2nd order IBM - #1958
2nd order IBM#1958danieljvickers wants to merge 9 commits into
Conversation
Lines of Code
|
…ljvickers/MFC into mittal-second-order-ibm-velocities
|
@sbryngelson This will be ready for merge once the test suite runs again |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82bd69ffab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (ib_second_order_vel) then | ||
| min_cell_width = min(dx(i), dy(j)) | ||
| if (p > 0) min_cell_width = min(min_cell_width, dz(k)) | ||
| ghost_points(q)%ip_dist = max(dist, ib_ip_min_dist*min_cell_width) |
There was a problem hiding this comment.
Carry the image distance through surface reconstruction
When ib_ip_min_dist*Δ exceeds abs(levelset) in a chemistry run with a prescribed-temperature or reacting IB, this assignment makes the gas-side image-point distance differ from the ghost-point distance, but s_ibm_correct_state still passes abs(gp%levelset) to the surface-flux solve at line 407 and s_blend_ghost_state extrapolates temperature and species with a unit distance ratio at lines 2204-2206. The resulting flux and ghost state no longer recover the requested wall state; use gp%ip_dist for IP-to-wall gradients and d_GP/d_IP for the ghost extrapolation, including the Stefan velocity. The registered second-order cases do not enable chemistry, so this accepted combination is currently unverified.
AGENTS.md reference: AGENTS.md:L5-L5
Useful? React with 👍 / 👎.
| end if | ||
|
|
||
| ! extrapolate linearly through the boundary intercept, Mittal et al. (2008) | ||
| if (ib_second_order_vel) vel_GP = vel_GP - abs(gp%levelset)/max(gp%ip_dist, sgm_eps)*(vel_IP - vel_GP) |
There was a problem hiding this comment.
Use linear-exact interpolation for second-order velocity
For an image point that is not symmetrically placed among its stencil centers, vel_IP comes from s_compute_interpolation_coeffs, whose normalized 1/dist**2 weights at lines 1017-1028 do not reproduce even a linear velocity field. This new no-slip extrapolation therefore propagates an O(h) image-velocity error into the ghost value and cannot provide the advertised second-order surface velocity; use bilinear/trilinear linear-exact weights or an equivalent correction. The added Circle -> second order vel goldens use only one n=49 grid, so they cannot verify the claimed convergence order.
AGENTS.md reference: AGENTS.md:L5-L5
Useful? React with 👍 / 👎.
| end if | ||
|
|
||
| ! extrapolate linearly through the boundary intercept, Mittal et al. (2008) | ||
| if (ib_second_order_vel) vel_GP = vel_GP - abs(gp%levelset)/max(gp%ip_dist, sgm_eps)*(vel_IP - vel_GP) |
There was a problem hiding this comment.
Evaluate rotating wall velocity at the boundary intercept
When ib_second_order_vel is used on a rotating no-slip moving IB (angular_vel != 0), the value in vel_GP before this line is the rigid-body velocity at the ghost center because radial_vector is built from physical_loc at lines 485-492. This extrapolation treats that value as u_BI, so it enforces Ω×(x_GP-C) at the intercept instead of Ω×(x_BI-C), leaving an O(h) tangential slip; build the rotation velocity from the boundary-intercept location before extrapolating. The registered second-order test leaves the body static, so this path is unverified.
AGENTS.md reference: AGENTS.md:L5-L5
Useful? React with 👍 / 👎.
|
Claude Code Review Head SHA: 82bd69f Files changed:
Findings:
Checked in step 4 (partial): |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1958 +/- ##
==========================================
+ Coverage 61.75% 61.90% +0.14%
==========================================
Files 86 86
Lines 22787 22893 +106
Branches 3357 3372 +15
==========================================
+ Hits 14073 14172 +99
+ Misses 6225 6221 -4
- Partials 2489 2500 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…(upstream PR MFlowCode#1958, 82bd69f) Re-applies Dan Vickers' PR MFlowCode#1958 unchanged on top of sync-upstream, where buried image points are already handled by upstream MFlowCode#1792 (interp_valid + averaging over corrected ghost points), so the local guard of fb84365 is no longer needed. The single-gas isothermal reflection uses the same d_GP/d_IP ratio so ib_ip_min_dist keeps the wall temperature consistent.
|
can you make a convergence plot for a curved interface (sphere/torus) and show 2nd order convergence of face and face flux values? that's what really validates the implementation (not smoother airfoil surfaces) |
Description
For no-slip walls, it was observed that artifacts form on the surface of IB surfaces, which hampers the analysis of surface quantities. I have implemented the 2nd-order method of Mittal et al. (2008), which gets enabled with additional case file parameters.
Improvement
Shown is a plot of the surface quantities of a no-slip airfoil in a mach 0.3 flow with Reynolds number of 1000. On the left is the 1st order method in master, and on the right is the 2nd order method implemented here.
