File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -551,15 +551,7 @@ contains
551551 ! Single- fluid cyl_coord: alpha is trivially 1 but drifts due to varying HLLC contact velocity across faces. Reset to
552552 ! prevent pressure NaN.
553553 if (num_fluids == 1 .and. cyl_coord .and. .not. bubbles_euler) then
554- $:GPU_PARALLEL_LOOP(collapse= 3 )
555- do l = 0 , p
556- do k = 0 , n
557- do j = 0 , m
558- q_cons_ts(1 )%vf(eqn_idx%adv%beg)%sf(j, k, l) = 1._wp
559- end do
560- end do
561- end do
562- $:END_GPU_PARALLEL_LOOP()
554+ call s_reset_single_fluid_alpha(q_cons_ts(1 )%vf)
563555 end if
564556
565557 if (ib) then
@@ -717,6 +709,25 @@ contains
717709
718710 end subroutine s_apply_bodyforces
719711
712+ !> Reset the single- fluid volume- fraction field to 1 , preventing per- stage drift caused by varying contact- wave speed across
713+ !! cylindrical faces.
714+ subroutine s_reset_single_fluid_alpha (q_cons_vf )
715+
716+ type(scalar_field), dimension (1 :sys_size), intent (inout ) :: q_cons_vf
717+ integer :: j, k, l
718+
719+ $:GPU_PARALLEL_LOOP(collapse= 3 )
720+ do l = 0 , p
721+ do k = 0 , n
722+ do j = 0 , m
723+ q_cons_vf(eqn_idx%adv%beg)%sf(j, k, l) = 1._wp
724+ end do
725+ end do
726+ end do
727+ $:END_GPU_PARALLEL_LOOP()
728+
729+ end subroutine s_reset_single_fluid_alpha
730+
720731 !> Update immersed boundary positions and velocities at the current Runge- Kutta stage
721732 subroutine s_propagate_immersed_boundaries (s )
722733
You can’t perform that action at this time.
0 commit comments