Solver inputs
Example data table
| Item | Example value | Meaning |
|---|---|---|
| Ne | 4 | Four equal bar elements. |
| L | 1 | Total bar length in meters. |
| E | 200e9 | Typical steel stiffness (Pa). |
| A | 1e-4 | Cross-section area (m²). |
| Fixed nodes | 1 | Left end fixed, u(1)=0. |
| F nodes | 0,0,0,0,1000 | 1000 N pull at the right end. |
| q | 0 | No distributed load along elements. |
This example produces increasing displacement toward the loaded end, and a balancing reaction at the fixed node.
Formula used
For each 2‑node axial element with length Le, modulus E, and area A:
- Element stiffness: ke = (E·A/Le) · [[1, −1], [−1, 1]]
- Uniform distributed load equivalent: fe = (q·Le/2) · [1, 1]
- Global equilibrium: K·u = F (after assembly)
- Reaction forces: R = K·u − F
- Strain: ε = (u2 − u1)/Le
- Stress: σ = E·ε
- Axial force: N = A·σ
This solver uses linear shape functions and small‑strain assumptions. For bending, plates, or 2D/3D meshes, you need different elements and stiffness formulations.
How to use this calculator
- Choose Ne and enter total length L.
- Provide uniform E and A, or per‑element lists.
- Enter nodal point loads as a list with Ne + 1 values.
- Set constraints using fixed nodes and optional prescribed displacements.
- Optional: add distributed loads q (uniform or per element).
- Press solve to view displacements, reactions, and element stress.
- Use the export buttons to save CSV or PDF.
If you leave the bar unconstrained, the system has rigid motion and cannot be solved. Add at least one fixed node to remove that mode.
Finite element solver article
1) What this solver represents
This calculator models a straight bar under axial loading with two-node linear finite elements. Each element assumes small strain, linear elasticity, and constant properties. Unknowns are nodal displacements; results include reactions and per-element strain, stress, and axial force.
2) Mesh choice and convergence
The bar is divided into Ne equal elements with Le = L/Ne. A finer mesh captures sharper gradients and property steps but increases the system size. Solve with 5–20 elements, then double Ne until outputs change minimally.
3) Material and geometry data
Young’s modulus E (Pa) sets stiffness and area A (m²) scales stiffness and internal force. Use uniform values for homogeneous members, or per-element lists for stepped sections and segmented materials. Maintain consistent units across all inputs.
4) Loads and equivalent nodal forces
Nodal point loads are entered as a list of Ne + 1 values. Distributed load q (N/m) may be uniform or per element. Each element contributes consistent equivalent nodal forces q·Le/2 at both end nodes, which are assembled into the global load vector.
5) Boundary conditions and solvability
At least one displacement constraint is required; otherwise rigid translation makes the stiffness matrix singular. Fixed nodes impose u = 0, while prescribed displacements enforce specific nodal values. If instability appears, check for missing constraints, duplicate entries, or out-of-range node indices.
6) Stiffness assembly and solution steps
Each element contributes ke = (E·A/Le) times the standard 2×2 matrix [[1,−1],[−1,1]]. Assembly forms a sparse, banded global K. The solver partitions free and constrained DOFs, solves the reduced system with pivoting, then reconstructs the full displacement vector. It effectively solves Kffuf = Ff − Kfcuc to enforce constraints cleanly.
7) Post-processing results
Reactions are computed as R = K·u − F using the total load vector that includes distributed-load equivalents. Element strain is (u2−u1)/Le, stress is E·ε, and axial force is A·σ. Values are constant within each element in this formulation.
8) Engineering checks and reporting
Validate equilibrium by confirming that reactions balance applied loads. For an end-force case, compare with the closed-form extension δ = F·L/(E·A). If stresses jump near loads or property changes, refine Ne. Export CSV/PDF to archive inputs, assumptions, and computed tables for review. For audits, include units with the exported files.
FAQs
1) Why do I get a singular matrix error?
A singular matrix usually means the model can move rigidly. Add at least one constraint using a fixed node or a prescribed displacement. Also avoid contradictory displacement constraints on the same node.
2) How many elements should I use?
Start with 10 elements for smooth problems, then increase to 20 or 40 and compare key outputs. When displacements and peak stress change only slightly, your mesh is typically adequate for this 1D model.
3) Can I model a bar with varying material or diameter?
Yes. Provide per-element lists for E and A with exactly Ne values. This approximates stepped or segmented members by assigning properties to each element.
4) What sign convention is used for loads?
Positive nodal forces and positive distributed load q act in the +x direction (from node 1 toward node Ne+1). Negative values act in the opposite direction.
5) What units should I enter?
Use a consistent unit system. In SI, enter meters, pascals, square meters, newtons, and newtons per meter. If you use millimeters, keep all terms consistent so stiffness and stresses remain meaningful.
6) How are reaction forces computed?
Reactions are computed from R = K u − F using the assembled stiffness matrix and the total load vector (including distributed-load equivalents). Reactions are most relevant at constrained nodes.
7) Are stresses averaged or computed per element?
Stresses are computed per element from its end displacements, so they are constant within each element for this linear bar formulation. Refine the mesh if you need smoother stress variation or better local detail.