Skip to content

    Under active development. New calculators and features ship every week. Everything currently runs free while the site matures — pricing pages are a preview, checkout is not open yet.

    Engineering / Finite Element Stress Tensor Solver

    FEM Stress Tensor Solver — Von Mises & Principal Stress

    Solve 2D elasticity with CST finite elements. Get the stress tensor, principal stresses, von Mises stress and patch-test check in plane stress or plane strain.

    ToolCalculatorExecutionIn browserCategoryEngineering
    ZorvLabs Structural Lab

    Finite Element Stress Tensor Solver

    Patch test uses exact boundary displacements on all edges; element stresses should be constant to numerical round-off.
    Peak von Mises
    283.468 MPa
    Yield strength: 250.000 MPa · FoS 0.88
    Peak principal
    268.273 MPa
    σ₁ maximum across all CST elements
    Max displacement
    0.002894
    Largest nodal |u| magnitude
    Equilibrium residual
    -3.56e-8
    Σ reactions + Σ external loads
    Mesh Stress View

    Element-wise von Mises contour + deformed overlay

    solve 12.1 ms · dof 182
    von Mises scalemin 283.468 MPamax 283.468 MPaDeformed mesh overlay (scaled)
    Centerline stress profilesx position along midline-32.647 MPa52.236 MPa137.119 MPa222.002 MPa306.884 MPa0.0000.5001.0001.5002.000Stress / comparisonσxx exactσyy exactτxy exactσvM exactσxxσyyτxyσvM
    Centerline displacement profilesx position along midline-0.0000.0000.0010.0020.0030.0000.5001.0001.5002.000Displacementu(x)v(x)
    Selected Element Tensor

    Local stress matrix

    σxx
    249.231 MPa
    σyy
    -9.231 MPa
    τxy
    72.692 MPa
    von Mises
    283.468 MPa
    σ = [[249230769.231, 72692307.692],
        [72692307.692, -9230769.231]]
    σ₁ = 268.273 MPa · σ₂ = -28.273 MPa
    θp = 14.68°
    ε = [1.200e-3, -4.000e-4, 9.000e-4]
    Benchmark accuracy

    Accuracy summary

    Boundary conditions
    72
    L∞ stress error
    2.09e-6
    L2 stress error
    6.15e-7
    Equation status
    K U = F
    Reference logic
    ε = B u
    σ = D ε
    K = Σₑ t A Bᵀ D B
    σvM = √(σx² − σxσy + σy² + 3τxy²) [plane stress]
    Plane strain uses σz = ν(σx + σy) for 3D von Mises evaluation.
    RMS VM error 6.790e-4
    Peak nodal von Mises: 283.468 MPa
    Export / summary

    Solver summary block

    {
      "problem": "PATCH_TEST",
      "plane": "planeStress",
      "mesh": "12x6",
      "material": {
        "E": 210000000000,
        "nu": 0.3,
        "thickness": 0.02,
        "yieldStrength": 250000000
      },
      "maxVonMises": 283468322.640872,
      "maxPrincipal": 268272597.986311,
      "maxDisplacement": 0.0028935,
      "reactionImbalance": -3.5623e-8,
      "benchmark": "Closed-form constant strain/stress benchmark",
      "exact": true,
      "solveMs": 12.1
    }
    engineering methodology

    A clear path from inputs to results.

    Solve a 2D linear-elasticity problem with constant-strain triangle (CST) finite elements and read the full stress tensor: the direct stresses, shear, principal stresses, their orientation, and the von Mises equivalent. A built-in manufactured patch test lets you confirm the solver reproduces an exact closed-form stress field to machine precision before you trust it on bending or shear demos.

    Step-by-step methodWorked exampleAssumptions explained

    How to use

    1. Choose a problem: the Patch Test (an exact manufactured field for verification), the Cantilever (left edge fixed, downward traction on the right), or the Shear Block (bottom fixed, horizontal traction on top).
    2. Select plane stress (thin plate) or plane strain (thick/constrained body), which sets the constitutive matrix D.
    3. Enter the material: elastic modulus E, Poisson’s ratio ν, plate thickness t, and a yield strength for the factor-of-safety check.
    4. Set the plate dimensions (width, height) and the mesh density nx × ny; each rectangular cell is split into two CST triangles.
    5. For the patch test, set the exact strain components εx, εy, γxy that define the manufactured linear displacement field imposed on all boundaries.
    6. Read the element stress tensor, principal stresses σ₁/σ₂ and angle θp, peak von Mises stress, maximum displacement, and — for the patch test — the L2 and L∞ stress errors that should be near machine zero.

    The formula

    ε=Bu,σ=Dε,Ke=t A B⊤DB,σvM=σxx2−σxxσyy+σyy2+3τxy2\boldsymbol{\varepsilon} = \mathbf{B}\mathbf{u}, \quad \boldsymbol{\sigma} = \mathbf{D}\boldsymbol{\varepsilon}, \quad \mathbf{K}_e = t\,A\,\mathbf{B}^{\top}\mathbf{D}\mathbf{B}, \quad \sigma_{vM} = \sqrt{\sigma_{xx}^2 - \sigma_{xx}\sigma_{yy} + \sigma_{yy}^2 + 3\tau_{xy}^2}

    Reference: Constant-strain triangle plane elasticity and the finite-element patch test; Zienkiewicz & Taylor, The Finite Element Method; Cook, Malkus & Plesha, Concepts and Applications of Finite Element Analysis; MIT OCW / solidmechanics.org linear-elasticity notes.

    Worked example

    Patch test — exact constant-stress field (plane stress)

    Inputs
    • Patch Test problem; plane stress; E = 210 GPa; ν = 0.3; exact strain field εx = 1.2×10⁻³, εy = −4.0×10⁻⁴, γxy = 9.0×10⁻⁴ imposed on all boundary nodes.
    Calculation path
    1. 1

      The plane-stress constitutive constant is c = E/(1−ν²) = 210×10⁹ / (1 − 0.09) = 230.769×10⁹ Pa, giving D = c·[[1, ν, 0],[ν, 1, 0],[0, 0, (1−ν)/2]]. Applying σ = Dε: σxx = c(εx + νεy) = 230.769×10⁹×(1.2×10⁻³ + 0.3×(−4.0×10⁻⁴)) = 249.23 MPa; σyy = c(νεx + εy) = 230.769×10⁹×(0.3×1.2×10⁻³ − 4.0×10⁻⁴) = −9.23 MPa; τxy = c·(1−ν)/2·γxy = 230.769×10⁹×0.35×9.0×10⁻⁴ = 72.69 MPa. The von Mises value is √(σxx² − σxxσyy + σyy² + 3τxy²) = 283.47 MPa. Because the imposed field is linear, every CST element returns exactly these stresses.

    Result

    Every element recovers σxx = 249.23 MPa, σyy = −9.23 MPa, τxy = 72.69 MPa, with principal stresses σ₁ = 268.27 MPa and σ₂ = −28.27 MPa oriented at θp = 14.68°, and von Mises 283.47 MPa — constant across the mesh to numerical round-off (L2 and L∞ stress errors near machine epsilon), confirming the solver passes the patch test.

    Interpreting the result

    Passing the patch test means the CST element can reproduce a state of constant strain exactly, which is the minimum condition for the mesh to converge to the correct answer as it is refined. The principal stresses σ₁ and σ₂ are the extreme normal stresses on planes where shear vanishes, and θp is the angle to those planes; von Mises combines the full tensor into a single number to compare against the yield strength. For the cantilever and shear-block demos there is no exact 2D closed form, so treat those as qualitative stress-gradient illustrations that improve with mesh refinement, not benchmark-exact results.

    Assumptions & limitations

    • The material is linear-elastic, homogeneous and isotropic, described entirely by E and ν through the plane-stress or plane-strain constitutive matrix.
    • Elements are three-node constant-strain triangles, so strain and stress are uniform within each element and the solution is piecewise constant across the mesh.
    • Plane stress assumes a thin plate free to contract through the thickness (σz = 0); plane strain assumes no out-of-plane strain (εz = 0, with σz = ν(σx + σy)).
    • Displacements and strains are small, so geometry is not updated and the stiffness matrix is constant (linear static analysis).
    • Edge tractions are lumped to the two end nodes of each boundary segment; the patch test instead imposes exact nodal displacements on every boundary node.
    • Only the patch test is a closed-form benchmark; the cantilever and shear-block presets have no exact analytic field and are illustrative.

    Frequently asked questions

    What is a finite-element patch test and why does it matter?

    A patch test imposes a known exact solution — here a linear displacement field giving constant strain — on the boundary of a small mesh and checks that the elements reproduce it exactly. If they do, the element can represent constant-strain states, which is the necessary condition for convergence under mesh refinement. The solver reports L2 and L∞ stress errors that should be at the level of floating-point round-off.

    How is the von Mises stress computed here?

    In plane stress the tool uses σvM = √(σxx² − σxxσyy + σyy² + 3τxy²). In plane strain it first forms σz = ν(σx + σy) and evaluates the full 3D von Mises expression. Comparing σvM against the entered yield strength gives the factor of safety reported in the summary.

    Are the cantilever and shear-block results exact?

    No. Only the patch test has an exact closed-form field. The cantilever shows a realistic bending-stress gradient that trends toward Euler-Bernoulli beam theory, and the shear block shows a clean shear field with principal-stress rotation, but neither is benchmark-exact. Their accuracy improves as you increase the mesh density nx × ny.

    What is the difference between plane stress and plane strain?

    Plane stress models a thin plate loaded in its plane, where the out-of-plane stress σz is zero and the material is free to thin; it uses D = E/(1−ν²)·[...]. Plane strain models a long or constrained body where out-of-plane strain is zero and σz = ν(σx + σy); it uses D = E/((1+ν)(1−2ν))·[...]. The same loads give different stresses and von Mises values in each.

    What are principal stresses and the angle θp?

    Principal stresses σ₁ and σ₂ are the maximum and minimum normal stresses at a point, acting on planes where the shear stress is zero. The angle θp = ½·atan2(2τxy, σxx − σyy) gives the orientation of those planes. In the worked example σ₁ = 268.27 MPa and σ₂ = −28.27 MPa at θp = 14.68°.

    Methodology last reviewed 2026-10-06. Results are informational and not financial or engineering advice — see our disclaimer.