|
MFC: Simulation
High-fidelity multiphase flow simulation
|
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 |
The module contains the subroutines used to create a acoustic source pressure source term.
| 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.
| freq_conv_flag | Determines if frequency is given or wavelength |
| ai | Acoustic source index |
| c | Speed of sound |
| 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.
| gauss_conv_flag | Determines if sigma_dist is given or sigma_time |
| c | Speed of sound |
| ai | Acoustic source index |
| 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.
| q_cons_vf | Conservative variables | |
| q_prim_vf | Primitive variables | |
| t_step | Current time step | |
| rhs_vf | rhs variables | |
| [in,out] | q_cons_vf | This 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_vf | The 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. |
| impure subroutine, public m_acoustic_src::s_initialize_acoustic_src |
This subroutine initializes the acoustic source module.
| 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.
| 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.
| j | x-index |
| k | y-index |
| l | z-index |
| loc | Nominal source term location |
| ai | Acoustic source index |
| source | Source term amplitude |
| angle | Angle of the source term with respect to the x-axis (for 2D or 2D axisymmetric) |
| xyz_to_r_ratios | Ratios of the [xyz]-component of the source term to the magnitude (for 3D) |
| 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.
| ai | Acoustic source index |
| sig | Sigma value for the Gaussian distribution |
| r | Displacement from source to current point |
| source | Source term amplitude |
| 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.
| ai | Acoustic source index |
| sig | Sigma value for the Gaussian distribution |
| r | Displacement from source to current point |
| source | Source term amplitude |
| angle | Angle of the source term with respect to the x-axis (for 2D or 2D axisymmetric) |
| xyz_to_r_ratios | Ratios of the [xyz]-component of the source term to the magnitude (for 3D) |
| 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.
| ai | Acoustic source index |
| sig | Sigma value for the Gaussian distribution |
| r | Displacement from source to current point |
| source | Source term amplitude |
| angle | Angle of the source term with respect to the x-axis (for 2D or 2D axisymmetric) |
| xyz_to_r_ratios | Ratios of the [xyz]-component of the source term to the magnitude (for 3D) |
| 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.
| sim_time | Simulation time |
| c | Sound speed |
| ai | Acoustic source index |
| term_index | Index of the term to be calculated (1: mass source, 2: momentum source) |
| frequency_local | Frequency at the spatial location for sine and square waves |
| gauss_sigma_time_local | sigma in time for Gaussian pulse |
| source | Source term amplitude |
| real(wp), dimension(:), allocatable m_acoustic_src::aperture |
| real(wp), dimension(:), allocatable m_acoustic_src::bb_bandwidth |
| real(wp), dimension(:), allocatable m_acoustic_src::bb_lowest_freq |
| integer, dimension(:), allocatable m_acoustic_src::bb_num_freq |
| real(wp), dimension(:), allocatable m_acoustic_src::delay |
| logical, dimension(:), allocatable m_acoustic_src::dipole |
| real(wp), dimension(:), allocatable m_acoustic_src::dir |
| real(wp), dimension(:, :, :), allocatable m_acoustic_src::e_src |
| integer, dimension(:), allocatable m_acoustic_src::element_on |
| real(wp), dimension(:), allocatable m_acoustic_src::element_polygon_ratio |
| real(wp), dimension(:), allocatable m_acoustic_src::element_spacing_angle |
| real(wp), dimension(:), allocatable m_acoustic_src::foc_length |
| real(wp), dimension(:), allocatable m_acoustic_src::frequency |
| real(wp), dimension(:), allocatable m_acoustic_src::gauss_sigma_dist |
| real(wp), dimension(:), allocatable m_acoustic_src::gauss_sigma_time |
| real(wp), dimension(:), allocatable m_acoustic_src::height |
| real(wp), dimension(:), allocatable m_acoustic_src::length |
| real(wp), dimension(:, :), allocatable, target m_acoustic_src::loc_acoustic |
| real(wp), dimension(:), allocatable m_acoustic_src::mag |
| real(wp), dimension(:, :, :), allocatable m_acoustic_src::mass_src |
| real(wp), dimension(:, :, :, :), allocatable m_acoustic_src::mom_src |
| real(wp), dimension(:), allocatable m_acoustic_src::npulse |
| integer, dimension(:), allocatable m_acoustic_src::num_elements |
| integer, dimension(:), allocatable m_acoustic_src::pulse |
| real(wp), dimension(:), allocatable m_acoustic_src::rotate_angle |
| type(source_spatial_type), dimension(:), allocatable m_acoustic_src::source_spatials |
Data of non-zero source grid points for each source.
| integer, dimension(:), allocatable m_acoustic_src::source_spatials_num_points |
Number of non-zero source grid points for each source.
| integer, dimension(:), allocatable m_acoustic_src::support |
| real(wp), dimension(:), allocatable m_acoustic_src::wavelength |