Skip to content

Commit e29d8e1

Browse files
hyeoksu-leeHyeoksu Lee
andauthored
reduce redundancy in bubbles (#1062)
Co-authored-by: Hyeoksu Lee <[email protected]>
1 parent 364a237 commit e29d8e1

File tree

16 files changed

+30
-26
lines changed

16 files changed

+30
-26
lines changed

docs/documentation/case.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@ Details of the transducer acoustic source model can be found in [Maeda and Colon
745745
| `mu_v`| Real | Viscosity |
746746
| `k_v`| Real | Thermal conductivity |
747747
| `cp_v`| Real | Specific heat capacity |
748+
| `D_v`| Real | Vapor diffusivity in the gas |
748749

749750
These options work only for gas-liquid two-component flows.
750751
Component indexes are required to be 1 for liquid and 2 for gas.
@@ -836,7 +837,6 @@ When ``polytropic = 'F'``, the gas compression is modeled as non-polytropic due
836837
| `T0` | Real | Reference temperature |
837838
| `x0` | Real | Reference length |
838839
| `Thost` | Real | Temperature of the surrounding liquid (host) |
839-
| `diffcoefvap` | Real | Vapor diffusivity in the gas |
840840

841841
- `nBubs_glb` Total number of bubbles. Their initial conditions need to be specified in the ./input/lag_bubbles.dat file. See the example cases for additional information.
842842

examples/1D_qbmm/case.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
M_n = 28.97
2626
mu_n = 1.8e-05
2727
k_n = 0.02556
28+
D = 0.242e-4
2829

2930
# air props
3031
# gamma_gas = gamma_n
@@ -163,6 +164,7 @@
163164
"fluid_pp(2)%M_v": M_n,
164165
"fluid_pp(2)%mu_v": mu_n,
165166
"fluid_pp(2)%k_v": k_n,
167+
"fluid_pp(2)%D_v": D,
166168
# Non-polytropic gas compression model AND/OR Tait EOS
167169
"pref": p0,
168170
"rhoref": rho0,

examples/3D_lagrange_bubblescreen/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@
155155
"lag_params%rho0": rho0,
156156
"lag_params%T0": T0,
157157
"lag_params%x0": x0,
158-
"lag_params%diffcoefvap": diffVapor,
159158
"lag_params%Thost": T_host,
160159
# Fluids Physical Parameters
161160
# Host medium
@@ -177,6 +176,7 @@
177176
"fluid_pp(2)%M_v": MW_g,
178177
"fluid_pp(2)%k_v": k_g,
179178
"fluid_pp(2)%cp_v": cp_g,
179+
"fluid_pp(2)%D_v": diffVapor,
180180
}
181181
)
182182
)

examples/3D_lagrange_shbubcollapse/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@
157157
"lag_params%rho0": rho0,
158158
"lag_params%T0": T0,
159159
"lag_params%x0": x0,
160-
"lag_params%diffcoefvap": diffVapor,
161160
"lag_params%Thost": T_host,
162161
# Fluids Physical Parameters
163162
# Host medium
@@ -179,6 +178,7 @@
179178
"fluid_pp(2)%M_v": MW_g,
180179
"fluid_pp(2)%k_v": k_g,
181180
"fluid_pp(2)%cp_v": cp_g,
181+
"fluid_pp(2)%D_v": diffVapor,
182182
}
183183
)
184184
)

src/common/m_derived_types.fpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,8 @@ module m_derived_types
357357
real(wp) :: k_v !< Bubble constants (see Preston (2007), Ando (2010))
358358
real(wp) :: cp_v
359359
real(wp) :: G
360+
real(wp) :: D_v !< Vapor diffusivity in the gas
361+
360362
end type physical_parameters
361363
362364
type mpi_io_airfoil_ib_var
@@ -459,7 +461,6 @@ module m_derived_types
459461
real(wp) :: rho0 !< Reference density
460462
real(wp) :: T0, Thost !< Reference temperature and host temperature
461463
real(wp) :: x0 !< Reference length
462-
real(wp) :: diffcoefvap !< Vapor diffusivity in the gas
463464
464465
end type bubbles_lagrange_parameters
465466

src/common/m_helper.fpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,6 @@ contains
116116
real(wp), parameter :: k_poly = 1._wp !<
117117
!! polytropic index used to compute isothermal natural frequency
118118

119-
real(wp), parameter :: Ru = 8314._wp !<
120-
!! universal gas constant
121-
122119
rhol0 = rhoref
123120
pl0 = pref
124121
#ifdef MFC_SIMULATION
@@ -154,15 +151,15 @@ contains
154151
if (thermal == 2) gamma_m = 1._wp
155152

156153
temp = 293.15_wp
157-
D_m = 0.242e-4_wp
154+
D_m = fluid_pp(2)%D_v
158155
uu = sqrt(pl0/rhol0)
159156

160157
omega_ref = 3._wp*k_poly*Ca + 2._wp*(3._wp*k_poly - 1._wp)/Web
161158

162159
!!! thermal properties !!!
163160
! gas constants
164-
R_n = Ru/M_n
165-
R_v = Ru/M_v
161+
R_n = R_uni/M_n
162+
R_v = R_uni/M_v
166163
! phi_vn & phi_nv (phi_nn = phi_vv = 1)
167164
phi_vn = (1._wp + sqrt(mu_v/mu_n)*(M_n/M_v)**(0.25_wp))**2 &
168165
/(sqrt(8._wp)*sqrt(1._wp + M_v/M_n))

src/post_process/m_global_parameters.fpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ contains
424424
fluid_pp(i)%qv = 0._wp
425425
fluid_pp(i)%qvp = 0._wp
426426
fluid_pp(i)%G = dflt_real
427+
fluid_pp(i)%D_v = dflt_real
427428
end do
428429

429430
! Formatted database file(s) structure parameters

src/post_process/m_mpi_proxy.fpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ contains
134134
call MPI_BCAST(fluid_pp(i)%qv, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
135135
call MPI_BCAST(fluid_pp(i)%qvp, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
136136
call MPI_BCAST(fluid_pp(i)%G, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
137+
call MPI_BCAST(fluid_pp(i)%D_v, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
137138
end do
138139
139140
#:for VAR in [ 'pref', 'rhoref', 'R0ref', 'poly_sigma', 'Web', 'Ca', &

src/pre_process/m_global_parameters.fpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ contains
584584
fluid_pp(i)%qv = 0._wp
585585
fluid_pp(i)%qvp = 0._wp
586586
fluid_pp(i)%G = 0._wp
587+
fluid_pp(i)%D_v = dflt_real
587588
end do
588589

589590
Bx0 = dflt_real

src/pre_process/m_mpi_proxy.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,15 @@ contains
144144
! Fluids physical parameters
145145
do i = 1, num_fluids_max
146146
#:for VAR in [ 'gamma','pi_inf','mul0','ss','pv','gamma_v','M_v', &
147-
& 'mu_v','k_v', 'G', 'cv', 'qv', 'qvp' ]
147+
& 'mu_v','k_v', 'G', 'cv', 'qv', 'qvp', 'D_v' ]
148148
call MPI_BCAST(fluid_pp(i)%${VAR}$, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
149149
#:endfor
150150
end do
151151
152152
! Simplex noise and fluid physical parameters
153153
do i = 1, num_fluids_max
154154
#:for VAR in [ 'gamma','pi_inf','mul0','ss','pv','gamma_v','M_v', &
155-
& 'mu_v','k_v', 'G', 'cv', 'qv', 'qvp' ]
155+
& 'mu_v','k_v', 'G', 'cv', 'qv', 'qvp', 'D_v' ]
156156
call MPI_BCAST(fluid_pp(i)%${VAR}$, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
157157
#:endfor
158158

0 commit comments

Comments
 (0)