ovidiopr / scattnlay

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

Microsphere nanojet simulation #19

Closed Jason-code-source closed 3 years ago

Jason-code-source commented 5 years ago

Hi! How can I increase the nmax in python code if I compute a large-scale (~ 10 wavelengths )sphere ? I am looking forward to your reply! Thank you!

kostyfisik commented 5 years ago

You should use mp version of scattnlay , it will automatically increase nmax to the needed value . In latest version on GitHub it is just the parameter of function to run simulation.

On Sat, Oct 12, 2019, 12:39 Jason-code-source notifications@github.com wrote:

Hi! How can I increase the nmax in python code if I compute a large-scale (~ 10 wavelengths )sphere ? I am looking forward to your reply! Thank you!

— 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/19?email_source=notifications&email_token=ABH7JPI3LTL5ESWS5E6KNHDQOGLLPA5CNFSM4JACEES2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HRLNTEA, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABH7JPJN4CMCKMQGNATKLA3QOGLLPANCNFSM4JACEESQ .

Jason-code-source commented 5 years ago

Thank you! I am a bit confused by the mp scattnlay version you mentioned. Do you mean that I should install python-scattnlay_2.0.1-1_amd64.deb? Now, I am using the ovidiopr/scattnlay-5a74126 version and the value of nmax (default) is -1. But the mie code does not work well on computing the field around the large-scale model.

kostyfisik commented 5 years ago

Could you please provide the parameters of your model? I will try it myself.

On Sat, Oct 12, 2019, 16:43 Jason-code-source notifications@github.com wrote:

Thank you! I am a bit confused by the mp scattnlay version you mentioned. Do you mean that I should install python-scattnlay_2.0.1-1_amd64.deb? Now, I am using the ovidiopr/scattnlay-5a74126 version and the value of nmax (default) is -1. But the mie code does not work well on computing the field around the large-scale model.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ovidiopr/scattnlay/issues/19?email_source=notifications&email_token=ABH7JPJKLYXSWEMVG2CZBMDQOHIBBA5CNFSM4JACEES2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBB7XUA#issuecomment-541326288, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABH7JPOT7Y4I54DKNMSNOWTQOHIBBANCNFSM4JACEESQ .

Jason-code-source commented 5 years ago

Thanks for your reply, kostyfisik! My model is a dielectric sphere with a radius of 5 microns and refractive index of 1.33, exited by the plane wave with the wavelength of 532 nm. The backgroud material is air. For more detail, please refer to the figure 1(d) in the paper Control over parameters of photonic nanojets of dielectric microspheres (https://www.sciencedirect.com/science/article/abs/pii/S0030401810007431 ). Thanks again!

kostyfisik commented 5 years ago

@Jason-code-source I have coded the system, simulation script and results are in https://github.com/ovidiopr/scattnlay/tree/master/examples/Opt.Commun.-2010-Geints-Nanojets_of_dielectric_microspheres It works well for the sphere of 0.5 mkm, OK for 1 mkm sphere with use of MP feature, and doesn`t work for larger sphres. @ovidiopr we may probably try to work on this in November. Few result to compare against the paper: R0 5mkm_mp R1mkm_mp R3mkm_mp

kostyfisik commented 3 years ago

@Jason-code-source Now it works fine :) Just merged it into the master. Note, that results from paper for near-field were incorrect. See comparision of updated scattnaly, paper, and Stratify code (the last has a colorbar on top). The result from Stratify and Scattnlay coincide inside the sphere. A bit away from the sphere Stratify has some problems. The result from the paper is similar, however, it is far from being precise both incide and outside the sphere Screenshot from 2021-04-28 18-29-25 Screenshot from 2021-04-27 16-33-09