@galihru/mnp-material 0.1.0 → 0.1.1
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 +55 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,40 @@
|
|
|
1
1
|
# @galihru/mnp-material
|
|
2
2
|
|
|
3
3
|
Scientific dielectric-response models for plasmonic simulations.
|
|
4
|
+
JavaScript port of the [mnpbem-material](https://pypi.org/project/mnpbem-material/) Python module.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
## Features
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
- Constant dielectric model for homogeneous media
|
|
9
|
+
- Drude free-electron model for metals (Au, Ag, Al)
|
|
10
|
+
- Tabulated `(E, n, k)` optical constants with wavelength interpolation
|
|
11
|
+
- Complex arithmetic utilities
|
|
12
|
+
|
|
13
|
+
## Implemented Formulations
|
|
14
|
+
|
|
15
|
+
### Constant Dielectric
|
|
16
|
+
|
|
17
|
+
=\varepsilon_0)
|
|
18
|
+
|
|
19
|
+
Wave number in medium:
|
|
20
|
+
|
|
21
|
+
=\frac{2\pi}{\lambda}\sqrt{\varepsilon})
|
|
22
|
+
|
|
23
|
+
### Drude Model
|
|
24
|
+
|
|
25
|
+
For free-electron metals (Au, Ag, Al):
|
|
26
|
+
|
|
27
|
+
=\varepsilon_\infty-\frac{\omega_p^2}{\omega(\omega+i\gamma)})
|
|
28
|
+
|
|
29
|
+
Energy–wavelength conversion:
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
|
|
33
|
+
### Tabulated Material
|
|
34
|
+
|
|
35
|
+
Given tabulated optical constants `(E, n, k)`:
|
|
36
|
+
|
|
37
|
+
^2)
|
|
10
38
|
|
|
11
39
|
## Install
|
|
12
40
|
|
|
@@ -14,11 +42,31 @@ $$
|
|
|
14
42
|
npm install @galihru/mnp-material
|
|
15
43
|
```
|
|
16
44
|
|
|
17
|
-
##
|
|
45
|
+
## API
|
|
18
46
|
|
|
19
47
|
```js
|
|
20
|
-
import {
|
|
48
|
+
import {
|
|
49
|
+
constantEpsilon,
|
|
50
|
+
drudeEpsilon,
|
|
51
|
+
makeDrudeMaterial,
|
|
52
|
+
wavenumberInMedium,
|
|
53
|
+
complex, add, sub, mul, div, sqrtComplex,
|
|
54
|
+
EV_TO_NM, HARTREE_EV
|
|
55
|
+
} from "@galihru/mnp-material";
|
|
21
56
|
|
|
57
|
+
// Drude model for gold at 548.1 nm
|
|
22
58
|
const epsAu = drudeEpsilon("Au", 548.1);
|
|
23
|
-
console.log(epsAu);
|
|
59
|
+
console.log(epsAu); // { re: ..., im: ... }
|
|
60
|
+
|
|
61
|
+
// Constant dielectric (water, n ≈ 1.33)
|
|
62
|
+
const epsWater = constantEpsilon(1.33 ** 2, 548.1);
|
|
63
|
+
|
|
64
|
+
// Wave number in medium
|
|
65
|
+
const k = wavenumberInMedium(epsWater, 548.1);
|
|
24
66
|
```
|
|
67
|
+
|
|
68
|
+
## Author
|
|
69
|
+
|
|
70
|
+
**GALIH RIDHO UTOMO** — g4lihru@students.unnes.ac.id
|
|
71
|
+
License: GPL-2.0-only
|
|
72
|
+
|