diff --git a/docs/documentation/case.md b/docs/documentation/case.md index 8cb8d96ac9..e88ef86f47 100644 --- a/docs/documentation/case.md +++ b/docs/documentation/case.md @@ -743,7 +743,6 @@ Implementation of the parameters into the model follow [Ando (2010)](references. | `polydisperse` | Logical | Polydispersity in equilibrium bubble radius R0 | | `nb` | Integer | Number of bins: [1] Monodisperse; [$>1$] Polydisperse | | `poly_sigma` | Real | Standard deviation for probability density function of polydisperse bubble populations | -| `R0_type` | Integer | Quadrature rule for probability density function of polydisperse bubble populations | | `Ca` | Real | Cavitation number | | `Web` | Real | Weber number | | `Re_inv` | Real | Inverse Reynolds number | @@ -761,15 +760,12 @@ When ``polytropic = 'F'``, the gas compression is modeled as non-polytropic due - `thermal` specifies a model for heat transfer across the bubble interface by an integer from 1 through 3. `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. -- `polydisperse` activates polydispersity in the bubble model through a probability density function (PDF) of the equilibrium bubble radius. +- `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. - `R0ref` specifies the reference bubble radius. - `nb` specifies the number of discrete bins that define the probability density function (PDF) of the equilibrium bubble radius. -- `R0_type` specifies the quadrature rule for integrating the log-normal PDF of equilibrium bubble radius for polydisperse populations. -`R0_type = 1` corresponds to Simpson's rule. - - `poly_sigma` specifies the standard deviation of the log-normal PDF of equilibrium bubble radius for polydisperse populations. - `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. diff --git a/examples/1D_poly_bubscreen/case.py b/examples/1D_poly_bubscreen/case.py index df69501e4c..e73eff2e92 100644 --- a/examples/1D_poly_bubscreen/case.py +++ b/examples/1D_poly_bubscreen/case.py @@ -157,7 +157,6 @@ "bubbles_euler": "T", "bubble_model": 2, "polytropic": "T", - "R0_type": 1, "thermal": 3, "R0ref": myr0, "nb": 1, diff --git a/examples/1D_qbmm/case.py b/examples/1D_qbmm/case.py index 5298782f5a..926ad49a14 100644 --- a/examples/1D_qbmm/case.py +++ b/examples/1D_qbmm/case.py @@ -171,7 +171,6 @@ "bubble_model": 2, "polytropic": "F", "polydisperse": "T", - "R0_type": 1, "poly_sigma": 0.3, "thermal": 3, "R0ref": myr0, diff --git a/examples/2D_bubbly_steady_shock/case.py b/examples/2D_bubbly_steady_shock/case.py index 96fcdd3868..5e14c72e43 100644 --- a/examples/2D_bubbly_steady_shock/case.py +++ b/examples/2D_bubbly_steady_shock/case.py @@ -191,7 +191,6 @@ "bubble_model": 2, "polytropic": "T", "polydisperse": "F", - "R0_type": 1, "poly_sigma": 0.3, "thermal": 3, "R0ref": x0, diff --git a/examples/2D_whale_bubble_annulus/case.py b/examples/2D_whale_bubble_annulus/case.py index 15afc66b0a..f610ebd17e 100755 --- a/examples/2D_whale_bubble_annulus/case.py +++ b/examples/2D_whale_bubble_annulus/case.py @@ -152,7 +152,6 @@ "bubbles_euler": "T", "bubble_model": 3, "polytropic": "T", - "R0_type": 1, "thermal": 3, "R0ref": myr0, "nb": 1, diff --git a/src/post_process/m_global_parameters.fpp b/src/post_process/m_global_parameters.fpp index d7bdd89ab5..23ff1e8932 100644 --- a/src/post_process/m_global_parameters.fpp +++ b/src/post_process/m_global_parameters.fpp @@ -282,7 +282,7 @@ module m_global_parameters integer :: nb real(wp) :: R0ref real(wp) :: Ca, Web, Re_inv - real(wp), dimension(:), allocatable :: weight, R0, V0 + real(wp), dimension(:), allocatable :: weight, R0 logical :: bubbles_euler logical :: qbmm logical :: polytropic @@ -556,7 +556,7 @@ contains allocate (bub_idx%rs(nb), bub_idx%vs(nb)) allocate (bub_idx%ps(nb), bub_idx%ms(nb)) - allocate (weight(nb), R0(nb), V0(nb)) + allocate (weight(nb), R0(nb)) if (qbmm) then allocate (bub_idx%moms(nb, nmom)) @@ -588,11 +588,7 @@ contains if (nb == 1) then weight(:) = 1._wp R0(:) = 1._wp - V0(:) = 0._wp - else if (nb > 1) then - !call s_simpson - V0(:) = 0._wp - else + else if (nb < 1) then stop 'Invalid value of nb' end if @@ -659,7 +655,7 @@ contains allocate (bub_idx%rs(nb), bub_idx%vs(nb)) allocate (bub_idx%ps(nb), bub_idx%ms(nb)) - allocate (weight(nb), R0(nb), V0(nb)) + allocate (weight(nb), R0(nb)) do i = 1, nb if (polytropic .neqv. .true.) then @@ -680,10 +676,7 @@ contains if (nb == 1) then weight(:) = 1._wp R0(:) = 1._wp - V0(:) = 0._wp - else if (nb > 1) then - V0(:) = 0._wp - else + else if (nb < 1) then stop 'Invalid value of nb' end if diff --git a/src/pre_process/m_assign_variables.fpp b/src/pre_process/m_assign_variables.fpp index f1bfe06fa3..e40ebffeff 100644 --- a/src/pre_process/m_assign_variables.fpp +++ b/src/pre_process/m_assign_variables.fpp @@ -405,8 +405,8 @@ contains ! Bubbles euler variables if (bubbles_euler) then do i = 1, nb - muR = R0(i)*patch_icpp(smooth_patch_id)%r0 ! = R0(i) - muV = V0(i)*patch_icpp(smooth_patch_id)%v0 ! = 0 + muR = R0(i)*patch_icpp(smooth_patch_id)%r0 + muV = patch_icpp(smooth_patch_id)%v0 if (qbmm) then ! Initialize the moment set if (dist_type == 1) then @@ -610,8 +610,8 @@ contains ! Smoothed bubble variables if (bubbles_euler) then do i = 1, nb - muR = R0(i)*patch_icpp(patch_id)%r0 ! = 1*R0(i) - muV = V0(i)*patch_icpp(patch_id)%v0 ! = 1*V0(i) + muR = R0(i)*patch_icpp(patch_id)%r0 + muV = patch_icpp(patch_id)%v0 if (qbmm) then ! Initialize the moment set if (dist_type == 1) then @@ -630,12 +630,6 @@ contains q_prim_vf(bub_idx%fullmom(i, 0, 2))%sf(j, k, l) = muV**2 + sigV**2 end if else - ! q_prim_vf(bub_idx%rs(i))%sf(j,k,l) = & - ! (eta * R0(i)*patch_icpp(patch_id)%r0 & - ! + (1._wp-eta)*orig_prim_vf(bub_idx%rs(i))) - ! q_prim_vf(bub_idx%vs(i))%sf(j,k,l) = & - ! (eta * V0(i)*patch_icpp(patch_id)%v0 & - ! + (1._wp-eta)*orig_prim_vf(bub_idx%vs(i))) q_prim_vf(bub_idx%rs(i))%sf(j, k, l) = muR q_prim_vf(bub_idx%vs(i))%sf(j, k, l) = muV diff --git a/src/pre_process/m_checker.fpp b/src/pre_process/m_checker.fpp index 15307cb948..aa724f7f77 100644 --- a/src/pre_process/m_checker.fpp +++ b/src/pre_process/m_checker.fpp @@ -137,11 +137,10 @@ contains end subroutine s_check_inputs_grid_stretching !> Checks constraints on the QBMM and polydisperse bubble parameters - !! (qbmm, polydisperse, dist_type, rhoRV, and R0_type) + !! (qbmm, polydisperse, dist_type and rhoRV) impure subroutine s_check_inputs_qbmm_and_polydisperse @:PROHIBIT(qbmm .and. dist_type == dflt_int, "dist_type must be set if using QBMM") @:PROHIBIT(qbmm .and. dist_type /= 1 .and. rhoRV > 0._wp, "rhoRV cannot be used with dist_type != 1") - @:PROHIBIT(polydisperse .and. R0_type == dflt_int, "R0 type must be set if using Polydisperse") end subroutine s_check_inputs_qbmm_and_polydisperse !> Checks constraints on initial partial density perturbation diff --git a/src/pre_process/m_global_parameters.fpp b/src/pre_process/m_global_parameters.fpp index 9a5eb51391..73e971a070 100644 --- a/src/pre_process/m_global_parameters.fpp +++ b/src/pre_process/m_global_parameters.fpp @@ -216,7 +216,7 @@ module m_global_parameters integer :: nb real(wp) :: R0ref real(wp) :: Ca, Web, Re_inv - real(wp), dimension(:), allocatable :: weight, R0, V0 + real(wp), dimension(:), allocatable :: weight, R0 logical :: bubbles_euler logical :: qbmm !< Quadrature moment method integer :: nmom !< Number of carried moments @@ -252,7 +252,6 @@ module m_global_parameters real(wp) :: gamma_m, gamma_n, mu_n real(wp) :: poly_sigma integer :: dist_type !1 = binormal, 2 = lognormal-normal - integer :: R0_type !1 = simpson !> @} !> @name Surface Tension Modeling @@ -493,7 +492,6 @@ contains sigV = dflt_real rhoRV = 0._wp dist_type = dflt_int - R0_type = dflt_int R_n = dflt_real R_v = dflt_real @@ -639,7 +637,7 @@ contains sys_size = n_idx end if - allocate (weight(nb), R0(nb), V0(nb)) + allocate (weight(nb), R0(nb)) allocate (bub_idx%rs(nb), bub_idx%vs(nb)) allocate (bub_idx%ps(nb), bub_idx%ms(nb)) @@ -680,11 +678,7 @@ contains if (nb == 1) then weight(:) = 1._wp R0(:) = 1._wp - V0(:) = 1._wp - else if (nb > 1) then - V0(:) = 1._wp - !R0 and weight initialized in s_simpson - else + else if (nb < 1) then stop 'Invalid value of nb' end if @@ -759,7 +753,7 @@ contains allocate (bub_idx%rs(nb), bub_idx%vs(nb)) allocate (bub_idx%ps(nb), bub_idx%ms(nb)) - allocate (weight(nb), R0(nb), V0(nb)) + allocate (weight(nb), R0(nb)) do i = 1, nb if (.not. polytropic) then @@ -780,10 +774,7 @@ contains if (nb == 1) then weight(:) = 1._wp R0(:) = 1._wp - V0(:) = 0._wp - else if (nb > 1) then - V0(:) = 1._wp - else + else if (nb < 1) then stop 'Invalid value of nb' end if diff --git a/src/pre_process/m_mpi_proxy.fpp b/src/pre_process/m_mpi_proxy.fpp index 1a0e691aa4..393348a7d2 100644 --- a/src/pre_process/m_mpi_proxy.fpp +++ b/src/pre_process/m_mpi_proxy.fpp @@ -45,7 +45,7 @@ contains & 'loops_x', 'loops_y', 'loops_z', 'model_eqns', 'num_fluids', & & 'weno_order', 'precision', 'perturb_flow_fluid', & & 'perturb_sph_fluid', 'num_patches', 'thermal', 'nb', 'dist_type',& - & 'R0_type', 'relax_model', 'num_ibs', 'n_start', 'elliptic_smoothing_iters', & + & 'relax_model', 'num_ibs', 'n_start', 'elliptic_smoothing_iters', & & 'num_bc_patches', 'mixlayer_perturb_nk' ] call MPI_BCAST(${VAR}$, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr) #:endfor diff --git a/src/pre_process/m_start_up.fpp b/src/pre_process/m_start_up.fpp index 1779b464cf..50b38d74cc 100644 --- a/src/pre_process/m_start_up.fpp +++ b/src/pre_process/m_start_up.fpp @@ -142,7 +142,7 @@ contains rhoref, pref, bubbles_euler, R0ref, nb, & polytropic, thermal, Ca, Web, Re_inv, & polydisperse, poly_sigma, qbmm, & - sigR, sigV, dist_type, rhoRV, R0_type, & + sigR, sigV, dist_type, rhoRV, & file_per_process, relax, relax_model, & palpha_eps, ptgalpha_eps, ib, num_ibs, patch_ib, & sigma, adv_n, cfl_adap_dt, cfl_const_dt, n_start, & diff --git a/src/simulation/m_global_parameters.fpp b/src/simulation/m_global_parameters.fpp index fa6185c207..50dbcfac42 100644 --- a/src/simulation/m_global_parameters.fpp +++ b/src/simulation/m_global_parameters.fpp @@ -398,8 +398,7 @@ module m_global_parameters real(wp), dimension(:), allocatable :: weight !< Simpson quadrature weights real(wp), dimension(:), allocatable :: R0 !< Bubble sizes - real(wp), dimension(:), allocatable :: V0 !< Bubble velocities - $:GPU_DECLARE(create='[weight,R0,V0]') + $:GPU_DECLARE(create='[weight,R0]') logical :: bubbles_euler !< Bubbles euler on/off logical :: polytropic !< Polytropic switch @@ -424,10 +423,9 @@ module m_global_parameters integer, parameter :: nmom = 6 !< Number of carried moments per R0 location integer :: nmomsp !< Number of moments required by ensemble-averaging integer :: nmomtot !< Total number of carried moments moments/transport equations - integer :: R0_type real(wp) :: pi_fac !< Factor for artificial pi_inf - $:GPU_DECLARE(create='[qbmm, nmomsp,nmomtot,R0_type,pi_fac]') + $:GPU_DECLARE(create='[qbmm, nmomsp,nmomtot,pi_fac]') #:if not MFC_CASE_OPTIMIZATION $:GPU_DECLARE(create='[nb]') @@ -671,8 +669,6 @@ contains num_fluids = dflt_int #:endif - R0_type = dflt_int - adv_n = .false. adap_dt = .false. adap_dt_tol = dflt_real @@ -902,7 +898,7 @@ contains sys_size = n_idx end if - @:ALLOCATE(weight(nb), R0(nb), V0(nb)) + @:ALLOCATE(weight(nb), R0(nb)) @:ALLOCATE(bub_idx%rs(nb), bub_idx%vs(nb)) @:ALLOCATE(bub_idx%ps(nb), bub_idx%ms(nb)) @@ -943,11 +939,7 @@ contains if (nb == 1) then weight(:) = 1._wp R0(:) = 1._wp - V0(:) = 1._wp - else if (nb > 1) then - V0(:) = 1._wp - !R0 and weight initialized in s_simpson - else + else if (nb < 1) then stop 'Invalid value of nb' end if @@ -1019,7 +1011,7 @@ contains @:ALLOCATE(bub_idx%rs(nb), bub_idx%vs(nb)) @:ALLOCATE(bub_idx%ps(nb), bub_idx%ms(nb)) - @:ALLOCATE(weight(nb), R0(nb), V0(nb)) + @:ALLOCATE(weight(nb), R0(nb)) do i = 1, nb if (polytropic) then @@ -1039,10 +1031,7 @@ contains if (nb == 1) then weight(:) = 1._wp R0(:) = 1._wp - V0(:) = 0._wp - else if (nb > 1) then - V0(:) = 1._wp - else + else if (nb < 1) then stop 'Invalid value of nb' end if @@ -1280,7 +1269,7 @@ contains #:endif $:GPU_ENTER_DATA(copyin='[nb,R0ref,Ca,Web,Re_inv,weight,R0, & - & V0,bubbles_euler,polytropic,polydisperse,qbmm,R0_type, & + & bubbles_euler,polytropic,polydisperse,qbmm, & & ptil,bubble_model,thermal,poly_sigma]') $:GPU_ENTER_DATA(copyin='[R_n,R_v,phi_vn,phi_nv,Pe_c,Tw,pv, & & M_n,M_v,k_n,k_v,pb0,mass_n0,mass_v0,Pe_T, & diff --git a/src/simulation/m_mpi_proxy.fpp b/src/simulation/m_mpi_proxy.fpp index fc08409e36..da69af5fc4 100644 --- a/src/simulation/m_mpi_proxy.fpp +++ b/src/simulation/m_mpi_proxy.fpp @@ -98,7 +98,7 @@ contains & 'wave_speeds', 'avg_state', 'precision', 'bc_x%beg', 'bc_x%end', & & 'bc_y%beg', 'bc_y%end', 'bc_z%beg', 'bc_z%end', 'fd_order', & & 'num_probes', 'num_integrals', 'bubble_model', 'thermal', & - & 'R0_type', 'num_source', 'relax_model', 'num_ibs', 'n_start', & + & 'num_source', 'relax_model', 'num_ibs', 'n_start', & & 'num_bc_patches', 'num_igr_iters', 'num_igr_warm_start_iters'] call MPI_BCAST(${VAR}$, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr) #:endfor diff --git a/src/simulation/m_start_up.fpp b/src/simulation/m_start_up.fpp index 782418b416..3e14a53577 100644 --- a/src/simulation/m_start_up.fpp +++ b/src/simulation/m_start_up.fpp @@ -172,7 +172,7 @@ contains polydisperse, poly_sigma, qbmm, & relax, relax_model, & palpha_eps, ptgalpha_eps, & - R0_type, file_per_process, sigma, & + file_per_process, sigma, & pi_fac, adv_n, adap_dt, adap_dt_tol, & bf_x, bf_y, bf_z, & k_x, k_y, k_z, w_x, w_y, w_z, p_x, p_y, p_z, & @@ -1249,7 +1249,7 @@ contains call s_initialize_global_parameters_module() !Quadrature weights and nodes for polydisperse simulations - if (bubbles_euler .and. nb > 1 .and. R0_type == 1) then + if (bubbles_euler .and. nb > 1) then call s_simpson(weight, R0) end if !Initialize variables for non-polytropic (Preston) model @@ -1412,8 +1412,8 @@ contains if (chemistry) then $:GPU_UPDATE(device='[q_T_sf%sf]') end if - $:GPU_UPDATE(device='[nb,R0ref,Ca,Web,Re_inv,weight,R0,V0, & - & bubbles_euler,polytropic,polydisperse,qbmm,R0_type, & + $:GPU_UPDATE(device='[nb,R0ref,Ca,Web,Re_inv,weight,R0, & + & bubbles_euler,polytropic,polydisperse,qbmm, & & ptil,bubble_model,thermal,poly_sigma,adv_n,adap_dt, & & adap_dt_tol,n_idx,pi_fac,low_Mach]') $:GPU_UPDATE(device='[R_n,R_v,phi_vn,phi_nv,Pe_c,Tw,pv,M_n, & diff --git a/toolchain/mfc/run/case_dicts.py b/toolchain/mfc/run/case_dicts.py index 43e0199718..3a2465b897 100644 --- a/toolchain/mfc/run/case_dicts.py +++ b/toolchain/mfc/run/case_dicts.py @@ -86,7 +86,6 @@ def analytic(self): 'num_patches': ParamType.INT, 'qbmm': ParamType.LOG, 'dist_type': ParamType.INT, - 'R0_type': ParamType.INT, 'sigR': ParamType.REAL, 'sigV': ParamType.REAL, 'rhoRV': ParamType.REAL, @@ -276,7 +275,6 @@ def analytic(self): 'acoustic_source': ParamType.LOG, 'num_source': ParamType.INT, 'qbmm': ParamType.LOG, - 'R0_type': ParamType.INT, 'integral_wrt': ParamType.LOG, 'num_integrals': ParamType.INT, 'rdma_mpi': ParamType.LOG, diff --git a/toolchain/mfc/test/case.py b/toolchain/mfc/test/case.py index 5837b42ea6..46d9cd0fd8 100644 --- a/toolchain/mfc/test/case.py +++ b/toolchain/mfc/test/case.py @@ -76,7 +76,6 @@ 'qbmm' : 'F', 'dist_type' : 2, 'poly_sigma' : 0.3, - 'R0_type' : 1, 'sigR' : 0.1, 'sigV' : 0.1, 'rhoRV' : 0.0,