User Interface
This page contains all relevant docstrings for users to construct simulations.
LightMatter.build_Simulation — Functionbuild_Simulation(;densitymatrix::Union{DensityMatrix,NamedTuple,Nothing}=nothing, electronictemperature::Union{ElectronicTemperature,NamedTuple,Nothing}=nothing,
phononictemperature::Union{PhononicTemperature,NamedTuple,Nothing}=nothing, athermalelectrons::Union{AthermalElectrons,NamedTuple,Nothing}=nothing,
electronicdistribution::Union{ElectronicDistribution,NamedTuple,Nothing}=nothing, phononicdistribution::Union{PhononicDistribution,NamedTuple,Nothing}=nothing,
structure::Union{Structure,NamedTuple,Nothing}=nothing, laser::Union{Laser,NamedTuple,Nothing}=nothing)
Assembles the full Simulation struct from the requested components. Any systems not provided to the function are disabled by default.
The user can send either a completed Struct of the correct type or a NamedTuple with the correct key-word arguments to assemble the struct directly within the function
using the representative build_x function where x is the subsystem.
# Arguments
- 'densitymatrix': The DensityMatrix subsystem
- 'electronictemperature': The ElectronicTemperature subsystem
- 'phononictemperature': The PhononicTemperature subsystem
- 'athermalelectrons': The AthermalElectrons subsystem
- 'electronicdistribution': The ElectronicDistribution subsystem
- 'phononicdistribution': The PhononicDistribution subsystem
- 'structure': The Structure subsystem
- 'laser': The Laser subsystem
# Returns
- The PhononicTemperature struct with the users settings and parameters with any neccessary unit conversion.LightMatter.build_Laser — Functionbuild_laser(;envelope=:Gaussian, FWHM=10.0, ϕ=10.0, hv=5.0, Transport=:optical, ϵ=1.0, R=0.0, δb=1.0)
Outer constructor function to assemble the Laser struct. Can handle unit conversions if the user provides a
unitful quantity to the laser.
Defaults allow any unneccessary parameters for users simulation to be ignored.
# Arguments
- 'envelope': Symbol representing the shape of the envelope, :Gaussian, :HyperbolicSecant, :Lorentzian, :Rectangular
- 'FWHM': unit = fs: Full-Width Half-Maximum of the laser pulse or half the duration of the Rectangular laser ± 0.0
- 'ϕ': unit = eV/nm²: The fluence of the laser
- 'hv': unit = eV: The photon energy of the laser
- 'Transport': The method of spatial transport of the laser, :optical, :ballistic, :combined
- 'ϵ': unit = nm: The penetration depth of the material (1/α), for the :Optical & :Combined transport
- 'R': unit = unitless:The reflectivity of the sample surface, leave at 0.0 if your provided fluence is the absorbed fluence
- 'δb': unit = nm:The ballistic length of electrons, for :ballistic & :combined transport
# Returns
- The Laser struct with the user settings and neccessary values converted to the correct unitsLightMatter.build_Dimension — Functionbuild_Dimension(grid=[0.0]::AbstractArray{Float64}, cutoff=0.0::Union{Vector{Float64},Float64})
Outer constructor function to assemble the Dimension struct. The user provides an evenly spaced grid
and sorted list of interface heights for antenna-reactor complexes. The user must ensure the length of
cutoff = Elemental_System - 1. No unit conversion is performed when assembling this struct.
Defaults allow any unneccessary parameters for users simulation to be ignored.
# Arguments
- 'grid': unit = nm: Vector representing spatial grid. If [0.0] then homogenous (0D) calculation is performed
- 'cutoff': unit = nm: Sorted list of all interface heights. Only used when Elemental_System > 1.
# Returns
- The Dimension struct with the users grid and interface heightsLightMatter.build_Structure — Functionbuild_Structure(; las::Laser=build_Laser(), Spatial_DOS::Bool = false, Elemental_System::Int = 1, dimension::Dimension = build_Dimension(),
bulk_DOS::Union{String,Vector{String},Nothing} = nothing, DOS_folder::Union{String,Vector{String},Nothing} = nothing,
bulk_geometry::Union{String,Vector{String},Nothing} = nothing, slab_geometry::Union{String,Vector{String},Nothing} = nothing,
atomic_layer_tolerance::Union{Float64,Vector{Float64}} = 0.1, DOS::Union{spl,Vector{spl},Nothing} = nothing,
egrid::Union{Vector{Float64},Nothing} = nothing)
Outer constructor function to assemble the Structure struct. No unit conversion is performed.
All DOS files must be in the format |energy (eV), states (eV⁻¹Vᵤ⁻¹)|. Comment lines (#) are ignored
Defaults allow any unneccessary parameters for users simulation to be ignored.
# Arguments
- 'las': Laser struct, provide if not providing a pre-made energy grid
- 'Spatial_DOS': Bool for determening whether the DOS is spatially resolved or bulk
- 'Elemental_System': Float64 of different crystal systems in the structure
- 'dimension': Dimension struct, provide if not wanting a 0D calculation
- 'bulk_DOS': File location of the bulk DOS file
- 'DOS_folder': Location of a folder containing atom projected DOS. These must be in units of (eV⁻¹atom⁻¹) and be .dat files
- 'bulk_geometry': File location of the bulk DOS' geometry.in file
- 'slab_geometry': File location of the geometry.in to create the atom projected DOS' found in DOS_folder
- 'atomic_layer_tolerance': Minimum height spacing in Å for two atoms to be apart to be considered different layers
- 'DOS': A user made DOS or vector of DOS' for the simulation if not wanting to use the DOS_initialization function. Will overwrite this function.
Must be of the type DataInterpolations.LinearInterpolation or a vector of them. It is advised to have extrapolation enabled just in case.
- 'egrid': A user made energy grid if not wanting to use build_egrid function. Will overwrite this function. Must be an evenly spaced grid that
has length(egrid) % 4 == 1 for the numerical integration algorithm to work.
- 'BandStructure': Contains splines of [k->E, E->k] for the evaluation of magnetotransport and group velocity
# Returns
- The Structure struct with the DOS and egrid assembled or provided by the userLightMatter.build_AthermalElectrons — Functionbuild_AthermalElectrons(;structure::Structure, Enabled = false, AthermalElectron_ElectronCoupling = false,
AthermalElectron_PhononCoupling = false, Conductivity = false, ElectronicRelaxation = :FLT,
PhononicRelaxation = :constant, ExcitationMatrixElements = :unity, FE=0.0, τ=1.0, τep = 1000.0,
v_g = nothing, Conductive_Velocity = :constant, EmbeddedAthEM = false)
Outer constructor function to assemble the AthermalElectrons struct. Unit conversion is detected on all parameters.
The function will build the group veolcity if one isn't provided by the user.
Defaults allow any unneccessary parameters for users simulation to be ignored.
# Arguments
- 'Enabled': Bool for enabling an athermal electron subssystem
- 'structure': Structure struct, provide if you want the group velocity calculated for you
- 'AthermalElectron_ElectronCoupling': Enables athermal electron - thermal electron coupling
- 'AthermalElectron_PhononCoupling': Enables athermal electron - thermal phonon coupling
- 'Conductivity': Bool for enabling athermal electron ballistic transport
- 'ElectronicRelaxation': Method for calculating athermal electron lifetime due to e-e collisions, :FLT or :constant
- 'PhononicRelaxation': Method for calculating athermal electron lifetime due to e-p collisions, :quasi or :constant
- 'ExcitationMatrixElements': Decides method to calculate excitation matrix elements, only :unity is currently implemented
- 'FE': unit = eV: The Fermi energy defined as the difference between the bottom of the valence band in the DOS and 0.0
- 'τ': unit = fs: A material dependent scalar for the :FLT lifetime or the constant value for :constant e-e lifetime
- 'τep': unit = fs: The constant lifetime for the athermal electrons due to electron-phonon coupling
- 'v_g': unit = nm/fs: The group velocity of the ballistic electrons, for the user to define their own group velocity and will overwrite the
one calculated by build_group_velocity. Also the value used for a constant velocity.
- 'Conductive_Velocity': Define the group velocity that build_group_velocity should use, :constant :fermigas, :effectiveoneband
- 'EmbeddedAthEM': Bool for setting only the surface layer to AthEM and the rest a TTM. Can't be used alongside athermal electron
transport
# Returns
- The AthermalElectrons struct with the users settings and parameters with any neccessary unit conversion.LightMatter.build_ElectronicTemperature — Functionbuild_ElectronicTemperature(; Enabled = false, AthermalElectron_ElectronCoupling = false, Electron_PhononCoupling = false, Conductivity = false,
ElectronicHeatCapacity = :linear, ElectronPhononCouplingValue = :constant, γ = 1.0, κ = 1.0, λ = 1.0, ω = 1.0, g = 1.0)
Outer constructor function to assemble the ElectronicTemperature struct. Unit conversion is detected on all parameters.
Defaults allow any unneccessary parameters for users simulation to be ignored.
# Arguments
- 'Enabled': Bool for enabling an thermal electronic bath
- 'AthermalElectron_ElectronCoupling': Enables athermal electron - thermal electron coupling
- 'Electron_PhononCoupling': Enables electron bath - phonon bath coupling
- 'Conductivity': Bool for enabling thermnal electron diffusive transport
- 'ElectronicHeatCapacity': Method for calculating the electronic heat capacity, :linear or :nonlinear
- 'ElectronPhononCouplingValue': Method for calculating the electron phonon coupling value, either :constant or :variable
- 'γ': unit = eV/nm³/K²: Specific heat capacity of electronic bath for :linear ElectronicHeatCapacity
- 'κ': unit = eV/fs/nm/K: Thermal conductivity of electrons at room temperature
- 'λ': unit = unitless: Electron-phonon mass enhancement parameter
- 'ω': unit = eV^2: The second moment of the phonon spectrum
- 'g': unit = eV/fs/nm³/K: Constant value for the electron-phonon coupling if using :constant
# Returns
- The ElectronicTemperature struct with the users settings and parameters with any neccessary unit conversion.LightMatter.build_ElectronicDistribution — Functionbuild_ElectronicDistribution(;Enabled = false, Electron_PhononCoupling = false, Ω=1.0, me = Constants.me)
Boltzmann clacluations are currently WIP.
Outer constructor function to assemble the ElectronicDistribution struct. Unit conversion is detected on all parameters.
Defaults allow any unneccessary parameters for users simulation to be ignored. Recommended to use Unitful Quantity
for me due to the unusual mass units in LightMatter.jl
# Arguments
- 'Enabled': Bool for enabling the full electronic distriubtion propagation
- 'Electron_PhononCoupling': Enables electronic distribution - phononic distribution bath coupling
- 'me': unit = eVm : Mass of conduction electron in LightMatter.jl mass units
# Returns
- The ElectronicDistribution struct with the users settings and parameters with any neccessary unit conversion.LightMatter.build_PhononicTemperature — Functionbuild_PhononicTemperature(;Enabled = false, AthermalElectron_PhononCoupling = false, Electron_PhononCoupling = false,
Conductivity = false, PhononicHeatCapacity = :linear, θ = 1.0, n = 1.0, Cph = 1.0, κ = 1.0)
Outer constructor function to assemble the PhononicTemperature struct. Unit conversion is detected on all parameters.
Defaults allow any unneccessary parameters for users simulation to be ignored.
# Arguments
- 'Enabled': Bool for enabling an thermal electronic bath
- 'AthermalElectron_PhononCoupling': Enables athermal electron - thermal electron coupling
- 'Electron_PhononCoupling': Enables electron bath - phonon bath coupling
- 'Conductivity': Bool for enabling thermal phonon diffusive transport
- 'PhononicHeatCapacity': Method for calculating the phononic heat capacity, :constant or :nonlinear
- 'θ': unit = K: Debye temperature of the material
- 'n': unit = atoms/nm³: Float64 of atoms per nm³
- 'Cph': unit = eV/nm³/K: Constant heat capacity for :constant
- 'κ': unit = eV/nm: Constant thermal conductivity of phonons
# Returns
- The PhononicTemperature struct with the users settings and parameters with any neccessary unit conversion.LightMatter.build_PhononicDistribution — Functionbuild_PhononicDistribution(;Enabled = false, Electron_PhononCoupling = false, Ω=1.0, me = Constants.me)
Boltzmann clacluations are currently WIP.
Outer constructor function to assemble the PhononicDistribution struct. Unit conversion is detected on all parameters.
Defaults allow any unneccessary parameters for users simulation to be ignored. Recommended to use Unitful Quantity
for me due to the unusual mass units in LightMatter.jl
# Arguments
- 'Enabled': Bool for enabling the full phononic distriubtion propagation
- 'Electron_PhononCoupling': Enables electronic distribution - phononic distribution bath coupling
- 'cs': unit = nm/fs : Speed of sound of longitudinal mode
= 'ED': unit = eV : Deybe energy of the material
# Returns
- The PhononicDistribution struct with the users settings and parameters with any neccessary unit conversion.LightMatter.build_DensityMatrix — FunctionWIP!!!
build_DensityMatrix(; Enabled = false)
Once implemented will build a density matrix and store Hamiltonian for propagation via the vonNeumann equation.