schrodinger.application.matsci.elasticity.strain module¶
This module provides classes and methods used to describe deformations and strains, including applying those deformations to structure objects and generating deformed structure sets for further calculations.
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.application.matsci.elasticity.strain.Deformation(deformation_gradient)¶
Bases:
schrodinger.application.matsci.elasticity.tensors.SquareTensor
Subclass of SquareTensor that describes the deformation gradient tensor
- is_independent(tol=1e-08)¶
checks to determine whether the deformation is independent
- get_perturbed_indices(tol=1e-08)¶
Gets indices of perturbed elements of the deformation gradient, i. e. those that differ from the identity
- property green_lagrange_strain¶
calculates the euler-lagrange strain from the deformation gradient
- apply_to_structure(structure)¶
Apply the deformation gradient to a structure.
- Args:
- structure (Structure object): the structure object to
be modified by the deformation
- classmethod from_index_amount(matrixpos, amt)¶
Factory method for constructing a Deformation object from a matrix position and amount
- Args:
- matrixpos (tuple): tuple corresponding the matrix position to
have a perturbation added
- amt (float): amount to add to the identity matrix at position
matrixpos
- class schrodinger.application.matsci.elasticity.strain.DeformedStructureSet(structure, norm_strains=None, shear_strains=None, symmetry=False)¶
Bases:
collections.abc.Sequence
class that generates a set of independently deformed structures that can be used to calculate linear stress-strain response
- NORM_INDICES = [(0, 0), (1, 1), (2, 2)]¶
- NORM_STRAINS = [-0.01, -0.005, 0.005, 0.01]¶
- SHEAR_INDICES = [(0, 1), (0, 2), (1, 2)]¶
- SHEAR_STRAINS = [-0.06, -0.03, 0.03, 0.06]¶
- __init__(structure, norm_strains=None, shear_strains=None, symmetry=False)¶
constructs the deformed geometries of a structure. Generates m + n deformed structures according to the supplied parameters.
- Parameters
structure (Structure) – structure to undergo deformation
shear_strains (list[float]) – strain values to apply to each shear mode.
symmetry (bool) – whether or not to use symmetry reduction.
- Param
norm_strains: strain values to apply to each normal mode.
- __len__()¶
- class schrodinger.application.matsci.elasticity.strain.Strain(strain_matrix, dfm=None, dfm_shape='upper')¶
Bases:
schrodinger.application.matsci.elasticity.tensors.SquareTensor
Subclass of SquareTensor that describes the Green-Lagrange strain tensor.
- classmethod from_deformation(deformation)¶
Factory method that returns a Strain object from a deformation gradient
- Args:
deformation (3x3 array-like):
- classmethod from_index_amount(idx, amount)¶
Like Deformation.from_index_amount, except generates a strain from the zero 3x3 tensor or voigt vector with the amount specified in the index location. Ensures symmetric strain.
- Parameters
idx (tuple or integer) – index to be perturbed, can be voigt or full-tensor notation
amount (float) – amount to perturb selected index
- property deformation_matrix¶
returns the deformation matrix
- property von_mises_strain¶
Equivalent strain to Von Mises Stress
- schrodinger.application.matsci.elasticity.strain.convert_strain_to_deformation(strain, shape='upper')¶
This function converts a strain to a deformation gradient that will produce that strain. Supports three methods:
- Parameters
strain – (3x3 array-like) strain matrix
shape (str) – method for determining deformation, supports: - “upper” produces an upper triangular defo - “lower” produces a lower triangular defo - “symmetric” produces a symmetric defo