Repository navigation
IBM: TSC image points of an injecting body sample fluid cells only - #2252
Draft
sbryngelson wants to merge 1 commit into
Draft
sbryngelson wants to merge 1 commit into
sbryngelson wants to merge 1 commit into
Conversation
An injecting body's ghost cells hold the imposed injectant state, not a mirror of the gas. With ib_ip_interp = 2 the 3x3 stencil weighted them, so the injected state fed back into its own image point. Zero the solid cells of the stencil for bodies with inj_species > 0 and renormalise, as the inverse-distance stencil already does. Adds a golden-file test.
Lines of Code
|
|
Claude Code Review Head SHA: 5672e63 Files changed:
Findings: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With
ib_ip_interp = 2(TSC), the 3x3 stencil around the image point of an injecting body (patch_ib%inj_species > 0) weights solid cells. Those cells are the body's own ghost cells, which hold the imposed injectant state rather than a mirror of the gas, so the injected state feeds back into its own image point. This change zeroes the solid cells of the stencil for injecting bodies and renormalises, which is what the inverse-distance stencil (ib_ip_interp = 1) already does. Non-injecting bodies andib_ip_interp = 1are unchanged.Evidence
Hand runs on Tuolumne (MI300A, amdflang,
--gpu mp), 1 rank, cylinder in a closed chamber, no-slip,v_blow = 20 m/s, quarter-length runs (reacting) or full length (inert). "IDW" isib_ip_interp = 1, the reference. Shell s1 is the first fluid shell, 1 to 2 cells off the wall.Inert N2 injection into O2/Ar at 300 K (reactions off), injected mass flux over
v_blow(kg/m3) and shell density range:Reacting H2 injection into hot O2/Ar (
examples/2D_ibm_burning_grain), first-shell H2 mass flux overv_blowand shell density range, at 1/4 of the run:examples/2D_ibm_flameholder(4 cells/D, 1/8 of the run) shows the same: first-shell flux 0.0049 (IDW), 0.0197 (master TSC), 0.0048 (patch); minimum shell density 0.046, 0.198, 0.047.Species stay in [0, 1] and no NaN appears in any of these runs on either build. The master TSC value is the near-wall H2 density of pure H2 at a far lower temperature than the case's, the signature of the injected state being sampled back.
Tests
2D -> IBM -> Injecting Body -> ib_ip_interp=2(burning-grain Example at 25x25, 50 steps, tolerance 1e-3). Its golden passes on the patch and fails on master.Thermostatcases, relative error 2.5e-6 against a 1e-6 tolerance; they fail identically, with the same errors, on unmodified master on this machine, and do not useinj_species)../mfc.sh precheckpasses.Limitations
--gpu mp); not on NVHPC or Cray CCE here.ib_ip_interp = 1as well as with the patch, so that is not related to this change; the comparisons above stop before it.This PR was made with Claude Code (AI).