@galihru/mnp-mie 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -173
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,173 +1,129 @@
|
|
|
1
|
-
# @galihru/mnp-mie
|
|
2
|
-
|
|
3
|
-
Rayleigh quasi-static scattering formulas for spherical metallic nanoparticles
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
###
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
**
|
|
47
|
-
|
|
48
|
-

|
|
132
|
-
|
|
133
|
-
### Cross Sections
|
|
134
|
-
|
|
135
|
-
Extinction:
|
|
136
|
-
|
|
137
|
-
)
|
|
138
|
-
|
|
139
|
-
Scattering:
|
|
140
|
-
|
|
141
|
-

|
|
142
|
-
|
|
143
|
-
Absorption:
|
|
144
|
-
|
|
145
|
-

|
|
146
|
-
|
|
147
|
-
## Install
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
npm install @galihru/mnp-mie
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
## API
|
|
154
|
-
|
|
155
|
-
```js
|
|
156
|
-
import { complex, rayleighPolarizability, rayleighCrossSections } from "@galihru/mnp-mie";
|
|
157
|
-
|
|
158
|
-
const epsParticle = complex(-5.2, 2.1);
|
|
159
|
-
const epsMedium = complex(1.77, 0.0);
|
|
160
|
-
|
|
161
|
-
// Polarizability (radius in nm)
|
|
162
|
-
const alpha = rayleighPolarizability(50, epsParticle, epsMedium);
|
|
163
|
-
|
|
164
|
-
// Cross sections (wavelength in nm, radius in nm)
|
|
165
|
-
const cs = rayleighCrossSections(548.1, 50, epsParticle, epsMedium);
|
|
166
|
-
console.log(cs); // { ext: ..., sca: ..., abs: ... }
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
## Author
|
|
170
|
-
|
|
171
|
-
**GALIH RIDHO UTOMO** — g4lihru@students.unnes.ac.id
|
|
172
|
-
License: GPL-2.0-only
|
|
173
|
-
|
|
1
|
+
# @galihru/mnp-mie
|
|
2
|
+
|
|
3
|
+
Rayleigh quasi-static scattering formulas for spherical metallic nanoparticles
|
|
4
|
+
in a homogeneous dielectric medium. Computes complex polarizability and
|
|
5
|
+
electromagnetic cross sections -- extinction, scattering, and absorption --
|
|
6
|
+
within the electric-dipole approximation, valid for particle radius a << lambda.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Physical Background
|
|
11
|
+
|
|
12
|
+
In the Rayleigh (quasi-static) limit, the electromagnetic response of a small
|
|
13
|
+
sphere is fully characterised by its induced electric dipole moment. The key
|
|
14
|
+
quantity is the complex polarizability alpha, which encodes both radiative
|
|
15
|
+
(scattering) and non-radiative (absorption) optical losses. This framework
|
|
16
|
+
underpins localized surface plasmon resonance (LSPR) spectroscopy, photothermal
|
|
17
|
+
therapy, and surface-enhanced sensing.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Implemented Formulations
|
|
22
|
+
|
|
23
|
+
### 1. Quasi-static Polarizability (Clausius-Mossotti)
|
|
24
|
+
|
|
25
|
+
For a sphere of radius *a* with permittivity eps_p in an embedding medium with
|
|
26
|
+
permittivity eps_m:
|
|
27
|
+
|
|
28
|
+

|
|
29
|
+
|
|
30
|
+
The **Frohlich resonance** (LSPR condition) occurs when:
|
|
31
|
+
|
|
32
|
+
=0)
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
### 2. Wave Number in the Embedding Medium
|
|
37
|
+
|
|
38
|
+

|
|
39
|
+
|
|
40
|
+
where lambda is the free-space wavelength in nanometres.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
### 3. Electromagnetic Cross Sections
|
|
45
|
+
|
|
46
|
+
**Extinction cross section** -- total power removed from the incident beam:
|
|
47
|
+
|
|
48
|
+
\quad[\mathrm{nm}^2])
|
|
49
|
+
|
|
50
|
+
**Scattering cross section** -- power re-radiated as scattered light:
|
|
51
|
+
|
|
52
|
+

|
|
53
|
+
|
|
54
|
+
**Absorption cross section** -- power dissipated as Ohmic heat:
|
|
55
|
+
|
|
56
|
+

|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Install
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npm install @galihru/mnp-mie
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## API Reference
|
|
69
|
+
|
|
70
|
+
### `rayleighPolarizability(radiusNm, epsParticle, epsMedium)`
|
|
71
|
+
|
|
72
|
+
Returns the complex polarizability alpha of a sphere.
|
|
73
|
+
|
|
74
|
+
```js
|
|
75
|
+
import { complex, rayleighPolarizability } from "@galihru/mnp-mie";
|
|
76
|
+
|
|
77
|
+
const epsParticle = complex(-7.45, 1.23); // Au at 548 nm
|
|
78
|
+
const epsMedium = complex(1.769, 0.0); // water
|
|
79
|
+
|
|
80
|
+
const alpha = rayleighPolarizability(50, epsParticle, epsMedium);
|
|
81
|
+
// -> { re: ..., im: ... } [nm^3]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
### `rayleighCrossSections(wavelengthNm, radiusNm, epsParticle, epsMedium)`
|
|
87
|
+
|
|
88
|
+
Returns extinction, scattering, and absorption cross sections in nm^2.
|
|
89
|
+
|
|
90
|
+
```js
|
|
91
|
+
import { complex, rayleighCrossSections } from "@galihru/mnp-mie";
|
|
92
|
+
|
|
93
|
+
const epsParticle = complex(-7.45, 1.23);
|
|
94
|
+
const epsMedium = complex(1.769, 0.0);
|
|
95
|
+
|
|
96
|
+
// Single wavelength
|
|
97
|
+
const cs = rayleighCrossSections(548.1, 50, epsParticle, epsMedium);
|
|
98
|
+
// -> { cExt: ..., cSca: ..., cAbs: ... } [nm^2]
|
|
99
|
+
|
|
100
|
+
// Spectral scan (array input)
|
|
101
|
+
const scan = rayleighCrossSections(
|
|
102
|
+
[400, 450, 500, 548, 600, 700],
|
|
103
|
+
50,
|
|
104
|
+
[eps400, eps450, eps500, eps548, eps600, eps700],
|
|
105
|
+
[em400, em450, em500, em548, em600, em700]
|
|
106
|
+
);
|
|
107
|
+
// -> [{ cExt, cSca, cAbs }, ...]
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
### `complex(re, im)`
|
|
113
|
+
|
|
114
|
+
Constructs a complex number `{ re, im }`.
|
|
115
|
+
|
|
116
|
+
```js
|
|
117
|
+
import { complex } from "@galihru/mnp-mie";
|
|
118
|
+
|
|
119
|
+
const z = complex(-5.2, 2.1);
|
|
120
|
+
// -> { re: -5.2, im: 2.1 }
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Author
|
|
126
|
+
|
|
127
|
+
**GALIH RIDHO UTOMO** | g4lihru@students.unnes.ac.id
|
|
128
|
+
Universitas Negeri Semarang (UNNES)
|
|
129
|
+
License: GPL-2.0-only
|
package/package.json
CHANGED