Skip to content

Commit 40ac592

Browse files
committed
Revert "Made bubble functions pure"
This reverts commit 2090b48.
1 parent 9ac36aa commit 40ac592

File tree

1 file changed

+21
-46
lines changed

1 file changed

+21
-46
lines changed

src/simulation/m_bubbles.fpp

Lines changed: 21 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,14 @@ contains
266266
real(wp), intent(in) :: fR0, fR, fV, fpb
267267
<<<<<<< HEAD
268268
real(wp), intent(in) :: gam_l, Ca_l, Web_l, Re_inv_l
269-
logical, intent(in) :: polytropic_l
269+
logical, intent(in) :: polytropic_l
270270

271271
real(wp) :: f_cpbw_KM
272272

273273
if (polytropic_l) then
274274
f_cpbw_KM = Ca_l*((fR0/fR)**(3._wp*gam_l)) - Ca_l + 1._wp
275275
if (.not. f_is_default(Web_l)) f_cpbw_KM = f_cpbw_KM + &
276+
<<<<<<< HEAD
276277
(2._wp/(Web_l*fR0))*((fR0/fR)**(3._wp*gam_l))
277278
=======
278279

@@ -283,6 +284,9 @@ contains
283284
if (.not. f_is_default(Web)) f_cpbw_KM = f_cpbw_KM + &
284285
(2._wp/(Web*fR0))*((fR0/fR)**(3._wp*gam))
285286
>>>>>>> parent of 1c9d815a (Refactoring functions to not use globals)
287+
=======
288+
(2._wp/(Web_l*fR0))*((fR0/fR)**(3._wp*gam_l))
289+
>>>>>>> parent of 2090b48f (Made bubble functions pure)
286290
else
287291
f_cpbw_KM = fpb
288292
end if
@@ -327,13 +331,17 @@ contains
327331
if (polytropic_l) then
328332
cdot_star = -3._wp*gam_l*Ca_l*((fR0/fR)**(3._wp*gam_l))*fV/fR
329333
if (.not. f_is_default(Web_l)) cdot_star = cdot_star - &
334+
<<<<<<< HEAD
330335
3._wp*gam_l*(2._wp/(Web_l*fR0))*((fR0/fR)**(3._wp*gam_l))*fV/fR
331336
=======
332337
if (polytropic) then
333338
cdot_star = -3._wp*gam*Ca*((fR0/fR)**(3._wp*gam))*fV/fR
334339
if (.not. f_is_default(Web)) cdot_star = cdot_star - &
335340
3._wp*gam*(2._wp/(Web*fR0))*((fR0/fR)**(3._wp*gam))*fV/fR
336341
>>>>>>> parent of 1c9d815a (Refactoring functions to not use globals)
342+
=======
343+
3._wp*gam_l*(2._wp/(Web_l*fR0))*((fR0/fR)**(3._wp*gam_l))*fV/fR
344+
>>>>>>> parent of 2090b48f (Made bubble functions pure)
337345
else
338346
cdot_star = fpbdot
339347
end if
@@ -378,30 +386,14 @@ contains
378386
!> Function that computes the vapour flux
379387
!! @param fR Current bubble radius
380388
!! @param fV Current bubble velocity
389+
!! @param fpb
381390
!! @param fmass_v Current mass of vapour
382391
!! @param iR0 Bubble size index (EE) or bubble identifier (EL)
383-
<<<<<<< HEAD
384-
!! @param mass_n0_l Physical Bubble parameter (pass in from global parameters)
385-
!! @param Re_trans_c_l Physical Bubble parameter (pass in from global parameters)
386-
!! @param chi_vw_l Bubble wall properties (pass in from Bubble Module)
387-
!! @param rho_mw_l Bubble wall properties (pass in from Bubble Module)
388-
!! @param Pe_c_l Physical Bubble parameter (pass in from global parameters)
389-
!! @param pv_l Physical Bubble parameter (pass in from global parameters)
390-
!! @param R_v_l Physical Bubble parameter (pass in from global parameters)
391-
!! @param Tw_l Physical Bubble parameter (pass in from global parameters)
392-
!! @param polytropic_l Polytropic switch (pass in from global parameters)
393-
!! @param bubbles_lagrange_l Lagrangian subgrid bubble model switch (pass in from global parameters)
394-
!! @param thermal_l Thermal behavior (pass in from global parameters)
395-
!! @param fmass_n Current gas mass (EL)
396-
!! @param fbeta_c Mass transfer coefficient (EL)
397-
function f_vflux(fR, fV, fpb, fmass_v, iR0, mass_n0_l, Re_trans_c_l, chi_vw_l, rho_mw_l, Pe_c_l, pv_l, R_v_l, Tw_l, thermal_l, bubbles_lagrange_l, fmass_n, fbeta_c, fR_m, fgamma_m)
398-
=======
399392
!! @param fmass_n Current gas mass (EL)
400393
!! @param fbeta_c Mass transfer coefficient (EL)
401394
!! @param fR_m Mixture gas constant (EL)
402395
!! @param fgamma_m Mixture gamma (EL)
403396
function f_vflux(fR, fV, fpb, fmass_v, iR0, fmass_n, fbeta_c, fR_m, fgamma_m)
404-
>>>>>>> parent of 1c9d815a (Refactoring functions to not use globals)
405397
!$acc routine seq
406398
real(wp), intent(in) :: fR
407399
real(wp), intent(in) :: fV
@@ -456,57 +448,40 @@ contains
456448
!! @param fpb Current internal bubble pressure
457449
!! @param fmass_v Current mass of vapour
458450
!! @param iR0 Bubble size index (EE) or bubble identifier (EL)
459-
!! @param Tw_l Physical bubble parameters (pass in from global parameters)
460-
!! @param R_v_l Physical bubble parameters (pass in from global parameters)
461-
!! @param pv_l Physical bubble parameters (pass in from global parameters)
462-
!! @param pb0_l Physical bubble parameters (pass in from global parameters)
463-
!! @param mass_n0_l Physical bubble parameters (pass in from global parameters)
464-
!! @param mass_v0_l Physical bubble parameters (pass in from global parameters)
465-
!! @param Pe_T_l Physical bubble parameters (pass in from global parameters)
466-
!! @param Re_trans_T_l Physical bubble parameters (pass in from global parameters)
467-
!! @param k_mw_l Bubble Wall properties (pass in from bubbles module)
468-
!! @param thermal_l Thermal Behavior (pass in from global parameters)
469-
!! @param bubbles_lagrange_l Lagrangian subgrid bubble model switch (pass in from global parameters)
470451
!! @param fbeta_t Mass transfer coefficient (EL)
471452
!! @param fR_m Mixture gas constant (EL)
472453
!! @param fgamma_m Mixture gamma (EL)
473-
pure function f_bpres_dot(fvflux, fR, fV, fpb, fmass_v, iR0, Tw_l, R_v_l, pv_l, pb0_l, mass_n0_l, mass_v0_l, Pe_T_l, Re_trans_T_l, k_mw_l, thermal_l, bubbles_lagrange_l, fbeta_t, fR_m, fgamma_m)
454+
function f_bpres_dot(fvflux, fR, fV, fpb, fmass_v, iR0, fbeta_t, fR_m, fgamma_m)
474455
!$acc routine seq
475456
real(wp), intent(in) :: fvflux
476457
real(wp), intent(in) :: fR
477458
real(wp), intent(in) :: fV
478459
real(wp), intent(in) :: fpb
479460
real(wp), intent(in) :: fmass_v
480461
integer, intent(in) :: iR0
481-
real(wp), intent(in) :: Tw_l, R_v_l, pv_l
482-
real(wp), dimension(:), allocatable, intent(in) :: pb0_l, mass_n0_l, mass_v0_l, Pe_T_l
483-
real(wp), dimension(:), allocatable, intent(in) :: Re_trans_T_l
484-
real(wp), intent(in) :: k_mw_l
485-
integer, intent(in) :: thermal_l
486-
logical, intent(in) :: bubbles_lagrange_l
487462
real(wp), intent(in), optional :: fbeta_t, fR_m, fgamma_m
488463

489464
real(wp) :: T_bar
490465
real(wp) :: grad_T
491466
real(wp) :: f_bpres_dot
492467
real(wp) :: heatflux
493468

494-
if (thermal_l == 3) then
495-
if (bubbles_lagrange_l) then
469+
if (thermal == 3) then
470+
if (bubbles_lagrange) then
496471
T_bar = fpb*(4._wp/3._wp*pi*fR**3._wp)/fR_m
497-
grad_T = -fbeta_t*(T_bar - Tw_l)
472+
grad_T = -fbeta_t*(T_bar - Tw)
498473
heatflux = (fgamma_m - 1._wp)/fgamma_m*grad_T/fR
499-
f_bpres_dot = 3._wp*fgamma_m*(-fV*fpb + fvflux*R_v_l*Tw_l &
474+
f_bpres_dot = 3._wp*fgamma_m*(-fV*fpb + fvflux*R_v*Tw &
500475
+ heatflux)/fR
501476
return
502477
end if
503-
T_bar = Tw_l*(fpb/pb0_l(iR0))*(fR/R0(iR0))**3 &
504-
*(mass_n0_l(iR0) + mass_v0_l(iR0))/(mass_n0_l(iR0) + fmass_v)
505-
grad_T = -Re_trans_T_l(iR0)*(T_bar - Tw_l)
506-
f_bpres_dot = 3._wp*gamma_m*(-fV*fpb + fvflux*R_v_l*Tw_l &
507-
+ pb0_l(iR0)*k_mw_l*grad_T/Pe_T_l(iR0)/fR)/fR
478+
T_bar = Tw*(fpb/pb0(iR0))*(fR/R0(iR0))**3 &
479+
*(mass_n0(iR0) + mass_v0(iR0))/(mass_n0(iR0) + fmass_v)
480+
grad_T = -Re_trans_T(iR0)*(T_bar - Tw)
481+
f_bpres_dot = 3._wp*gamma_m*(-fV*fpb + fvflux*R_v*Tw &
482+
+ pb0(iR0)*k_mw*grad_T/Pe_T(iR0)/fR)/fR
508483
else
509-
f_bpres_dot = -3._wp*gamma_m*fV/fR*(fpb - pv_l)
484+
f_bpres_dot = -3._wp*gamma_m*fV/fR*(fpb - pv)
510485
end if
511486

512487
end function f_bpres_dot

0 commit comments

Comments
 (0)