OGR FEM2D
The suite's engine for stresses and deformations in soil and rock by two-dimensional finite elements. It is at an early stage: it has no interface, command line, project file or installer yet, and today it can only be used from Python, running from its source tree.
An engine first, the program later
OGR FEM2D is being built from the inside out: first the engine and its validation against closed-form solutions, then the mesher, the project file and the interface. The engine is written in Rust, and every element and every constitutive law also has a reference implementation in Python, which the tests use as the oracle. Rust computes the stresses, internal forces and tangent at each integration point; Python assembles the model, solves the linear systems and drives the load steps. In the tests the two agree to 10−10 relative.
What the engine does today
Only what is implemented and covered by tests in the published version. Everything else is in the roadmap below.
Elements
Three- and six-node triangles, in plane strain and in axisymmetry (the whole ring, with ur = 0 on the axis).
Constitutive laws
Linear isotropic elasticity, and perfectly plastic Mohr–Coulomb with dilatancy (c ≥ 0, 0 ≤ ψ ≤ φ < 90°), integrated by implicit return mapping with its consistent tangent (de Souza Neto, Perić and Owen 2008). Mohr–Coulomb is accepted only with six-node triangles in plane strain, the combination it has been validated with.
Loads and restraints
Nodal loads, point loads inside an element and linearly varying loads on an element side, normal or in global axes, plus the self-weight of the active elements. Restraints in x, y or both, and prescribed displacements. The engine checks that the restraints stop every rigid-body motion and names the one they do not.
Initial stress
A constant field, or a gravitational field with a horizontal ground surface and horizontal strata, each with its own K and Kz. A variable K and an irregular surface are not supported yet.
Stages and excavation
Each stage is solved on its active elements, and the load released by an excavation follows Zienkiewicz and Taylor (2000). An element cannot be reactivated, so there is no fill or construction stage yet.
Solver
Full Newton–Raphson with the consistent tangent, load steps and automatic cutting of a step that does not converge.
There is no general mesher yet. The engine runs on a structured rectangle, a quarter annulus and a full radial annulus (plane strain only). The mesher for arbitrary regions is under way: boundary discretisation, arcs, curved six-node triangles with an exact Jacobian and the patch test are done in version 0.0.8; the mesher itself is not.
Checked against closed-form solutions
Each case fixes its model, its mesh, the expected value and the source of the solution; the error is measured at the worst point of the mesh. The cases are in the repository.
| Case | Solution | Quantity | Tolerance | Error |
|---|---|---|---|---|
| Circular hole, elastic | Kirsch (1898) | ur(a) · σθ(a) | 0.5 % | 0.189 % · 0.194 % |
| Circular hole, Mohr–Coulomb | Salençon (1969) | ur(a), ψ = 0° · ψ = 30° | 2 % | 1.10 % · 1.47 % |
| Spherical cavity, axisymmetric | Lamé (1852) | σt · uR(a) | 0.5 % | 0.341 % · 0.130 % |
| Strip load, elastic | Michell (1902) | σ1 · σ3 | 0.01 q | 0.0012 q · 0.0054 q |
| Circular hole, non-hydrostatic field, general mesh | Kirsch (1898) | — | 0.5 % | pending: it needs the mesher |
What comes next
In the order of the project's development plan, without dates.
A usable program
The mesher for arbitrary regions, the finite-element model and its .ogr project file, results in HDF5 and their interpretation, and then the interface, the command line and the MCP server.
Collapse and strength reduction
Tolerance, collapse and load steps; full Mohr–Coulomb, Drucker–Prager and generalised Hoek–Brown; shear strength reduction; hydrostatic pore pressures; a faster global loop.
Structures, water and more
Linings, bolts, joints, complete construction stages and infinite elements; then groundwater, advanced models, probabilistic analysis and special fields.
Data sheet
Taken from the source code of version 0.0.8. If you find a difference between this page and the program, the program is right; let us know and we will correct the page.
- Analysis
- 2D static finite elements, plane strain and axisymmetric
- Elements
- Three- and six-node triangles
- Laws
- Linear elastic; perfectly plastic Mohr–Coulomb with dilatancy (six-node triangles, plane strain)
- Loads
- Nodal, point, linear on element sides, self-weight, prescribed displacements
- Initial stress
- Constant, or gravitational with horizontal strata and K per stratum
- Stages
- Excavation by deactivating elements
- Solver
- Newton–Raphson, consistent tangent, load steps with automatic cutting
- Engine
- Rust, with a Python reference implementation of every element and law
- Interfaces
- Python, from the source tree
- Requirements
- Python 3.11 or newer, Git and the stable Rust toolchain
- Shared code
- OGR-Core, pinned to a tag
- Licence
- AGPL-3.0-or-later · no warranty
A suite of 293 tests
In the last run of version 0.0.8 all 293 tests pass. Besides the validation cases, they compare the Rust engine with the Python reference, check the curved elements with the patch test and check the radial mesh against the exact solution for a thick ring.