sfepy.mechanics.tensors module

Functions to compute some tensor-related quantities usual in continuum mechanics.

class sfepy.mechanics.tensors.StressTransform(def_grad, jacobian=None)[source]

Encapsulates functions to convert various stress tensors in the symmetric storage given the deformation state.

get_cauchy_from_2pk(stress_in)[source]

Get the Cauchy stress given the second Piola-Kirchhoff stress.

System Message: WARNING/2 (\sigma_{ij} = J^{-1} F_{ik} S_{kl} F_{jl})

latex exited with error [stdout] This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/TeX Live for SUSE Linux) restricted \write18 enabled. entering extended mode (./math.tex LaTeX2e <2011/06/27> Babel <3.9f> and hyphenation patterns for 78 languages loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size12.clo)) (/usr/share/texmf/tex/latex/base/inputenc.sty ! LaTeX Error: File `utf8x.def’ not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def) Enter file name: ! Emergency stop. <read *> l.131 \endinput ^^M No pages of output. Transcript written on math.log.
sfepy.mechanics.tensors.dim2sym(dim)[source]

Given the space dimension, return the symmetric storage size.

sfepy.mechanics.tensors.get_deviator(tensor, sym_storage=True)[source]

The deviatoric part (deviator) of a tensor.

sfepy.mechanics.tensors.get_full_indices(dim)[source]

The indices for converting the symmetric storage to the full storage.

sfepy.mechanics.tensors.get_non_diagonal_indices(dim)[source]

The non_diagonal indices for the full vector storage.

sfepy.mechanics.tensors.get_sym_indices(dim)[source]

The indices for converting the full storage to the symmetric storage.

sfepy.mechanics.tensors.get_trace(tensor, sym_storage=True)[source]

The trace of a tensor.

sfepy.mechanics.tensors.get_volumetric_tensor(tensor, sym_storage=True)[source]

The volumetric part of a tensor.

sfepy.mechanics.tensors.get_von_mises_stress(stress, sym_storage=True)[source]

Given a symmetric stress tensor, compute the von Mises stress (also known as Equivalent tensile stress).

Notes

System Message: WARNING/2 (\sigma_V = \sqrt{\frac{(\sigma_{11} - \sigma_{22})^2 + (\sigma_{22} - \sigma_{33})^2 + (\sigma_{11} - \sigma_{33})^2 + 6 (\sigma_{12}^2 + \sigma_{13}^2 + \sigma_{23}^2)}{2}} )

latex exited with error [stdout] This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/TeX Live for SUSE Linux) restricted \write18 enabled. entering extended mode (./math.tex LaTeX2e <2011/06/27> Babel <3.9f> and hyphenation patterns for 78 languages loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size12.clo)) (/usr/share/texmf/tex/latex/base/inputenc.sty ! LaTeX Error: File `utf8x.def’ not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def) Enter file name: ! Emergency stop. <read *> l.131 \endinput ^^M No pages of output. Transcript written on math.log.
sfepy.mechanics.tensors.prepare_cylindrical_transform(coors, origin, mode='axes')[source]

Prepare matrices for transforming tensors into cylindrical coordinates with the axis ‘z’ in a given origin.

Parameters:

coors : array

The Cartesian coordinates.

origin : array of length 3

The origin.

mode : ‘axes’ or ‘data’

In ‘axes’ (default) mode the matrix transforms data to different coordinate system, while in ‘data’ mode the matrix transforms the data in the same coordinate system and is transpose of the matrix in the ‘axes’ mode.

Returns:

mtx : array

The array of transformation matrices for each coordinate in coors.

sfepy.mechanics.tensors.sym2dim(sym)[source]

Given the symmetric storage size, return the space dimension.

Notes

This function works for any space dimension.

sfepy.mechanics.tensors.transform_data(data, coors=None, mode='cylindrical', mtx=None)[source]

Transform vector or tensor data components between orthogonal coordinate systems in 3D using transformation matrix

System Message: WARNING/2 (M)

latex exited with error [stdout] This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/TeX Live for SUSE Linux) restricted \write18 enabled. entering extended mode (./math.tex LaTeX2e <2011/06/27> Babel <3.9f> and hyphenation patterns for 78 languages loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size12.clo)) (/usr/share/texmf/tex/latex/base/inputenc.sty ! LaTeX Error: File `utf8x.def’ not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def) Enter file name: ! Emergency stop. <read *> l.131 \endinput ^^M No pages of output. Transcript written on math.log.
, that should express rotation of the original coordinate system to the new system denoted by

System Message: WARNING/2 (\bullet')

latex exited with error [stdout] This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/TeX Live for SUSE Linux) restricted \write18 enabled. entering extended mode (./math.tex LaTeX2e <2011/06/27> Babel <3.9f> and hyphenation patterns for 78 languages loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size12.clo)) (/usr/share/texmf/tex/latex/base/inputenc.sty ! LaTeX Error: File `utf8x.def’ not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def) Enter file name: ! Emergency stop. <read *> l.131 \endinput ^^M No pages of output. Transcript written on math.log.
below.

For vectors:

System Message: WARNING/2 (\ul{v}' = M \cdot \ul{v} )

latex exited with error [stdout] This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/TeX Live for SUSE Linux) restricted \write18 enabled. entering extended mode (./math.tex LaTeX2e <2011/06/27> Babel <3.9f> and hyphenation patterns for 78 languages loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size12.clo)) (/usr/share/texmf/tex/latex/base/inputenc.sty ! LaTeX Error: File `utf8x.def’ not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def) Enter file name: ! Emergency stop. <read *> l.131 \endinput ^^M No pages of output. Transcript written on math.log.

For second order tensors:

System Message: WARNING/2 (\ull{t}' = M \cdot \ull{t} \cdot M^T \mbox{or} t_{ij}' = M_{ip} M_{jq} t_{pq})

latex exited with error [stdout] This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/TeX Live for SUSE Linux) restricted \write18 enabled. entering extended mode (./math.tex LaTeX2e <2011/06/27> Babel <3.9f> and hyphenation patterns for 78 languages loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size12.clo)) (/usr/share/texmf/tex/latex/base/inputenc.sty ! LaTeX Error: File `utf8x.def’ not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def) Enter file name: ! Emergency stop. <read *> l.131 \endinput ^^M No pages of output. Transcript written on math.log.

For fourth order tensors:

System Message: WARNING/2 (t_{ijkl}' = M_{ip} M_{jq} M_{kr} M_{ls} t_{pqrs})

latex exited with error [stdout] This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/TeX Live for SUSE Linux) restricted \write18 enabled. entering extended mode (./math.tex LaTeX2e <2011/06/27> Babel <3.9f> and hyphenation patterns for 78 languages loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size12.clo)) (/usr/share/texmf/tex/latex/base/inputenc.sty ! LaTeX Error: File `utf8x.def’ not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def) Enter file name: ! Emergency stop. <read *> l.131 \endinput ^^M No pages of output. Transcript written on math.log.
Parameters:

data : array, shape (num, n_r) or (num, n_r, n_c)

The vectors (n_r is 3) or tensors (symmetric storage, n_r is 6, n_c, if available, is 1 or 6) to be transformed.

coors : array

The Cartesian coordinates of the data. Not needed when mtx argument is given.

mode : one of [‘cylindrical’]

The requested coordinate system. Not needed when mtx argument is given.

mtx : array

The array of transformation matrices

System Message: WARNING/2 (M)

latex exited with error [stdout] This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/TeX Live for SUSE Linux) restricted \write18 enabled. entering extended mode (./math.tex LaTeX2e <2011/06/27> Babel <3.9f> and hyphenation patterns for 78 languages loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2007/10/19 v1.4h Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size12.clo)) (/usr/share/texmf/tex/latex/base/inputenc.sty ! LaTeX Error: File `utf8x.def’ not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def) Enter file name: ! Emergency stop. <read *> l.131 \endinput ^^M No pages of output. Transcript written on math.log.

for each data row.

Returns:

new_data : array

The transformed data.