Web Simulation 

 

 

 

 

Finite Element Analysis (2D Linear Triangle) 

This interactive simulation demonstrates 2D Finite Element Analysis (FEA) using Linear Triangle (T3 / Constant Strain Triangle) elements in plane stress. A rectangular mesh is built from nodes and triangular elements; the global stiffness matrix is assembled from each element’s B (strain–displacement) and D (constitutive) matrices. Fixed nodes (left edge by default) are enforced with the penalty method; the governing equation K d = Fext + Fp is solved with the Conjugate Gradient method. Displacements are exaggerated for visualization; triangles are colored by Von Mises stress (blue = low, red = high).

Adjust Young’s Modulus E and Poisson’s ratio ν in the sidebar. Use Apply force (drag) to drag a node and set force; use Toggle fix node to fix or free a node. Use Mesh Density to change grid size; Interpolation for None/Linear/Shape Functions; Principal Stresses, Nodal Influence, Residuals for extra visuals. The Math Monitor shows K, d, Fext, Fp; click K for assembly animation. Reset restores mesh and left-edge fix. The gray outline is the original mesh; the colored mesh is the deformed configuration (displacement scaled for visibility).

 

Math behind the simulation

1. Goal

Solve for nodal displacements d given applied forces and boundary conditions:

K d = Fext + Fp

where K is the global stiffness matrix, Fext is external force, and Fp is plastic force.

2. Plane stress and D matrix

For plane stress, stress and strain are related by the constitutive (D) matrix. With Young’s modulus E and Poisson’s ratio ν:

σ = D ε,    D = E / (1 − ν²) · [1, ν, 0; ν, 1, 0; 0, 0, (1 − ν)/2]
3. Constant Strain Triangle (CST)

Each triangle has linear displacement; strain is constant in the element. The B (strain–displacement) matrix depends on the node coordinates and area:

ε = B ue

where ue is the 6×1 vector of nodal displacements (u, v for each of 3 nodes).

4. Element stiffness and assembly

Local stiffness is integrated over the element (area A, thickness t = 1 here):

ke = BT D B A t

ke is assembled into the global K by mapping local DOFs to global node indices. Click K in the equation box to animate this assembly.

5. Boundary conditions and solver

Fixed degrees of freedom are enforced with the penalty method: a large value is added to the diagonal of K for that DOF and the force is set to zero. The system is solved with the Conjugate Gradient method (iterative; scales with mesh size).

6. Von Mises stress and plasticity

For each element, strain ε = B ue and stress σ = D ε. The Von Mises equivalent stress (plane stress) is:

σv = √(σx² + σy² − σxσy + 3τxy²)

Colors map low (blue) to high (red) stress. With plasticity enabled, excess stress accumulates permanent strain and Fp is added to the right-hand side.

CST caveat: because strain is constant within each linear triangle, T3 elements are stiff in bending and need a fine mesh to resolve stress gradients accurately. Watch how refining Mesh Density changes the stress field.

Simulation

The interactive simulator is below. Use the controls to explore the concepts described above.

 

Usage

  1. Apply force: Set mode to “Apply force (drag)”, then click and drag a node. The drag vector sets the force at that node; the mesh deforms and stress updates.
  2. Fix / free nodes: Set mode to “Toggle fix node”, then click a node to fix or free it in X and Y. By default the left edge (x = 0) is fixed.
  3. Material: Change Young’s Modulus E and Poisson’s ratio ν. Use Mesh Density (4–30) to change grid size (e.g. 10×5).
  4. Plasticity: Enable and set Yield strength; drag hard to see permanent deformation. Clear Plasticity resets.
  5. Interpolation: None (flat), Linear (Gouraud), or Shape Functions (with sampling markers).
  6. Math Monitor: Click K in the equation to run assembly animation. Hover the K grid for K[i,j]; hover a node (with Nodal Influence on) to see its DOF rows.
  7. Reset: Restores mesh and left-edge fix; keeps current Mesh Density; clears applied forces.

Parameters

Control

Range / options

Effect

Young’s Modulus E

e.g. 1e6

Material stiffness. Higher E ⇒ smaller displacements for the same force.

Poisson’s ratio ν

0 < ν < 0.5

Lateral strain / axial strain. Larger ν ⇒ more "bulge" perpendicular to load.

Mesh Density

4–30

Grid size (e.g. 10 → 10×5). Finer mesh ⇒ more DOFs and a larger K matrix.

Plasticity / Yield strength

on / off + value

Stress above yield accumulates permanent strain; Fp appears in the equation monitor.

Interpolation

None / Linear / Shape Functions

Flat shading, Gouraud smoothing, or shape-function sampling markers.

Visualization

  • Gray outline: Undeformed mesh.
  • Colored triangles: Deformed mesh; color = Von Mises stress (blue low → red high). Interpolation controls smooth vs. flat shading.
  • Nodes: Blue = unloaded; gray = fixed; red = has applied force.
  • Principal Stresses: Green/red crosses on elements (tension/compression).
  • Nodal Influence: Hover a node to highlight connected elements and its global DOF rows.
  • Residuals: Red arrows showing FK d at each node.
  • Math Monitor: Governing equation, dimensions, sparsity %, and K×d=Fext+Fp canvases (K sparsity grid and d, Fext, Fp vector ribbons).

Limitations

  • Linear, small-strain elasticity. The solver assumes infinitesimal strains and a fixed stiffness matrix; large rotations and geometric (large-deformation) nonlinearity are not modeled. Displacements are exaggerated purely for visualization.
  • Constant Strain Triangles only. T3 elements give a piecewise-constant stress field, so stresses are discontinuous between elements and converge slowly — this demo trades accuracy for transparency.
  • 2D plane stress. Only thin-plate, in-plane loading is represented; no plane strain, no out-of-plane bending, no 3D effects.
  • Penalty boundary conditions. Fixed DOFs use a large diagonal penalty rather than exact constraint elimination, which can mildly perturb the solution and conditioning.
  • Simplified plasticity. The plastic-force update is a basic excess-stress accumulation, not a full return-mapping / hardening model, so it is illustrative rather than quantitatively accurate.
  • Iterative CG solver. Conjugate Gradient convergence depends on conditioning; very fine meshes or extreme material ratios can slow or degrade the solve.