Skip to content

Commit 52e1010

Browse files
sbryngelsonclaude
andcommitted
Fix GRCBC subsonic inflow using wrong L index
In the GRCBC subsonic inflow loop (do i = 2, momxb), L(2) was hardcoded instead of L(i), causing only the second wave amplitude to be updated rather than each wave amplitude in the loop. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 83d2618 commit 52e1010

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/simulation/m_cbc.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ contains
930930
if (bc_${XYZ}$%grcbc_in) then
931931
$:GPU_LOOP(parallelism='[seq]')
932932
do i = 2, momxb
933-
L(2) = c**3._wp*Ma*(alpha_rho(i - 1) - alpha_rho_in(i - 1, ${CBC_DIR}$))/Del_in(${CBC_DIR}$) - c*Ma*(pres - pres_in(${CBC_DIR}$))/Del_in(${CBC_DIR}$)
933+
L(i) = c**3._wp*Ma*(alpha_rho(i - 1) - alpha_rho_in(i - 1, ${CBC_DIR}$))/Del_in(${CBC_DIR}$) - c*Ma*(pres - pres_in(${CBC_DIR}$))/Del_in(${CBC_DIR}$)
934934
end do
935935
if (n > 0) then
936936
L(momxb + 1) = c*Ma*(vel(dir_idx(2)) - vel_in(${CBC_DIR}$, dir_idx(2)))/Del_in(${CBC_DIR}$)

0 commit comments

Comments
 (0)