elasticityproject

Submodules

Package Contents

Classes

ElasticityTheory

Generates the compliance matrix, compliance tensor and stiffness matrix based on the given inputs. Each crystal class have a specific number of constants to be given

DirectionalProperties

Generates the object that calculate directional properties based on the given input properties

VRH

Voigt-Reuss-Hill approximation to polycristalline elastic properties

Functions

mayaviplot(property, smoothness[, auto_extent, ...])

Generates the surface plot based on the data generated by the DirectionalProperties class

LinearCompressibility3DPlot(material, *args, **kwargs)

YoungModulus3DPlot(material, *args, **kwargs)

Attributes

__version__

elasticityproject.__version__
class elasticityproject.ElasticityTheory(crystal_class, *stiff_consts)[source]

Generates the compliance matrix, compliance tensor and stiffness matrix based on the given inputs. Each crystal class have a specific number of constants to be given

Parameters:
  • crystal_class (str) – one of the following crystal classes: isotropic (2), cubic (3), hexagonal (5), trigonal_1 (6), trigonal_2 (7), tetragonal_1 (6), tetragonal_2 (7), orthorhombic (9), monoclinic_1 (13), monoclinic_2 (13), triclinic (21)

  • constants (stiffness) – independent elastic constants, the quantity of constants depends on the crystal class, as indicated between parenthesis above, GPa is the refered unit

Returns:

  • C (array) – (6x6) numpy array, stiffness matrix based on the given constants and material crystal class

  • S (array) – (6x6) numpy array, compliance matrix based on the given constants and material crystal class

  • St (array) – (3x3x3x3) numpy array, compliance tensor based on the given constants and material crystal class

StiffnessMatrix(crystal_class, *stiff_consts)[source]

Generates the stiffness matrix based on the given crystal class and independent elastic constants based on voigt notation

Parameters:
  • crystal_class (str) – one of the following crystal classes: isotropic (2), cubic (3), hexagonal (5), trigonal_1 (6), trigonal_2 (7), tetragonal_1 (6), tetragonal_2 (7), orthorhombic (9), monoclinic_1 (13), monoclinic_2 (13), triclinic (21)

  • constants (stiffness) – independent elastic constants, the quantity of constants depends on the crystal class, as indicated between parenthesis above, GPa is the refered unit

Returns:

C – (6x6) numpy array, stiffness matrix based on the given constants and material crystal class

Return type:

array

ComplianceMatrix(C)[source]

Generates the compliance matrix based on the given crystal class and independent elastic constants based on voigt notation

Parameters:
  • crystal_class (str) – one of the following crystal classes: isotropic (2), cubic (3), hexagonal (5), trigonal_1 (6), trigonal_2 (7), tetragonal_1 (6), tetragonal_2 (7), orthorhombic (9), monoclinic_1 (13), monoclinic_2 (13), triclinic (21)

  • constants (stiffness) – independent elastic constants, the quantity of constants depends on the crystal class, as indicated between parenthesis above, GPa is the refered unit

Returns:

S – (6x6) numpy array, compliance matrix based on the given constants and material crystal class

Return type:

array

ComplianceTensor(S)[source]

Generates the compliance tensor based on the given crystal class and independent elastic constants based on voigt notation

Parameters:
  • crystal_class (str) – one of the following crystal classes: isotropic (2), cubic (3), hexagonal (5), trigonal_1 (6), trigonal_2 (7), tetragonal_1 (6), tetragonal_2 (7), orthorhombic (9), monoclinic_1 (13), monoclinic_2 (13), triclinic (21)

  • constants (stiffness) – independent elastic constants, the quantity of constants depends on the crystal class, as indicated between parenthesis above, GPa is the refered unit

Returns:

St – (3x3x3x3) numpy array, compliance tensor based on the given constants and material crystal class

Return type:

array

class elasticityproject.DirectionalProperties(crystal_class, *stiff_consts)[source]

Bases: ElasticityTheory

Generates the object that calculate directional properties based on the given input properties

Parameters:
  • crystal_class (str) – one of the following crystal classes: isotropic (2), cubic (3), hexagonal (5), trigonal_1 (6), trigonal_2 (7), tetragonal_1 (6), tetragonal_2 (7), orthorhombic (9), monoclinic_1 (13), monoclinic_2 (13), triclinic (21)

  • constants (stiffness) – independent elastic constants, the quantity of constants depends on the crystal class, as indicated between parenthesis above, GPa is the refered unit

Returns:

  • B (array) – (NxN) np array, Linear compressibility for each direction l

  • E (array) – (NxN) np array, Young Modulus for each direction l

  • G (array) – (NxNxN) np array | Shear Modulus for l and n directions

  • p (array) – (NxNxN) np array | Poisson’s Ration for l and n directions

  • *N is the number of points specified in the l direction

LinearCompressibility(l)[source]

Generates the material linear compressibility matrix based on the l direction input

Parameters:

l (array) – Stress direction (NxN) array

Returns:

B – (NxN) np array, Linear compressibility for each direction l

Return type:

array

YoungModulus(l)[source]

Generates the material young modulus matrix based on the l direction input

Parameters:

l (array) – Stress direction (NxN) array

Returns:

E – (NxN) np array, Linear compressibility for each direction l

Return type:

array

ShearModulus(l, n)[source]

Generates the material shear modulus matrix based on the l direction input

Parameters:
  • l (array) – Stress direction (NxN) array

  • n (array) – Normal direction (NxNxN) array

Returns:

G – (NxNxN) np array, Linear compressibility for each direction l and normal direction n

Return type:

array

PoissonRatio(l, n)[source]

Generates the material Poisson Ratio matrix based on the l direction input

Parameters:
  • l (array) – Stress direction (NxN) array

  • n (array) – Normal direction (NxNxN) array

Returns:

PoissonRatio – (NxNxN) np array, Linear compressibility for each direction l and normal direction n

Return type:

array

class elasticityproject.VRH(crystal_class, *stiff_consts)[source]

Bases: ElasticityTheory

Voigt-Reuss-Hill approximation to polycristalline elastic properties

Parameters:
  • crystal_class (str) – one of the following crystal classes: isotropic (2), cubic (3), hexagonal (5), trigonal_1 (6), trigonal_2 (7), tetragonal_1 (6), tetragonal_2 (7), orthorhombic (9), monoclinic_1 (13), monoclinic_2 (13), triclinic (21)

  • constants (stiffness) – independent elastic constants, the quantity of constants depends on the crystal class, as indicated between parenthesis above, GPa is the refered unit

Returns:

  • BR (int) – Reuss approximation of linear compressibility

  • GR (int) – Reuss approximation of shear modulus

  • BV (int) – Voigt approximation of linear compressibility

  • GV (int) – Voigt approximation of shear modulus

  • BH (int) – Hill approximation of linear compressibility

  • GH (int) – Hill Reuss approximation of shear modulus

  • BulkModulus (int) – VRH approximation of Bulk Modulus using data from the three approximations

  • YoungModulus (int) – VRH approximation of Young Modulus using data from the three approximations

  • PoissonRatio (int) – VRH approximation of Poisson Ratio using data from the three approximations

Reuss()[source]
Voigt()[source]
Hill()[source]
VRH()[source]
elasticityproject.mayaviplot(property, smoothness, auto_extent=True, axes_extent=4, labels=['x (GPa)', 'y (GPa)', 'z (GPa)'], offscreen=False, filename='PlottedImage.png', *args, **kwargs)[source]

Generates the surface plot based on the data generated by the DirectionalProperties class :param property: a instance of the object created by the DirectionalProperties class :type property: object :param smoothness: degree of smoothness of the generated surface :type smoothness: int :param auto_extent: flag to determine the axes extenxt will be generated automatically or via input :type auto_extent: bool, optional :param axes_extent: extent of the axes, auto extent will override this parameter :type axes_extent: int, optional :param labels: labels of each axis, [0] element is x, [1] element is y, [2] element is z :type labels: array of str, optional :param offscreen: flag to determine whether the graphics will be renderized in a GUI window or saved in a file :type offscreen: bool, optional :param filename: name of the generated file if offscren is true :type filename: str, optional

Returns:

  • Example

  • ———-

  • DirProp = DirectionalProperties(‘orthorhombic’, 26.47, 29.77, 21.71, 74.54, 29.76, 70.52, 23.63, 21.40, 30.71)

  • YoungModulus3DPlot(DirProp, smoothness=N,auto_extent=True)

elasticityproject.LinearCompressibility3DPlot(material, *args, **kwargs)[source]
elasticityproject.YoungModulus3DPlot(material, *args, **kwargs)[source]