Skip to content

Commit b3506d4

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 333da8a commit b3506d4

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
@@ -943,7 +943,7 @@ contains
943943
if (bc_${XYZ}$%grcbc_in) then
944944
$:GPU_LOOP(parallelism='[seq]')
945945
do i = 2, momxb
946-
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}$)
946+
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}$)
947947
end do
948948
if (n > 0) then
949949
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)