Skip to content

Commit

Permalink
Merge pull request #180 from anandrdbz/final
Browse files Browse the repository at this point in the history
  • Loading branch information
sbryngelson authored Jul 13, 2023
2 parents f2bee49 + 44ff93d commit 1aefc09
Show file tree
Hide file tree
Showing 68 changed files with 6,041 additions and 2,064 deletions.
33 changes: 10 additions & 23 deletions examples/1D_qbmm/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,14 @@
#Characteristic velocity
uu = math.sqrt( p0/rho0 )
#Cavitation number
# Ca = (p0 - pv)/(rho0*(uu**2.))
Ca = 1.
Ca = (p0 - pv)/(rho0*(uu**2.))
#Weber number
# We = rho0*(uu**2.)*R0ref/ss
We = p0*R0ref/ss
We = rho0*(uu**2.)*R0ref/ss
#Inv. bubble Reynolds number
Re_inv = mul0/(rho0*uu*R0ref)

#IC setup
vf0 = 4.E-5
vf0 = 0.04
n0 = vf0/(math.pi*4.E+00/3.E+00)

cact = 1475.
Expand Down Expand Up @@ -89,11 +87,11 @@
'm' : Nx,
'n' : 0,
'p' : 0,
'dt' : 0.002,
'dt' : dt,
't_step_start' : 0,
't_step_stop' : 8000,
't_step_stop' : 800,
# 't_step_stop' : 4,
't_step_save' : 8000,
't_step_save' : 80,
# 't_step_save' : 1,
# ==========================================================

Expand Down Expand Up @@ -122,7 +120,7 @@
'format' : 1,
'precision' : 2,
'prim_vars_wrt' :'T',
'parallel_io' :'F',
'parallel_io' :'T',
'fd_order' : 1,
#'schlieren_wrt' :'T',
'probe_wrt' :'T',
Expand Down Expand Up @@ -186,34 +184,23 @@
# Bubbles ==================================================
'bubbles' : 'T',
'bubble_model' : 2,
'polytropic' : 'T',
'polytropic' : 'F',
'polydisperse' : 'T',
'R0_type' : 1,
'poly_sigma' : 0.3,
'thermal' : 3,
'R0ref' : myr0,
# 'nb' : 3,
'nb' : 3,
'Ca' : Ca,
# 'Web' : We,
# 'Re_inv' : Re_inv,
'Web' : We,
'Re_inv' : Re_inv,
'qbmm' : 'T',
'dist_type' : 2,
'sigR' : 0.1,
'sigV' : 0.1,
'rhoRV' : 0.0,
# ==========================================================

# Acoustic source ==========================================
'Monopole' : 'T',
'num_mono' : 1,
'Mono(1)%loc(1)' : -5.E-03/x0,
'Mono(1)%npulse' : 1,
'Mono(1)%dir' : 1.,
'Mono(1)%pulse' : 1,
'Mono(1)%mag' : 1*pa,
'Mono(1)%length' : (1./(300000.))*cact/x0,
# ==========================================================
}))

# ==============================================================================
5 changes: 3 additions & 2 deletions src/common/include/inline_conversions.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@
else
c = &
(1d0/gamma + 1d0)* &
(pres + pi_inf/(gamma+1d0))/ &
(rho*(1d0 - adv(num_fluids)))
(pres + pi_inf/(gamma + 1d0)) / &
(rho * (1d0 - adv(num_fluids)))
end if

else
c = ((H - 5d-1*vel_sum)/gamma)
end if
Expand Down
5 changes: 5 additions & 0 deletions src/common/m_derived_types.f90
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ module m_derived_types
real(kind(0d0)), pointer, dimension(:, :, :) :: sf => null()
end type scalar_field

!> Derived type for bubble variables pb and mv at quadrature nodes (qbmm)
type pres_field
real(kind(0d0)), pointer, dimension(:, :, :, :, :) :: sf => null()
end type pres_field

type mpi_io_var
integer, allocatable, dimension(:) :: view
type(scalar_field), allocatable, dimension(:) :: var
Expand Down
Loading

0 comments on commit 1aefc09

Please sign in to comment.