@@ -26,7 +26,7 @@ module m_ibm
2626 implicit none
2727
2828 private :: s_compute_image_points, s_compute_interpolation_coeffs, s_interpolate_image_point, s_find_ghost_points, &
29- & s_find_num_ghost_points
29+ & s_find_num_ghost_points, s_compute_ghost_point_pressure, s_compute_ghost_point_velocity
3030 ; public :: s_initialize_ibm_module, s_ibm_setup, s_ibm_correct_state, s_finalize_ibm_module
3131
3232 type(integer_field), public :: ib_markers
@@ -157,20 +157,9 @@ contains
157157 pres_GP = 0._wp
158158 $:GPU_LOOP(parallelism= ' [seq]' )
159159 do q = 1 , num_fluids
160- select case (eoss(q))
161- case (eos_ideal_gas, eos_stiffened_gas)
162- ! Pressure correction for moving IB: accounts for acceleration of IB surface
163- pres_GP = pres_GP + pres_IP/ (1._wp - 2._wp * abs (gp%levelset* alpha_rho_IP(q)/ pres_IP) &
164- & * dot_product (patch_ib(gp_patch_id)%force/ patch_ib(gp_patch_id)%mass, &
165- & gp%levelset_norm))
166- case default
167- ! TODO: moving- IB pressure correction is not yet derived for state- dependent EOS
168- ! (Mie- Gruneisen/ JWL/ Vinet); wire up the correct formula in a follow- up PR.
169- #ifndef MFC_GPU
170- call s_mpi_abort(' s_compute_ghost_point_pressure: moving IB pressure correction is only ' &
171- & // ' implemented for eos_ideal_gas/eos_stiffened_gas' )
172- #endif
173- end select
160+ ! Pressure correction for moving IB: accounts for acceleration of IB surface
161+ pres_GP = pres_GP + pres_IP/ (1._wp - 2._wp * abs (gp%levelset* alpha_rho_IP(q)/ pres_IP) &
162+ & * dot_product (patch_ib(gp_patch_id)%force/ patch_ib(gp_patch_id)%mass, gp%levelset_norm))
174163 end do
175164
176165 end subroutine s_compute_ghost_point_pressure
@@ -249,7 +238,7 @@ contains
249238 real (wp) :: G_K
250239 real (wp) :: qv_K
251240 real (wp) :: pres_IP, pres_GP
252- real (wp), dimension (3 ) :: vel_IP, vel_norm_IP
241+ real (wp), dimension (3 ) :: vel_IP
253242 real (wp) :: c_IP
254243
255244 #:if not MFC_CASE_OPTIMIZATION and USING_AMD
@@ -269,18 +258,13 @@ contains
269258 #:endif
270259 real (wp) :: alpha_q, alpha_rho_q, e_q
271260 real (wp) :: T_IP, mw_IP, e_IP !< Image- point temperature, mixture MW, and mass- specific internal energy (chemistry)
272- real (wp) :: v_blow_eff !< Effective surface blowing speed (after any pressure- coupled burn- rate scaling)
273261 ! Primitive variables at the image point associated with a ghost point, interpolated from surrounding fluid cells.
274262
275- real (wp), dimension (3 ) :: norm !< Normal vector from GP to IP
276- real (wp), dimension (3 ) :: physical_loc !< Physical loc of GP
277- real (wp), dimension (3 ) :: vel_g !< Velocity of GP
278- real (wp), dimension (3 ) :: radial_vector !< vector from centroid to ghost point
279- real (wp), dimension (3 ) :: rotation_velocity !< speed of the ghost point due to rotation
263+ real (wp), dimension (3 ) :: physical_loc !< Physical loc of GP
264+ real (wp), dimension (3 ) :: vel_g !< Velocity of GP
265+ real (wp), dimension (3 ) :: radial_vector !< vector from centroid to ghost point
280266 real (wp) :: nbub
281- real (wp) :: buf
282267 type(ghost_point) :: gp
283- type(ghost_point) :: innerp
284268
285269 ! set the Moving IBM interior conservative variables
286270 $:GPU_PARALLEL_LOOP(private= ' [i, j, k, patch_id, rho]' , collapse= 3 )
@@ -318,9 +302,9 @@ contains
318302
319303 if (num_gps > 0 ) then
320304 $:GPU_PARALLEL_LOOP(private= ' [i, physical_loc, dyn_pres, alpha_rho_IP, alpha_IP, pres_IP, pres_GP, vel_IP, vel_g, &
321- & vel_norm_IP, r_IP, v_IP, pb_IP, mv_IP, nmom_IP, presb_IP, massv_IP, rho, gamma, pi_inf, Re_K, &
322- & G_K, Gs, gp, innerp, norm, buf, radial_vector, rotation_velocity, j, k, l, q, qv_K, c_IP, nbub , &
323- & patch_id, Ys_IP, T_IP, mw_IP, e_IP, v_blow_eff, vel_sum_g, E_ghost, alpha_q, alpha_rho_q, e_q]' )
305+ & r_IP, v_IP, pb_IP, mv_IP, nmom_IP, presb_IP, massv_IP, rho, gamma, pi_inf, Re_K, G_K, Gs, gp , &
306+ & radial_vector, j, k, l, q, qv_K, c_IP, nbub, patch_id, Ys_IP, T_IP, mw_IP, e_IP, vel_sum_g , &
307+ & E_ghost, alpha_q, alpha_rho_q, e_q]' )
324308 do i = 1 , num_gps
325309 gp = ghost_points(i)
326310 j = gp%loc(1 )
0 commit comments