@@ -251,7 +251,7 @@ contains
251251 end do
252252 close (94 )
253253 else
254- stop " if you include lagrange bubbles, you have to initialize them in input/lag_bubbles.dat"
254+ stop " Lagrange bubbles: you have to initialize them in input/lag_bubbles.dat"
255255 end if
256256 else
257257 if (proc_rank == 0 ) print * , ' Restarting lagrange bubbles at save_count: ' , save_count
@@ -338,6 +338,16 @@ contains
338338 cell = - buff_size
339339 call s_locate_cell(mtn_pos(bub_id, 1 :3 , 1 ), cell, mtn_s(bub_id, 1 :3 , 1 ))
340340
341+ ! Check if the bubble is located in the ghost cell of a symmetric boundary
342+ if (bc_x%beg == - 2 .and. cell(1 ) < 0 ) stop " Lagrange bubble is in the ghost cells of a symmetric boundary (bc_x%beg)."
343+ if (bc_x%end == - 2 .and. cell(1 ) > m) stop " Lagrange bubble is in the ghost cells of a symmetric boundary (bc_x%end)."
344+ if (bc_y%beg == - 2 .and. cell(2 ) < 0 ) stop " Lagrange bubble is in the ghost cells of a symmetric boundary (bc_y%beg)."
345+ if (bc_y%end == - 2 .and. cell(2 ) > n) stop " Lagrange bubble is in the ghost cells of a symmetric boundary (bc_y%end)."
346+ if (p > 0 ) then
347+ if (bc_z%beg == - 2 .and. cell(3 ) < 0 ) stop " Lagrange bubble is in the ghost cells of a symmetric boundary (bc_z%beg)."
348+ if (bc_z%end == - 2 .and. cell(3 ) > p) stop " Lagrange bubble is in the ghost cells of a symmetric boundary (bc_z%end)."
349+ end if
350+
341351 ! If particle is in the ghost cells, find the closest non- ghost cell
342352 cell(1 ) = min (max (cell(1 ), 0 ), m)
343353 cell(2 ) = min (max (cell(2 ), 0 ), n)
@@ -366,17 +376,15 @@ contains
366376 gas_mv(bub_id, 1 ) = pv* volparticle* (1._wp / (R_v* Tw))* (massflag) ! vapermass
367377 gas_mg(bub_id) = (gas_p(bub_id, 1 ) - pv* (massflag))* volparticle* (1._wp / (R_n* Tw)) ! gasmass
368378 if (gas_mg(bub_id) <= 0._wp ) then
369- stop ' the initial mass of gas inside the bubble is negative. Check your initial conditions'
379+ stop " The initial mass of gas inside the bubble is negative. Check your initial conditions. "
370380 end if
371381 totalmass = gas_mg(bub_id) + gas_mv(bub_id, 1 ) ! totalmass
372382
373383 ! Bubble natural frequency
374384 concvap = gas_mv(bub_id, 1 )/ (gas_mv(bub_id, 1 ) + gas_mg(bub_id))
375385 omegaN = (3._wp * (gas_p(bub_id, 1 ) - pv* (massflag)) + 4._wp * (1._wp / Web)/ bub_R0(bub_id))/ rhol
376386 if (pv* (massflag) > gas_p(bub_id, 1 )) then
377- print * , ' Not allowed: bubble initially located in a region with pressure below the vapor pressure'
378- print * , ' location:' , mtn_pos(bub_id, 1 :3 , 1 )
379- stop
387+ stop " Lagrange bubble initially located in a region with pressure below the vapor pressure."
380388 end if
381389 omegaN = sqrt (omegaN/ bub_R0(bub_id)** 2._wp )
382390
@@ -906,11 +914,7 @@ contains
906914 ! Bubble dynamic closure from Maeda and Colonius (2018 )
907915
908916 ! Range of cells included in Omega
909- if (lag_params%smooth_type == 1 ) then
910- mapCells_pinf = mapCells
911- else
912- stop " lag_params%cluster_type: 2 requires lag_params%smooth_type: 1."
913- end if
917+ mapCells_pinf = mapCells
914918
915919 ! Include the cell that contains the bubble (mapCells+1 + mapCells)
916920 smearGrid = mapCells_pinf - (- mapCells_pinf) + 1
@@ -987,9 +991,6 @@ contains
987991 f_pinfl = charpres2/ charvol2
988992 vol = charvol
989993 dc = (3._wp * abs (vol)/ (4._wp * pi))** (1._wp / 3._wp )
990- else
991-
992- stop " Check cluterflag. Exiting."
993994
994995 end if
995996
@@ -1038,7 +1039,6 @@ contains
10381039 mtn_vel(k, 1 :3 , 1 ) = mtn_vel(k, 1 :3 , 1 ) + dt* mtn_dveldt(k, 1 :3 , 1 )
10391040 gas_p(k, 1 ) = gas_p(k, 1 ) + dt* gas_dpdt(k, 1 )
10401041 gas_mv(k, 1 ) = gas_mv(k, 1 ) + dt* gas_dmvdt(k, 1 )
1041- if (intfc_rad(k, 1 ) <= 0._wp ) stop " Negative bubble radius encountered, please reduce dt"
10421042 end do
10431043
10441044 call s_transfer_data_to_tmp()
@@ -1061,7 +1061,6 @@ contains
10611061 mtn_vel(k, 1 :3 , 2 ) = mtn_vel(k, 1 :3 , 1 ) + dt* mtn_dveldt(k, 1 :3 , 1 )
10621062 gas_p(k, 2 ) = gas_p(k, 1 ) + dt* gas_dpdt(k, 1 )
10631063 gas_mv(k, 2 ) = gas_mv(k, 1 ) + dt* gas_dmvdt(k, 1 )
1064- if (intfc_rad(k, 2 ) <= 0._wp ) stop " Negative bubble radius encountered, please reduce dt"
10651064 end do
10661065
10671066 elseif (stage == 2 ) then
@@ -1074,7 +1073,6 @@ contains
10741073 mtn_vel(k, 1 :3 , 1 ) = mtn_vel(k, 1 :3 , 1 ) + dt* (mtn_dveldt(k, 1 :3 , 1 ) + mtn_dveldt(k, 1 :3 , 2 ))/ 2._wp
10751074 gas_p(k, 1 ) = gas_p(k, 1 ) + dt* (gas_dpdt(k, 1 ) + gas_dpdt(k, 2 ))/ 2._wp
10761075 gas_mv(k, 1 ) = gas_mv(k, 1 ) + dt* (gas_dmvdt(k, 1 ) + gas_dmvdt(k, 2 ))/ 2._wp
1077- if (intfc_rad(k, 1 ) <= 0._wp ) stop " Negative bubble radius encountered, please reduce dt"
10781076 end do
10791077
10801078 call s_transfer_data_to_tmp()
@@ -1099,7 +1097,6 @@ contains
10991097 mtn_vel(k, 1 :3 , 2 ) = mtn_vel(k, 1 :3 , 1 ) + dt* mtn_dveldt(k, 1 :3 , 1 )
11001098 gas_p(k, 2 ) = gas_p(k, 1 ) + dt* gas_dpdt(k, 1 )
11011099 gas_mv(k, 2 ) = gas_mv(k, 1 ) + dt* gas_dmvdt(k, 1 )
1102- if (intfc_rad(k, 2 ) <= 0._wp ) stop " Negative bubble radius encountered, please reduce dt"
11031100 end do
11041101
11051102 elseif (stage == 2 ) then
@@ -1112,7 +1109,6 @@ contains
11121109 mtn_vel(k, 1 :3 , 2 ) = mtn_vel(k, 1 :3 , 1 ) + dt* (mtn_dveldt(k, 1 :3 , 1 ) + mtn_dveldt(k, 1 :3 , 2 ))/ 4._wp
11131110 gas_p(k, 2 ) = gas_p(k, 1 ) + dt* (gas_dpdt(k, 1 ) + gas_dpdt(k, 2 ))/ 4._wp
11141111 gas_mv(k, 2 ) = gas_mv(k, 1 ) + dt* (gas_dmvdt(k, 1 ) + gas_dmvdt(k, 2 ))/ 4._wp
1115- if (intfc_rad(k, 2 ) <= 0._wp ) stop " Negative bubble radius encountered, please reduce dt"
11161112 end do
11171113 elseif (stage == 3 ) then
11181114 !$acc parallel loop gang vector default(present) private(k)
@@ -1124,7 +1120,6 @@ contains
11241120 mtn_vel(k, 1 :3 , 1 ) = mtn_vel(k, 1 :3 , 1 ) + (2._wp / 3._wp )* dt* (mtn_dveldt(k, 1 :3 , 1 )/ 4._wp + mtn_dveldt(k, 1 :3 , 2 )/ 4._wp + mtn_dveldt(k, 1 :3 , 3 ))
11251121 gas_p(k, 1 ) = gas_p(k, 1 ) + (2._wp / 3._wp )* dt* (gas_dpdt(k, 1 )/ 4._wp + gas_dpdt(k, 2 )/ 4._wp + gas_dpdt(k, 3 ))
11261122 gas_mv(k, 1 ) = gas_mv(k, 1 ) + (2._wp / 3._wp )* dt* (gas_dmvdt(k, 1 )/ 4._wp + gas_dmvdt(k, 2 )/ 4._wp + gas_dmvdt(k, 3 ))
1127- if (intfc_rad(k, 1 ) <= 0._wp ) stop " Negative bubble radius encountered, please reduce dt"
11281123 end do
11291124
11301125 call s_transfer_data_to_tmp()
0 commit comments