sfepy.mechanics.matcoefs module

Conversion of material parameters and other utilities.

class sfepy.mechanics.matcoefs.ElasticConstants(young=None, poisson=None, bulk=None, lam=None, mu=None, p_wave=None, _regenerate_relations=False)[source]

Conversion formulas for various groups of elastic constants. The elastic constants supported are:

  • E : Young’s modulus

  • \nu : Poisson’s ratio

  • K : bulk modulus

  • \lambda : Lamé’s first parameter

  • \mu, G : shear modulus, Lamé’s second parameter

  • M : P-wave modulus, longitudinal wave modulus

The elastic constants are referred to by the following keyword arguments: young, poisson, bulk, lam, mu, p_wave.

Exactly two of them must be provided to the __init__() method.

Examples

  • basic usage:

    >>> from sfepy.mechanics.matcoefs import ElasticConstants
    >>> ec = ElasticConstants(lam=1.0, mu=1.5)
    >>> ec.young
    3.6000000000000001
    >>> ec.poisson
    0.20000000000000001
    >>> ec.bulk
    2.0
    >>> ec.p_wave
    4.0
    >>> ec.get(['bulk', 'lam', 'mu', 'young', 'poisson', 'p_wave'])
    [2.0, 1.0, 1.5, 3.6000000000000001, 0.20000000000000001, 4.0]
    
  • reinitialize existing instance:

    >>> ec.init(p_wave=4.0, bulk=2.0)
    >>> ec.get(['bulk', 'lam', 'mu', 'young', 'poisson', 'p_wave'])
    [2.0, 1.0, 1.5, 3.6000000000000001, 0.20000000000000001, 4.0]
    
get(names)[source]

Get the named elastic constants.

init(young=None, poisson=None, bulk=None, lam=None, mu=None, p_wave=None)[source]

Set exactly two of the elastic constants, and compute the remaining. (Re)-initializes the existing instance of ElasticConstants.

class sfepy.mechanics.matcoefs.TransformToPlane(iplane=None)[source]

Transformations of constitutive law coefficients of 3D problems to 2D.

tensor_plane_stress(c3=None, d3=None, b3=None)[source]

Transforms all coefficients of the piezoelectric constitutive law from 3D to plane stress problem in 2D: strain/stress ordering: 11 22 33 12 13 23. If d3 is None, uses only the stiffness tensor c3.

Parameters:
c3array

The stiffness tensor.

d3array

The dielectric tensor.

b3array

The piezoelectric coupling tensor.

sfepy.mechanics.matcoefs.bulk_from_lame(lam, mu)[source]

Compute bulk modulus from Lamé parameters.

\gamma = \lambda + {2 \over 3} \mu

sfepy.mechanics.matcoefs.bulk_from_youngpoisson(young, poisson, plane='strain')[source]

Compute bulk modulus corresponding to Young’s modulus and Poisson’s ratio.

sfepy.mechanics.matcoefs.lame_from_stiffness(stiffness, plane='strain')[source]

Compute Lamé parameters from an isotropic stiffness tensor.

sfepy.mechanics.matcoefs.lame_from_youngpoisson(young, poisson, plane='strain')[source]

Compute Lamé parameters from Young’s modulus and Poisson’s ratio.

The relationship between Lamé parameters and Young’s modulus, Poisson’s ratio (see [1],[2]):

\lambda = {\nu E \over (1+\nu)(1-2\nu)},\qquad \mu = {E \over 2(1+\nu)}

The plain stress hypothesis:

\bar\lambda = {2\lambda\mu \over \lambda + 2\mu}

[1] I.S. Sokolnikoff: Mathematical Theory of Elasticity. New York, 1956.

[2] T.J.R. Hughes: The Finite Element Method, Linear Static and Dynamic Finite Element Analysis. New Jersey, 1987.

sfepy.mechanics.matcoefs.stiffness_from_lame(dim, lam, mu)[source]

Compute stiffness tensor corresponding to Lamé parameters.

{\bm D}_{(2D)} = \begin{bmatrix} \lambda + 2\mu & \lambda & 0\\
\lambda & \lambda + 2\mu & 0\\ 0 & 0 & \mu \end{bmatrix}

{\bm D}_{(3D)} = \begin{bmatrix} \lambda + 2\mu & \lambda &
\lambda & 0 & 0 & 0\\ \lambda & \lambda + 2\mu & \lambda & 0 & 0 & 0 \\
\lambda & \lambda & \lambda + 2\mu & 0 & 0 & 0 \\ 0 & 0 & 0 & \mu & 0 &
0 \\ 0 & 0 & 0 & 0 & \mu & 0 \\ 0 & 0 & 0 & 0 & 0 & \mu\\ \end{bmatrix}

sfepy.mechanics.matcoefs.stiffness_from_lame_mixed(dim, lam, mu)[source]

Compute stiffness tensor corresponding to Lamé parameters for mixed formulation.

{\bm D}_{(2D)} = \begin{bmatrix} \widetilde\lambda + 2\mu &
\widetilde\lambda & 0\\ \widetilde\lambda & \widetilde\lambda + 2\mu &
0\\ 0 & 0 & \mu \end{bmatrix}

{\bm D}_{(3D)} = \begin{bmatrix} \widetilde\lambda + 2\mu &
\widetilde\lambda & \widetilde\lambda & 0 & 0 & 0\\ \widetilde\lambda &
\widetilde\lambda + 2\mu & \widetilde\lambda & 0 & 0 & 0 \\
\widetilde\lambda & \widetilde\lambda & \widetilde\lambda + 2\mu & 0 &
0 & 0 \\ 0 & 0 & 0 & \mu & 0 & 0 \\ 0 & 0 & 0 & 0 & \mu & 0 \\ 0 & 0 &
0 & 0 & 0 & \mu\\ \end{bmatrix}

where

\widetilde\lambda = -{2\over 3} \mu

sfepy.mechanics.matcoefs.stiffness_from_youngpoisson(dim, young, poisson, plane='strain')[source]

Compute stiffness tensor corresponding to Young’s modulus and Poisson’s ratio.

sfepy.mechanics.matcoefs.stiffness_from_youngpoisson_mixed(dim, young, poisson, plane='strain')[source]

Compute stiffness tensor corresponding to Young’s modulus and Poisson’s ratio for mixed formulation.

sfepy.mechanics.matcoefs.stiffness_from_yps_ortho3(young, poisson, shear)[source]

Compute 3D stiffness tensor {\bm D} of an orthotropic linear elastic material. Young’s modulus ([E_1, E_2, E_3]), Poisson’s ratio ([\nu_{12}, \nu_{13}, \nu_{23}]), and shear modulus ([G_{12}, G_{13}, G_{23}]) are given.

{\bm C}_{(3D)} = \begin{bmatrix}
1/E_1 & -\nu_{21}/E_2 & -\nu_{31}/E_3 & 0 & 0 & 0\\
-\nu_{12}/E_1 & 1/E_2 & -\nu_{32}/E_3 & 0 & 0 & 0\\
-\nu_{13}/E_1 & -\nu_{23}/E_2 & 1/E_3 & 0 & 0 & 0\\
0 & 0 & 0 & 1/G_{12} & 0 & 0 \\
0 & 0 & 0 & 0 & 1/G_{13} & 0 \\
0 & 0 & 0 & 0 & 0 & 1/G_{23} \end{bmatrix}

{\bm D}_{(3D)} = \mathrm{inv}({\bm C}_{(3D)})

\nu_{21} = \nu_{12}\frac{E_2}{E_1},\quad
\nu_{31} = \nu_{13}\frac{E_3}{E_1},\quad
\nu_{32} = \nu_{23}\frac{E_3}{E_2}

[1] R.M. Jones: Mechanics of composite materials. 1999.

sfepy.mechanics.matcoefs.wave_speeds_from_youngpoisson(young, poisson, rho)[source]

Compute the P- and S-wave speeds from the Young’s modulus E and Poisson’s ratio \nu in a homogeneous isotropic material.

v_p^2 = {E (1 - \nu) \over \rho (1 + \nu) (1 - 2 \nu)}
      = {(\lambda + 2 \mu) \over \rho}

v_s^2 = {E \over 2 \rho (1 + \nu)}
      = {\mu \over \rho}

Parameters:
youngfloat or array

The Young’s modulus.

poissonfloat or array

The Poisson’s ratio.

rhofloat or array

The density.

Returns:
vpfloat or array

The P-wave speed.

vsfloat or array

The S-wave speed.

sfepy.mechanics.matcoefs.youngpoisson_from_stiffness(stiffness, plane='strain')[source]

Compute Young’s modulus and Poisson’s ratio from an isotropic stiffness tensor.

sfepy.mechanics.matcoefs.youngpoisson_from_wave_speeds(vp, vs, rho)[source]

Compute the Young’s modulus E and Poisson’s ratio \nu from the P- and S-wave speeds in a homogeneous isotropic material.

E = {\rho v_s^2 (3 v_p^2 - 4 v_s^2) \over (v_p^2 - v_s^2)}

\nu = {(v_p^2/2 - v_s^2) \over (v_p^2 - v_s^2)}

Parameters:
vpfloat or array

The P-wave speed.

vsfloat or array

The S-wave speed.

rhofloat or array

The density.

Returns:
youngfloat or array

The Young’s modulus.

poissonfloat or array

The Poisson’s ratio.