pub struct OpticalMaterial {
pub n_real: f64,
pub n_imag: f64,
pub wavelength_nm: f64,
}Expand description
Optical material characterised by its complex refractive index ñ = n + i·k.
n_real– Real part of refractive index (phase velocity ratio).n_imag– Imaginary part k (extinction coefficient, ≥ 0 for absorbing media).wavelength_nm– Wavelength of light in vacuum [nm].
Fields§
§n_real: f64Real part of the complex refractive index n.
n_imag: f64Imaginary part (extinction coefficient) k ≥ 0.
wavelength_nm: f64Vacuum wavelength [nm].
Implementations§
Source§impl OpticalMaterial
impl OpticalMaterial
Sourcepub fn new(n: f64, k: f64, wl_nm: f64) -> Self
pub fn new(n: f64, k: f64, wl_nm: f64) -> Self
Create a new OpticalMaterial with complex index n + ik at wavelength λ.
Sourcepub fn absorption_coefficient(&self) -> f64
pub fn absorption_coefficient(&self) -> f64
Absorption coefficient α [m⁻¹].
α = 4π·k / λ where λ is in metres.
Sourcepub fn reflectance_normal(&self) -> f64
pub fn reflectance_normal(&self) -> f64
Normal-incidence reflectance R from vacuum into this material.
R = ((n−1)² + k²) / ((n+1)² + k²)
Sourcepub fn penetration_depth(&self) -> f64
pub fn penetration_depth(&self) -> f64
Optical penetration (skin) depth [m].
δ = λ / (4π·k) (wavelength in vacuum in metres). Returns infinity when k = 0 (non-absorbing material).
Sourcepub fn optical_impedance(&self) -> f64
pub fn optical_impedance(&self) -> f64
Optical impedance Z [Ω] (magnitude).
Z = Z₀ / n_real where Z₀ ≈ 376.73 Ω is the free-space impedance.
Trait Implementations§
Source§impl Clone for OpticalMaterial
impl Clone for OpticalMaterial
Source§fn clone(&self) -> OpticalMaterial
fn clone(&self) -> OpticalMaterial
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OpticalMaterial
impl Debug for OpticalMaterial
impl Copy for OpticalMaterial
Auto Trait Implementations§
impl Freeze for OpticalMaterial
impl RefUnwindSafe for OpticalMaterial
impl Send for OpticalMaterial
impl Sync for OpticalMaterial
impl Unpin for OpticalMaterial
impl UnsafeUnpin for OpticalMaterial
impl UnwindSafe for OpticalMaterial
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more