@@ -162,7 +162,7 @@ contains
162162
163163 end subroutine s_initialize_bubbles_EL_module
164164
165- !> The purpose of this procedure is to start the lagrange bubble parameters applying nondimensionalization if needed
165+ !> The purpose of this procedure is to start lagrange bubble parameters applying nondimensionalization if needed
166166 subroutine s_start_lagrange_inputs()
167167
168168 integer :: id_bubbles, id_host
@@ -197,7 +197,7 @@ contains
197197 Web = 1d0/ss
198198 Re_inv = mul0
199199
200- ! Need improvement to accept polytropic gas compression, isothermal and adiabatic thermal models, and
200+ ! Need improvements to accept polytropic gas compression, isothermal and adiabatic thermal models, and
201201 ! the Gilmore and RP bubble models.
202202 polytropic = .false. ! Forcing no polytropic model
203203 thermal = 3 ! Forcing constant transfer coefficient model based on Preston et al., 2007
@@ -594,7 +594,7 @@ contains
594594 end do
595595 call s_convert_species_to_mixture_variables_acc(rhol, gamma, pi_inf, qv, myalpha, &
596596 myalpha_rho, Re, cell(1 ), cell(2 ), cell(3 ))
597- call s_compute_cson_from_pinf(q_prim_vf, pinf, cell, rhol, gamma, pi_inf, cson)
597+ call s_compute_cson_from_pinf(k, q_prim_vf, pinf, cell, rhol, gamma, pi_inf, cson)
598598
599599 ! Velocity correction due to massflux
600600 velint = fV - gas_dmvdt(k, stage)/ (4d0 * pi* fR** 2d0 * rhol)
@@ -641,18 +641,20 @@ contains
641641 !! @param gamma Liquid specific heat ratio
642642 !! @param pi_inf Liquid stiffness
643643 !! @param cson Calculated speed of sound
644- subroutine s_compute_cson_from_pinf (q_prim_vf , pinf , cell , rhol , gamma , pi_inf , cson )
644+ subroutine s_compute_cson_from_pinf (bub_id , q_prim_vf , pinf , cell , rhol , gamma , pi_inf , cson )
645645#ifdef _CRAYFTN
646646 !DIR$ INLINEALWAYS s_compute_cson_from_pinf
647647#else
648648 !$acc routine seq
649649#endif
650+ integer , intent (in ) :: bub_id
650651 type(scalar_field), dimension (sys_size), intent (in ) :: q_prim_vf
651652 real (kind (0d0 )), intent (in ) :: pinf, rhol, gamma, pi_inf
652653 integer , dimension (3 ), intent (in ) :: cell
653654 real (kind (0d0 )), intent (out ) :: cson
654655
655656 real (kind (0d0 )) :: E, H
657+ real (kind (0d0 )), dimension (3 ) :: scoord
656658 real (kind (0d0 )), dimension (num_dims) :: vel
657659 integer :: i
658660
@@ -815,7 +817,7 @@ contains
815817 real (kind (0d0 )), intent (out ), optional :: preterm1, term2, Romega
816818
817819 real (kind (0d0 )), dimension (3 ) :: scoord, psi
818- real (kind (0d0 )) :: dc, vol, aux
820+ real (kind (0d0 )) :: dc, vol, aux, dist
819821 real (kind (0d0 )) :: volgas, term1, Rbeq, denom
820822 real (kind (0d0 )) :: charvol, charpres, charvol2, charpres2
821823 integer , dimension (3 ) :: cellaux
@@ -1427,6 +1429,7 @@ contains
14271429 if (scoord(i) < 0.0d0 ) cell(i) = cell(i) - 1
14281430 end do
14291431
1432+
14301433 end subroutine s_locate_cell
14311434
14321435 !> This subroutine transfer data into the temporal variables.
@@ -1530,20 +1533,18 @@ contains
15301533 integer , intent (in ) :: dir
15311534
15321535 integer :: i, j, k
1533- real (kind (0d0 )) :: aux1, aux2
15341536
15351537 if (dir == 1 ) then
15361538 ! Gradient in x dir.
15371539 !$acc parallel loop collapse(3 ) gang vector default(present)
15381540 do k = 0 , p
15391541 do j = 0 , n
15401542 do i = 0 , m
1541- aux1 = dx(i) + dx(i - 1 )
1542- aux2 = dx(i) + dx(i + 1 )
15431543 dq%sf(i, j, k) = q%sf(i, j, k)* (dx(i + 1 ) - dx(i - 1 )) &
1544- + q%sf(i + 1 , j, k)* aux1 &
1545- - q%sf(i - 1 , j, k)* aux2
1546- dq%sf(i, j, k) = dq%sf(i, j, k)/ (aux1* aux2)
1544+ + q%sf(i + 1 , j, k)* (dx(i) + dx(i - 1 )) &
1545+ - q%sf(i - 1 , j, k)* (dx(i) + dx(i + 1 ))
1546+ dq%sf(i, j, k) = dq%sf(i, j, k) / &
1547+ ((dx(i) + dx(i - 1 ))* (dx(i) + dx(i + 1 )))
15471548 end do
15481549 end do
15491550 end do
@@ -1554,12 +1555,11 @@ contains
15541555 do k = 0 , p
15551556 do j = 0 , n
15561557 do i = 0 , m
1557- aux1 = dy(j) + dy(j - 1 )
1558- aux2 = dy(j) + dy(j + 1 )
15591558 dq%sf(i, j, k) = q%sf(i, j, k)* (dy(j + 1 ) - dy(j - 1 )) &
1560- + q%sf(i, j + 1 , k)* aux1 &
1561- - q%sf(i, j - 1 , k)* aux2
1562- dq%sf(i, j, k) = dq%sf(i, j, k)/ (aux1* aux2)
1559+ + q%sf(i, j + 1 , k)* (dy(j) + dy(j - 1 )) &
1560+ - q%sf(i, j - 1 , k)* (dy(j) + dy(j + 1 ))
1561+ dq%sf(i, j, k) = dq%sf(i, j, k) / &
1562+ ((dy(j) + dy(j - 1 ))* (dy(j) + dy(j + 1 )))
15631563 end do
15641564 end do
15651565 end do
@@ -1569,12 +1569,11 @@ contains
15691569 do k = 0 , p
15701570 do j = 0 , n
15711571 do i = 0 , m
1572- aux1 = dz(k) + dz(k - 1 )
1573- aux2 = dz(k) + dz(k + 1 )
15741572 dq%sf(i, j, k) = q%sf(i, j, k)* (dz(k + 1 ) - dz(k - 1 )) &
1575- + q%sf(i, j, k + 1 )* aux1 &
1576- - q%sf(i, j, k - 1 )* aux2
1577- dq%sf(i, j, k) = dq%sf(i, j, k)/ (aux1* aux2)
1573+ + q%sf(i, j, k + 1 )* (dz(k) + dz(k - 1 )) &
1574+ - q%sf(i, j, k - 1 )* (dz(k) + dz(k + 1 ))
1575+ dq%sf(i, j, k) = dq%sf(i, j, k) / &
1576+ ((dz(k) + dz(k - 1 ))* (dz(k) + dz(k + 1 )))
15781577 end do
15791578 end do
15801579 end do
0 commit comments