Message Boards Message Boards

0
|
6576 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Scattering function: Need help with Bessel functions

Posted 9 years ago

Hello community

I am programming a scattering function and i have problems with Bessel and Hankel functions of higher order.

My goal is to calculate the scattering coefficients of the following formula:

scattering coefficients

with the logaritmic derivate (valid for all kinds of Bessel functions)

logarithmic derivate

I always get an error when the highest sum element rise above a value. In this special case the error starts when changing e = 324 in the nb.! Error Message"Infinite expression 1/(0. +0.\I) encountered. "

Is there an option to increase the precision, accuracy of the Bessel funktions or something else to gain more elements of the sum?

I need some help, because I do not know what else I can do.

Thanks.

Best regards

Walter

Attachments:
POSTED BY: Walter Kantor
2 Replies

Hi.

You are trying to solve the scattering of cylindrical nanoparticles, right? Bohren and Hufman?

The problem with your calculation is the limited precision of machine numbers in Mathematica. Use arbitrary precision numbers with a large number of digits. I have solved a plasmonic fiber taper problem, and had to use 700! digits, then the above error message went away. Read the chapter about numbers on these Wolfram homepage. Let me know if this was helpful.

Markus

POSTED BY: Markus Schmidt

hello markus,

yes, i am trying to solve the scattering of cylindrical nanoparticles, or better said in my special case µm particles. i have tried your advise with arbitrary precision number, but still the error arise.

dn[mmm_, j_] := ((BesselJ[mmm - 1, j]/BesselJ[mmm, j]) - mmm /
   j) (*logaritmic deriviate *)

from my nb is the troublemaker.

After changing in

dn[mmm_, j_] := 
 Block[{$MaxExtraPrecision = 1000}, 
  N[((BesselJ[mmm - 1, j]/BesselJ[mmm, j]) - mmm /j), 
   700]] (*logaritmic deriviate *)

the same error showed up.

Fortunatly i solved my problem 2 days ago with a bypass.

thx for your help.

best regards walter

POSTED BY: Walter Kantor
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract