@galihru/mnp-material
v0.1.4
Published
Analytical dielectric-function models for metallic nanoparticles in plasmonic nanophotonics.
Maintainers
Readme
@galihru/mnp-material
Analytical dielectric-function models for metallic nanoparticles in the framework of plasmonic nanophotonics. Provides frequency-dependent complex permittivity via the Drude free-electron model and constant dielectric approximation, with complex wave-number computation, all operating natively in the wavelength domain (wavelength in nm).
Physical Background
The optical response of a metallic nanoparticle is governed by its frequency-dependent complex dielectric function epsilon(omega). This package implements two analytical models and the wave-number relation used in electrodynamic simulations.
Implemented Models
1. Energy-Wavelength Conversion
All models accept wavelength in nanometres. The photon energy is computed as:
2. Drude Free-Electron Model
Describes the dielectric response of free-electron metals:
Parameters:
- eps_inf -- high-frequency (interband) dielectric constant
- omega_p -- bulk plasma frequency, derived from electron density via the Wigner-Seitz radius r_s:
- gamma -- phenomenological Drude damping rate (scattering)
Built-in material table:
| Material | r_s (a.u.) | eps_inf | gamma (eV) | omega_p (eV) |
|---|---|---|---|---|
| Au / gold | 3.00 | 10.0 | 0.066 | ~9.07 |
| Ag / silver | 3.00 | 3.3 | 0.022 | ~9.07 |
| Al / aluminum | 2.07 | 1.0 | 1.06 | ~15.8 |
3. Constant Dielectric Model
For non-dispersive homogeneous embedding media (glass, water, vacuum):
4. Wave Number in Medium
Complex wave number for light propagating through a dielectric:
Install
npm install @galihru/mnp-materialAPI Reference
drudeEpsilon(materialName, wavelengthNm)
Returns the complex Drude permittivity for a built-in metal at one or multiple wavelengths.
import { drudeEpsilon } from "@galihru/mnp-material";
// Single wavelength -> { re, im }
const eps = drudeEpsilon("Au", 548.1);
// Wavelength array -> [{ re, im }, ...]
const spectra = drudeEpsilon("Ag", [400, 500, 600, 700]);makeDrudeMaterial(name)
Returns the raw Drude parameter object for a given metal name.
import { makeDrudeMaterial } from "@galihru/mnp-material";
const au = makeDrudeMaterial("Au");
// -> { name: "Au", eps0: 10.0, gammad: 0.066, wp: 9.07 }constantEpsilon(value, wavelengthNm)
Returns a wavelength-independent complex permittivity.
import { constantEpsilon } from "@galihru/mnp-material";
// Water: n = 1.33 -> eps = n^2 = 1.769
const epsWater = constantEpsilon(1.769, 548.1);
// -> { re: 1.769, im: 0 }wavenumberInMedium(wavelengthNm, epsilonComplex)
Computes the complex wave number k = (2*pi/lambda)*sqrt(epsilon).
import { constantEpsilon, wavenumberInMedium } from "@galihru/mnp-material";
const eps = constantEpsilon(1.769, 548.1);
const k = wavenumberInMedium(548.1, eps);
// -> { re: ..., im: ... } [nm^-1]Complex Arithmetic Utilities
import { complex, add, sub, mul, div, sqrtComplex, fromReal } from "@galihru/mnp-material";
const z1 = complex(-5.2, 1.3); // -5.2 + 1.3i
const z2 = fromReal(2.0); // 2.0 + 0i
const prod = mul(z1, z2); // -> { re: -10.4, im: 2.6 }
const root = sqrtComplex(z1); // -> { re: ..., im: ... }Author
GALIH RIDHO UTOMO | [email protected] Universitas Negeri Semarang (UNNES) License: GPL-2.0-only
