Skip to content

Ex 2 - Finding the Von Mises Stress #1064

Answered by kinnala
federicodalinger asked this question in Q&A
Discussion options

You must be logged in to vote

Here is a variant of ex02 which, I believe, calculates the different components of stress:

from skfem import *
from skfem.models.poisson import unit_load
from skfem.helpers import dd, ddot, trace, eye
import numpy as np

m = (
    MeshTri.init_symmetric()
    .refined(3)
    .with_boundaries(
        {
            "left": lambda x: x[0] == 0,
            "right": lambda x: x[0] == 1,
            "top": lambda x: x[1] == 1,
        }
    )
)

e = ElementTriMorley()
ib = Basis(m, e)

d = 0.1
E = 200e9
nu = 0.3

def C(T):
    return E / (1 + nu) * (T + nu / (1 - nu) * eye(trace(T), 2))


@BilinearForm
def bilinf(u, v, w):

    return d**3 / 12.0 * ddot(C(dd(u)), dd(v))


K = asm(bilinf, ib)
f =

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@federicodalinger
Comment options

@kinnala
Comment options

Answer selected by federicodalinger
@federicodalinger
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants