GetEnergySpectrum Function

function GetEnergySpectrum(kmag, kp, A) result(res)

Computes E(k)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: kmag

Wavevector magnitude

real(kind=wp), intent(in) :: kp

Peak

real(kind=wp), intent(in) :: A

Spectrum amplitude

Return Value real(kind=wp)

Result


Called by

proc~~getenergyspectrum~~CalledByGraph proc~getenergyspectrum GetEnergySpectrum proc~buildfouriermodes BuildFourierModes proc~buildfouriermodes->proc~getenergyspectrum proc~setupcasefields~4 SetUpCaseFields proc~setupcasefields~4->proc~buildfouriermodes program~main~8 main program~main~8->proc~setupcasefields~4

Source Code

    function GetEnergySpectrum(kmag,kp,A) result (res)
      !> Computes E(k)
      implicit none
      real(wp), intent(in) :: kmag                                             !! Wavevector magnitude
      real(wp), intent(in) :: kp                                               !! Peak
      real(wp), intent(in) :: A                                                !! Spectrum amplitude
      real(wp)             :: res                                              !! Result

      res = A*(kmag**4)*exp(-2.0_wp*(kmag/kp)**2)

      return
    end function GetEnergySpectrum