schrodinger.application.matsci.elasticity.elastic module

This module provides a class used to describe the elastic tensor, including methods used to fit the elastic tensor from linear response stress-strain data.

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.matsci.elasticity.elastic.ComplianceTensor(s_array)

Bases: schrodinger.application.matsci.elasticity.tensors.Tensor

This class represents the compliance tensor, and exists primarily to keep the voigt-conversion scheme consistent since the compliance tensor has a unique vscale

class schrodinger.application.matsci.elasticity.elastic.NthOrderElasticTensor(input_array, check_rank=None, tol=0.0001)

Bases: schrodinger.application.matsci.elasticity.tensors.Tensor

An object representing an nth-order tensor expansion of the stress-strain constitutive equations

property order

Order of the elastic tensor

calculate_stress(strain)

Calculate’s a given elastic tensor’s contribution to the stress using Einstein summation

Parameters

strain – 3x3 matrix corresponding to strain

class schrodinger.application.matsci.elasticity.elastic.ElasticTensor(input_array, tol=0.0001)

Bases: schrodinger.application.matsci.elasticity.elastic.NthOrderElasticTensor

This class extends Tensor to describe the 3x3x3x3 second-order elastic tensor, C_{ijkl}, with various methods for estimating other properties derived from the second order elastic tensor

property compliance_tensor

returns the Voigt-notation compliance tensor, which is the matrix inverse of the Voigt-notation elastic tensor

property k_voigt

returns the K_v bulk modulus

property g_voigt

returns the G_v shear modulus

property k_reuss

returns the K_r bulk modulus

property g_reuss

returns the G_r shear modulus

property k_vrh

returns the K_vrh (Voigt-Reuss-Hill) average bulk modulus

property g_vrh

returns the G_vrh (Voigt-Reuss-Hill) average shear modulus

property y_mod

Calculates Young’s modulus (in SI units) using the Voigt-Reuss-Hill averages of bulk and shear moduli

property universal_anisotropy

returns the universal anisotropy value

property homogeneous_poisson

returns the homogeneous poisson ratio

property lam

Returns lambda = (C11 + C22 + C33) / 3 - 2 * Mu in GPa.

Return float

Lambda (GPa)

property mu

Returns my = (C44 + C55 + C66) / 3 in GPa.

Return float

mu (GPa)

classmethod from_independent_strains(strains, stresses, eq_stress=None, vasp=False, tol=1e-10, dump_full_tensor=False)

Constructs the elastic tensor least-squares fit of independent strains

Parameters
  • strains (list[Strain]) – list of strain objects to fit

  • stresses (list) – list of stress objects to use in fit corresponding to the list of strains

  • eq_stress (Stress) – equilibrium stress to use in fitting

  • vasp (bool) – flag for whether the stress tensor should be converted based on vasp units/convention for stress

  • tol (float) – tolerance for removing near-zero elements of the resulting tensor

  • dump_full_tensor (bool) – dump complete 6*6 stress and strain matrix

schrodinger.application.matsci.elasticity.elastic.find_eq_stress(strains, stresses, tol=1e-10)

Finds stress corresponding to zero strain state in stress-strain list

Parameters
  • strains – Nx3x3 array-like array corresponding to strains

  • stresses – Nx3x3 array-like array corresponding to stresses

  • tol (float) – tolerance to find zero strain state

schrodinger.application.matsci.elasticity.elastic.get_strain_state_dict(strains, stresses, eq_stress=None, tol=1e-10, add_eq=True, sort=True)

Creates a dictionary of voigt-notation stress-strain sets keyed by “strain state”, i. e. a tuple corresponding to the non-zero entries in ratios to the lowest nonzero value, e.g. [0, 0.1, 0, 0.2, 0, 0] -> (0,1,0,2,0,0) This allows strains to be collected in stencils as to evaluate parameterized finite difference derivatives

Parameters
  • strains – Nx3x3 array-like strain matrices

  • stresses – Nx3x3 array-like stress matrices

  • eq_stress – Nx3x3 array-like equilibrium stress

  • tol (float) – tolerance for sorting strain states

  • add_eq (bool) – flag for whether to add eq_strain to stress-strain sets for each strain state

  • sort (bool) – flag for whether to sort strain states

Return type

OrderedDict

Returns

OrderedDict with strain state keys and dictionaries with stress-strain data corresponding to strain state