A comprehensive Finite Element Analysis (FEA) solver library implemented in Java, supporting both 2D and 3D linear and nonlinear structural analysis.
Academic Project: This repository is part of a Master's degree project in Computational Engineering at Ruhr University Bochum (Ruhr-UniversitΓ€t Bochum), Germany.
- 2D Linear Elasticity Analysis - Planar stress and strain problems
- 3D Linear Elasticity Analysis - Solid mechanics with hex elements
- Nonlinear 3D Analysis - Advanced nonlinear material and geometric behaviors
- Truss Elements - Specialized 1D structural analysis
- Quad & Hex Elements - 4-node and 8-node elements for 2D/3D analysis
- Material Models - Linear elastic and custom material definitions
- Von Mises Stress - Built-in stress visualization and analysis
- Excel Integration - Read geometry and boundary conditions from Excel files
- 3D Visualization - Interactive visualization of structures and results
- GUI Support - Graphical interface for nonlinear analysis
fea_solver_java/
βββ src/
β βββ core/ # Base FEA library
β β βββ Element.java # Base element class
β β βββ Node.java # Node definition
β β βββ Constraint.java # Boundary conditions
β β βββ Force.java # Load definitions
β β βββ Material.java # Material properties
β β βββ Structure.java # Main structure handler
β β βββ ElementQuad2D4N.java # 2D quad element
β β βββ ElementQuad3D8N.java # 3D hex element (8-node)
β β βββ LinearElastic2D.java # 2D elasticity model
β β βββ LinearElastic3D.java # 3D elasticity model
β β βββ VonMises2D.java # 2D stress analysis
β β βββ VonMises3D.java # 3D stress analysis
β β βββ Visualizer.java # Result visualization
β β βββ ReadGeometry.java # File I/O utilities
β β
β βββ examples/ # Practical implementations
β β βββ Linear2D/ # 2D linear elasticity examples
β β βββ Linear3D/ # 3D linear elasticity examples
β β βββ LinearTruss/ # 1D truss examples
β β βββ Nonlinear3D/ # Nonlinear analysis examples
β β
β βββ tests/ # Test cases and validation
β βββ Test3D/ # 3D element tests
β βββ TestCube.java # Cube structure tests
β βββ TestGeometry.java # Geometry validation
β βββ TestString.java # String tests
β
βββ .gitignore # Git ignore rules
βββ README.md # This file
- Java 8 or higher
- Apache POI (for Excel file reading)
- JNUMERICS library (for matrix operations)
- INF.V3D library (for 3D visualization)
import core.*;
Structure struct = new Structure();
// Create nodes
Node n1 = new Node(0, 0);
Node n2 = new Node(1, 0);
Node n3 = new Node(1, 1);
Node n4 = new Node(0, 1);
// Create element
ElementQuad elem = new ElementQuad(n1, n2, n3, n4);
// Define constraints and forces
Constraint c1 = new Constraint(true, true, true); // Fixed
Force f1 = new Force(0, -1000, 0); // Load
// Add to structure
struct.addNode(n1);
// ... add more nodes and elements
// Solve
struct.enumerateDOFs();
struct.solve();
// Visualize
Viewer viewer = new Viewer();
Visualizer viz = new Visualizer(struct, viewer);
viz.drawElements();import core.*;
// Create 3D hex element (8 nodes)
Node n1 = new Node(0, 0, 0);
Node n2 = new Node(1, 0, 0);
// ... define 8 nodes for hex element
ElementHex elem = new ElementHex(n1, n2, n3, n4, n5, n6, n7, n8);
// Similar workflow as 2DThe foundation for all FEA operations:
- Element Classes: Base element definitions and derived types (Quad, Hex)
- Node & Constraint: Mesh definition and boundary conditions
- Material & Force: Material properties and load definitions
- Elasticity Models: LinearElastic2D and LinearElastic3D solvers
- Stress Analysis: Von Mises stress computation and visualization
- Structure: Main orchestration class managing assembly and solving
2D planar stress/strain analysis with quad elements:
- Mesh generation from geometry files
- Linear elasticity solve
- Von Mises stress visualization
3D solid analysis with hex elements:
- 3D mesh handling
- Linear elasticity in 3D
- 3D stress visualization and export
Specialized 1D truss element analysis:
- Truss structure definition
- Axial force analysis
- Small structure examples
Advanced nonlinear analysis capabilities:
- Nonlinear material models
- Geometric nonlinearity
- Graphical user interface for parameter input
- Interactive visualization
Validation and test cases:
- ElementTests: Verify element formulations
- GeometryTests: Mesh and boundary condition validation
- CubeTests: Common benchmark problems
| Feature | 2D | 3D | Nonlinear |
|---|---|---|---|
| Linear Elasticity | β | β | β |
| Element Types | Quad | Hex | Hex |
| Material Models | Linear | Linear | Nonlinear |
| Visualization | β | β | β |
| GUI Interface | β | β | β |
- JNUMERICS: Matrix and linear algebra operations
- Apache POI: Excel file reading for geometry input
- INF.V3D: 3D visualization engine
- ICEB.JNUMERICS: Numerical computing utilities
ReadGeometry reader = new ReadGeometry("geometry.xlsx");
reader.parseGeometry(struct);VonMises3D vm = new VonMises3D(struct);
double stress = vm.computeStress(element);Viewer viewer = new Viewer();
Visualizer viz = new Visualizer(struct, viewer);
viz.drawElements();
viz.drawConstraints();
viz.drawForces();Compile using your preferred Java IDE or build tool:
javac -cp .:../lib/* src/core/*.java
javac -cp .:../lib/* src/examples/Linear2D/*.javajava -cp bin tests.Test3D.HexTest
java -cp bin tests.TestCubejava -cp bin examples.Linear2D.TestElement
java -cp bin examples.Linear3D.TestGeometry
java -cp bin examples.Nonlinear3D.GraphicalUIExpected columns:
NodeID: Unique node identifierX, Y, Z: CoordinatesElementID: Element identifierNode1-8: Node references for element connectivity
| Class | Purpose |
|---|---|
Structure |
Main analysis controller |
Node |
Point in space with degrees of freedom |
Element |
Base element (extended by specific types) |
ElementQuad / ElementHex |
2D/3D element implementations |
Material |
Material property definitions |
Constraint |
Boundary condition (fixed, free, etc.) |
Force |
Applied load |
Visualizer |
Results visualization |
ReadGeometry |
Input file parsing |