Elasticity calculations¶
Module contents for quippy.elasticity
:
Classes
AtomResolvedStressField ([bulk, a, cij, method]) 
Calculator interface to elastic_fields_fortran() and elastic_fields() 
Functions
einstein_frequencies (pot,at,[args_str,ii,delta]) 


elastic_fields (at[, a, bond_length, c, …]) 
Compute atomistic strain field and linear elastic stress response.  
graphene_elastic (pot,[args_str,cb]) 
Calculate inplane elastic constants of a graphene sheet with lattice parameter a using the Potential pot . 

poisson_ratio (cc,l,m) 
Calculate Poisson ratio \(\nu_{lm}\) from \(6\times6\) elastic constant matrix \(C_{ij}\).  
youngs_modulus (c,l) 
Calculate Youngs modulus \(E_l\) from \(6\times6\) elastic constants matrix \(C_{ij}\) This is the modulus for loading in the \(l\) direction.  
strain_matrix (strain_vector) 
Form a 3x3 strain matrix from a 6 component vector in Voigt notation  
stress_matrix (stress_vector) 
Form a 3x3 stress matrix from a 6 component vector in Voigt notation  
strain_vector (strain_matrix) 
Form a 6 component strain vector in Voight notation from a 3x3 matrix  
stress_vector (stress_matrix) 
Form a 6 component stress vector in Voight notation from a 3x3 matrix  
fit_elastic_constants (configs[, symmetry, …]) 
quippy.elasticity.fit_elastic_constants() deprecated, please use  
elastic_constants (pot, at[, sym, relax, …]) 
quippy.elasticity.elastic_contants() deprecated, please use  
atomic_strain (at, r0[, crystal_factor]) 
Atomic strain as defined by JA Zimmerman in Continuum and Atomistic Modeling of Dislocation Nucleation at Crystal Surface Ledges, PhD Thesis, Stanford University (1999).  
elastic_fields_fortran (at,a,[c11,c12,c44,cij]) 
elastic_fields(at,a,[c11,c12,c44,cij])  
elastic_fields (at[, a, bond_length, c, …]) 
Compute atomistic strain field and linear elastic stress response.  
transform_elasticity (c, R) 
Transform c as a rank4 tensor by the rotation matrix R.  
rayleigh_wave_speed (C, rho[, a, b, isotropic]) 
Rayleigh wave speed in a crystal. 

class
quippy.elasticity.
AtomResolvedStressField
(bulk=None, a=None, cij=None, method='fortran', **extra_args)[source]¶ Bases:
object
Calculator interface to
elastic_fields_fortran()
andelastic_fields()
Computes local stresses from atom resolved strain tensor and linear elasticity.
Parameters:  bulk: Atoms object, optional
If present, set a and
cij
frombulk.cell[0,0]
andbulk.get_calculator().get_elastic_constants(bulk)
. This means bulk should be a relaxed cubic unit cell. a : float, optional
Lattice constant
 cij : array_like, optional
6 x 6 matrix of elastic constants \(C_{ij}\). Can be obtained with :meth:`.Potential.get_elastic_constants’.
 method : str
Which routine to use: one of “fortran” or “python”.
 **extra_args : dict
Extra arguments to be passed along to python
elastic_fields()
, e.g. for noncubic cells.
Methods
get_stress
(atoms)Returns total stress on atoms, as a 6element array get_stresses
(atoms[, cutoff])Returns local stresses on atoms as a (len(atoms), 3, 3)
array

quippy.elasticity.
einstein_frequencies
(pot, at[, args_str, ii, delta])¶ Parameters:  pot :
Potential
object Potential to use
 at :
Atoms
object Atoms structure  should be equilibrium bulk configuation
 args_str : input string(len=1), optional
arg_str for potential_calc
 ii : input int, optional
The atom to displace (default 1)
 delta : input float, optional
How much to displace it (default 1e4_dp)
Returns:  ret_w_e : rank1 array(‘d’) with bounds (3)
References
Routine is wrapper around Fortran routine
einstein_frequencies
defined in file src/Utils/elasticity.f95. pot :

quippy.elasticity.
elastic_fields
(at, a=None, bond_length=None, c=None, c_vector=None, cij=None, save_reference=False, use_reference=False, mask=None, interpolate=False, cutoff_factor=1.2, system='tetrahedric')[source]¶ Compute atomistic strain field and linear elastic stress response.
Stress and strain are stored in compressed Voigt notation:
at.strain[:,i] = [e_xx,e_yy,e_zz,e_yz,e_xz,e_xy] at.stress[:,i] = [sig_xx, sig_yy, sig_zz, sig_yz, sig_xz, sig_xy]
so that sig = dot(C, strain) in the appropriate reference frame.
Fourfold coordinate atoms within at are used to define tetrahedra. The deformation of each tetrahedra is determined relative to the ideal structure, using a as the cubic lattice constant (related to bond length by a factor \(sqrt{3}/4\)). This deformation is then split into a strain and a rotation using a Polar decomposition.
If save_reference or use_reference are True then at must have a primitive_index integer property which is different for each atom in the primitive unit cell. save_reference causes the local strain and rotation for one atom of each primitive type to be saved as entries at.params. Conversely, use_reference uses this information and to undo the local strain and rotation.
The strain is then transformed into the crystal reference frame (i.e. x=100, y=010, z=001) to calculate the stress using the cij matrix of elastic constants. Finally the resulting stress is transformed back into the sample frame.
The stress and strain tensor fields are interpolated to give values for atoms which are not fourfold coordinated (for example oxygen atoms in silica).
Eigenvalues and eigenvectors of the stress are stored in the properties stress_evals,`stress_evec1`, stress_evec2 and stress_evec3, ordered decreasingly by eigenvalue so that the principal eigenvalue and eigenvector are stress_evals[1,:] and stress_evec1[:,i] respectively.

quippy.elasticity.
graphene_elastic
(pot[, args_str, cb])¶ Calculate inplane elastic constants of a graphene sheet with lattice parameter
a
using the Potentialpot
. On exit,poisson
will contain the in plane poisson ratio (dimensionless) andyoung
the in plane Young’s modulus (GPa).Parameters:  pot :
Potential
object  a : float
 poisson : float
 young : float
 args_str : input string(len=1), optional
arg_str for potential_calc
 cb : in/output rank0 array(float,’d’), optional
References
Routine is wrapper around Fortran routine
graphene_elastic
defined in file src/Utils/elasticity.f95. pot :

quippy.elasticity.
poisson_ratio
(cc, l, m)¶ Calculate Poisson ratio \(\nu_{lm}\) from \(6\times6\) elastic constant matrix \(C_{ij}\). This is the response in \(m\) direction to pulling in \(l\) direction. Result is dimensionless. Formula is from W. Brantley, Calculated elastic constants for stress problems associated with semiconductor devices. J. Appl. Phys., 44, 534 (1973).
Parameters:  cc : input rank2 array(‘d’) with bounds (6,6)
 l : input rank1 array(‘d’) with bounds (3)
 m : input rank1 array(‘d’) with bounds (3)
Returns:  ret_v : float
References
Routine is wrapper around Fortran routine
poisson_ratio
defined in file src/Utils/elasticity.f95.

quippy.elasticity.
youngs_modulus
(c, l)¶ Calculate Youngs modulus \(E_l\) from \(6\times6\) elastic constants matrix \(C_{ij}\) This is the modulus for loading in the \(l\) direction. Formula is from W. Brantley, Calculated elastic constants for stress problems associated with semiconductor devices. J. Appl. Phys., 44, 534 (1973).
Parameters:  c : input rank2 array(‘d’) with bounds (6,6)
 l : input rank1 array(‘d’) with bounds (3)
Returns:  ret_e : float
References
Routine is wrapper around Fortran routine
youngs_modulus
defined in file src/Utils/elasticity.f95.

quippy.elasticity.
strain_matrix
(strain_vector)[source]¶ Form a 3x3 strain matrix from a 6 component vector in Voigt notation

quippy.elasticity.
stress_matrix
(stress_vector)[source]¶ Form a 3x3 stress matrix from a 6 component vector in Voigt notation

quippy.elasticity.
strain_vector
(strain_matrix)[source]¶ Form a 6 component strain vector in Voight notation from a 3x3 matrix

quippy.elasticity.
stress_vector
(stress_matrix)[source]¶ Form a 6 component stress vector in Voight notation from a 3x3 matrix

quippy.elasticity.
fit_elastic_constants
(configs, symmetry=None, N_steps=5, verbose=True, graphics=True)[source]¶  quippy.elasticity.fit_elastic_constants() deprecated, please use
 matscipy.elasticity.fit_elastic_constants() instead

quippy.elasticity.
elastic_constants
(pot, at, sym='cubic', relax=True, verbose=True, graphics=True)[source]¶  quippy.elasticity.elastic_contants() deprecated, please use
 matscipy.elasticity.fit_elastic_constants() instead

quippy.elasticity.
atomic_strain
(at, r0, crystal_factor=1.0)[source]¶ Atomic strain as defined by JA Zimmerman in Continuum and Atomistic Modeling of Dislocation Nucleation at Crystal Surface Ledges, PhD Thesis, Stanford University (1999).

quippy.elasticity.
elastic_fields_fortran
(at, a[, c11, c12, c44, cij])¶ elastic_fields(at,a,[c11,c12,c44,cij])
Parameters:  at :
Atoms
object  a : input float
 c11 : input float, optional
 c12 : input float, optional
 c44 : input float, optional
 cij : input rank2 array(‘d’) with bounds (6,6), optional
References
Routine is wrapper around Fortran routine
elastic_fields
defined in file src/Utils/elasticity.f95. at :

quippy.elasticity.
elastic_fields
(at, a=None, bond_length=None, c=None, c_vector=None, cij=None, save_reference=False, use_reference=False, mask=None, interpolate=False, cutoff_factor=1.2, system='tetrahedric')[source] Compute atomistic strain field and linear elastic stress response.
Stress and strain are stored in compressed Voigt notation:
at.strain[:,i] = [e_xx,e_yy,e_zz,e_yz,e_xz,e_xy] at.stress[:,i] = [sig_xx, sig_yy, sig_zz, sig_yz, sig_xz, sig_xy]
so that sig = dot(C, strain) in the appropriate reference frame.
Fourfold coordinate atoms within at are used to define tetrahedra. The deformation of each tetrahedra is determined relative to the ideal structure, using a as the cubic lattice constant (related to bond length by a factor \(sqrt{3}/4\)). This deformation is then split into a strain and a rotation using a Polar decomposition.
If save_reference or use_reference are True then at must have a primitive_index integer property which is different for each atom in the primitive unit cell. save_reference causes the local strain and rotation for one atom of each primitive type to be saved as entries at.params. Conversely, use_reference uses this information and to undo the local strain and rotation.
The strain is then transformed into the crystal reference frame (i.e. x=100, y=010, z=001) to calculate the stress using the cij matrix of elastic constants. Finally the resulting stress is transformed back into the sample frame.
The stress and strain tensor fields are interpolated to give values for atoms which are not fourfold coordinated (for example oxygen atoms in silica).
Eigenvalues and eigenvectors of the stress are stored in the properties stress_evals,`stress_evec1`, stress_evec2 and stress_evec3, ordered decreasingly by eigenvalue so that the principal eigenvalue and eigenvector are stress_evals[1,:] and stress_evec1[:,i] respectively.

quippy.elasticity.
transform_elasticity
(c, R)[source]¶ Transform c as a rank4 tensor by the rotation matrix R.
Returns the new representation c’. If c is a 6x6 matrix it is first converted to 3x3x3x3 form, and then converted back after the transformation.

quippy.elasticity.
rayleigh_wave_speed
(C, rho, a=4000.0, b=6000.0, isotropic=False)[source]¶ Rayleigh wave speed in a crystal.
Returns triplet
(vs, vp, c_R)
in m/s, where vs is the transverse wave speed, vp the longitudinal wave speed and c_R the Rayleigh shear wave speed.For the anisotropic case (default), formula is Darinskii, A. (1997). On the theory of leaky waves in crystals. Wave Motion, 25(1), 3549.. If isostropic is True, formula is from this page
C is the 6x6 matrix of elastic contstant, rotated to reference the frame of sample, and should be given in units of GPa. The Rayleight speed returned is along the first (x) axis.
rho is the density in g/cm^3.