Skip to content

Commit 55e7361

Browse files
authored
Merge branch 'master' into FrontierUVM
2 parents 6b834c7 + 16de11c commit 55e7361

File tree

18 files changed

+44
-82
lines changed

18 files changed

+44
-82
lines changed

docs/documentation/case.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@ Details of implementation of viscosity in MFC can be found in [Coralic (2015)](r
379379
| `mixture_err` | Logical | Mixture properties correction |
380380
| `time_stepper` | Integer | Runge--Kutta order [1-3] |
381381
| `adap_dt` | Logical | Strang splitting scheme with adaptive time stepping |
382+
| `adap_dt_tol` | Real | Tolerance for adaptive time stepping in Strang splitting scheme|
383+
| `adap_dt_max_iters` | Integer | Max iteration for adaptive time stepping in Strang splitting scheme |
382384
| `weno_order` | Integer | WENO order [1,3,5] |
383385
| `weno_eps` | Real | WENO perturbation (avoid division by zero) |
384386
| `mapped_weno` | Logical | WENO-M (WENO with mapping of nonlinear weights) |
@@ -453,7 +455,7 @@ The effect and use of the source term are assessed by [Schmidmayer et al., 2019]
453455
- `time_stepper` specifies the order of the Runge-Kutta (RK) time integration scheme that is used for temporal integration in simulation, from the 1st to 5th order by corresponding integer.
454456
Note that `time_stepper = 3` specifies the total variation diminishing (TVD), third order RK scheme ([Gottlieb and Shu, 1998](references.md)).
455457

456-
- `adap_dt` activates the Strang operator splitting scheme which splits flux and source terms in time marching, and an adaptive time stepping strategy is implemented for the source term. It requires ``bubbles_euler = 'T'``, ``polytropic = 'T'``, ``adv_n = 'T'`` and `time_stepper = 3`. Additionally, it can be used with ``bubbles_lagrange = 'T'`` and `time_stepper = 3`
458+
- `adap_dt` activates the Strang operator splitting scheme which splits flux and source terms in time marching, and an adaptive time stepping strategy is implemented for the source term. It requires ``bubbles_euler = 'T'``, ``polytropic = 'T'``, ``adv_n = 'T'`` and `time_stepper = 3`. Additionally, it can be used with ``bubbles_lagrange = 'T'`` and `time_stepper = 3`. `adap_dt_tol` and `adap_dt_max_iters` are 1e-4 and 100, respectively, by default.
457459

458460
- `weno_order` specifies the order of WENO scheme that is used for spatial reconstruction of variables by an integer of 1, 3, 5, and 7, that correspond to the 1st, 3rd, 5th, and 7th order, respectively.
459461

@@ -743,7 +745,6 @@ Implementation of the parameters into the model follow [Ando (2010)](references.
743745
| `polydisperse` | Logical | Polydispersity in equilibrium bubble radius R0 |
744746
| `nb` | Integer | Number of bins: [1] Monodisperse; [$>1$] Polydisperse |
745747
| `poly_sigma` | Real | Standard deviation for probability density function of polydisperse bubble populations |
746-
| `R0_type` | Integer | Quadrature rule for probability density function of polydisperse bubble populations |
747748
| `Ca` | Real | Cavitation number |
748749
| `Web` | Real | Weber number |
749750
| `Re_inv` | Real | Inverse Reynolds number |
@@ -761,15 +762,12 @@ When ``polytropic = 'F'``, the gas compression is modeled as non-polytropic due
761762
- `thermal` specifies a model for heat transfer across the bubble interface by an integer from 1 through 3.
762763
`thermal = 1`, `2`, and `3` correspond to no heat transfer (adiabatic gas compression), isothermal heat transfer, and heat transfer with a constant heat transfer coefficient based on [Preston et al., 2007](references.md), respectively.
763764

764-
- `polydisperse` activates polydispersity in the bubble model through a probability density function (PDF) of the equilibrium bubble radius.
765+
- `polydisperse` activates polydispersity in the bubble model through a probability density function (PDF) of the equilibrium bubble radius. Simpson's rule is used for integrating the log-normal PDF of equilibrium bubble radius for polydisperse populations.
765766

766767
- `R0ref` specifies the reference bubble radius.
767768

768769
- `nb` specifies the number of discrete bins that define the probability density function (PDF) of the equilibrium bubble radius.
769770

770-
- `R0_type` specifies the quadrature rule for integrating the log-normal PDF of equilibrium bubble radius for polydisperse populations.
771-
`R0_type = 1` corresponds to Simpson's rule.
772-
773771
- `poly_sigma` specifies the standard deviation of the log-normal PDF of equilibrium bubble radius for polydisperse populations.
774772

775773
- `Ca`, `Web`, and `Re_inv` respectively specify the Cavitation number, Weber number, and the inverse Reynolds number that characterize the offset of the gas pressure from the vapor pressure, surface tension, and liquid viscosity when the polytropic gas compression model is used.

examples/0D_bubblecollapse_adap/case.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"adv_n": "T",
119119
# adap_dt
120120
"adap_dt": "T",
121+
"adap_dt_max_iters": 200,
121122
# Gas compression model
122123
"polytropic": "T",
123124
"thermal": 1,

examples/1D_poly_bubscreen/case.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@
157157
"bubbles_euler": "T",
158158
"bubble_model": 2,
159159
"polytropic": "T",
160-
"R0_type": 1,
161160
"thermal": 3,
162161
"R0ref": myr0,
163162
"nb": 1,

examples/1D_qbmm/case.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@
171171
"bubble_model": 2,
172172
"polytropic": "F",
173173
"polydisperse": "T",
174-
"R0_type": 1,
175174
"poly_sigma": 0.3,
176175
"thermal": 3,
177176
"R0ref": myr0,

examples/2D_bubbly_steady_shock/case.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@
191191
"bubble_model": 2,
192192
"polytropic": "T",
193193
"polydisperse": "F",
194-
"R0_type": 1,
195194
"poly_sigma": 0.3,
196195
"thermal": 3,
197196
"R0ref": x0,

examples/2D_whale_bubble_annulus/case.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@
152152
"bubbles_euler": "T",
153153
"bubble_model": 3,
154154
"polytropic": "T",
155-
"R0_type": 1,
156155
"thermal": 3,
157156
"R0ref": myr0,
158157
"nb": 1,

src/common/m_constants.fpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ module m_constants
5555

5656
! Strang Splitting constants
5757
real(wp), parameter :: dflt_adap_dt_tol = 1.e-4_wp !< Default tolerance for adaptive step size
58-
integer, parameter :: adap_dt_max_iters = 100 !< Maximum number of iterations
58+
integer, parameter :: dflt_adap_dt_max_iters = 100 !< Default max iteration for adaptive step size
59+
5960
! Constants of the algorithm described by Heirer, E. Hairer S.P.Nørsett G. Wanner, Solving Ordinary Differential Equations I, Chapter II.4
6061
! to choose the initial time step size for the adaptive time stepping routine
6162
real(wp), parameter :: threshold_first_guess = 1.e-5_wp

src/post_process/m_global_parameters.fpp

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ module m_global_parameters
286286
integer :: nb
287287
real(wp) :: R0ref
288288
real(wp) :: Ca, Web, Re_inv
289-
real(wp), dimension(:), allocatable :: weight, R0, V0
289+
real(wp), dimension(:), allocatable :: weight, R0
290290
logical :: bubbles_euler
291291
logical :: qbmm
292292
logical :: polytropic
@@ -568,7 +568,7 @@ contains
568568

569569
allocate (bub_idx%rs(nb), bub_idx%vs(nb))
570570
allocate (bub_idx%ps(nb), bub_idx%ms(nb))
571-
allocate (weight(nb), R0(nb), V0(nb))
571+
allocate (weight(nb), R0(nb))
572572

573573
if (qbmm) then
574574
allocate (bub_idx%moms(nb, nmom))
@@ -600,11 +600,7 @@ contains
600600
if (nb == 1) then
601601
weight(:) = 1._wp
602602
R0(:) = 1._wp
603-
V0(:) = 0._wp
604-
else if (nb > 1) then
605-
!call s_simpson
606-
V0(:) = 0._wp
607-
else
603+
else if (nb < 1) then
608604
stop 'Invalid value of nb'
609605
end if
610606

@@ -671,7 +667,7 @@ contains
671667

672668
allocate (bub_idx%rs(nb), bub_idx%vs(nb))
673669
allocate (bub_idx%ps(nb), bub_idx%ms(nb))
674-
allocate (weight(nb), R0(nb), V0(nb))
670+
allocate (weight(nb), R0(nb))
675671

676672
do i = 1, nb
677673
if (polytropic .neqv. .true.) then
@@ -692,10 +688,7 @@ contains
692688
if (nb == 1) then
693689
weight(:) = 1._wp
694690
R0(:) = 1._wp
695-
V0(:) = 0._wp
696-
else if (nb > 1) then
697-
V0(:) = 0._wp
698-
else
691+
else if (nb < 1) then
699692
stop 'Invalid value of nb'
700693
end if
701694

src/pre_process/m_assign_variables.fpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,8 @@ contains
409409
! Bubbles euler variables
410410
if (bubbles_euler) then
411411
do i = 1, nb
412-
muR = R0(i)*patch_icpp(smooth_patch_id)%r0 ! = R0(i)
413-
muV = V0(i)*patch_icpp(smooth_patch_id)%v0 ! = 0
412+
muR = R0(i)*patch_icpp(smooth_patch_id)%r0
413+
muV = patch_icpp(smooth_patch_id)%v0
414414
if (qbmm) then
415415
! Initialize the moment set
416416
if (dist_type == 1) then
@@ -616,8 +616,8 @@ contains
616616
! Smoothed bubble variables
617617
if (bubbles_euler) then
618618
do i = 1, nb
619-
muR = R0(i)*patch_icpp(patch_id)%r0 ! = 1*R0(i)
620-
muV = V0(i)*patch_icpp(patch_id)%v0 ! = 1*V0(i)
619+
muR = R0(i)*patch_icpp(patch_id)%r0
620+
muV = patch_icpp(patch_id)%v0
621621
if (qbmm) then
622622
! Initialize the moment set
623623
if (dist_type == 1) then
@@ -636,12 +636,6 @@ contains
636636
q_prim_vf(bub_idx%fullmom(i, 0, 2))%sf(j, k, l) = muV**2 + sigV**2
637637
end if
638638
else
639-
! q_prim_vf(bub_idx%rs(i))%sf(j,k,l) = &
640-
! (eta * R0(i)*patch_icpp(patch_id)%r0 &
641-
! + (1._wp-eta)*orig_prim_vf(bub_idx%rs(i)))
642-
! q_prim_vf(bub_idx%vs(i))%sf(j,k,l) = &
643-
! (eta * V0(i)*patch_icpp(patch_id)%v0 &
644-
! + (1._wp-eta)*orig_prim_vf(bub_idx%vs(i)))
645639
q_prim_vf(bub_idx%rs(i))%sf(j, k, l) = muR
646640
q_prim_vf(bub_idx%vs(i))%sf(j, k, l) = muV
647641

src/pre_process/m_checker.fpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,10 @@ contains
145145
end subroutine s_check_inputs_grid_stretching
146146

147147
!> Checks constraints on the QBMM and polydisperse bubble parameters
148-
!! (qbmm, polydisperse, dist_type, rhoRV, and R0_type)
148+
!! (qbmm, polydisperse, dist_type and rhoRV)
149149
impure subroutine s_check_inputs_qbmm_and_polydisperse
150150
@:PROHIBIT(qbmm .and. dist_type == dflt_int, "dist_type must be set if using QBMM")
151151
@:PROHIBIT(qbmm .and. dist_type /= 1 .and. rhoRV > 0._wp, "rhoRV cannot be used with dist_type != 1")
152-
@:PROHIBIT(polydisperse .and. R0_type == dflt_int, "R0 type must be set if using Polydisperse")
153152
end subroutine s_check_inputs_qbmm_and_polydisperse
154153

155154
!> Checks constraints on initial partial density perturbation

0 commit comments

Comments
 (0)