MFC
Exascale flow solver
Loading...
Searching...
No Matches
m_bubbles_el_kernels Module Reference

Kernel functions (Gaussian, delta) that smear Lagrangian bubble effects onto the Eulerian grid. More...

Functions/Subroutines

subroutine s_smoothfunction (nbubs, lbk_rad, lbk_vel, lbk_s, lbk_pos, updatedvar, kcomp)
 Smear the Lagrangian bubble effects onto the Eulerian grid using the selected kernel.
subroutine s_build_cell_list (nbubs, lbk_s)
 Builds a sorted cell list mapping each interior cell (0:m,0:n,0:p) to its resident bubbles. Uses a counting-sort on the host (O(nBubs + N_cells)). Must be called before s_gaussian each RK stage.
subroutine s_deltafunc (nbubs, lbk_rad, lbk_vel, lbk_s, updatedvar, kcomp)
 Cell-centric delta-function smearing using the cell list (no GPU atomics). Each bubble only affects the cell it resides in. The outer GPU loop iterates over interior cells and sums contributions from resident bubbles.
subroutine s_gaussian (nbubs, lbk_rad, lbk_vel, lbk_s, lbk_pos, updatedvar, kcomp)
 Cell-centric gaussian smearing using the cell list (no GPU atomics). Each grid cell accumulates contributions from nearby bubbles looked up via cell_list_start/count/idx.
subroutine s_applygaussian (center, cellaux, nodecoord, stddsv, strength_idx, func)
 Evaluate the Gaussian kernel at a grid node for a given bubble center.
subroutine s_compute_stddsv (cell, volpart, stddsv)
 Calculates the standard deviation of the bubble being smeared in the Eulerian framework.
subroutine s_compute_pressure_gradients (q_prim_vf)
 Precompute cell-centered pressure gradients (dp/dx, dp/dy, dp/dz).
real(wp) function f_interpolate_velocity (pos, cell, i, q_prim_vf)
real(wp) function f_get_bubble_force (pos, rad, rdot, vel, mg, mv, re, rho, cell, i, q_prim_vf)

Variables

real(wp), dimension(:,:,:), allocatable grad_p_x
real(wp), dimension(:,:,:), allocatable grad_p_y
real(wp), dimension(:,:,:), allocatable grad_p_z
real(wp), dimension(:,:), allocatable fd_coeff_x_pgrad
real(wp), dimension(:,:), allocatable fd_coeff_y_pgrad
real(wp), dimension(:,:), allocatable fd_coeff_z_pgrad
integer, dimension(:,:,:), allocatable cell_list_start
integer, dimension(:,:,:), allocatable cell_list_count
integer, dimension(:), allocatable cell_list_idx

Detailed Description

Kernel functions (Gaussian, delta) that smear Lagrangian bubble effects onto the Eulerian grid.

Function/Subroutine Documentation

◆ f_get_bubble_force()

real(wp) function m_bubbles_el_kernels::f_get_bubble_force ( real(wp), intent(in) pos,
real(wp), intent(in) rad,
real(wp), intent(in) rdot,
real(wp), intent(in) vel,
real(wp), intent(in) mg,
real(wp), intent(in) mv,
real(wp), intent(in) re,
real(wp), intent(in) rho,
integer, dimension(3), intent(in) cell,
integer, intent(in) i,
type(scalar_field), dimension(sys_size), intent(in) q_prim_vf )

Definition at line 1307 of file m_bubbles_EL_kernels.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ f_interpolate_velocity()

real(wp) function m_bubbles_el_kernels::f_interpolate_velocity ( real(wp), intent(in) pos,
integer, dimension(3), intent(in) cell,
integer, intent(in) i,
type(scalar_field), dimension(sys_size), intent(in) q_prim_vf )

Definition at line 1175 of file m_bubbles_EL_kernels.fpp.f90.

Here is the caller graph for this function:

◆ s_applygaussian()

subroutine m_bubbles_el_kernels::s_applygaussian ( real(wp), dimension(3), intent(in) center,
integer, dimension(3), intent(in) cellaux,
real(wp), dimension(3), intent(in) nodecoord,
real(wp), intent(in) stddsv,
real(wp), intent(in) strength_idx,
real(wp), intent(out) func )

Evaluate the Gaussian kernel at a grid node for a given bubble center.

3D gaussian function

2D cylindrical function:

2D cartesian function: Equation (48) from Maeda and Colonius 2018

Definition at line 830 of file m_bubbles_EL_kernels.fpp.f90.

Here is the caller graph for this function:

◆ s_build_cell_list()

subroutine m_bubbles_el_kernels::s_build_cell_list ( integer, intent(in) nbubs,
real(wp), dimension(1:lag_params%nbubs_glb,1:3,1:2), intent(in) lbk_s )

Builds a sorted cell list mapping each interior cell (0:m,0:n,0:p) to its resident bubbles. Uses a counting-sort on the host (O(nBubs + N_cells)). Must be called before s_gaussian each RK stage.

Definition at line 448 of file m_bubbles_EL_kernels.fpp.f90.

◆ s_compute_pressure_gradients()

subroutine m_bubbles_el_kernels::s_compute_pressure_gradients ( type(scalar_field), dimension(sys_size), intent(in) q_prim_vf)

Precompute cell-centered pressure gradients (dp/dx, dp/dy, dp/dz).

Definition at line 988 of file m_bubbles_EL_kernels.fpp.f90.

◆ s_compute_stddsv()

subroutine m_bubbles_el_kernels::s_compute_stddsv ( integer, dimension(3), intent(in) cell,
real(wp), intent(in) volpart,
real(wp), intent(out) stddsv )

Calculates the standard deviation of the bubble being smeared in the Eulerian framework.

Compute characteristic distance

Compute characteristic volume

Compute Standard deviaton

Definition at line 925 of file m_bubbles_EL_kernels.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_deltafunc()

subroutine m_bubbles_el_kernels::s_deltafunc ( integer, intent(in) nbubs,
real(wp), dimension(1:lag_params%nbubs_glb,1:2), intent(in) lbk_rad,
real(wp), dimension(1:lag_params%nbubs_glb,1:2), intent(in) lbk_vel,
real(wp), dimension(1:lag_params%nbubs_glb,1:3,1:2), intent(in) lbk_s,
type(scalar_field), dimension(:), intent(inout) updatedvar,
type(scalar_field), dimension(:), intent(inout) kcomp )

Cell-centric delta-function smearing using the cell list (no GPU atomics). Each bubble only affects the cell it resides in. The outer GPU loop iterates over interior cells and sums contributions from resident bubbles.

Definition at line 527 of file m_bubbles_EL_kernels.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_gaussian()

subroutine m_bubbles_el_kernels::s_gaussian ( integer, intent(in) nbubs,
real(wp), dimension(1:lag_params%nbubs_glb,1:2), intent(in) lbk_rad,
real(wp), dimension(1:lag_params%nbubs_glb,1:2), intent(in) lbk_vel,
real(wp), dimension(1:lag_params%nbubs_glb,1:3,1:2), intent(in) lbk_s,
real(wp), dimension(1:lag_params%nbubs_glb,1:3,1:2), intent(in) lbk_pos,
type(scalar_field), dimension(:), intent(inout) updatedvar,
type(scalar_field), dimension(:), intent(inout) kcomp )

Cell-centric gaussian smearing using the cell list (no GPU atomics). Each grid cell accumulates contributions from nearby bubbles looked up via cell_list_start/count/idx.

Definition at line 639 of file m_bubbles_EL_kernels.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_smoothfunction()

subroutine m_bubbles_el_kernels::s_smoothfunction ( integer, intent(in) nbubs,
real(wp), dimension(1:lag_params%nbubs_glb,1:2), intent(in) lbk_rad,
real(wp), dimension(1:lag_params%nbubs_glb,1:2), intent(in) lbk_vel,
real(wp), dimension(1:lag_params%nbubs_glb,1:3,1:2), intent(in) lbk_s,
real(wp), dimension(1:lag_params%nbubs_glb,1:3,1:2), intent(in) lbk_pos,
type(scalar_field), dimension(:), intent(inout) updatedvar,
type(scalar_field), dimension(:), intent(inout) kcomp )

Smear the Lagrangian bubble effects onto the Eulerian grid using the selected kernel.

Definition at line 429 of file m_bubbles_EL_kernels.fpp.f90.

Here is the call graph for this function:

Variable Documentation

◆ cell_list_count

integer, dimension(:,:,:), allocatable m_bubbles_el_kernels::cell_list_count

Definition at line 411 of file m_bubbles_EL_kernels.fpp.f90.

◆ cell_list_idx

integer, dimension(:), allocatable m_bubbles_el_kernels::cell_list_idx

Definition at line 412 of file m_bubbles_EL_kernels.fpp.f90.

◆ cell_list_start

integer, dimension(:,:,:), allocatable m_bubbles_el_kernels::cell_list_start

Definition at line 410 of file m_bubbles_EL_kernels.fpp.f90.

◆ fd_coeff_x_pgrad

real(wp), dimension(:,:), allocatable m_bubbles_el_kernels::fd_coeff_x_pgrad

Definition at line 393 of file m_bubbles_EL_kernels.fpp.f90.

◆ fd_coeff_y_pgrad

real(wp), dimension(:,:), allocatable m_bubbles_el_kernels::fd_coeff_y_pgrad

Definition at line 394 of file m_bubbles_EL_kernels.fpp.f90.

◆ fd_coeff_z_pgrad

real(wp), dimension(:,:), allocatable m_bubbles_el_kernels::fd_coeff_z_pgrad

Definition at line 395 of file m_bubbles_EL_kernels.fpp.f90.

◆ grad_p_x

real(wp), dimension(:,:,:), allocatable m_bubbles_el_kernels::grad_p_x

Definition at line 378 of file m_bubbles_EL_kernels.fpp.f90.

◆ grad_p_y

real(wp), dimension(:,:,:), allocatable m_bubbles_el_kernels::grad_p_y

Definition at line 378 of file m_bubbles_EL_kernels.fpp.f90.

◆ grad_p_z

real(wp), dimension(:,:,:), allocatable m_bubbles_el_kernels::grad_p_z

Definition at line 378 of file m_bubbles_EL_kernels.fpp.f90.