You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/simulation/m_ibm.fpp
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1016,23 +1016,30 @@ contains
1016
1016
do k = 0, p
1017
1017
ib_idx = ib_markers%sf(i, j, k)
1018
1018
if (ib_idx /= 0) then ! only need to compute the gradient for cells inside a IB
1019
-
if (patch_ib(ib_idx)%moving_ibm == 2) then
1019
+
if (patch_ib(ib_idx)%moving_ibm == 2) then ! make sure that this IB has 2-way coupling enabled
1020
1020
if (num_dims == 3) then
1021
1021
radial_vector = [x_cc(i), y_cc(j), z_cc(k)] - [patch_ib(ib_idx)%x_centroid, patch_ib(ib_idx)%y_centroid, patch_ib(ib_idx)%z_centroid] ! get the vector pointing to the grid cell
1022
1022
else
1023
1023
radial_vector = [x_cc(i), y_cc(j), 0._wp] - [patch_ib(ib_idx)%x_centroid, patch_ib(ib_idx)%y_centroid, 0._wp] ! get the vector pointing to the grid cell
1024
1024
end if
1025
+
1026
+
! use a finite difference to compute the 2D components of the gradient of the pressure and cell volume
0 commit comments