@galihru/mnp-material 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 +155 -220
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,220 +1,155 @@
|
|
|
1
|
-
# @galihru/mnp-material
|
|
2
|
-
|
|
3
|
-
Analytical dielectric-function models for metallic nanoparticles in the
|
|
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
|
-
=\varepsilon_0)
|
|
166
|
-
|
|
167
|
-
Wave number in medium:
|
|
168
|
-
|
|
169
|
-
=\frac{2\pi}{\lambda}\sqrt{\varepsilon})
|
|
170
|
-
|
|
171
|
-
### Drude Model
|
|
172
|
-
|
|
173
|
-
For free-electron metals (Au, Ag, Al):
|
|
174
|
-
|
|
175
|
-
=\varepsilon_\infty-\frac{\omega_p^2}{\omega(\omega+i\gamma)})
|
|
176
|
-
|
|
177
|
-
Energy–wavelength conversion:
|
|
178
|
-
|
|
179
|
-

|
|
180
|
-
|
|
181
|
-
### Tabulated Material
|
|
182
|
-
|
|
183
|
-
Given tabulated optical constants `(E, n, k)`:
|
|
184
|
-
|
|
185
|
-
^2)
|
|
186
|
-
|
|
187
|
-
## Install
|
|
188
|
-
|
|
189
|
-
```bash
|
|
190
|
-
npm install @galihru/mnp-material
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
## API
|
|
194
|
-
|
|
195
|
-
```js
|
|
196
|
-
import {
|
|
197
|
-
constantEpsilon,
|
|
198
|
-
drudeEpsilon,
|
|
199
|
-
makeDrudeMaterial,
|
|
200
|
-
wavenumberInMedium,
|
|
201
|
-
complex, add, sub, mul, div, sqrtComplex,
|
|
202
|
-
EV_TO_NM, HARTREE_EV
|
|
203
|
-
} from "@galihru/mnp-material";
|
|
204
|
-
|
|
205
|
-
// Drude model for gold at 548.1 nm
|
|
206
|
-
const epsAu = drudeEpsilon("Au", 548.1);
|
|
207
|
-
console.log(epsAu); // { re: ..., im: ... }
|
|
208
|
-
|
|
209
|
-
// Constant dielectric (water, n ≈ 1.33)
|
|
210
|
-
const epsWater = constantEpsilon(1.33 ** 2, 548.1);
|
|
211
|
-
|
|
212
|
-
// Wave number in medium
|
|
213
|
-
const k = wavenumberInMedium(epsWater, 548.1);
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
## Author
|
|
217
|
-
|
|
218
|
-
**GALIH RIDHO UTOMO** — g4lihru@students.unnes.ac.id
|
|
219
|
-
License: GPL-2.0-only
|
|
220
|
-
|
|
1
|
+
# @galihru/mnp-material
|
|
2
|
+
|
|
3
|
+
Analytical dielectric-function models for metallic nanoparticles in the
|
|
4
|
+
framework of plasmonic nanophotonics. Provides frequency-dependent complex
|
|
5
|
+
permittivity via the Drude free-electron model and constant dielectric
|
|
6
|
+
approximation, with complex wave-number computation, all operating natively
|
|
7
|
+
in the wavelength domain (wavelength in nm).
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Physical Background
|
|
12
|
+
|
|
13
|
+
The optical response of a metallic nanoparticle is governed by its
|
|
14
|
+
frequency-dependent complex dielectric function epsilon(omega). This package
|
|
15
|
+
implements two analytical models and the wave-number relation used in
|
|
16
|
+
electrodynamic simulations.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Implemented Models
|
|
21
|
+
|
|
22
|
+
### 1. Energy-Wavelength Conversion
|
|
23
|
+
|
|
24
|
+
All models accept wavelength in nanometres. The photon energy is computed as:
|
|
25
|
+
|
|
26
|
+

|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
### 2. Drude Free-Electron Model
|
|
31
|
+
|
|
32
|
+
Describes the dielectric response of free-electron metals:
|
|
33
|
+
|
|
34
|
+
=\varepsilon_\infty-\frac{\omega_p^2}{\omega(\omega+i\gamma)})
|
|
35
|
+
|
|
36
|
+
**Parameters:**
|
|
37
|
+
- **eps_inf** -- high-frequency (interband) dielectric constant
|
|
38
|
+
- **omega_p** -- bulk plasma frequency, derived from electron density via the Wigner-Seitz radius *r_s*:
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
- **gamma** -- phenomenological Drude damping rate (scattering)
|
|
43
|
+
|
|
44
|
+
**Built-in material table:**
|
|
45
|
+
|
|
46
|
+
| Material | r_s (a.u.) | eps_inf | gamma (eV) | omega_p (eV) |
|
|
47
|
+
|---|---|---|---|---|
|
|
48
|
+
| `Au` / `gold` | 3.00 | 10.0 | 0.066 | ~9.07 |
|
|
49
|
+
| `Ag` / `silver` | 3.00 | 3.3 | 0.022 | ~9.07 |
|
|
50
|
+
| `Al` / `aluminum` | 2.07 | 1.0 | 1.06 | ~15.8 |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
### 3. Constant Dielectric Model
|
|
55
|
+
|
|
56
|
+
For non-dispersive homogeneous embedding media (glass, water, vacuum):
|
|
57
|
+
|
|
58
|
+
=\varepsilon_0,\quad\varepsilon_0\in\mathbb{C})
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### 4. Wave Number in Medium
|
|
63
|
+
|
|
64
|
+
Complex wave number for light propagating through a dielectric:
|
|
65
|
+
|
|
66
|
+
=\frac{2\pi}{\lambda}\sqrt{\varepsilon(\lambda)}\quad[\mathrm{nm}^{-1}])
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Install
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npm install @galihru/mnp-material
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## API Reference
|
|
79
|
+
|
|
80
|
+
### `drudeEpsilon(materialName, wavelengthNm)`
|
|
81
|
+
|
|
82
|
+
Returns the complex Drude permittivity for a built-in metal at one or multiple
|
|
83
|
+
wavelengths.
|
|
84
|
+
|
|
85
|
+
```js
|
|
86
|
+
import { drudeEpsilon } from "@galihru/mnp-material";
|
|
87
|
+
|
|
88
|
+
// Single wavelength -> { re, im }
|
|
89
|
+
const eps = drudeEpsilon("Au", 548.1);
|
|
90
|
+
|
|
91
|
+
// Wavelength array -> [{ re, im }, ...]
|
|
92
|
+
const spectra = drudeEpsilon("Ag", [400, 500, 600, 700]);
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
### `makeDrudeMaterial(name)`
|
|
98
|
+
|
|
99
|
+
Returns the raw Drude parameter object for a given metal name.
|
|
100
|
+
|
|
101
|
+
```js
|
|
102
|
+
import { makeDrudeMaterial } from "@galihru/mnp-material";
|
|
103
|
+
|
|
104
|
+
const au = makeDrudeMaterial("Au");
|
|
105
|
+
// -> { name: "Au", eps0: 10.0, gammad: 0.066, wp: 9.07 }
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
### `constantEpsilon(value, wavelengthNm)`
|
|
111
|
+
|
|
112
|
+
Returns a wavelength-independent complex permittivity.
|
|
113
|
+
|
|
114
|
+
```js
|
|
115
|
+
import { constantEpsilon } from "@galihru/mnp-material";
|
|
116
|
+
|
|
117
|
+
// Water: n = 1.33 -> eps = n^2 = 1.769
|
|
118
|
+
const epsWater = constantEpsilon(1.769, 548.1);
|
|
119
|
+
// -> { re: 1.769, im: 0 }
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
### `wavenumberInMedium(wavelengthNm, epsilonComplex)`
|
|
125
|
+
|
|
126
|
+
Computes the complex wave number k = (2*pi/lambda)*sqrt(epsilon).
|
|
127
|
+
|
|
128
|
+
```js
|
|
129
|
+
import { constantEpsilon, wavenumberInMedium } from "@galihru/mnp-material";
|
|
130
|
+
|
|
131
|
+
const eps = constantEpsilon(1.769, 548.1);
|
|
132
|
+
const k = wavenumberInMedium(548.1, eps);
|
|
133
|
+
// -> { re: ..., im: ... } [nm^-1]
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
### Complex Arithmetic Utilities
|
|
139
|
+
|
|
140
|
+
```js
|
|
141
|
+
import { complex, add, sub, mul, div, sqrtComplex, fromReal } from "@galihru/mnp-material";
|
|
142
|
+
|
|
143
|
+
const z1 = complex(-5.2, 1.3); // -5.2 + 1.3i
|
|
144
|
+
const z2 = fromReal(2.0); // 2.0 + 0i
|
|
145
|
+
const prod = mul(z1, z2); // -> { re: -10.4, im: 2.6 }
|
|
146
|
+
const root = sqrtComplex(z1); // -> { re: ..., im: ... }
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Author
|
|
152
|
+
|
|
153
|
+
**GALIH RIDHO UTOMO** | g4lihru@students.unnes.ac.id
|
|
154
|
+
Universitas Negeri Semarang (UNNES)
|
|
155
|
+
License: GPL-2.0-only
|
package/package.json
CHANGED