Skip to content

Commit 94b6623

Browse files
Diego VacaDiego Vaca
authored andcommitted
Add adap_dt to bubbles_lagrange (with format)
1 parent 903aa93 commit 94b6623

File tree

2 files changed

+28
-18
lines changed

2 files changed

+28
-18
lines changed

src/simulation/m_bubbles.fpp

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ contains
3737
!! @param fBtait Tait EOS parameter
3838
!! @param f_bub_adv_src Source for bubble volume fraction
3939
!! @param f_divu Divergence of velocity
40+
!! @param fCson Speed of sound from fP (EL)
4041
function f_rddot(fRho, fP, fR, fV, fR0, fpb, fpbdot, alf, fntait, fBtait, f_bub_adv_src, f_divu, fCson)
4142
!$acc routine seq
4243
real(wp), intent(in) :: fRho, fP, fR, fV, fR0, fpb, fpbdot, alf
@@ -340,6 +341,8 @@ contains
340341
!! @param iR0 Bubble size index (EE) or bubble identifier (EL)
341342
!! @param fmass_n Current gas mass (EL)
342343
!! @param fbeta_c Mass transfer coefficient (EL)
344+
!! @param fR_m Mixture gas constant (EL)
345+
!! @param fgamma_m Mixture gamma (EL)
343346
function f_vflux(fR, fV, fpb, fmass_v, iR0, fmass_n, fbeta_c, fR_m, fgamma_m)
344347
!$acc routine seq
345348
real(wp), intent(in) :: fR
@@ -398,7 +401,6 @@ contains
398401
!! @param fbeta_t Mass transfer coefficient (EL)
399402
!! @param fR_m Mixture gas constant (EL)
400403
!! @param fgamma_m Mixture gamma (EL)
401-
!! @param fconc_v Current vapor concentration (EL)
402404
function f_bpres_dot(fvflux, fR, fV, fpb, fmass_v, iR0, fbeta_t, fR_m, fgamma_m)
403405
!$acc routine seq
404406
real(wp), intent(in) :: fvflux
@@ -456,9 +458,9 @@ contains
456458
!! @param fbeta_t Heat transfer coefficient (EL)
457459
!! @param fCson Speed of sound (EL)
458460
subroutine s_advance_step(fRho, fP, fR, fV, fR0, fpb, fpbdot, alf, &
459-
fntait, fBtait, f_bub_adv_src, f_divu, &
460-
bub_id, fmass_v, fmass_n, fbeta_c, &
461-
fbeta_t, fCson)
461+
fntait, fBtait, f_bub_adv_src, f_divu, &
462+
bub_id, fmass_v, fmass_n, fbeta_c, &
463+
fbeta_t, fCson)
462464
#ifdef _CRAYFTN
463465
!DIR$ INLINEALWAYS s_advance_step
464466
#else
@@ -477,7 +479,7 @@ contains
477479
real(wp), dimension(4) :: myR_tmp1, myV_tmp1, myR_tmp2, myV_tmp2 !< Bubble radius, radial velocity, and radial acceleration for the inner loop
478480
real(wp), dimension(4) :: myPb_tmp1, myMv_tmp1, myPb_tmp2, myMv_tmp2 !< Gas pressure and vapor mass for the inner loop (EL)
479481

480-
tol = 1e-4_wp
482+
tol = 1e-4_wp ! Tolerance value
481483

482484
h = f_initial_substep_h(fRho, fP, fR, fV, fR0, fpb, fpbdot, alf, &
483485
fntait, fBtait, f_bub_adv_src, f_divu, fCson)
@@ -577,10 +579,10 @@ contains
577579
!! @param fBtait Tait EOS parameter
578580
!! @param f_bub_adv_src Source for bubble volume fraction
579581
!! @param f_divu Divergence of velocity
580-
!! @param h Time step size
582+
!! @param fCson Speed of sound (EL)
581583
function f_initial_substep_h(fRho, fP, fR, fV, fR0, fpb, fpbdot, alf, &
582-
fntait, fBtait, f_bub_adv_src, f_divu, &
583-
fCson)
584+
fntait, fBtait, f_bub_adv_src, f_divu, &
585+
fCson)
584586
!$acc routine seq
585587
real(wp), intent(IN) :: fRho, fP, fR, fV, fR0, fpb, fpbdot, alf
586588
real(wp), intent(IN) :: fntait, fBtait, f_bub_adv_src, f_divu
@@ -645,15 +647,22 @@ contains
645647
!! @param fBtait Tait EOS parameter
646648
!! @param f_bub_adv_src Source for bubble volume fraction
647649
!! @param f_divu Divergence of velocity
650+
!! @param bub_id Bubble identifier (EL)
651+
!! @param fmass_v Current mass of vapour (EL)
652+
!! @param fmass_n Current mass of gas (EL)
653+
!! @param fbeta_c Mass transfer coefficient (EL)
654+
!! @param fbeta_t Heat transfer coefficient (EL)
655+
!! @param fCson Speed of sound (EL)
648656
!! @param h Time step size
649657
!! @param myR_tmp Bubble radius at each stage
650658
!! @param myV_tmp Bubble radial velocity at each stage
651-
!! @param err Estimated error
659+
!! @param myPb_tmp Internal bubble pressure at each stage (EL)
660+
!! @param myMv_tmp Mass of vapor in the bubble at each stage (EL)
652661
function f_advance_substep(fRho, fP, fR, fV, fR0, fpb, fpbdot, alf, &
653-
fntait, fBtait, f_bub_adv_src, f_divu, &
654-
bub_id, fmass_v, fmass_n, fbeta_c, &
655-
fbeta_t, fCson, h, &
656-
myR_tmp, myV_tmp, myPb_tmp, myMv_tmp)
662+
fntait, fBtait, f_bub_adv_src, f_divu, &
663+
bub_id, fmass_v, fmass_n, fbeta_c, &
664+
fbeta_t, fCson, h, &
665+
myR_tmp, myV_tmp, myPb_tmp, myMv_tmp)
657666
!$acc routine seq
658667
real(wp), intent(IN) :: fRho, fP, fR, fV, fR0, fpb, fpbdot, alf
659668
real(wp), intent(IN) :: fntait, fBtait, f_bub_adv_src, f_divu, h

src/simulation/m_bubbles_EL.fpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ module m_bubbles_EL
5959
!$acc gas_dpdt, gas_dmvdt, mtn_dposdt, mtn_dveldt)
6060
6161
integer, private :: lag_num_ts !< Number of time stages in the time-stepping scheme
62-
62+
6363
!$acc declare create(lag_num_ts)
6464
6565
integer :: nBubs !< Number of bubbles in the local domain
@@ -486,6 +486,7 @@ contains
486486
!! @param q_cons_vf Conservative variables
487487
!! @param q_prim_vf Primitive variables
488488
!! @param rhs_vf Calculated change of conservative variables
489+
!! @param t_step Current time step
489490
!! @param stage Current stage in the time-stepper algorithm
490491
subroutine s_compute_bubble_EL_dynamics(q_cons_vf, q_prim_vf, t_step, rhs_vf, stage)
491492

@@ -580,11 +581,11 @@ contains
580581

581582
else
582583

583-
! Radial acceleration from bubble models
584+
! Radial acceleration from bubble models
584585
intfc_dveldt(k, stage) = f_rddot(myRho, myPinf, myR, myV, myR0, &
585-
myPb, myPbdot, dmalf, dmntait, dmBtait, &
586-
dm_bub_adv_src, dm_divu, &
587-
myCson)
586+
myPb, myPbdot, dmalf, dmntait, dmBtait, &
587+
dm_bub_adv_src, dm_divu, &
588+
myCson)
588589
intfc_draddt(k, stage) = myV
589590
gas_dmvdt(k, stage) = myMvdot
590591
gas_dpdt(k, stage) = myPbdot

0 commit comments

Comments
 (0)