Elasticipy.StressStrainTensors module

class Elasticipy.StressStrainTensors.StrainTensor(mat)[source]

Bases: SymmetricSecondOrderTensor

Class for manipulating symmetric strain tensors or arrays of symmetric strain tensors.

elastic_energy(stress)[source]

Compute the elastic energy.

Parameters:

stress (StressTensor) – Corresponding stress tensor

Return type:

Volumetric elastic energy

name = 'Strain tensor'

Name to use when printing the tensor

principalStrains()[source]

Values of the principals strains.

If the tensor array is of shape [m,n,…], the results will be of shape [m,n,…,3].

Returns:

Principal strain values

Return type:

np.ndarray

voigt_map = [1, 1, 1, 2, 2, 2]

List of factors to use for building a tensor from Voigt vector(s)

volumetricStrain()[source]

Volumetric change (1st invariant of the strain tensor)

Returns:

Volumetric change

Return type:

np.array or float

class Elasticipy.StressStrainTensors.StressTensor(mat)[source]

Bases: SymmetricSecondOrderTensor

Class for manipulating stress tensors or arrays of stress tensors.

property J1

First invariant of the deviatoric part of the stress tensor. It is always zeros, as the deviatoric part as null trace.

Returns:

zero(s)

Return type:

float or np.ndarray

property J2

Second invariant of the deviatoric part of the stress tensor.

Returns:

J2 invariant

Return type:

float or np.ndarray

property J3

Third invariant of the deviatoric part of the stress tensor.

Returns:

J3 invariant

Return type:

float or np.ndarray

Tresca()[source]

Tresca(-Guest) equivalent stress.

Returns:

Tresca equivalent stress

Return type:

np.ndarray or float

See also

vonMises

von Mises equivalent stress

elastic_energy(strain)[source]

Compute the elastic energy.

Parameters:

strain (StrainTensor) – Corresponding strain tensor

Return type:

Volumetric elastic energy

hydrostaticPressure()[source]

Hydrostatic pressure

Return type:

np.ndarray or float

See also

sphericalPart

spherical part of the stress

name = 'Stress tensor'

Name to use when printing the tensor

principal_stresses()[source]

Values of the principals stresses.

If the tensor array is of shape [m,n,…], the results will be of shape [m,n,…,3].

Returns:

Principal stresses

Return type:

np.ndarray

vonMises()[source]

von Mises equivalent stress.

Returns:

von Mises equivalent stress

Return type:

np.ndarray or float

See also

Tresca

Tresca equivalent stress