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

Applies acoustic pressure source terms including focused, planar, and broadband transducers. More...

Functions/Subroutines

impure subroutine, public s_initialize_acoustic_src
 This subroutine initializes the acoustic source module.
impure subroutine, public s_acoustic_src_calculations (q_cons_vf, q_prim_vf, t_step, rhs_vf)
 This subroutine updates the rhs by computing the mass, mom, energy sources.
elemental subroutine s_source_temporal (sim_time, c, ai, term_index, frequency_local, gauss_sigma_time_local, source, sum_bb)
 This subroutine gives the temporally varying amplitude of the pulse.
impure subroutine, public s_precalculate_acoustic_spatial_sources
 This subroutine identifies and precalculates the non-zero acoustic spatial sources before time-stepping.
subroutine s_source_spatial (j, k, l, loc, ai, source, angle, xyz_to_r_ratios)
 This subroutine gives the spatial support of the acoustic source.
subroutine s_source_spatial_planar (ai, sig, r, source)
 This subroutine calculates the spatial support for planar acoustic sources in 1D, 2D, and 3D.
subroutine s_source_spatial_transducer (ai, sig, r, source, angle, xyz_to_r_ratios)
 This subroutine calculates the spatial support for a single transducer in 2D, 2D axisymmetric, and 3D.
subroutine s_source_spatial_transducer_array (ai, sig, r, source, angle, xyz_to_r_ratios)
 This subroutine calculates the spatial support for multiple transducers in 2D, 2D axisymmetric, and 3D.
elemental real(wp) function f_frequency_local (freq_conv_flag, ai, c)
 This function performs wavelength to frequency conversion.
real(wp) function f_gauss_sigma_time_local (gauss_conv_flag, ai, c)
 This function performs Gaussian sigma dist to time conversion.

Variables

integer, dimension(:), allocatable pulse
integer, dimension(:), allocatable support
logical, dimension(:), allocatable dipole
real(wp), dimension(:, :), allocatable, target loc_acoustic
real(wp), dimension(:), allocatable mag
real(wp), dimension(:), allocatable length
real(wp), dimension(:), allocatable height
real(wp), dimension(:), allocatable wavelength
real(wp), dimension(:), allocatable frequency
real(wp), dimension(:), allocatable gauss_sigma_dist
real(wp), dimension(:), allocatable gauss_sigma_time
real(wp), dimension(:), allocatable npulse
real(wp), dimension(:), allocatable dir
real(wp), dimension(:), allocatable delay
real(wp), dimension(:), allocatable foc_length
real(wp), dimension(:), allocatable aperture
real(wp), dimension(:), allocatable element_spacing_angle
real(wp), dimension(:), allocatable element_polygon_ratio
real(wp), dimension(:), allocatable rotate_angle
real(wp), dimension(:), allocatable bb_bandwidth
real(wp), dimension(:), allocatable bb_lowest_freq
integer, dimension(:), allocatable num_elements
integer, dimension(:), allocatable element_on
integer, dimension(:), allocatable bb_num_freq
integer, dimension(:), allocatable source_spatials_num_points
 Number of non-zero source grid points for each source.
type(source_spatial_type), dimension(:), allocatable source_spatials
 Data of non-zero source grid points for each source.
Acoustic source terms
real(wp), dimension(:, :, :), allocatable mass_src
real(wp), dimension(:, :, :), allocatable e_src
real(wp), dimension(:, :, :, :), allocatable mom_src

Detailed Description

Applies acoustic pressure source terms including focused, planar, and broadband transducers.

Function/Subroutine Documentation

◆ f_frequency_local()

elemental real(wp) function m_acoustic_src::f_frequency_local ( logical, intent(in) freq_conv_flag,
integer, intent(in) ai,
real(wp), intent(in) c )

This function performs wavelength to frequency conversion.

Parameters
freq_conv_flagDetermines if frequency is given or wavelength
aiAcoustic source index
cSpeed of sound
Returns
frequency_local Converted frequency

Definition at line 1803 of file m_acoustic_src.fpp.f90.

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

◆ f_gauss_sigma_time_local()

real(wp) function m_acoustic_src::f_gauss_sigma_time_local ( logical, intent(in) gauss_conv_flag,
integer, intent(in) ai,
real(wp), intent(in) c )

This function performs Gaussian sigma dist to time conversion.

Parameters
gauss_conv_flagDetermines if sigma_dist is given or sigma_time
cSpeed of sound
aiAcoustic source index
Returns
gauss_sigma_time_local Converted Gaussian sigma time

Definition at line 1836 of file m_acoustic_src.fpp.f90.

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

◆ s_acoustic_src_calculations()

impure subroutine, public m_acoustic_src::s_acoustic_src_calculations ( type(scalar_field), dimension(sys_size), intent(inout) q_cons_vf,
type(scalar_field), dimension(sys_size), intent(inout) q_prim_vf,
integer, intent(in) t_step,
type(scalar_field), dimension(sys_size), intent(inout) rhs_vf )

This subroutine updates the rhs by computing the mass, mom, energy sources.

Parameters
t_stepCurrent time step
rhs_vfrhs variables
[in,out]q_cons_vfThis variable contains the WENO-reconstructed values of the cell-average conservative variables, which are located in q_cons_vf, at cell-interior Gaussian quadrature points (QP).
[in,out]q_prim_vfThe primitive variables at cell-interior Gaussian quadrature points. These are calculated from the conservative variables and gradient magnitude (GM) of the volume fractions, q_cons_qp and gm_alpha_qp, respectively.

Definition at line 715 of file m_acoustic_src.fpp.f90.

Here is the call graph for this function:

◆ s_initialize_acoustic_src()

impure subroutine, public m_acoustic_src::s_initialize_acoustic_src

This subroutine initializes the acoustic source module.

Definition at line 473 of file m_acoustic_src.fpp.f90.

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

◆ s_precalculate_acoustic_spatial_sources()

impure subroutine, public m_acoustic_src::s_precalculate_acoustic_spatial_sources

This subroutine identifies and precalculates the non-zero acoustic spatial sources before time-stepping.

Definition at line 1176 of file m_acoustic_src.fpp.f90.

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

◆ s_source_spatial()

subroutine m_acoustic_src::s_source_spatial ( integer, intent(in) j,
integer, intent(in) k,
integer, intent(in) l,
real(wp), dimension(3), intent(in) loc,
integer, intent(in) ai,
real(wp), intent(out) source,
real(wp), intent(out) angle,
real(wp), dimension(3), intent(out) xyz_to_r_ratios )

This subroutine gives the spatial support of the acoustic source.

Parameters
jx-index
ky-index
lz-index
locNominal source term location
aiAcoustic source index
sourceSource term amplitude
angleAngle of the source term with respect to the x-axis (for 2D or 2D axisymmetric)
xyz_to_r_ratiosRatios of the [xyz]-component of the source term to the magnitude (for 3D)

Definition at line 1610 of file m_acoustic_src.fpp.f90.

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

◆ s_source_spatial_planar()

subroutine m_acoustic_src::s_source_spatial_planar ( integer, intent(in) ai,
real(wp), intent(in) sig,
real(wp), dimension(3), intent(in) r,
real(wp), intent(out) source )

This subroutine calculates the spatial support for planar acoustic sources in 1D, 2D, and 3D.

Parameters
aiAcoustic source index
sigSigma value for the Gaussian distribution
rDisplacement from source to current point
sourceSource term amplitude

Definition at line 1646 of file m_acoustic_src.fpp.f90.

Here is the caller graph for this function:

◆ s_source_spatial_transducer()

subroutine m_acoustic_src::s_source_spatial_transducer ( integer, intent(in) ai,
real(wp), intent(in) sig,
real(wp), dimension(3), intent(in) r,
real(wp), intent(out) source,
real(wp), intent(out) angle,
real(wp), dimension(3), intent(out) xyz_to_r_ratios )

This subroutine calculates the spatial support for a single transducer in 2D, 2D axisymmetric, and 3D.

Parameters
aiAcoustic source index
sigSigma value for the Gaussian distribution
rDisplacement from source to current point
sourceSource term amplitude
angleAngle of the source term with respect to the x-axis (for 2D or 2D axisymmetric)
xyz_to_r_ratiosRatios of the [xyz]-component of the source term to the magnitude (for 3D)

Definition at line 1676 of file m_acoustic_src.fpp.f90.

Here is the caller graph for this function:

◆ s_source_spatial_transducer_array()

subroutine m_acoustic_src::s_source_spatial_transducer_array ( integer, intent(in) ai,
real(wp), intent(in) sig,
real(wp), dimension(3), intent(in) r,
real(wp), intent(out) source,
real(wp), intent(out) angle,
real(wp), dimension(3), intent(out) xyz_to_r_ratios )

This subroutine calculates the spatial support for multiple transducers in 2D, 2D axisymmetric, and 3D.

Parameters
aiAcoustic source index
sigSigma value for the Gaussian distribution
rDisplacement from source to current point
sourceSource term amplitude
angleAngle of the source term with respect to the x-axis (for 2D or 2D axisymmetric)
xyz_to_r_ratiosRatios of the [xyz]-component of the source term to the magnitude (for 3D)

Definition at line 1721 of file m_acoustic_src.fpp.f90.

Here is the caller graph for this function:

◆ s_source_temporal()

elemental subroutine m_acoustic_src::s_source_temporal ( real(wp), intent(in) sim_time,
real(wp), intent(in) c,
integer, intent(in) ai,
integer, intent(in) term_index,
real(wp), intent(in) frequency_local,
real(wp), intent(in) gauss_sigma_time_local,
real(wp), intent(out) source,
real(wp), intent(in) sum_bb )

This subroutine gives the temporally varying amplitude of the pulse.

Parameters
sim_timeSimulation time
cSound speed
aiAcoustic source index
term_indexIndex of the term to be calculated (1: mass source, 2: momentum source)
frequency_localFrequency at the spatial location for sine and square waves
gauss_sigma_time_localsigma in time for Gaussian pulse
sourceSource term amplitude
sum_bbSum of basis functions

Definition at line 1102 of file m_acoustic_src.fpp.f90.

Here is the caller graph for this function:

Variable Documentation

◆ aperture

real(wp), dimension(:), allocatable m_acoustic_src::aperture

Definition at line 375 of file m_acoustic_src.fpp.f90.

◆ bb_bandwidth

real(wp), dimension(:), allocatable m_acoustic_src::bb_bandwidth

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

◆ bb_lowest_freq

real(wp), dimension(:), allocatable m_acoustic_src::bb_lowest_freq

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

◆ bb_num_freq

integer, dimension(:), allocatable m_acoustic_src::bb_num_freq

Definition at line 414 of file m_acoustic_src.fpp.f90.

◆ delay

real(wp), dimension(:), allocatable m_acoustic_src::delay

Definition at line 351 of file m_acoustic_src.fpp.f90.

◆ dipole

logical, dimension(:), allocatable m_acoustic_src::dipole

Definition at line 324 of file m_acoustic_src.fpp.f90.

◆ dir

real(wp), dimension(:), allocatable m_acoustic_src::dir

Definition at line 351 of file m_acoustic_src.fpp.f90.

◆ e_src

real(wp), dimension(:, :, :), allocatable m_acoustic_src::e_src

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

◆ element_on

integer, dimension(:), allocatable m_acoustic_src::element_on

Definition at line 414 of file m_acoustic_src.fpp.f90.

◆ element_polygon_ratio

real(wp), dimension(:), allocatable m_acoustic_src::element_polygon_ratio

Definition at line 388 of file m_acoustic_src.fpp.f90.

◆ element_spacing_angle

real(wp), dimension(:), allocatable m_acoustic_src::element_spacing_angle

Definition at line 388 of file m_acoustic_src.fpp.f90.

◆ foc_length

real(wp), dimension(:), allocatable m_acoustic_src::foc_length

Definition at line 375 of file m_acoustic_src.fpp.f90.

◆ frequency

real(wp), dimension(:), allocatable m_acoustic_src::frequency

Definition at line 350 of file m_acoustic_src.fpp.f90.

◆ gauss_sigma_dist

real(wp), dimension(:), allocatable m_acoustic_src::gauss_sigma_dist

Definition at line 351 of file m_acoustic_src.fpp.f90.

◆ gauss_sigma_time

real(wp), dimension(:), allocatable m_acoustic_src::gauss_sigma_time

Definition at line 351 of file m_acoustic_src.fpp.f90.

◆ height

real(wp), dimension(:), allocatable m_acoustic_src::height

Definition at line 350 of file m_acoustic_src.fpp.f90.

◆ length

real(wp), dimension(:), allocatable m_acoustic_src::length

Definition at line 350 of file m_acoustic_src.fpp.f90.

◆ loc_acoustic

real(wp), dimension(:, :), allocatable, target m_acoustic_src::loc_acoustic

Definition at line 337 of file m_acoustic_src.fpp.f90.

◆ mag

real(wp), dimension(:), allocatable m_acoustic_src::mag

Definition at line 350 of file m_acoustic_src.fpp.f90.

◆ mass_src

real(wp), dimension(:, :, :), allocatable m_acoustic_src::mass_src

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

◆ mom_src

real(wp), dimension(:, :, :, :), allocatable m_acoustic_src::mom_src

Definition at line 430 of file m_acoustic_src.fpp.f90.

◆ npulse

real(wp), dimension(:), allocatable m_acoustic_src::npulse

Definition at line 351 of file m_acoustic_src.fpp.f90.

◆ num_elements

integer, dimension(:), allocatable m_acoustic_src::num_elements

Definition at line 414 of file m_acoustic_src.fpp.f90.

◆ pulse

integer, dimension(:), allocatable m_acoustic_src::pulse

Definition at line 311 of file m_acoustic_src.fpp.f90.

◆ rotate_angle

real(wp), dimension(:), allocatable m_acoustic_src::rotate_angle

Definition at line 388 of file m_acoustic_src.fpp.f90.

◆ source_spatials

type(source_spatial_type), dimension(:), allocatable m_acoustic_src::source_spatials

Data of non-zero source grid points for each source.

Definition at line 457 of file m_acoustic_src.fpp.f90.

◆ source_spatials_num_points

integer, dimension(:), allocatable m_acoustic_src::source_spatials_num_points

Number of non-zero source grid points for each source.

Definition at line 444 of file m_acoustic_src.fpp.f90.

◆ support

integer, dimension(:), allocatable m_acoustic_src::support

Definition at line 311 of file m_acoustic_src.fpp.f90.

◆ wavelength

real(wp), dimension(:), allocatable m_acoustic_src::wavelength

Definition at line 350 of file m_acoustic_src.fpp.f90.