File:Mie resonances vs Radius.gif
From Vigyanwiki
Mie resonances vs Radius.gif
Mie_resonances_vs_Radius.gif (243 × 243 pixels, file size: 5.67 MB, MIME type: image/gif, looped, 202 frames, 30 s)
This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.
Summary
DescriptionMie resonances vs Radius.gif |
English: Effect of a dielectric sphere (technically a disk, as the simulation is in 2D) on an incident plane wave as a function of the radius.
The patterns you see flashing in are the Mie resonances. The incident plane wave is coming from the bottom. |
Date | |
Source | https://twitter.com/j_bertolotti/status/1388821332989775875 |
Author | Jacopo Bertolotti |
Permission (Reusing this file) |
https://twitter.com/j_bertolotti/status/1030470604418428929 |
Mathematica 12.0 code
\[Lambda]0 = 1.; k0 =
N[(2 \[Pi])/\[Lambda]0]; (*The wavelength in vacuum is set to 1, so all lengths are now in units of wavelengths*)
\[Delta] = \[Lambda]0/20; \[CapitalDelta] = 20*\[Lambda]0; (*Parameters for the grid*)
sourcef[x_, y_] := E^(I k0 y); (*Important! The source MUST be a solution of the Helmholtz equation in vacuum*)
\[Phi]in = Table[sourcef[x, y], {x, -\[CapitalDelta]/2, \[CapitalDelta]/ 2, \[Delta]}, {y, -\[CapitalDelta]/2, \[CapitalDelta]/ 2, \[Delta]}]; (*Discretized source*)
d = \[Lambda]0/1; (*typical scale of the absorbing layer*)
imn = Table[5 I (E^-((x + \[CapitalDelta]/2)/d) + E^((x - \[CapitalDelta]/2)/d) + E^-((y + \[CapitalDelta]/2)/d) + E^((y - \[CapitalDelta]/2)/d)), {x, -\[CapitalDelta]/2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/ 2, \[CapitalDelta]/ 2, \[Delta]}]; (*Imaginary part of the refractive index (used to emulate absorbing boundaries)*)
dim = Dimensions[\[Phi]in][[1]];
L = -1/\[Delta]^2*KirchhoffMatrix[GridGraph[{dim, dim}]]; (*Discretized Laplacian*)
r[t_] := (\[Lambda]0*3 - \[Delta]*5) Sin[\[Pi]/ 2 t]^2 + \[Delta]*5; (*The radius changes with the parameter t*)
frames = Table[
n = Table[
If[y^2 + x^2 <= r[t]^2, 2, 1], {x, -\[CapitalDelta]/ 2, \[CapitalDelta]/2, \[Delta]}, {y, -\[CapitalDelta]/ 2, \[CapitalDelta]/2, \[Delta]}] + imn; (*Matrix with the refractive index*)
b = -(Flatten[n]^2 - 1) k0^2 Flatten[\[Phi]in]; (*Right-hand side of the equation we want to solve*)
M = L + DiagonalMatrix[SparseArray[Flatten[n]^2 k0^2]]; (*Operator on the left-hand side of the equation we want to solve*)
\[Phi]s = Partition[LinearSolve[M, b], dim]; (*Solve the linear system*)
ImageAdd[
ArrayPlot[
Transpose[Abs[\[Phi]in + \[Phi]s]^2/ Max[Abs[\[Phi]in + \[Phi]s]^2]][[(4 d)/\[Delta] ;; (-4 d)/\[Delta], (4 d)/\[Delta] ;; (-4 d)/\[Delta]]], ColorFunction -> "AvocadoColors" , DataReversed -> True,
Frame -> False, PlotRange -> {0, 0.8}], ArrayPlot[Transpose@Re[(n - 1)/10] , DataReversed -> True , ColorFunctionScaling -> False, ColorFunction -> GrayLevel, Frame -> False]
](*Plot everything*)
, {t, 0, 1, 1./100}];
ListAnimate[frames]
Licensing
I, the copyright holder of this work, hereby publish it under the following licence:
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighbouring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
Items portrayed in this file
depicts
some value
2 May 2021
image/gif
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 14:21, 4 May 2021 | 243 × 243 (5.67 MB) | wikimediacommons>Berto | Uploaded own work with UploadWizard |
File usage
The following page uses this file:
Metadata
This file contains additional information, probably added from the digital camera or scanner used to create or digitise it.
If the file has been modified from its original state, some details may not fully reflect the modified file.
GIF file comment | Created with the Wolfram Language : www.wolfram.com |
---|
Retrieved from ‘https://www.vigyanwiki.in/wiki/File:Mie_resonances_vs_Radius.gif’