Skip to content

Commit ada47da

Browse files
hyeoksu-leeHyeoksu Lee
andauthored
bubbles clean-up: remove R0_type and V0 (#963)
Co-authored-by: Hyeoksu Lee <[email protected]>
1 parent c933e72 commit ada47da

File tree

16 files changed

+30
-75
lines changed

16 files changed

+30
-75
lines changed

docs/documentation/case.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,6 @@ Implementation of the parameters into the model follow [Ando (2010)](references.
743743
| `polydisperse` | Logical | Polydispersity in equilibrium bubble radius R0 |
744744
| `nb` | Integer | Number of bins: [1] Monodisperse; [$>1$] Polydisperse |
745745
| `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 |
747746
| `Ca` | Real | Cavitation number |
748747
| `Web` | Real | Weber number |
749748
| `Re_inv` | Real | Inverse Reynolds number |
@@ -761,15 +760,12 @@ When ``polytropic = 'F'``, the gas compression is modeled as non-polytropic due
761760
- `thermal` specifies a model for heat transfer across the bubble interface by an integer from 1 through 3.
762761
`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.
763762

764-
- `polydisperse` activates polydispersity in the bubble model through a probability density function (PDF) of the equilibrium bubble radius.
763+
- `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.
765764

766765
- `R0ref` specifies the reference bubble radius.
767766

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

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-
773769
- `poly_sigma` specifies the standard deviation of the log-normal PDF of equilibrium bubble radius for polydisperse populations.
774770

775771
- `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/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/post_process/m_global_parameters.fpp

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ module m_global_parameters
282282
integer :: nb
283283
real(wp) :: R0ref
284284
real(wp) :: Ca, Web, Re_inv
285-
real(wp), dimension(:), allocatable :: weight, R0, V0
285+
real(wp), dimension(:), allocatable :: weight, R0
286286
logical :: bubbles_euler
287287
logical :: qbmm
288288
logical :: polytropic
@@ -556,7 +556,7 @@ contains
556556

557557
allocate (bub_idx%rs(nb), bub_idx%vs(nb))
558558
allocate (bub_idx%ps(nb), bub_idx%ms(nb))
559-
allocate (weight(nb), R0(nb), V0(nb))
559+
allocate (weight(nb), R0(nb))
560560

561561
if (qbmm) then
562562
allocate (bub_idx%moms(nb, nmom))
@@ -588,11 +588,7 @@ contains
588588
if (nb == 1) then
589589
weight(:) = 1._wp
590590
R0(:) = 1._wp
591-
V0(:) = 0._wp
592-
else if (nb > 1) then
593-
!call s_simpson
594-
V0(:) = 0._wp
595-
else
591+
else if (nb < 1) then
596592
stop 'Invalid value of nb'
597593
end if
598594

@@ -659,7 +655,7 @@ contains
659655

660656
allocate (bub_idx%rs(nb), bub_idx%vs(nb))
661657
allocate (bub_idx%ps(nb), bub_idx%ms(nb))
662-
allocate (weight(nb), R0(nb), V0(nb))
658+
allocate (weight(nb), R0(nb))
663659

664660
do i = 1, nb
665661
if (polytropic .neqv. .true.) then
@@ -680,10 +676,7 @@ contains
680676
if (nb == 1) then
681677
weight(:) = 1._wp
682678
R0(:) = 1._wp
683-
V0(:) = 0._wp
684-
else if (nb > 1) then
685-
V0(:) = 0._wp
686-
else
679+
else if (nb < 1) then
687680
stop 'Invalid value of nb'
688681
end if
689682

src/pre_process/m_assign_variables.fpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ contains
405405
! Bubbles euler variables
406406
if (bubbles_euler) then
407407
do i = 1, nb
408-
muR = R0(i)*patch_icpp(smooth_patch_id)%r0 ! = R0(i)
409-
muV = V0(i)*patch_icpp(smooth_patch_id)%v0 ! = 0
408+
muR = R0(i)*patch_icpp(smooth_patch_id)%r0
409+
muV = patch_icpp(smooth_patch_id)%v0
410410
if (qbmm) then
411411
! Initialize the moment set
412412
if (dist_type == 1) then
@@ -610,8 +610,8 @@ contains
610610
! Smoothed bubble variables
611611
if (bubbles_euler) then
612612
do i = 1, nb
613-
muR = R0(i)*patch_icpp(patch_id)%r0 ! = 1*R0(i)
614-
muV = V0(i)*patch_icpp(patch_id)%v0 ! = 1*V0(i)
613+
muR = R0(i)*patch_icpp(patch_id)%r0
614+
muV = patch_icpp(patch_id)%v0
615615
if (qbmm) then
616616
! Initialize the moment set
617617
if (dist_type == 1) then
@@ -630,12 +630,6 @@ contains
630630
q_prim_vf(bub_idx%fullmom(i, 0, 2))%sf(j, k, l) = muV**2 + sigV**2
631631
end if
632632
else
633-
! q_prim_vf(bub_idx%rs(i))%sf(j,k,l) = &
634-
! (eta * R0(i)*patch_icpp(patch_id)%r0 &
635-
! + (1._wp-eta)*orig_prim_vf(bub_idx%rs(i)))
636-
! q_prim_vf(bub_idx%vs(i))%sf(j,k,l) = &
637-
! (eta * V0(i)*patch_icpp(patch_id)%v0 &
638-
! + (1._wp-eta)*orig_prim_vf(bub_idx%vs(i)))
639633
q_prim_vf(bub_idx%rs(i))%sf(j, k, l) = muR
640634
q_prim_vf(bub_idx%vs(i))%sf(j, k, l) = muV
641635

src/pre_process/m_checker.fpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,10 @@ contains
137137
end subroutine s_check_inputs_grid_stretching
138138

139139
!> Checks constraints on the QBMM and polydisperse bubble parameters
140-
!! (qbmm, polydisperse, dist_type, rhoRV, and R0_type)
140+
!! (qbmm, polydisperse, dist_type and rhoRV)
141141
impure subroutine s_check_inputs_qbmm_and_polydisperse
142142
@:PROHIBIT(qbmm .and. dist_type == dflt_int, "dist_type must be set if using QBMM")
143143
@:PROHIBIT(qbmm .and. dist_type /= 1 .and. rhoRV > 0._wp, "rhoRV cannot be used with dist_type != 1")
144-
@:PROHIBIT(polydisperse .and. R0_type == dflt_int, "R0 type must be set if using Polydisperse")
145144
end subroutine s_check_inputs_qbmm_and_polydisperse
146145

147146
!> Checks constraints on initial partial density perturbation

src/pre_process/m_global_parameters.fpp

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ module m_global_parameters
216216
integer :: nb
217217
real(wp) :: R0ref
218218
real(wp) :: Ca, Web, Re_inv
219-
real(wp), dimension(:), allocatable :: weight, R0, V0
219+
real(wp), dimension(:), allocatable :: weight, R0
220220
logical :: bubbles_euler
221221
logical :: qbmm !< Quadrature moment method
222222
integer :: nmom !< Number of carried moments
@@ -252,7 +252,6 @@ module m_global_parameters
252252
real(wp) :: gamma_m, gamma_n, mu_n
253253
real(wp) :: poly_sigma
254254
integer :: dist_type !1 = binormal, 2 = lognormal-normal
255-
integer :: R0_type !1 = simpson
256255
!> @}
257256

258257
!> @name Surface Tension Modeling
@@ -493,7 +492,6 @@ contains
493492
sigV = dflt_real
494493
rhoRV = 0._wp
495494
dist_type = dflt_int
496-
R0_type = dflt_int
497495

498496
R_n = dflt_real
499497
R_v = dflt_real
@@ -639,7 +637,7 @@ contains
639637
sys_size = n_idx
640638
end if
641639

642-
allocate (weight(nb), R0(nb), V0(nb))
640+
allocate (weight(nb), R0(nb))
643641
allocate (bub_idx%rs(nb), bub_idx%vs(nb))
644642
allocate (bub_idx%ps(nb), bub_idx%ms(nb))
645643

@@ -680,11 +678,7 @@ contains
680678
if (nb == 1) then
681679
weight(:) = 1._wp
682680
R0(:) = 1._wp
683-
V0(:) = 1._wp
684-
else if (nb > 1) then
685-
V0(:) = 1._wp
686-
!R0 and weight initialized in s_simpson
687-
else
681+
else if (nb < 1) then
688682
stop 'Invalid value of nb'
689683
end if
690684

@@ -759,7 +753,7 @@ contains
759753

760754
allocate (bub_idx%rs(nb), bub_idx%vs(nb))
761755
allocate (bub_idx%ps(nb), bub_idx%ms(nb))
762-
allocate (weight(nb), R0(nb), V0(nb))
756+
allocate (weight(nb), R0(nb))
763757

764758
do i = 1, nb
765759
if (.not. polytropic) then
@@ -780,10 +774,7 @@ contains
780774
if (nb == 1) then
781775
weight(:) = 1._wp
782776
R0(:) = 1._wp
783-
V0(:) = 0._wp
784-
else if (nb > 1) then
785-
V0(:) = 1._wp
786-
else
777+
else if (nb < 1) then
787778
stop 'Invalid value of nb'
788779
end if
789780

src/pre_process/m_mpi_proxy.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ contains
4545
& 'loops_x', 'loops_y', 'loops_z', 'model_eqns', 'num_fluids', &
4646
& 'weno_order', 'precision', 'perturb_flow_fluid', &
4747
& 'perturb_sph_fluid', 'num_patches', 'thermal', 'nb', 'dist_type',&
48-
& 'R0_type', 'relax_model', 'num_ibs', 'n_start', 'elliptic_smoothing_iters', &
48+
& 'relax_model', 'num_ibs', 'n_start', 'elliptic_smoothing_iters', &
4949
& 'num_bc_patches', 'mixlayer_perturb_nk' ]
5050
call MPI_BCAST(${VAR}$, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
5151
#:endfor

0 commit comments

Comments
 (0)