Init the expansion coefficients for the Mie-Scattering.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_State) | :: | conf |
lua state type |
|||
integer, | intent(in) | :: | thandle |
aotus parent handle |
||
type(tem_miescatter_type), | intent(in) | :: | miescatter |
The description of the Mie-Scattering setup. |
||
type(tem_mieexpansion_type), | intent(out) | :: | mieexpansion |
The expansion coefficients to be filled |
subroutine tem_init_data( conf, thandle, miescatter, mieexpansion ) ! -------------------------------------------------------------------------- !> lua state type type(flu_State) :: conf !> aotus parent handle integer, intent(in) :: thandle !> The description of the Mie-Scattering setup. type(tem_miescatter_type), intent(in) :: miescatter !> The expansion coefficients to be filled type(tem_mieexpansion_type), intent(out) :: mieexpansion ! -------------------------------------------------------------------------- integer :: nCoeffs, n ! -------------------------------------------------------------------------- ! Get the number of expansion coefficients to be used .... nCoeffs = tem_get_ncoeffs_miescat(conf,thandle) mieexpansion%nCoeffs = nCoeffs ! Calculate the expansion coefficients inside the cylinder allocate(mieexpansion%c_tot(-nCoeffs:nCoeffs)) innerLoop: do n = -nCoeffs, nCoeffs ! C_n^{tot} mieexpansion%c_tot(n) & & = (0.0_rk,1.0_rk)**(-n) * & & ( (miescatter%wavenumber_background / & & miescatter%permeability_background) & & * bessel_jn_derivative(n, & & miescatter%wavenumber_background * miescatter%radius) & & * hankel2_n(n,miescatter%wavenumber_background * miescatter%radius) & & - (miescatter%wavenumber_background / & & miescatter%permeability_background) & & * hankel2_n_derivative(n, & & miescatter%wavenumber_background * miescatter%radius) & & * bessel_jn(n,miescatter%wavenumber_background * miescatter%radius) & & ) & & / & & ( & & (miescatter%wavenumber_cylinder / & & miescatter%permeability_cylinder) & & * bessel_jn_derivative(n, & & miescatter%wavenumber_cylinder * miescatter%radius) & & * hankel2_n(n,miescatter%wavenumber_background * miescatter%radius) & & - (miescatter%wavenumber_background / & & miescatter%permeability_background)& & * hankel2_n_derivative(n, & & miescatter%wavenumber_background * miescatter%radius) & & * bessel_jn(n,miescatter%wavenumber_cylinder * miescatter%radius) & & ) end do innerLoop ! Calculate the expansion coefficients outside of the cylinder, for the ! scattered field allocate(mieexpansion%c_scat(-nCoeffs:nCoeffs)) outerLoop: do n = -nCoeffs, nCoeffs ! C_n^{scat} mieexpansion%c_scat(n) & & = (0.0_rk,1.0_rk)**(-n) * & & ( (miescatter%wavenumber_background / & & miescatter%permeability_background) & & * bessel_jn_derivative(n, & & miescatter%wavenumber_background*miescatter%radius) & & * bessel_jn(n,miescatter%wavenumber_cylinder*miescatter%radius) & & - (miescatter%wavenumber_cylinder/miescatter%permeability_cylinder) & & * bessel_jn_derivative(n, & & miescatter%wavenumber_cylinder*miescatter%radius) & & * bessel_jn(n,miescatter%wavenumber_background*miescatter%radius) & & ) & & / & & ( & & (miescatter%wavenumber_cylinder/miescatter%permeability_cylinder) & & * bessel_jn_derivative(n, & & miescatter%wavenumber_cylinder*miescatter%radius) & & * hankel2_n(n,miescatter%wavenumber_background*miescatter%radius) & & - (miescatter%wavenumber_background / & & miescatter%permeability_background) & & * hankel2_n_derivative(n, & & miescatter%wavenumber_background*miescatter%radius) & & * bessel_jn(n,miescatter%wavenumber_cylinder*miescatter%radius) & & ) end do outerLoop end subroutine tem_init_data