MFC: Simulation
High-fidelity multiphase flow simulation
Loading...
Searching...
No Matches
m_acoustic_src Module Reference

The module contains the subroutines used to create a acoustic source pressure source term. 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

The module contains the subroutines used to create a acoustic source pressure source term.

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
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
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
q_cons_vfConservative variables
q_prim_vfPrimitive variables
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.
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.

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.

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)
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
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)
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)
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
Here is the caller graph for this function:

Variable Documentation

◆ aperture

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

◆ bb_bandwidth

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

◆ bb_lowest_freq

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

◆ bb_num_freq

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

◆ delay

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

◆ dipole

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

◆ dir

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

◆ e_src

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

◆ element_on

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

◆ element_polygon_ratio

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

◆ element_spacing_angle

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

◆ foc_length

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

◆ frequency

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

◆ gauss_sigma_dist

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

◆ gauss_sigma_time

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

◆ height

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

◆ length

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

◆ loc_acoustic

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

◆ mag

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

◆ mass_src

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

◆ mom_src

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

◆ npulse

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

◆ num_elements

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

◆ pulse

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

◆ rotate_angle

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

◆ source_spatials

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

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

◆ source_spatials_num_points

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

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

◆ support

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

◆ wavelength

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