The materials() class
Overview
The materials() class is used to define and store the permittivity values of different materials as a function of wavenumber.
When a material is defined using one of the methods, the complex permittivity, ε, and complex refractive index, η, are stored inside the materials() object under the .matDict attribute.
The dictionary key for ε is ["eps"] and the key for η is ["eta"].
For example, to access the imaginary part of the permittivity of Au you would input:
np.imag(<materialsInstanceName>.matDict["Au"]["eps"])
where <materialsInstanceName> should be replaced with the name of your materials object without the < >.
Creating a materials() object
materials(domainInput, fixed_aoi_or_wavenumber, [loInput], [hiInput], [numVals])
Defines the basic parameters of the system and has various methods to define permittivities of materials.
- domainInput: a string, either "frequency" or "aoi" depending on what you would like your domain to be.
- fixed_aoi_or_wavenumber: float, representing either:
- Fixed frequency in wavenumbers (if domainMode = "aoi")
- Fixed angle of incidence in degrees (if domainMode = "frequency")
- loInput: the lower bound of the domain to be calculated (default = 1500)
- hiInput: the upper bound of the domain to be calculated (default = 1700)
- numVals: the number of data points in the domain to be calculated (default = 100)
Methods to define permittivity for single-component materials
In order to use any of the following methods, you must have already defined the permittivity functions of some materials. The methods that follow are different ways of combining the already-defined permittivity functions of pure materials together to create an effective permittivity function of a composite material in the long wavelength limit.
.importMat(matName)
Imports tabulated permitivities of materials from .csv files with the name <name>.csv located in the directory materials_n_k.
- matName: a string containing part of the filename of the csv file containing the values you want to import. The file should be stored in a folder named "materials_n_k" in the root directory. The columns in the csv, from left to right should be: Wavenumber, n, k. If there is no third "k" column, it is interpreted as having a wavenumber-invariant damping factor of 0. Note that OptiCalc will perform a cubic spline interpolation to get the required values for the requested calculation based on the values of loInput, hiInput, and numVals when creating the "materials" object. The program will not extrapolate and will provide an error message to the user if the frequency range of the csv file is smaller than the frequency range required for the calculation.
.setFixed(matName, independent_n, [independent_k])
Sets a wavenumber-invariant refractive index.
- matName: string that will later be used to refer to this material
- independent_n: wavenumber-invariant refractive index
- independent_k: optional. wavenumber-invariant damping factor. If none is given, it is assumed to be 0.
.setLorentz(matName, B, vD, epsInf, vR)
Calculates the permittivities by modelling a Lorentz oscillator.
- matName: string that will later be used to refer to this material
- B: list of floats - oscillator strength defined as in Osawa et al J Electron Spectros Relat Phenomena. 1993, 64/65, 376 (B must have units of cm-2)
- vD: list of floats - damping factors of the Lorentz oscillator (in wavenumbers)
- epsInf: float - permittivity far off resonance
- vR: list of floats - resonant frequency of the Lorentz oscillator in wavenumbers
.setDrude(matName, vP, vD, epsInf, [method])
Calculates the permittivities using the Drude model for metals, accounting only for the unbound electrons -- no interband transitions.
- matName: string that will later be used to refer to this material
- vP: float - plasma frequency of the Lorentz oscillator in wavenumbers
- vD: float - damping factor of the Lorentz oscillator in wavenumbers
- epsInf: float - permittivity far off resonance
- method: optional string - either "LeRu" or "Franzen", indicating the method/convention by which the plasma frequency is reported. For more details, read this (from page 7 of the supporting information of ACS Appl. Nano Mater. 2019, 2, 3, 1274-1284. If none is given, "Franzen" is assumed.
.setLorentzDrude(matName, vP, f, vD, vj)
Calculates permittivities using the generalized Lorentz-Drude model. This function uses the parameterization provided by the equation under the "Multiple Resonanaces" section of
my thesis. Uses the same parameterization as
Dr. Raymond Rumpf's video.For a good overview of the Lorentz and Drude models, you can read
this document from MIT opencourseware on the subject.
- matName: string that will later be used to refer to this material
- vP: float - plasma frequency of the Lorentz oscillator in wavenumbers
- f: list of floats - empirically-determined scalar(s) to account for the intensity of each individual oscillator, dimensionless
- vD: list of floats - damping factor(s) of the Lorentz oscillator in wavenumbers
- vj: list of floats - frequency position(s) of the oscillation(s) in wavenumbers
.setAbsLorentzian(matName, peakPosition, peakHeight, FWHM, pathlength_um, n_inf)
Calculates permittivities from the spectral features of an absorbance spectrum of, for example, a liquid in a cuvette.
- matName: string that will later be used to refer to this material
- peakPosition: list of floats - the frequencies of the peak positions
- FWHM: list of floats - the full widths at half maximum of the peaks, in wavenumbers
- pathlength_um: float - the pathlength of the transmission measurement in micrometers
- n_inf: float - the infinite-frequency refractive index
Methods to define permittivity for composite materials (Effective Medium Approximations)
.setBasicMaxwellGarnett(matName, inclusionMat, matrixMat, f)
- matName: string that will later be used to refer to this material
- inclusionMat: string - the name of the inclusion material
- matrixMat: string - the name of the matrix material
- f: float - the volumetric fill fraction of the inclusion (must be between 0 and 1 and note that the Maxwell-Garnett approximation performs porrly at high fill fractions)
.setBasicBruggeman(matName, inclusionMat, matrixMat, f, d = 3)
- matName: string that will later be used to refer to this material
- inclusionMat: string - the name of the inclusion material
- matrixMat: string - the name of the matrix material
- f: float - the volumetric fill fraction of the inclusion (must be between 0 and 1)
- d: int - optional parameter indicating the dimensionality of the calculation. Default = 3. (e.g. dimensionality of 2 could be used for calculating the percolation of circles on a plane)
.setMultiBruggeman(matName, constituentMat_ARR, fill_ARR)
- matName: string that will later be used to refer to this material
- constituentMat_ARR: list of stri
ngs - the names of the materials of the component particles
- fill_ARR: list of floats - the fill fraction of each of the constituent particles
.setCoatedEllipsoid(matName, coreMat, shellMat, a_core, b_core, c_core, lamda, rotMat=None)
- matName: string that will later be used to refer to this material
- coreMat: string - the name of the core material
- shellMat: string - the name of the shell (coating) material
- a_core: float - the longest semi-axis of the ellipsoid
- b_core: float - the intermediate semi-axis of the ellipsoid
- c_core: float - the shortest semi-axis of the ellipsoid
- lamda: lamda is the volume fraction of the outer ellipsoid to the inner ellipsoid = (Vcore + Vshell) / Vshell Physically valid lamdas are foun on the intercal 0 <= lambda < 1
.setBruggeman(matName, coreMat, shellMat, matrixMat, thickness, molec, ratio1, F, plotResult=False, iterations=1)
Caution: this method might be sketchy, I don't think I have any direct verification that it is working as intended by comparing it to known modelling results. Calculates the permittivities using the Bruggeman formula for 3 phase, coated core-shell ellipsoids, NO self consistency condition. Granqvist has some papers that describe this formulation.
- matName: string that will later be used to refer to this material
- coreMat: string indicating the core material of the ellipsoidal nanoparticles
- shellMat: string indicating the shell/coating material (i.e. the adsorbate)
- matrixMat: string indicating the material of the host material filling the spaces between the adsorbate-coated ellipsoids
- thickness: float - the thickness of the layer in nanometers
- molec: thickness of the shell of the molecular film coating the ellipsoids
- ratio1: aspect ratio of the ellipsoids
- F: fill factor, the volumetric fraction of the layer occupied by ellipsoids
Back to main page.