@galihru/mnp-mie 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 +38 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,18 +1,31 @@
|
|
|
1
1
|
# @galihru/mnp-mie
|
|
2
2
|
|
|
3
3
|
Rayleigh-limit scattering formulas for small spherical particles.
|
|
4
|
+
JavaScript port of the [mnpbem-mie](https://pypi.org/project/mnpbem-mie/) Python module.
|
|
4
5
|
|
|
5
|
-
Implemented
|
|
6
|
+
## Implemented Formulations
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
\alpha = 4\pi a^3\frac{\varepsilon_p-\varepsilon_m}{\varepsilon_p+2\varepsilon_m}
|
|
9
|
-
$$
|
|
8
|
+
### Polarizability
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+

|
|
11
|
+
|
|
12
|
+
### Wave Number in Medium
|
|
13
|
+
|
|
14
|
+

|
|
15
|
+
|
|
16
|
+
### Cross Sections
|
|
17
|
+
|
|
18
|
+
Extinction:
|
|
19
|
+
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
Scattering:
|
|
23
|
+
|
|
24
|
+

|
|
25
|
+
|
|
26
|
+
Absorption:
|
|
27
|
+
|
|
28
|
+

|
|
16
29
|
|
|
17
30
|
## Install
|
|
18
31
|
|
|
@@ -20,12 +33,24 @@ $$
|
|
|
20
33
|
npm install @galihru/mnp-mie
|
|
21
34
|
```
|
|
22
35
|
|
|
23
|
-
##
|
|
36
|
+
## API
|
|
24
37
|
|
|
25
38
|
```js
|
|
26
|
-
import { complex, rayleighCrossSections } from "@galihru/mnp-mie";
|
|
39
|
+
import { complex, rayleighPolarizability, rayleighCrossSections } from "@galihru/mnp-mie";
|
|
27
40
|
|
|
28
41
|
const epsParticle = complex(-5.2, 2.1);
|
|
29
|
-
const epsMedium
|
|
30
|
-
|
|
42
|
+
const epsMedium = complex(1.77, 0.0);
|
|
43
|
+
|
|
44
|
+
// Polarizability (radius in nm)
|
|
45
|
+
const alpha = rayleighPolarizability(50, epsParticle, epsMedium);
|
|
46
|
+
|
|
47
|
+
// Cross sections (wavelength in nm, radius in nm)
|
|
48
|
+
const cs = rayleighCrossSections(548.1, 50, epsParticle, epsMedium);
|
|
49
|
+
console.log(cs); // { ext: ..., sca: ..., abs: ... }
|
|
31
50
|
```
|
|
51
|
+
|
|
52
|
+
## Author
|
|
53
|
+
|
|
54
|
+
**GALIH RIDHO UTOMO** — g4lihru@students.unnes.ac.id
|
|
55
|
+
License: GPL-2.0-only
|
|
56
|
+
|