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

Ghost-node immersed boundary method: locates ghost/image points, computes interpolation coefficients, and corrects the flow state. More...

Functions/Subroutines

impure subroutine, public s_initialize_ibm_module ()
 Allocates memory for the variables in the IBM module.
impure subroutine, public s_ibm_setup ()
 Initializes the values of various IBM variables, such as ghost points and image points.
subroutine, public s_ibm_correct_state (q_cons_vf, q_prim_vf, pb_in, mv_in)
 Update the conservative variables at the ghost points.
impure subroutine, private s_compute_image_points (ghost_points_in)
 Compute the image points for each ghost point.
subroutine, private s_find_num_ghost_points (num_gps_out)
 Count the number of ghost points for memory allocation.
subroutine, private s_find_ghost_points (ghost_points_in)
 Locate all ghost points in the domain.
subroutine, private s_compute_interpolation_coeffs (ghost_points_in)
 Compute the interpolation coefficients for image points.
subroutine, private s_interpolate_image_point (q_prim_vf, gp, alpha_rho_ip, alpha_ip, pres_ip, vel_ip, c_ip, r_ip, v_ip, pb_ip, mv_ip, nmom_ip, pb_in, mv_in, presb_ip, massv_ip)
 Interpolate primitive variables to a ghost point's image point using bilinear or trilinear interpolation.
impure subroutine s_update_mib (num_ibs)
 Resets the current indexes of immersed boundaries and replaces them after updating the position of each moving immersed boundary.
subroutine s_compute_ib_forces (q_prim_vf, fluid_pp)
 Compute pressure and viscous forces and torques on immersed bodies via volume integration.
subroutine s_compute_centroid_offset (ib_marker)
 Computes the center of mass for IB patch types where we are unable to determine their center of mass analytically. These patches include things like NACA airfoils and STL models.
subroutine s_compute_moment_of_inertia (patch, axis, moment)
 Computes the moment of inertia for an immersed boundary.
subroutine s_wrap_periodic_ibs ()
 Wrap immersed boundary positions across periodic domain boundaries.
subroutine s_communicate_ib_forces (forces, torques)
 Swaps ownership of IBs and passes ownership of IBs to neighbor processors Reduces forces and torques across the local neighborhood without a global allreduce. Accumulation phase: 2 passes per dimension receiving from the low-index (-X) neighbor. Pass 1: add received values; save what was received as recv_snap. Pass 2: send current (post-pass-1) values; add received; subtract recv_snap to remove double-counting of the direct contribution already added in pass 1. Back-propagation phase: 2 passes per dimension receiving from the high-index (+X) neighbor, each overwriting local forces with the neighbor's accumulated total.
subroutine s_handoff_ib_ownership ()
subroutine s_get_neighborhood_idx (gbl_idx, neighborhood_idx)
subroutine s_update_ib_lookup ()
impure subroutine, public s_finalize_ibm_module ()
 Finalize the IBM module.

Variables

type(integer_field), public ib_markers
type(ghost_point), dimension(:), allocatable ghost_points
integer num_gps
 Number of ghost points.
logical moving_immersed_boundary_flag
integer, dimension(:), allocatable send_ids
integer, dimension(:), allocatable recv_ids
real(wp), dimension(:,:), allocatable send_ft
real(wp), dimension(:,:), allocatable recv_ft
real(wp), dimension(:,:), allocatable recv_forces_snap
real(wp), dimension(:,:), allocatable recv_torques_snap

Detailed Description

Ghost-node immersed boundary method: locates ghost/image points, computes interpolation coefficients, and corrects the flow state.

Function/Subroutine Documentation

◆ s_communicate_ib_forces()

subroutine m_ibm::s_communicate_ib_forces ( real(wp), dimension(num_ibs, 3), intent(inout) forces,
real(wp), dimension(num_ibs, 3), intent(inout) torques )

Swaps ownership of IBs and passes ownership of IBs to neighbor processors Reduces forces and torques across the local neighborhood without a global allreduce. Accumulation phase: 2 passes per dimension receiving from the low-index (-X) neighbor. Pass 1: add received values; save what was received as recv_snap. Pass 2: send current (post-pass-1) values; add received; subtract recv_snap to remove double-counting of the direct contribution already added in pass 1. Back-propagation phase: 2 passes per dimension receiving from the high-index (+X) neighbor, each overwriting local forces with the neighbor's accumulated total.

Definition at line 2504 of file m_ibm.fpp.f90.

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

◆ s_compute_centroid_offset()

subroutine m_ibm::s_compute_centroid_offset ( integer, intent(in) ib_marker)

Computes the center of mass for IB patch types where we are unable to determine their center of mass analytically. These patches include things like NACA airfoils and STL models.

Definition at line 2259 of file m_ibm.fpp.f90.

Here is the caller graph for this function:

◆ s_compute_ib_forces()

subroutine m_ibm::s_compute_ib_forces ( type(scalar_field), dimension(1:sys_size), intent(in) q_prim_vf,
type(physical_parameters), dimension(1:num_fluids), intent(in) fluid_pp )

Compute pressure and viscous forces and torques on immersed bodies via volume integration.

Definition at line 2032 of file m_ibm.fpp.f90.

Here is the call graph for this function:

◆ s_compute_image_points()

impure subroutine, private m_ibm::s_compute_image_points ( type(ghost_point), dimension(num_gps), intent(inout) ghost_points_in)
private

Compute the image points for each ghost point.

Definition at line 1228 of file m_ibm.fpp.f90.

Here is the caller graph for this function:

◆ s_compute_interpolation_coeffs()

subroutine, private m_ibm::s_compute_interpolation_coeffs ( type(ghost_point), dimension(num_gps), intent(inout) ghost_points_in)
private

Compute the interpolation coefficients for image points.

Definition at line 1598 of file m_ibm.fpp.f90.

Here is the caller graph for this function:

◆ s_compute_moment_of_inertia()

subroutine m_ibm::s_compute_moment_of_inertia ( type(ib_patch_parameters), intent(in) patch,
real(wp), dimension(3), intent(in) axis,
real(wp), intent(out) moment )

Computes the moment of inertia for an immersed boundary.

Definition at line 2319 of file m_ibm.fpp.f90.

Here is the caller graph for this function:

◆ s_finalize_ibm_module()

impure subroutine, public m_ibm::s_finalize_ibm_module

Finalize the IBM module.

Definition at line 3487 of file m_ibm.fpp.f90.

◆ s_find_ghost_points()

subroutine, private m_ibm::s_find_ghost_points ( type(ghost_point), dimension(num_gps), intent(inout) ghost_points_in)
private

Locate all ghost points in the domain.

Definition at line 1460 of file m_ibm.fpp.f90.

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

◆ s_find_num_ghost_points()

subroutine, private m_ibm::s_find_num_ghost_points ( integer, intent(out) num_gps_out)
private

Count the number of ghost points for memory allocation.

Definition at line 1373 of file m_ibm.fpp.f90.

Here is the caller graph for this function:

◆ s_get_neighborhood_idx()

subroutine m_ibm::s_get_neighborhood_idx ( integer, intent(in) gbl_idx,
integer, intent(out) neighborhood_idx )

Definition at line 3393 of file m_ibm.fpp.f90.

Here is the caller graph for this function:

◆ s_handoff_ib_ownership()

subroutine m_ibm::s_handoff_ib_ownership

Definition at line 3223 of file m_ibm.fpp.f90.

Here is the call graph for this function:

◆ s_ibm_correct_state()

subroutine, public m_ibm::s_ibm_correct_state ( type(scalar_field), dimension(sys_size), intent(inout) q_cons_vf,
type(scalar_field), dimension(sys_size), intent(inout) q_prim_vf,
real(stp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), intent(inout), optional pb_in,
real(stp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), intent(inout), optional mv_in )

Update the conservative variables at the ghost points.

Parameters
[in,out]q_cons_vfPrimitive Variables
[in,out]q_prim_vfPrimitive Variables

Definition at line 811 of file m_ibm.fpp.f90.

Here is the call graph for this function:

◆ s_ibm_setup()

impure subroutine, public m_ibm::s_ibm_setup

Initializes the values of various IBM variables, such as ghost points and image points.

Definition at line 553 of file m_ibm.fpp.f90.

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

◆ s_initialize_ibm_module()

impure subroutine, public m_ibm::s_initialize_ibm_module

Allocates memory for the variables in the IBM module.

Definition at line 408 of file m_ibm.fpp.f90.

Here is the caller graph for this function:

◆ s_interpolate_image_point()

subroutine, private m_ibm::s_interpolate_image_point ( type(scalar_field), dimension(sys_size), intent(in) q_prim_vf,
type(ghost_point), intent(in) gp,
real(wp), dimension(num_fluids), intent(inout) alpha_rho_ip,
real(wp), dimension(num_fluids), intent(inout) alpha_ip,
real(wp), intent(inout) pres_ip,
real(wp), dimension(3), intent(inout) vel_ip,
real(wp), intent(inout) c_ip,
real(wp), dimension(:), intent(inout), optional r_ip,
real(wp), dimension(:), intent(inout), optional v_ip,
real(wp), dimension(:), intent(inout), optional pb_ip,
real(wp), dimension(:), intent(inout), optional mv_ip,
real(wp), dimension(:), intent(inout), optional nmom_ip,
real(stp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), intent(in), optional pb_in,
real(stp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), intent(in), optional mv_in,
real(wp), dimension(:), intent(inout), optional presb_ip,
real(wp), dimension(:), intent(inout), optional massv_ip )
private

Interpolate primitive variables to a ghost point's image point using bilinear or trilinear interpolation.

Parameters
[in]q_prim_vfPrimitive Variables

Definition at line 1735 of file m_ibm.fpp.f90.

Here is the caller graph for this function:

◆ s_update_ib_lookup()

subroutine m_ibm::s_update_ib_lookup

Definition at line 3419 of file m_ibm.fpp.f90.

Here is the caller graph for this function:

◆ s_update_mib()

impure subroutine m_ibm::s_update_mib ( integer, intent(in) num_ibs)

Resets the current indexes of immersed boundaries and replaces them after updating the position of each moving immersed boundary.

Definition at line 1926 of file m_ibm.fpp.f90.

Here is the call graph for this function:

◆ s_wrap_periodic_ibs()

subroutine m_ibm::s_wrap_periodic_ibs

Wrap immersed boundary positions across periodic domain boundaries.

Definition at line 2407 of file m_ibm.fpp.f90.

Variable Documentation

◆ ghost_points

type(ghost_point), dimension(:), allocatable m_ibm::ghost_points

Definition at line 359 of file m_ibm.fpp.f90.

◆ ib_markers

type(integer_field), public m_ibm::ib_markers

Definition at line 346 of file m_ibm.fpp.f90.

◆ moving_immersed_boundary_flag

logical m_ibm::moving_immersed_boundary_flag

Definition at line 398 of file m_ibm.fpp.f90.

◆ num_gps

integer m_ibm::num_gps

Number of ghost points.

Definition at line 372 of file m_ibm.fpp.f90.

◆ recv_forces_snap

real(wp), dimension(:,:), allocatable m_ibm::recv_forces_snap

Definition at line 403 of file m_ibm.fpp.f90.

◆ recv_ft

real(wp), dimension(:,:), allocatable m_ibm::recv_ft

Definition at line 402 of file m_ibm.fpp.f90.

◆ recv_ids

integer, dimension(:), allocatable m_ibm::recv_ids

Definition at line 401 of file m_ibm.fpp.f90.

◆ recv_torques_snap

real(wp), dimension(:,:), allocatable m_ibm::recv_torques_snap

Definition at line 403 of file m_ibm.fpp.f90.

◆ send_ft

real(wp), dimension(:,:), allocatable m_ibm::send_ft

Definition at line 402 of file m_ibm.fpp.f90.

◆ send_ids

integer, dimension(:), allocatable m_ibm::send_ids

Definition at line 401 of file m_ibm.fpp.f90.