pynitride.physics.phonons module¶
- class pynitride.physics.phonons.AcousticPhonon(solvmesh, rmesh, num_eigs, keepmesh=None, first_level=0, vecform='XYZ', deformation=True, piezo=False)¶
 Bases:
PhononModelSuperclass for acoustic phonons.
- Parameters:
 solvmesh – see
PhononModelrmesh – see
PhononModelkeepmesh – see
PhononModelfirst_level – see
PhononModelvecform (str) – Format for the vecs, ‘XZ’, ‘XYZ’, or ‘Y’
deformation (bool) – whether to include deformation potential effects in matrix elements
piezo (bool) – whether to solve for the piezoelectric potential induced by the phonon and use it in matrix elements
- I2(carrier, psii, psij, iq, thetaq, l)¶
 The matrix element squared between two wavefunctions
See
PhononModel.I2()for arguments and returns.Note: if both piezo and deformation potentials are included, they are combined coherently (ie inside the squaring).
- deformation¶
 Whether to include deformation potential effects in matrix elements
- piezo¶
 Whether to solve for the piezoelectric potential induced by the phonon and use it in matrix elements
- strain(iq, thetaq, l)¶
 The strain profile
The strains returned are physicist strains, not engineering strains, eg \(e_{xy}=\frac{1}{2}\left(\partial_xu_y+\partial_yu_x\right)\)
- Parameters:
 iq (int) – index into the q array
thetaq – in-plane angle of the phonon propagation (from X toward Y)
l – which eigenvalue to use of those solved for
- Returns:
 a tuple of six MidFunctions (exx,exy,exz,eyy,eyz,ezz)
- u(iq, thetaq, l)¶
 The displacement profile
- Parameters:
 iq (int) – index into the q array
thetaq – in-plane angle of the phonon propagation (from X toward Y)
l – which eigenvalue to use of those solved for
- Returns:
 a tuple of three NodFunctions (ux,uy,uz)
- vecform¶
 Format for the vecs, ‘XZ’, ‘XYZ’, or ‘Y’
- class pynitride.physics.phonons.DielectricContinuum_BulkWurtzite(solvmesh, rmesh, num_eigs, thickness, matname, keepmesh=None, first_level=0, pol='L')¶
 Bases:
OpticalPhononSolves the Dielectric Continuum model for the bulk phonon dispersion
- Parameters:
 solvmesh – mesh to solve on [ignored, but kept for compatibility with non-bulk signatures]
rmesh – the reciprocal mesh on which to solve
num_eigs – number of eigenvalues total to solve for
thickness – normalization thickness to use for the modes
matname – material name to look up for the parameters
keepmesh – mesh on which to produce the solution vectors
first_level – index of the first eigenvalue to solve for (if solving with this object, must be zero, but if this is just inheriting an RMesh from an already solved model, can be non-zero to pick out a different part of the spectrum)
pol – ‘L’ or ‘T’ to choose which branch to solve (nearly longitudinal or nearly transverse)
- solve(just_energies=False, print_count=False, mode_iqs=None)¶
 
- class pynitride.physics.phonons.DielectricContinuum_SWH(solvmesh, rmesh, num_spec_eigs, num_eigs=None, first_level=0, keepmesh=None)¶
 Bases:
OpticalPhononSolves for the extraordinary PO phonons in a Single Wurtzite Heterojunction.
See the Dielectric Continuum Binary Wurtzite Heterojunction model for the relevant mathematics.
- Parameters:
 solvmesh – The mesh to solve on, should contain one
Wurtzitematerial block, which has two layers of uniform molefraction.rmesh – The
RMesh_1Dwhich specifies the \(q\) pointsnum_spec_eigs – should be a dictionary indicating how many eigenvalues are desired for each mode type, ie mapping the names ‘TOl’,’TOIF’,’TOu’,’LOl’,’LOIF’,’LOu’ to integers. ‘l’,’IF’,’u’ refer to the lower-region confined, interface, and upper-region confined modes respectively
num_eigs – if specified, only this many contiguous eigenvalues will be used out of the modes specified by num_spec_eigs
first_level – can be used in combination with num_eigs to select which set of num_eigs eigenvalues will be used.
keepmesh – the mesh on which to actually store the solved phi
- get_mode_by_name(name, num, iq=None)¶
 Convenience function to pull particular modes from the phi array by name.
- Parameters:
 name (str) – name of the mode type, eg ‘TOu’ for the TO mode confined to the upper region
num – which of the modes solved for to return (indexed from 0 being the first solved-for mode of this type)
iq – if specified, will return only for the given \(q\) index (may be integer or slice)
- Returns:
 a tuple of the energy(ies), potential(s)
- property rmesh¶
 
- solve(just_energies=False, print_count=False, mode_iqs=None)¶
 Actually solve for the modes.
- w_IF(pol='T')¶
 Finds the inteface resonant frequency.
- Parameters:
 pol – the polarization ‘T’ or ‘L’
- Returns:
 a tuple of the interface resonant frequency and +1/-1 indicating the mode is found above/below this frequency respectively
- class pynitride.physics.phonons.ElasticContinuum(solvmesh, rmesh, num_eigs, keepmesh=None, vecform='XYZ', first_level=0, parallel=True, deformation=True, piezo=False, dirichelet_bottom=False)¶
 Bases:
AcousticPhononNote: this parallel is not the same as the one in solve()
- solve(just_energies=False, parallel=True, print_count=True, mode_iqs=None, tasksize=600)¶
 
- solve_one_q(q, iq=None, just_energies=False)¶
 
- class pynitride.physics.phonons.ElasticContinuum_BulkWurtzite(solvmesh, rmesh, num_eigs, thickness, matname, keepmesh=None, first_level=0, vecform='XYZ', polXZ='all')¶
 Bases:
AcousticPhononSolves the Elastic Continuum model for the bulk phonon dispersion
- Parameters:
 solvmesh – mesh to solve on [ignored, but kept for compatibility with non-bulk signatures]
rmesh – the reciprocal mesh on which to solve
num_eigs – number of eigenvalues total to solve for
thickness – normalization thickness to use for the modes
matname – material name to look up for the parameters
keepmesh – mesh on which to produce the solution vectors
first_level – index of the first eigenvalue to solve for (if solving with this object, must be zero, but if this is just inheriting an RMesh from an already solved model, can be non-zero to pick out a different part of the spectrum)
vecform – see
AcousticPhononpolXZ – for XZ modes, can specify whether to include only ‘TA’ or only ‘LA’ or ‘all’
- solve(just_energies=False, print_count=False, mode_iqs=None)¶
 Solve the phonon problem, populating the energies and possibly vectors.
- Parameters:
 just_energies – whether to only solve the energies
print_count – (ignored)
mode_iqs – can limit the indices (into the rmesh) at which to solve
- class pynitride.physics.phonons.OpticalPhonon(solvmesh, rmesh, num_eigs, keepmesh=None, first_level=0)¶
 Bases:
PhononModelSuperclass for all optical phonon models.
- I2(carrier, psii, psij, iq, thetaq, l)¶
 The matrix element squared between two wavefunctions
See
PhononModel.I2()for arguments and returns.Note:thetaq does not actually matter for optical phonons.
- class pynitride.physics.phonons.PhononModel(solvmesh, rmesh, num_eigs, keepmesh=None, first_level=0)¶
 Bases:
objectSuperclass for all phonon models.
- Parameters:
 solvmesh – the direct mesh on which to perform the phonon solve
rmesh – the 1-D reciprocal mesh on which to perform the phonon solve
num_eigs – the number of eigenvalues to solve for
keepmesh – the direct mesh on which phonon modes will actually be desired, eg for a scattering problem, just the region where the carriers are. This should be a submesh of solvmesh.
first_level – the index of the first eigenvalue which should be solved for.
- I2(carrier, psii, psij, iq, thetaq, l)¶
 The matrix element squared between two wavefunctions
- Parameters:
 psii – the two wavefunctions (as 2-D NodFunctions)
psij – the two wavefunctions (as 2-D NodFunctions)
iq (int) – index into the q array
thetaq – in-plane angle of the phonon propagation (from X toward Y)
l – which eigenvalue to use of those solved for
- Returns:
 the squared matrix element
- en(iq=slice(None, None, None), l=None)¶
 Returns the l-th energy at q-index iq.
Note: l is an absolute index, ie l should not be lower than first_level
- first_level¶
 The index of the first eigenvalue to solve for
- interp_energy(absk, l, bounds_check=True)¶
 Returns the interpolated energy at a point in reciprocal space
- interp_radial_group_velocity(absk, l, bounds_check=True)¶
 Returns the interpolated radial group velocity at a point in reciprocal space
- num_eigs¶
 The number of eigenvalues to solve for
- phi(iq=slice(None, None, None), l=slice(None, None, None))¶
 Returns the l-th potential at q-index iq.
Note: l is an absolute index, ie l should not be lower than first_level
- property q¶
 The q values of the self.rmesh.
- read(name, just_energies=False)¶
 Reads the phonon solve from a file.
If reading mode vectors and/or potentials, checks the dimensions. If dimensions are incorrect, any new keys in rmesh will be cleared away and then an error will be raised.
- property rmesh¶
 The reciprocal mesh on which to solve
- save(filename, just_energies=False)¶
 Saves the phonon solve to a file.
- solve(mode_iqs=None)¶
 
- vecs(iq=slice(None, None, None), l=None)¶
 Returns the l-th mode vector at q-index iq.
Note: l is an absolute index, ie l should not be lower than first_level
- class pynitride.physics.phonons.PiezoPotential(pm, parallel=True)¶
 Bases:
objectHelper for
ElasticContinuumto calculate the piezo potential`- Parameters:
 pm – the
ElasticContinuummodel this calculator will helpparallel – whether to spawn parallel processes
- property q¶
 
- property rmesh¶
 
- solve_one_q(q, iq, vec)¶
 Solve the piezo potential at one q
- Parameters:
 q – the wavevector
iq – if supplied, use this iq to determine the q, and use precalculated FEM matrices
vec – the elastic continuum solution
- Returns:
 the electric potential function for this mode