Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/module_categories.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"m_bubbles_EE",
"m_bubbles_EL",
"m_bubbles_EL_kernels",
"m_particles_EL",
"m_particles_EL_kernels",
"m_qbmm",
"m_hyperelastic",
"m_hypoelastic",
Expand Down
371 changes: 371 additions & 0 deletions src/common/m_boundary_common.fpp

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/common/m_constants.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ module m_constants
real(wp), parameter :: initial_distance_buffer = 1.e12_wp !< Initialized levelset distance for the shortest path pair algorithm

! Lagrange bubbles constants
integer, parameter :: mapCells = 3 !< Number of cells around the bubble where the smoothening function will have effect
integer, parameter :: mapCells = 3 !< Number of cells around the bubble/particle where the smoothening function will have effect
real(wp), parameter :: R_uni = 8314._wp !< Universal gas constant - J/kmol/K
integer, parameter :: lag_io_vars = 21 ! Number of variables per particle for MPI_IO
integer, parameter :: lag_io_vars = 21 !< Number of variables per particle for MPI_IO

! Strang Splitting constants
real(wp), parameter :: dflt_adap_dt_tol = 1.e-4_wp !< Default tolerance for adaptive step size
Expand Down
20 changes: 20 additions & 0 deletions src/common/m_derived_types.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,12 @@ module m_derived_types
real(wp) :: R_g !< gas constant of gas (bubble)
end type subgrid_bubble_physical_parameters

!> Derived type annexing the physical parameters required for sub-grid particle models
type subgrid_particle_physical_parameters
real(wp) :: rho0ref_particle !< reference density
real(wp) :: cp_particle !<solid particle specific heat
end type subgrid_particle_physical_parameters

type mpi_io_airfoil_ib_var
integer, dimension(2) :: view
type(vec3_dt), allocatable, dimension(:) :: var
Expand Down Expand Up @@ -487,11 +493,25 @@ module m_derived_types
integer :: smooth_type !< Smoothing function. 1: Gaussian, 2:Delta 3x3
logical :: heatTransfer_model !< Activate HEAT transfer model at the bubble-liquid interface
logical :: massTransfer_model !< Activate MASS transfer model at the bubble-liquid interface
logical :: write_void_evol !< Write files to track evolution of void fraction at each time step
logical :: write_bubbles !< Write files to track the bubble evolution each time step
logical :: write_bubbles_stats !< Write the maximum and minimum radius of each bubble
integer :: nBubs_glb !< Global number of bubbles
integer :: nParticles_glb !< Global number of particles
integer :: vel_model !< Particle velocity model
integer :: drag_model !< Particle drag model
logical :: pressure_force !< Include pressure force translational motion
logical :: gravity_force !< Include gravity force in translational motion
integer :: qs_drag_model !< Particle QS drag model
integer :: stokes_drag !< Particle stokes drag
integer :: added_mass_model !< Particle added mass model
integer :: interpolation_order !< Fluid-to-Particle barycentric interpolation order
logical :: collision_force !< Include collision forces

character(LEN=pathlen_max) :: input_path !< Path to lag_bubbles.dat
real(wp) :: epsilonb !< Standard deviation scaling for the gaussian function
real(wp) :: charwidth !< Domain virtual depth (z direction, for 2D simulations)
integer :: charNz !< Number of grid cells in characteristic depth
real(wp) :: valmaxvoid !< Maximum void fraction permitted

end type bubbles_lagrange_parameters
Expand Down
11 changes: 10 additions & 1 deletion src/common/m_helper.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ module m_helper
f_cut_on, &
f_cut_off, &
s_downsample_data, &
s_upsample_data
s_upsample_data, &
s_initialize_particles_model

contains

Expand Down Expand Up @@ -111,6 +112,13 @@ contains

end subroutine s_print_2D_array

impure subroutine s_initialize_particles_model()

rho0ref_particle = particle_pp%rho0ref_particle
cp_particle = particle_pp%cp_particle

end subroutine s_initialize_particles_model

!>
!! bubbles_euler + polytropic
!! bubbles_euler + non-polytropic
Expand Down Expand Up @@ -160,6 +168,7 @@ contains
R_v = bub_pp%R_v; R_g = bub_pp%R_g
Tw = bub_pp%T0ref
end if

if (bubbles_lagrange) then
cp_v = bub_pp%cp_v; cp_g = bub_pp%cp_g
k_vl = bub_pp%k_v; k_gl = bub_pp%k_g
Expand Down
14 changes: 10 additions & 4 deletions src/common/m_helper_basic.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,14 @@ contains

subroutine s_configure_coordinate_bounds(recon_type, weno_polyn, muscl_polyn, &
igr_order, buff_size, idwint, idwbuff, &
viscous, bubbles_lagrange, m, n, p, num_dims, igr, ib)
viscous, bubbles_lagrange, particles_lagrange, &
m, n, p, num_dims, igr, ib, fd_number)

integer, intent(in) :: recon_type, weno_polyn, muscl_polyn
integer, intent(in) :: m, n, p, num_dims, igr_order
integer, intent(in) :: m, n, p, num_dims, igr_order, fd_number
integer, intent(inout) :: buff_size
type(int_bounds_info), dimension(3), intent(inout) :: idwint, idwbuff
logical, intent(in) :: viscous, bubbles_lagrange
logical, intent(in) :: viscous, bubbles_lagrange, particles_lagrange
logical, intent(in) :: igr
logical, intent(in) :: ib

Expand All @@ -142,7 +143,12 @@ contains

! Correction for smearing function in the lagrangian subgrid bubble model
if (bubbles_lagrange) then
buff_size = max(buff_size, 6)
buff_size = max(buff_size + fd_number, mapCells + 1 + fd_number)
end if

! Correction for smearing function in the lagrangian subgrid particle model
if (particles_lagrange) then
buff_size = max(buff_size + fd_number, mapCells + 1 + fd_number)
end if

if (ib) then
Expand Down
Loading
Loading