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

Per-cell noncharacteristic boundary condition primitives applied in the ghost cells. More...

Functions/Subroutines

pure real(wp) function, public f_vel_ramp (tau, t0, frac0, t)
 Velocity scaling for a GRCBC inflow that is ramping up: unity unless bc_[x,y,z]vel_in_ramp is set, so an unramped case is untouched. Takes the time as an argument so the caller can evaluate it on the device from mytime, which the time stepper already places there, rather than computing it on the host and copying the result every Runge-Kutta stage.
subroutine s_ghost_cell_extrapolation (q_prim_vf, bc_dir, bc_loc, k, l, q_t_sf)
 Fill ghost cells by copying the nearest boundary cell value along the specified direction.
subroutine s_symmetry (q_prim_vf, bc_dir, bc_loc, k, l, pb_in, mv_in, q_t_sf)
 Apply reflective (symmetry) boundary conditions by mirroring primitive variables and flipping the normal velocity component.
subroutine s_periodic (q_prim_vf, bc_dir, bc_loc, k, l, pb_in, mv_in, q_t_sf)
 Apply periodic boundary conditions by copying values from the opposite domain boundary.
subroutine s_axis (q_prim_vf, pb_in, mv_in, k, l, q_t_sf)
 Apply axis boundary conditions for cylindrical coordinates by reflecting values across the axis with azimuthal phase shift.
subroutine s_slip_wall (q_prim_vf, bc_dir, bc_loc, k, l, q_t_sf)
 Apply slip wall boundary conditions by extrapolating scalars and reflecting the wall-normal velocity component.
subroutine s_no_slip_wall (q_prim_vf, bc_dir, bc_loc, k, l, q_t_sf)
 Apply no-slip wall boundary conditions by reflecting and negating all velocity components at the wall.
subroutine s_dirichlet (q_prim_vf, bc_dir, bc_loc, k, l, q_t_sf)
 Apply Dirichlet boundary conditions by prescribing ghost cell values from stored boundary buffers.
pure real(wp) function f_dir_vel (i, dir)
 Ramp factor for variable i of a Dirichlet ghost cell on a dir-normal face: bc_vel_ramp(dir) for velocities, else 1.
subroutine s_qbmm_extrapolation (bc_dir, bc_loc, k, l, pb_in, mv_in)
 Extrapolate QBMM bubble pressure and mass-vapor variables into ghost cells by copying boundary values.
subroutine s_color_function_periodic (c_divs, bc_dir, bc_loc, k, l)
 Apply periodic boundary conditions to the color function and its divergence fields.
subroutine s_color_function_reflective (c_divs, bc_dir, bc_loc, k, l)
 Apply reflective boundary conditions to the color function and its divergence fields.
subroutine s_color_function_ghost_cell_extrapolation (c_divs, bc_dir, bc_loc, k, l)
 Extrapolate the color function and its divergence into ghost cells by copying boundary values.
subroutine s_f_igr_periodic (jac_sf, bc_dir, bc_loc, k, l)
 Apply periodic boundary conditions to the IGR Jacobian field by copying values from the opposite domain boundary.
subroutine s_f_igr_reflective (jac_sf, bc_dir, bc_loc, k, l)
 Apply reflective boundary conditions to the IGR Jacobian field by mirroring values across the boundary.
subroutine s_f_igr_ghost_cell_extrapolation (jac_sf, bc_dir, bc_loc, k, l)
 Extrapolate the IGR Jacobian field into ghost cells by copying boundary values.
subroutine s_beta_periodic (q_beta, kahan_comp, bc_dir, bc_loc, k, l, nvar)
subroutine s_beta_extrapolation (q_beta, bc_dir, bc_loc, k, l, nvar)
subroutine s_beta_reflective (q_beta, kahan_comp, bc_dir, bc_loc, k, l, nvar)

Variables

type(scalar_field), dimension(:,:), allocatable bc_buffers
logical dirichlet_from_buffers = .false.
real(wp), dimension(3), public bc_vel_ramp = 1._wp
 f_vel_ramp per direction, applied to Dirichlet ghost velocities; set by the time stepper when a ramp is active

Detailed Description

Per-cell noncharacteristic boundary condition primitives applied in the ghost cells.

Function/Subroutine Documentation

◆ f_dir_vel()

pure real(wp) function m_boundary_primitives::f_dir_vel ( integer, intent(in) i,
integer, intent(in) dir )

Ramp factor for variable i of a Dirichlet ghost cell on a dir-normal face: bc_vel_ramp(dir) for velocities, else 1.

Definition at line 1596 of file m_boundary_primitives.fpp.f90.

Here is the caller graph for this function:

◆ f_vel_ramp()

pure real(wp) function, public m_boundary_primitives::f_vel_ramp ( real(wp), intent(in) tau,
real(wp), intent(in) t0,
real(wp), intent(in) frac0,
real(wp), intent(in) t )

Velocity scaling for a GRCBC inflow that is ramping up: unity unless bc_[x,y,z]vel_in_ramp is set, so an unramped case is untouched. Takes the time as an argument so the caller can evaluate it on the device from mytime, which the time stepper already places there, rather than computing it on the host and copying the result every Runge-Kutta stage.

Definition at line 426 of file m_boundary_primitives.fpp.f90.

◆ s_axis()

subroutine m_boundary_primitives::s_axis ( 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,
integer, intent(in) k,
integer, intent(in) l,
type(scalar_field), intent(inout), optional q_t_sf )

Apply axis boundary conditions for cylindrical coordinates by reflecting values across the axis with azimuthal phase shift.

Definition at line 991 of file m_boundary_primitives.fpp.f90.

◆ s_beta_extrapolation()

subroutine m_boundary_primitives::s_beta_extrapolation ( type(scalar_field), dimension(num_dims + 1), intent(inout) q_beta,
integer, intent(in) bc_dir,
integer, intent(in) bc_loc,
integer, intent(in) k,
integer, intent(in) l,
integer, intent(in) nvar )

Definition at line 2346 of file m_boundary_primitives.fpp.f90.

◆ s_beta_periodic()

subroutine m_boundary_primitives::s_beta_periodic ( type(scalar_field), dimension(num_dims + 1), intent(inout) q_beta,
type(scalar_field), dimension(num_dims + 1), intent(inout) kahan_comp,
integer, intent(in) bc_dir,
integer, intent(in) bc_loc,
integer, intent(in) k,
integer, intent(in) l,
integer, intent(in) nvar )

Definition at line 2237 of file m_boundary_primitives.fpp.f90.

◆ s_beta_reflective()

subroutine m_boundary_primitives::s_beta_reflective ( type(scalar_field), dimension(num_dims + 1), intent(inout) q_beta,
type(scalar_field), dimension(num_dims + 1), intent(inout) kahan_comp,
integer, intent(in) bc_dir,
integer, intent(in) bc_loc,
integer, intent(in) k,
integer, intent(in) l,
integer, intent(in) nvar )

Definition at line 2436 of file m_boundary_primitives.fpp.f90.

◆ s_color_function_ghost_cell_extrapolation()

subroutine m_boundary_primitives::s_color_function_ghost_cell_extrapolation ( type(scalar_field), dimension(num_dims + 1), intent(inout) c_divs,
integer, intent(in) bc_dir,
integer, intent(in) bc_loc,
integer, intent(in) k,
integer, intent(in) l )

Extrapolate the color function and its divergence into ghost cells by copying boundary values.

Definition at line 1914 of file m_boundary_primitives.fpp.f90.

◆ s_color_function_periodic()

subroutine m_boundary_primitives::s_color_function_periodic ( type(scalar_field), dimension(num_dims + 1), intent(inout) c_divs,
integer, intent(in) bc_dir,
integer, intent(in) bc_loc,
integer, intent(in) k,
integer, intent(in) l )

Apply periodic boundary conditions to the color function and its divergence fields.

Definition at line 1710 of file m_boundary_primitives.fpp.f90.

◆ s_color_function_reflective()

subroutine m_boundary_primitives::s_color_function_reflective ( type(scalar_field), dimension(num_dims + 1), intent(inout) c_divs,
integer, intent(in) bc_dir,
integer, intent(in) bc_loc,
integer, intent(in) k,
integer, intent(in) l )

Apply reflective boundary conditions to the color function and its divergence fields.

Definition at line 1800 of file m_boundary_primitives.fpp.f90.

◆ s_dirichlet()

subroutine m_boundary_primitives::s_dirichlet ( type(scalar_field), dimension(sys_size), intent(inout) q_prim_vf,
integer, intent(in) bc_dir,
integer, intent(in) bc_loc,
integer, intent(in) k,
integer, intent(in) l,
type(scalar_field), intent(inout), optional q_t_sf )

Apply Dirichlet boundary conditions by prescribing ghost cell values from stored boundary buffers.

Parameters
[in,out]q_t_sfx-direction
[in,out]q_t_sfbc_xend
[in,out]q_t_sfy-direction
[in,out]q_t_sfbc_ybeg
[in,out]q_t_sfbc_yend
[in,out]q_t_sfz-direction
[in,out]q_t_sfbc_zbeg
[in,out]q_t_sfbc_zend

Definition at line 1466 of file m_boundary_primitives.fpp.f90.

Here is the call graph for this function:

◆ s_f_igr_ghost_cell_extrapolation()

subroutine m_boundary_primitives::s_f_igr_ghost_cell_extrapolation ( type(scalar_field), dimension(1:), intent(inout) jac_sf,
integer, intent(in) bc_dir,
integer, intent(in) bc_loc,
integer, intent(in) k,
integer, intent(in) l )

Extrapolate the IGR Jacobian field into ghost cells by copying boundary values.

Definition at line 2160 of file m_boundary_primitives.fpp.f90.

◆ s_f_igr_periodic()

subroutine m_boundary_primitives::s_f_igr_periodic ( type(scalar_field), dimension(1:), intent(inout) jac_sf,
integer, intent(in) bc_dir,
integer, intent(in) bc_loc,
integer, intent(in) k,
integer, intent(in) l )

Apply periodic boundary conditions to the IGR Jacobian field by copying values from the opposite domain boundary.

Definition at line 2004 of file m_boundary_primitives.fpp.f90.

◆ s_f_igr_reflective()

subroutine m_boundary_primitives::s_f_igr_reflective ( type(scalar_field), dimension(1:), intent(inout) jac_sf,
integer, intent(in) bc_dir,
integer, intent(in) bc_loc,
integer, intent(in) k,
integer, intent(in) l )

Apply reflective boundary conditions to the IGR Jacobian field by mirroring values across the boundary.

Definition at line 2082 of file m_boundary_primitives.fpp.f90.

◆ s_ghost_cell_extrapolation()

subroutine m_boundary_primitives::s_ghost_cell_extrapolation ( type(scalar_field), dimension(sys_size), intent(inout) q_prim_vf,
integer, intent(in) bc_dir,
integer, intent(in) bc_loc,
integer, intent(in) k,
integer, intent(in) l,
type(scalar_field), intent(inout), optional q_t_sf )

Fill ghost cells by copying the nearest boundary cell value along the specified direction.

Parameters
[in,out]q_t_sfx-direction
[in,out]q_t_sfbc_xend
[in,out]q_t_sfy-direction
[in,out]q_t_sfbc_ybeg
[in,out]q_t_sfbc_yend
[in,out]q_t_sfz-direction
[in,out]q_t_sfbc_zbeg
[in,out]q_t_sfbc_zend

Definition at line 456 of file m_boundary_primitives.fpp.f90.

Here is the caller graph for this function:

◆ s_no_slip_wall()

subroutine m_boundary_primitives::s_no_slip_wall ( type(scalar_field), dimension(sys_size), intent(inout) q_prim_vf,
integer, intent(in) bc_dir,
integer, intent(in) bc_loc,
integer, intent(in) k,
integer, intent(in) l,
type(scalar_field), intent(inout), optional q_t_sf )

Apply no-slip wall boundary conditions by reflecting and negating all velocity components at the wall.

Parameters
[in,out]q_t_sfx-direction
[in,out]q_t_sfbc_xbeg
[in,out]q_t_sfbc_xend
[in,out]q_t_sfy-direction
[in,out]q_t_sfbc_ybeg
[in,out]q_t_sfbc_yend
[in,out]q_t_sfz-direction
[in,out]q_t_sfbc_zbeg
[in,out]q_t_sfbc_zend

Definition at line 1258 of file m_boundary_primitives.fpp.f90.

◆ s_periodic()

subroutine m_boundary_primitives::s_periodic ( type(scalar_field), dimension(sys_size), intent(inout) q_prim_vf,
integer, intent(in) bc_dir,
integer, intent(in) bc_loc,
integer, intent(in) k,
integer, intent(in) l,
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,
type(scalar_field), intent(inout), optional q_t_sf )

Apply periodic boundary conditions by copying values from the opposite domain boundary.

Parameters
[in,out]q_t_sfx-direction
[in,out]q_t_sfbc_xbeg
[in,out]q_t_sfbc_xend
[in,out]q_t_sfy-direction
[in,out]q_t_sfbc_ybeg
[in,out]q_t_sfbc_yend
[in,out]q_t_sfz-direction
[in,out]q_t_sfbc_zbeg
[in,out]q_t_sfbc_zend

Definition at line 817 of file m_boundary_primitives.fpp.f90.

◆ s_qbmm_extrapolation()

subroutine m_boundary_primitives::s_qbmm_extrapolation ( integer, intent(in) bc_dir,
integer, intent(in) bc_loc,
integer, intent(in) k,
integer, intent(in) l,
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 )

Extrapolate QBMM bubble pressure and mass-vapor variables into ghost cells by copying boundary values.

Definition at line 1622 of file m_boundary_primitives.fpp.f90.

◆ s_slip_wall()

subroutine m_boundary_primitives::s_slip_wall ( type(scalar_field), dimension(sys_size), intent(inout) q_prim_vf,
integer, intent(in) bc_dir,
integer, intent(in) bc_loc,
integer, intent(in) k,
integer, intent(in) l,
type(scalar_field), intent(inout), optional q_t_sf )

Apply slip wall boundary conditions by extrapolating scalars and reflecting the wall-normal velocity component.

Parameters
[in,out]q_t_sfx-direction
[in,out]q_t_sfbc_xbeg
[in,out]q_t_sfbc_xend
[in,out]q_t_sfy-direction
[in,out]q_t_sfbc_ybeg
[in,out]q_t_sfbc_yend
[in,out]q_t_sfz-direction
[in,out]q_t_sfbc_zbeg
[in,out]q_t_sfbc_zend

Definition at line 1071 of file m_boundary_primitives.fpp.f90.

◆ s_symmetry()

subroutine m_boundary_primitives::s_symmetry ( type(scalar_field), dimension(sys_size), intent(inout) q_prim_vf,
integer, intent(in) bc_dir,
integer, intent(in) bc_loc,
integer, intent(in) k,
integer, intent(in) l,
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,
type(scalar_field), intent(inout), optional q_t_sf )

Apply reflective (symmetry) boundary conditions by mirroring primitive variables and flipping the normal velocity component.

Parameters
[in,out]q_t_sfx-direction
[in,out]q_t_sfbc_xbeg
[in,out]q_t_sfbc_xend
[in,out]q_t_sfy-direction
[in,out]q_t_sfbc_ybeg
[in,out]q_t_sfbc_yend
[in,out]q_t_sfz-direction
[in,out]q_t_sfbc_zbeg
[in,out]q_t_sfbc_zend

Definition at line 578 of file m_boundary_primitives.fpp.f90.

Variable Documentation

◆ bc_buffers

type(scalar_field), dimension(:,:), allocatable m_boundary_primitives::bc_buffers

Definition at line 376 of file m_boundary_primitives.fpp.f90.

◆ bc_vel_ramp

real(wp), dimension(3), public m_boundary_primitives::bc_vel_ramp = 1._wp

f_vel_ramp per direction, applied to Dirichlet ghost velocities; set by the time stepper when a ramp is active

Definition at line 405 of file m_boundary_primitives.fpp.f90.

◆ dirichlet_from_buffers

logical m_boundary_primitives::dirichlet_from_buffers = .false.

Definition at line 390 of file m_boundary_primitives.fpp.f90.