@galihru/mnp 0.1.3 → 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.
Files changed (2) hide show
  1. package/README.md +32 -27
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,21 +1,29 @@
1
- # @galihru/mnp
1
+ # @galihru/mnp
2
2
 
3
- Integrated computational package for the single-nanoparticle electromagnetic response in the Rayleigh quasi-static limit. Composes dielectric-function evaluation with polarizability and optical cross-section computation into a unified, self-consistent simulation API.
3
+ Integrated computational package for the single-nanoparticle electromagnetic
4
+ response in the Rayleigh quasi-static limit. Composes dielectric-function
5
+ evaluation with polarizability and optical cross-section computation into a
6
+ unified, self-consistent simulation API.
4
7
 
5
8
  ---
6
9
 
7
10
  ## Physical Scope
8
11
 
9
- This package solves the **single-nanoparticle optical response problem**: given a metallic sphere of radius *a* � ? embedded in a dielectric host medium, compute as functions of illumination wavelength:
12
+ This package solves the **single-nanoparticle optical response problem**: given
13
+ a metallic sphere of radius a << lambda embedded in a dielectric host medium,
14
+ compute as functions of illumination wavelength:
10
15
 
11
16
  1. Complex permittivity via the **Drude free-electron model**:
12
- ![e(?) = e8 - ?p�/(?(?+i?))](https://latex.codecogs.com/svg.latex?\varepsilon(\omega)=\varepsilon_\infty-\frac{\omega_p^2}{\omega(\omega+i\gamma)})
13
17
 
14
- 2. Complex polarizability via the **Clausius�Mossotti relation**:
15
- ![a = 4pa�(ep-em)/(ep+2em)](https://latex.codecogs.com/svg.latex?\alpha=4\pi%20a^3\frac{\varepsilon_p-\varepsilon_m}{\varepsilon_p+2\varepsilon_m})
18
+ ![epsilon Drude](https://latex.codecogs.com/svg.latex?\varepsilon(\omega)=\varepsilon_\infty-\frac{\omega_p^2}{\omega(\omega+i\gamma)})
19
+
20
+ 2. Complex polarizability via the **Clausius-Mossotti relation**:
21
+
22
+ ![alpha CM](https://latex.codecogs.com/svg.latex?\alpha=4\pi%20a^3\frac{\varepsilon_p-\varepsilon_m}{\varepsilon_p+2\varepsilon_m})
16
23
 
17
24
  3. Electromagnetic **cross sections** from the optical theorem:
18
- ![Cext, Csca, Cabs](https://latex.codecogs.com/svg.latex?C_{\mathrm{ext}}=k\,\mathrm{Im}(\alpha),\quad%20C_{\mathrm{sca}}=\frac{|k|^4}{6\pi}|\alpha|^2,\quad%20C_{\mathrm{abs}}=C_{\mathrm{ext}}-C_{\mathrm{sca}})
25
+
26
+ ![cross sections](https://latex.codecogs.com/svg.latex?C_{\mathrm{ext}}=k\,\mathrm{Im}(\alpha),\quad%20C_{\mathrm{sca}}=\frac{|k|^4}{6\pi}|\alpha|^2,\quad%20C_{\mathrm{abs}}=C_{\mathrm{ext}}-C_{\mathrm{sca}})
19
27
 
20
28
  ---
21
29
 
@@ -23,7 +31,7 @@ This package solves the **single-nanoparticle optical response problem**: given
23
31
 
24
32
  | Package | Description |
25
33
  |---|---|
26
- | [`@galihru/mnp-material`](https://www.npmjs.com/package/@galihru/mnp-material) | Drude dielectric model for Au, Ag, Al; constant e; complex wave number |
34
+ | [`@galihru/mnp-material`](https://www.npmjs.com/package/@galihru/mnp-material) | Drude dielectric model for Au, Ag, Al; constant epsilon; complex wave number |
27
35
  | [`@galihru/mnp-mie`](https://www.npmjs.com/package/@galihru/mnp-mie) | Rayleigh polarizability; extinction, scattering, and absorption cross sections |
28
36
 
29
37
  ---
@@ -38,7 +46,7 @@ npm install @galihru/mnp
38
46
 
39
47
  ## API Reference
40
48
 
41
- ### `simulateSphereResponse(options)` High-level
49
+ ### `simulateSphereResponse(options)` -- High-level
42
50
 
43
51
  Computes the complete optical response of a metallic nanosphere in a single call.
44
52
 
@@ -47,7 +55,7 @@ import { simulateSphereResponse } from "@galihru/mnp";
47
55
 
48
56
  const result = simulateSphereResponse({
49
57
  material: "Au", // "Au" | "Ag" | "Al"
50
- wavelengthNm: 548.1, // nm scalar or Array for spectral scan
58
+ wavelengthNm: 548.1, // nm -- scalar or Array for spectral scan
51
59
  radiusNm: 50, // nm
52
60
  mediumRefractiveIndex: 1.33 // dimensionless refractive index of host medium
53
61
  });
@@ -57,13 +65,13 @@ const result = simulateSphereResponse({
57
65
 
58
66
  | Field | Unit | Description |
59
67
  |---|---|---|
60
- | `inputs` | | Echo of all input parameters |
68
+ | `inputs` | -- | Echo of all input parameters |
61
69
  | `epsParticle` | `{re, im}` | Complex permittivity of the metal particle |
62
70
  | `epsMedium` | `{re, im}` | Permittivity of the embedding medium |
63
- | `alpha` | `{re, im}` nm | Quasi-static complex polarizability |
64
- | `crossSection.cExt` | nm | Extinction cross section |
65
- | `crossSection.cSca` | nm | Scattering cross section |
66
- | `crossSection.cAbs` | nm | Absorption cross section |
71
+ | `alpha` | `{re, im}` nm^3 | Quasi-static complex polarizability |
72
+ | `crossSection.cExt` | nm^2 | Extinction cross section |
73
+ | `crossSection.cSca` | nm^2 | Scattering cross section |
74
+ | `crossSection.cAbs` | nm^2 | Absorption cross section |
67
75
 
68
76
  ---
69
77
 
@@ -86,7 +94,7 @@ import {
86
94
 
87
95
  ---
88
96
 
89
- ## Example Spectral Scan
97
+ ## Example -- Spectral Scan
90
98
 
91
99
  ```js
92
100
  import { drudeEpsilon, constantEpsilon, rayleighCrossSections } from "@galihru/mnp";
@@ -96,27 +104,24 @@ const wavelengths = [400, 450, 500, 548, 600, 700];
96
104
  // Au permittivity across wavelengths
97
105
  const epsAu = drudeEpsilon("Au", wavelengths);
98
106
 
99
- // Host medium: water (n = 1.33, e = n)
107
+ // Host medium: water (n = 1.33, eps = n^2)
100
108
  const epsH2O = wavelengths.map(w => constantEpsilon(1.769, w));
101
109
 
102
110
  // Cross sections for a 50 nm radius Au sphere
103
111
  const spectra = rayleighCrossSections(wavelengths, 50, epsAu, epsH2O);
104
112
 
105
113
  spectra.forEach((cs, i) =>
106
- console.log(`${wavelengths[i]} nm Cext=${cs.cExt.toFixed(1)} nm� Cabs=${cs.cAbs.toFixed(1)} nm�`)
114
+ console.log(
115
+ wavelengths[i] + " nm Cext=" + cs.cExt.toFixed(1) + " nm^2" +
116
+ " Cabs=" + cs.cAbs.toFixed(1) + " nm^2"
117
+ )
107
118
  );
108
119
  ```
109
120
 
110
121
  ---
111
122
 
112
- ## Keywords
113
-
114
- nanoparticle � plasmonics � nanophotonics � mie-scattering � drude-model � lspr � localized-surface-plasmon � cross-section � electrodynamics � simulation
115
-
116
- ---
117
-
118
123
  ## Author
119
124
 
120
- **GALIH RIDHO UTOMO** g4lihru@students.unnes.ac.id
121
- Universitas Negeri Semarang (UNNES)
122
- License: GPL-2.0-only
125
+ **GALIH RIDHO UTOMO** | g4lihru@students.unnes.ac.id
126
+ Universitas Negeri Semarang (UNNES)
127
+ License: GPL-2.0-only
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galihru/mnp",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Integrated electromagnetic response of metallic nanoparticles: Drude dielectric model combined with Rayleigh quasi-static scattering.",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -27,8 +27,8 @@
27
27
  "author": "GALIH RIDHO UTOMO <g4lihru@students.unnes.ac.id>",
28
28
  "license": "GPL-2.0-only",
29
29
  "dependencies": {
30
- "@galihru/mnp-material": "0.1.3",
31
- "@galihru/mnp-mie": "0.1.3"
30
+ "@galihru/mnp-material": "0.1.4",
31
+ "@galihru/mnp-mie": "0.1.4"
32
32
  },
33
33
  "repository": {
34
34
  "type": "git",