4 #ifndef QPMS_MATERIALS_H
5 #define QPMS_MATERIALS_H
7 #include <gsl/gsl_spline.h>
11 #define SPEED_OF_LIGHT (2.99792458e8)
23 qpms_epsmu_t (*
function) (complex
double omega,
const void *params);
30 return gen.
function(omega, gen.params);
41 return csqrt(em.
eps * em.
mu);
53 return csqrt(em.
mu / em.
eps);
115 const double *wavelength_m,
118 const gsl_interp_type *iptype
124 const gsl_interp_type *iptype
135 complex
double omega,
136 const void * interpolator
152 complex
double eps_inf,
153 complex
double omega_p,
154 complex
double gamma_p,
157 return eps_inf - omega_p*omega_p/(omega*(omega+I*gamma_p));
static complex double qpms_wavenumber(complex double omega, qpms_epsmu_t em)
Gets wave number k from angular frequency and material permeability and permittivity.
Definition: materials.h:46
static complex double qpms_drude_epsilon(complex double eps_inf, complex double omega_p, complex double gamma_p, complex double omega)
Relative permittivity from the Drude model.
Definition: materials.h:151
complex double qpms_permittivity_interpolator_eps_at_omega(const qpms_permittivity_interpolator_t *interp, double omega_SI)
Evaluates interpolated material permittivity at a given angular frequency.
Definition: materials.c:120
const qpms_ldparams_t *const QPMS_LDPARAMS_CR
Lorentz-Drude parameters from for chromium.
Definition: drudeparam_data.c:85
static complex double qpms_refindex(qpms_epsmu_t em)
Gets refractive index of a material from its permeability and permittivity.
Definition: materials.h:40
qpms_epsmu_t qpms_lorentzdrude_epsmu(complex double omega, const qpms_ldparams_t *)
Lorentz-Drude optical properties, with relative permeability set always to one.
Definition: materials.c:166
const qpms_ldparams_t *const QPMS_LDPARAMS_AU
Lorentz-Drude parameters from for gold.
Definition: drudeparam_data.c:28
const qpms_ldparams_t *const QPMS_LDPARAMS_AG
Lorentz-Drude parameters from for silver.
Definition: drudeparam_data.c:43
struct qpms_permittivity_interpolator_t qpms_permittivity_interpolator_t
Interpolator of tabulated optical properties.
const qpms_ldparams_t *const QPMS_LDPARAMS_NI
Lorentz-Drude parameters from for nickel.
Definition: drudeparam_data.c:127
#define SPEED_OF_LIGHT
Speed of light in m/s.
Definition: materials.h:11
double qpms_permittivity_interpolator_omega_min(const qpms_permittivity_interpolator_t *ip)
Returns the minimum angular frequency supported by the interpolator.
Definition: materials.c:150
double qpms_permittivity_interpolator_omega_max(const qpms_permittivity_interpolator_t *ip)
Returns the minimum angular frequency supported by the interpolator.
Definition: materials.c:144
static complex double qpms_waveimpedance(qpms_epsmu_t em)
Gets (relative) wave impedance from material permeability and permittivity.
Definition: materials.h:52
qpms_epsmu_t qpms_epsmu_const_g(complex double omega, const void *epsmu)
Constant optical property "generator" for qpms_epsmu_generator_t.
Definition: materials.c:179
qpms_permittivity_interpolator_t * qpms_permittivity_interpolator_from_yml(const char *path, const gsl_interp_type *iptype)
Creates a permittivity interpolator from an yml file downloaded from refractiveindex....
Definition: materials.c:104
complex double qpms_lorentzdrude_eps(complex double omega, const qpms_ldparams_t *)
Lorentz-Drude permittivity.
Definition: materials.c:156
struct qpms_ldparams_triple_t qpms_ldparams_triple_t
A triple for qpms_ldparams_t.
const qpms_ldparams_t *const QPMS_LDPARAMS_W
Lorentz-Drude parameters from for tungsten.
Definition: drudeparam_data.c:169
qpms_epsmu_t qpms_lorentzdrude_epsmu_g(complex double omega, const void *ldparams)
Lorentz-Drude optical properties, with relative permeability set always to one, compatible with qpms_...
Definition: materials.c:174
const qpms_ldparams_t *const QPMS_LDPARAMS_TI
Lorentz-Drude parameters from for titanium.
Definition: drudeparam_data.c:99
const qpms_ldparams_t *const QPMS_LDPARAMS_CU
Lorentz-Drude parameters from for copper.
Definition: drudeparam_data.c:57
const qpms_ldparams_t *const QPMS_LDPARAMS_BE
Lorentz-Drude parameters from for beryllium.
Definition: drudeparam_data.c:113
void qpms_permittivity_interpolator_free(qpms_permittivity_interpolator_t *interp)
Destroy a permittivity interpolator.
Definition: materials.c:32
struct qpms_epsmu_generator_t qpms_epsmu_generator_t
Prototype for general optical property generator for isotropic materials.
qpms_permittivity_interpolator_t * qpms_permittivity_interpolator_create(const size_t incount, const double *wavelength_m, const double *n, const double *k, const gsl_interp_type *iptype)
Creates a permittivity interpolator from tabulated wavelengths, refraction indices and extinction coe...
Definition: materials.c:11
qpms_epsmu_t qpms_permittivity_interpolator_epsmu_g(complex double omega, const void *interpolator)
Evaluates interpolated material permittivity at a given angular frequency, qpms_epsmu_generator_t com...
Definition: materials.c:131
const qpms_ldparams_t *const QPMS_LDPARAMS_PD
Lorentz-Drude parameters from for polonium.
Definition: drudeparam_data.c:141
struct qpms_ldparams_t qpms_ldparams_t
Structure holding Lorentz-Drude model parameters of a material.
const qpms_ldparams_t *const QPMS_LDPARAMS_PT
Lorentz-Drude parameters from for platinum.
Definition: drudeparam_data.c:155
const qpms_ldparams_t *const QPMS_LDPARAMS_AL
Lorentz-Drude parameters from for aluminium.
Definition: drudeparam_data.c:71
static qpms_epsmu_t qpms_epsmu_generator_eval(qpms_epsmu_generator_t gen, complex double omega)
Convenience function for generating material properties at given frequency.
Definition: materials.h:28
struct qpms_epsmu_t qpms_epsmu_t
A type holding electric permittivity and magnetic permeability of a material.
Prototype for general optical property generator for isotropic materials.
Definition: materials.h:16
qpms_epsmu_t(* function)(complex double omega, const void *params)
Generator function.
Definition: materials.h:23
A type holding electric permittivity and magnetic permeability of a material.
Definition: qpms_types.h:422
complex double mu
Relative permeability.
Definition: qpms_types.h:424
complex double eps
Relative permittivity.
Definition: qpms_types.h:423
Structure holding Lorentz-Drude model parameters of a material.
Definition: materials.h:69
qpms_ldparams_triple_t data[]
"Oscillator" parameters.
Definition: materials.h:73
size_t n
Number of "oscillators".
Definition: materials.h:72
complex double eps_inf
Permittivity at infinity.
Definition: materials.h:70
double omega_p
Plasma frequency.
Definition: materials.h:71
A triple for qpms_ldparams_t.
Definition: materials.h:57
Interpolator of tabulated optical properties.
Definition: materials.h:103
size_t size
Size of n[], k[], and wavelength_m[].
Definition: materials.h:109
double * wavelength_m
Wavelength array (in meters).
Definition: materials.h:104
double * k
Attenuation coefficient array.
Definition: materials.h:106
gsl_interp * interp_k
Attenuation coeff interpolator object.
Definition: materials.h:108
double * n
Refraction index array.
Definition: materials.h:105
gsl_interp * interp_n
Refraction index interpolator object.
Definition: materials.h:107