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

Perturbs initial mean flow fields with random noise, mixing-layer instabilities, or simplex noise. More...

Functions/Subroutines

impure subroutine s_initialize_perturbation_module ()
 Allocates the temporary primitive variable array used by elliptic smoothing.
impure subroutine s_perturb_sphere (q_prim_vf)
 Randomly perturbs partial density fields at the interface of a spherical volume fraction region.
impure subroutine s_perturb_surrounding_flow (q_prim_vf)
 Adds random noise to the velocity and void fraction of the surrounding flow field.
impure subroutine s_elliptic_smoothing (q_prim_vf, bc_type)
 Iteratively smooths all primitive variable fields using a discrete elliptic (Laplacian) filter.
subroutine s_perturb_simplex (q_prim_vf)
 Perturbs velocity and volume fraction fields using multi-octave simplex noise.
subroutine s_perturb_mixlayer (q_prim_vf)
 This subroutine computes velocity perturbations for a temporal mixing layer with a hyperbolic tangent mean streamwise velocity profile, using an inverter version of the spectrum-based synthetic turbulence generation method proposed by Guo et al. (2023, JFM).
subroutine s_generate_random_perturbation (khat, xi, phi, ik, yloc)
 Generates deterministic pseudo-random wave vector, polarization, and phase for a perturbation mode.
real(wp) function, dimension(3) f_unit_vector (theta, eta)
 Generates a unit vector uniformly distributed on the sphere from two random parameters.
subroutine s_prng (var, seed)
 This function generates a pseudo-random number between 0 and 1 based on linear congruential generator.
integer function modmul (a)
 Computes a modular multiplication step for the linear congruential pseudo-random number generator.
impure subroutine s_finalize_perturbation_module ()
 Deallocates the temporary primitive variable array used by elliptic smoothing.

Variables

real(wp), dimension(:, :, :, :), allocatable q_prim_temp

Detailed Description

Perturbs initial mean flow fields with random noise, mixing-layer instabilities, or simplex noise.

Function/Subroutine Documentation

◆ f_unit_vector()

real(wp) function, dimension(3) m_perturbation::f_unit_vector ( real(wp), intent(in) theta,
real(wp), intent(in) eta )

Generates a unit vector uniformly distributed on the sphere from two random parameters.

Definition at line 357 of file m_perturbation.fpp.f90.

Here is the caller graph for this function:

◆ modmul()

integer function m_perturbation::modmul ( integer, intent(in) a)

Computes a modular multiplication step for the linear congruential pseudo-random number generator.

Definition at line 383 of file m_perturbation.fpp.f90.

Here is the caller graph for this function:

◆ s_elliptic_smoothing()

impure subroutine m_perturbation::s_elliptic_smoothing ( type(scalar_field), dimension(sys_size), intent(inout) q_prim_vf,
type(integer_field), dimension(1:num_dims, 1:2), intent(in) bc_type )

Iteratively smooths all primitive variable fields using a discrete elliptic (Laplacian) filter.

Definition at line 98 of file m_perturbation.fpp.f90.

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

◆ s_finalize_perturbation_module()

impure subroutine m_perturbation::s_finalize_perturbation_module

Deallocates the temporary primitive variable array used by elliptic smoothing.

Definition at line 395 of file m_perturbation.fpp.f90.

◆ s_generate_random_perturbation()

subroutine m_perturbation::s_generate_random_perturbation ( real(wp), dimension(3), intent(out) khat,
real(wp), dimension(3), intent(out) xi,
real(wp), intent(out) phi,
integer, intent(in) ik,
real(wp), intent(in) yloc )

Generates deterministic pseudo-random wave vector, polarization, and phase for a perturbation mode.

Definition at line 332 of file m_perturbation.fpp.f90.

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

◆ s_initialize_perturbation_module()

impure subroutine m_perturbation::s_initialize_perturbation_module

Allocates the temporary primitive variable array used by elliptic smoothing.

Definition at line 30 of file m_perturbation.fpp.f90.

◆ s_perturb_mixlayer()

subroutine m_perturbation::s_perturb_mixlayer ( type(scalar_field), dimension(sys_size), intent(inout) q_prim_vf)

This subroutine computes velocity perturbations for a temporal mixing layer with a hyperbolic tangent mean streamwise velocity profile, using an inverter version of the spectrum-based synthetic turbulence generation method proposed by Guo et al. (2023, JFM).

Definition at line 252 of file m_perturbation.fpp.f90.

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

◆ s_perturb_simplex()

subroutine m_perturbation::s_perturb_simplex ( type(scalar_field), dimension(sys_size), intent(inout) q_prim_vf)

Perturbs velocity and volume fraction fields using multi-octave simplex noise.

Definition at line 160 of file m_perturbation.fpp.f90.

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

◆ s_perturb_sphere()

impure subroutine m_perturbation::s_perturb_sphere ( type(scalar_field), dimension(sys_size), intent(inout) q_prim_vf)

Randomly perturbs partial density fields at the interface of a spherical volume fraction region.

Definition at line 39 of file m_perturbation.fpp.f90.

Here is the caller graph for this function:

◆ s_perturb_surrounding_flow()

impure subroutine m_perturbation::s_perturb_surrounding_flow ( type(scalar_field), dimension(sys_size), intent(inout) q_prim_vf)

Adds random noise to the velocity and void fraction of the surrounding flow field.

Definition at line 72 of file m_perturbation.fpp.f90.

Here is the caller graph for this function:

◆ s_prng()

subroutine m_perturbation::s_prng ( real(wp), intent(out) var,
integer, intent(inout) seed )

This function generates a pseudo-random number between 0 and 1 based on linear congruential generator.

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

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

Variable Documentation

◆ q_prim_temp

real(wp), dimension(:, :, :, :), allocatable m_perturbation::q_prim_temp

Definition at line 25 of file m_perturbation.fpp.f90.