Tensor Components

Videos

Symbols

Angles

counts pos. about

shows angular pos. of

relative to

\(\varphi\)

\(z=\bar z\)

\((\bar x, \bar y)\)

\((x, y)\)

\(\alpha\)

\(z=\bar z\)

\(\boldsymbol T'\)

\(\boldsymbol T\)

Tensor Components

\((x,y)\)-Comp.

\((\bar x, \bar y)\)-Comp.

\(\boldsymbol T\)

\(\begin{bmatrix} T_{xx} & T_{xy} \\ \mathsf{sym} & T_{yy} \end{bmatrix}\)

\(\begin{bmatrix} T_{\bar x \bar x} & T_{\bar x\bar y} \\ \mathsf{sym} & T_{\bar y\bar y} \end{bmatrix}\)

\(\boldsymbol T'\)

\(\begin{bmatrix} T'_{xx} & T'_{xy} \\ \mathsf{sym} & T'_{yy} \end{bmatrix}\)

nicht definiert

Passive und active Transformation

Passive und aktive Transformation

For a tensor given by its \((x,y)\)-components wrt an \((x,y)\)-frame the following transformations exist:

  • Passive transformation: 1 Tensor & 2 frames: The \((\bar x, \bar y)\)-components of the same tensor wrt a second frame is calculated. This second frame is the \((\bar x, \bar y)\)-frame, which is rotated relative to the given \((x, y)\)-frame.

    \begin{align} \label{eq-trafo_tensor_formulae-1} \begin{bmatrix} T_{\bar x \bar x} & T_{\bar x\bar y} \\ \mathsf{sym} & T_{\bar y\bar y} \end{bmatrix} = R_\varphi \begin{bmatrix} T_{xx} & T_{xy} \\ \mathsf{sym} & T_{yy} \end{bmatrix} R_\varphi^{\mathsf T} \tag{1} \end{align}

    with \(R_\varphi = \begin{bmatrix}c_\varphi & s_\varphi \\-s_\varphi & c_\varphi\end{bmatrix}\) and \(R_\varphi^{\mathsf T}\) the transpose of \(R_\varphi\).

    Single Tensor Component

    Let \(\boldsymbol e\) be a unit vector with the \((x,y)\)-components \(\left[e_x, e_y\right]\). The tensor component \(T_{ee}\) in this ee-direction is:

    \[\begin{split}T_{ee} &= \begin{bmatrix} e_x & e_y \end{bmatrix} \begin{bmatrix} T_{xx} & T_{xy} \\ \mathsf{sym} & T_{yy} \end{bmatrix} \begin{bmatrix} e_x \\ e_y \end{bmatrix}\end{split}\]

    If the unitvector is along the \(\bar x\)-axis, then its components are:

    \[\begin{bmatrix} e_x & e_y \end{bmatrix} = \begin{bmatrix} c_\varphi & s_\varphi \end{bmatrix}\]

    so that \(T_{ee} = T_{\bar x \bar x}\)

  • Active transformation: 2 Tensors & 1 frame: The \((x, y)\)-components of a second tensor are calculated. This second tensor is rotated relative to the given tensor.

    \[\begin{split}\begin{bmatrix} T'_{xx} & T'_{xy} \\ \mathsf{sym} & T'_{yy} \end{bmatrix} = R_\alpha^{\mathsf T} \begin{bmatrix} T_{xx} & T_{xy} \\ \mathsf{sym} & T_{yy} \end{bmatrix} R_\alpha\end{split}\]

    with \(R_\alpha = \begin{bmatrix}c_\alpha & s_\alpha \\-s_\alpha & c_\alpha\end{bmatrix}\) and \(R_\alpha^{\mathsf T}\) the transpose of \(R_\alpha\).

Web-App 1

Tensor Transformation

Other Planes

Similar formulae exist for other planes:

Plane

\(\varphi\) counts pos. about

\((x,y)\)

\(z\)

\((y,z)\)

\(x\)

\((z,x)\)

\(y\)

Example \((y,z)\)-plane

Passive und active transformation:

\[\begin{split}\begin{bmatrix} T_{\bar y \bar y} & T_{\bar y\bar z} \\ \mathsf{sym} & T_{\bar z\bar z} \end{bmatrix} \! &= R_\varphi \begin{bmatrix} T_{yy} & T_{yz} \\ \mathsf{sym} & T_{zz} \end{bmatrix} R_\varphi^{\mathsf T} \\ \begin{bmatrix} T'_{yy} & T'_{yz} \\ \mathsf{sym} & T'_{zz} \end{bmatrix} &= R_\alpha^{\mathsf T} \begin{bmatrix} T_{yy} & T_{yz} \\ \mathsf{sym} & T_{zz} \end{bmatrix} R_\alpha\end{split}\]
Tensor Transformation

Do a Quiz!

Tensor Components

Programs

  • Passive Transformation (in 2D), Eigenvalues and Eigenvectors

    Solution with Python: Copy - Paste - Play

    • Copy: Source Code (see below) view and copy.

    • Paste: Paste as Python-Notebook on:

    • Play: Run.

    Source Code

    # -*- coding: utf-8 -*-
    from sympy.physics.units import *
    from sympy import *
    
    # Units:
    (k, M, G ) = ( 10**3, 10**6, 10**9 )
    (mm, cm) = ( m/1000, m/100 )
    Newton = kg*m/s**2
    Pa     = Newton/m**2
    MPa    = M*Pa
    GPa    = G*Pa
    kN     = k*Newton
    deg    = pi/180
    half = S(1)/2
    
    # Rounding:
    import decimal
    from decimal import Decimal as DX
    from copy import deepcopy
    def iso_round(obj, pv, rounding=decimal.ROUND_HALF_EVEN):
        import sympy
        """
        Rounding acc. to DIN EN ISO 80000-1:2013-08
        place value = Rundestellenwert
        """
        assert pv in set([
            # place value   #  round to:
            1,              #  1
            0.1,            #  1st digit after decimal
            0.01,           #  2nd
            0.001,          #  3rd
            0.0001,         #  4th
            0.00001,        #  5th
            0.000001,       #  6th
            0.0000001,      #  7th
            0.00000001,     #  8th
            0.000000001,    #  9th
            0.0000000001,   # 10th
            ])
        objc = deepcopy(obj)
        try:
            tmp = DX(str(float(objc)))
            objc = tmp.quantize(DX(str(pv)), rounding=rounding)
        except:
            for i in range(len(objc)):
                tmp = DX(str(float(objc[i])))
                objc[i] = tmp.quantize(DX(str(pv)), rounding=rounding)
        return objc
    
    
    """
        Input:
    
        * (x,y)-Components of Symm. Tensor.
        * Angular Position phi.
        * Output Precision prec.
    
        Output:
        * (\bar x, \bar y)`-Components for given phi.
        * Principal values and resp. angles.
    
    """
    
    
    # User input starts here.
    prec = 0.01
    
    # Tensor components in their resp. unit:
    
    # Txx, Txy, Tyy = var("Txx, Txy, Tyy")
    (Txx, Txy, Tyy)  = ( -1,  4,  5)
    # (Txx, Txy, Tyy)  = (-12, -6,  0)
    # (Txx, Txy, Tyy)  = ( -2, -6,  9)
    # (Txx, Txy, Tyy)  = ( 13,  -4,  7)
    # (Txx, Txy, Tyy)  = (-1.2, -0.6,  0)
    # (Txx, Txy, Tyy)  = (864, 0,  216)
    
    # Angle in deg:
    phi = 15
    
    # User input ends here.
    
    f = lambda x: iso_round(x,prec)
    
    pprint("\nφ / deg:")
    tmp = phi
    pprint(tmp)
    
    print(u'\nComponents wrt (x, y):')
    T = Matrix([ [Txx, Txy], [Txy, Tyy] ])
    tmp = T
    tmp = tmp.applyfunc(f)
    pprint(tmp)
    
    pprint("\nR:")
    phi *= pi/180
    c, s = cos(phi), sin(phi)
    R = Matrix([ [c, s] , [-s, c] ])
    tmp = R
    tmp = tmp.applyfunc(f)
    pprint(tmp)
    
    pprint(u"\nComponents wrt (x\u0304, y\u0304):")
    
    Rt = R.transpose()
    tmp = R*T*Rt
    tmp = tmp.applyfunc(simplify)
    tmp = tmp.applyfunc(f)
    pprint(tmp)
    
    pprint("\n(λ₁, λ₂):")
    ev = T.eigenvals()
    tmp = Matrix([max(ev), min(ev)])
    tmp = tmp.applyfunc(f)
    pprint(tmp)
    
    pprint("\n(φ₁, φ₂) / deg:")
    t1 = Txy
    t2 = (Txx - min(ev))
    if (t1==0 and Txx < Tyy):
        p1 = pi/2
    else:
        p1 = atan(t1/t2)
    p1 /= deg
    p2 = p1 + 90
    p = Matrix([iso_round(p1,prec), iso_round(p2,prec)])
    pprint(p)
    
    pprint("\n(ψ₁, ψ₂) / deg:")
    q1 = p1 - 45
    q2 = p1 + 45
    q = Matrix([iso_round(q1,prec), iso_round(q2,prec)])
    pprint(q)
    

  • Tensor component for given direction (in 2D)

    Solution with Python: Copy - Paste - Play

    • Copy: Source Code (see below) view and copy.

    • Paste: Paste as Python-Notebook on:

    • Play: Run.

    Source Code

    # -*- coding: utf-8 -*-
    from sympy.physics.units import *
    from sympy import *
    
    """
        Find normal stress using quantities wrt two different frames:
    
        1) The (x,y)-frame and
        2) The (xbar, ybar)-frame, with the (xbar, ybar)-placement specified
           by an angle.
        3) phi: This angle, measured from x to xbar, counted positive about the z-axis.
    
        This program shows, that:
    
        * The stress tensor is a bilinear form.
        * The stress is found by applying this form to vectors.
        * The result is independent on which frame is used.
    
    """
    
    # Shortcuts for cos(phi) and sin(phi):
    C, S = var("C, S")
    
    sxx, syy, txy = var("sigma_{xx}, sigma_{yy}, tau_{xy}")
    vx, vy = var("vx, vy")
    
    T = Matrix([[sxx, txy],[txy, syy]])
    
    prec = 2
    phi_deg = 90
    
    sub_list=[
        (C, cos(phi_deg*pi/180)),
        (S, sin(phi_deg*pi/180)),
        (sxx, -1 *Pa),
        (syy,  5 *Pa),
        (txy, 4 *Pa),
        ]
    
    # Rotation matrix:
    R = Matrix([[C, S],[-S, C]])
    
    pprint("\nphi in deg:")
    tmp = phi_deg
    pprint(tmp)
    
    
    pprint("\n\nComponents wrt (x,y):")
    pprint("---------------------")
    
    pprint("\nStress tensor in Pa:")
    tmp = T
    tmp = tmp.subs(sub_list)
    tmp /= Pa
    pprint(tmp)
    
    n = Matrix([C,S])
    t = Matrix([-S,C])
    nt = n.transpose()
    tt = t.transpose()
    
    pprint("\nNormal vector n:")
    tmp = n
    pprint(tmp)
    pprint("\nTangent vector t:")
    tmp = t
    pprint(tmp)
    pprint("\nTranspose n' of n:")
    tmp = nt
    pprint(tmp)
    pprint("\nTranspose t' of t:")
    tmp = tt
    pprint(tmp)
    
    pprint(u"\nσ = n' T n in Pa:")
    tmp = nt*(T*n)
    tmp = tmp[0]
    tmp = tmp.subs(sub_list)
    tmp /= Pa
    pprint(N(tmp,prec))
    
    pprint("\nτ = t' T n in Pa:")
    tmp = tt*T*n
    tmp = tmp[0]
    tmp = tmp.subs(sub_list)
    tmp /= Pa
    pprint(N(tmp,prec))
    
    # unicode utf overbar xbar ybar is \u0304:
    pprint("\nComponents wrt (x\u0304,y\u0304):")
    pprint("---------------------")
    
    n = Matrix([1,0])
    nt = n.transpose()
    t = Matrix([0,1])
    tt = t.transpose()
    T = R*T*R.transpose()
    
    pprint("\nStress tensor in Pa:")
    tmp = T
    tmp = tmp.subs(sub_list)
    tmp /= Pa
    pprint(tmp)
    
    pprint("\nNormal vector n:")
    tmp = n
    pprint(tmp)
    pprint("\nTranspose n' of n:")
    tmp = nt
    pprint(tmp)
    pprint("\nTangent vector t:")
    tmp = t
    pprint(tmp)
    pprint("\nTranspose t' of t:")
    tmp = tt
    pprint(tmp)
    
    pprint(u"\nσ = n' T n in Pa:")
    tmp = nt*(T*n)
    tmp = tmp[0]
    tmp = tmp.subs(sub_list)
    tmp /= Pa
    pprint(N(tmp,prec))
    
    pprint("\nτ = t' T n in Pa:")
    tmp = tt*T*n
    tmp = tmp[0]
    tmp = tmp.subs(sub_list)
    tmp /= Pa
    pprint(N(tmp,prec))
    

  • Tensor component for given direction (in 3D)

    Solution with Python: Copy - Paste - Play

    • Copy: Source Code (see below) view and copy.

    • Paste: Paste as Python-Notebook on:

    • Play: Run.

    Source Code

    # -*- coding: utf-8 -*-
    from sympy.physics.units import *
    from sympy import *
    
    # Input:
    
    # 1.
    # (i1, i2, i3)-components of symmetric tensor:
    T11, T12, T13 = -1, 4, 0
    T22, T23 = 5, 0
    T33 = 0
    
    # 2.
    # (i1, i2, i3)-components of unit vector:
    d1, d2, d3 = 0, 1, 0
    
    pprint("\nInput 1: (i1, i2, i3)-tensor-components:")
    T = Matrix([
        [T11, T12, T13],
        [T12, T22, T23],
        [T13, T23, T33]
        ])
    pprint(T)
    
    pprint("\nInput 2: (i1, i2, i3)-unit-vector-components:")
    d = Matrix([d1, d2, d3])
    tmp = d.norm()
    assert(tmp==1)
    
    pprint("\nOutput: Tensor-component in unit-vector-direction:")
    tmp = d.transpose()*T*d
    pprint(tmp)
    
    # Input 1: (i1, i2, i3)-tensor-components:
    # ⎡-1  4  0⎤
    # ⎢        ⎥
    # ⎢4   5  0⎥
    # ⎢        ⎥
    # ⎣0   0  0⎦
    #
    # Input 2: (i1, i2, i3)-unit-vector-components:
    #
    # Output: Tensor-component in unit-vector-direction:
    # [5]
    

Footnotes:

1

Unitless Quantities are used. These are defined as the actual quantity divided by its unit: E.g. if a quantity was given in the unit “Pascal”: The respective unitless quantity would be equal to the given quantity divided by “Pascal”.