ovidiopr / scattnlay

Near- and far-field Mie scattering by a multilayered sphere
GNU General Public License v3.0
59 stars 25 forks source link

Large complex argument #3

Open kostyfisik opened 9 years ago

kostyfisik commented 9 years ago

At the moment Scattnlay is limited in the range of used materials due to constraints on accuracy of calculation of Bessel functions with large complex argument. May be we can rewrite code to benefit from using psi_(n-1)/psi_n instead of diff(psi)/psi to calculate scattering coefficients with large complex argument? See H. Du, "Mie-scattering calculation," Appl. Opt. 43, 1951-1956 (2004). http://dx.doi.org/10.1364/AO.43.001951 http://www.opticsinfobase.org/ao/abstract.cfm?uri=ao-43-9-1951

kostyfisik commented 8 years ago

http://journals.aps.org/pre/pdf/10.1103/PhysRevE.60.2347 eq 36-38 can be usefull for D_n evaluation

kostyfisik commented 5 years ago

Just to track it here, this is needed to solve #17 without using multiprecision

Sure!!! I browsed the code from scattnlay and I guess that the problem is two-fold:

  1. the recursion for bessel functions of complex argument is performed directly, and this exposes the code to an overflow problem when the imaginary part of the argument is big. If instead one performs the recursion over the ratio of bessel functions, as in Du's paper, the problem is solved. One then of course needs to express the all expansion coefficients (a[n,l],b[n,l],...) for each layer of the sphere as a function of the ratio of bessel functions.
  2. The recursion must be performed using kaptein inequality as in Du, in order to recover all the needed significant digits

Other than that no futher modifications should be needed

Best

Giovanni

ovidiopr commented 5 years ago

I completely agree with you! Let's see if this year we find time to do this implementation. This will be a great improvement.

Best regards,

Ovidio

On Wed, Jun 26, 2019 at 7:14 PM Konstantin Ladutenko < notifications@github.com> wrote:

Just to track it here, this is needed to solve #17 https://github.com/ovidiopr/scattnlay/issues/17 without using multiprecision

Sure!!! I browsed the code from scattnlay and I guess that the problem is two-fold:

  1. the recursion for bessel functions of complex argument is performed directly, and this exposes the code to an overflow problem when the imaginary part of the argument is big. If instead one performs the recursion over the ratio of bessel functions, as in Du's paper, the problem is solved. One then of course needs to express the all expansion coefficients (a[n,l],b[n,l],...) for each layer of the sphere as a function of the ratio of bessel functions.
  2. The recursion must be performed using kaptein inequality as in Du, in order to recover all the needed significant digits

Other than that no futher modifications should be needed

Best

Giovanni

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ovidiopr/scattnlay/issues/3?email_source=notifications&email_token=ACNOR2MA4ZLRHIXADKTIAETP4OPYHA5CNFSM4BBCTCX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYUGZOQ#issuecomment-505965754, or mute the thread https://github.com/notifications/unsubscribe-auth/ACNOR2KRRZX45OXM4NHPJ4DP4OPYHANCNFSM4BBCTCXQ .