fea3d
3D linear elastic stress and deflection of a solid part, on proven open-source code: gmsh 4.14 (OpenCASCADE) builds or reads the part and meshes it with quadratic curved tetrahedra; scikit-fem 11 assembles linear elasticity; SciPy (direct) or PyAMG (smoothed aggregation + CG) solves it.
Part box, cylinder, tube (optionally a sector), a 2D outline with holes and corner fillets extruded through a thickness, or a STEP file (mm).
Supports and loads act on CAD faces picked by plane, box or hole; loads are pressure, total force, traction, or a pin bearing on a hole (cosine pressure, as fea2d).
Readings peak von Mises and where, the peak away from supports, the governing peak after the mesh convergence check (fea2d's rules: h/2 and h/4 balls of refinement, converged under 2 %, singular when it keeps growing), safety factor on yield, largest displacement, applied load against the sum of reactions, mesh size and quality, probes at exact points.
Files scene.glb (the part coloured by von Mises, with a legend), results.csv (the readings), nodes.csv (every node: position, displacement, stress), part.step (the part as built).
Units whatever the inputs use consistently (mm, N, MPa).
- Field
- Mechanics, CAD and finite elements
- Version
- 0.1.0
- Runs as
- Compiled (Rust)
- Typical run
- 30 s
Compiled from source: run sh packs/install.sh once before admitting it.
Known answers it must pass
r0001Cantilever 200 × 10 × 10 mm, E 200 GPa, ν 0.3, 100 N at the free end, wall face clamped: tip deflection PL^3/3EI + PL/(kGA) = 1.6031 mm (Timoshenko, k = 5/6) within 1%; bending stress M c / I = 6P(L - x)/(b h²) = 108 MPa at x = 20 and 60 MPa at x = 100 on the top face within 1%; the clamped edge's peak is singular (a rigid wall with ν > 0) and the part is judged by the peak away from itpassed
probes.0.displacement.2= -1.6031, within 1 %reading not recorded on this pageprobes.1.stress.0= 108, within 1 %reading not recorded on this pageprobes.2.stress.0= 60, within 1 %reading not recorded on this pageconvergence.points.0.status= singularmisseddiffersconvergence.status= convergedmisseddifferssummary.equilibrium_errorat most 1.000000 × 10⁻⁸reading not recorded on this pagesummary.residualat most 1.000000 × 10⁻⁸reading not recorded on this pagesummary.applied.2= -100, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagescene.legend_max_is_reported_peak= truemisseddiffersscene.bounds_max.0= 200, within 1.000000 × 10⁻⁶reading not recorded on this pager0002Axial bar 100 × 10 × 10 mm on three symmetry planes, 1000 N on the end face: stress F/A = 10 MPa everywhere, extension FL/EA = 0.005 mm, lateral strain -ν F/(EA) (uy = -7.5 × 10⁻⁵ mm at y = 5); exact for any mesh, within 10⁻⁶passed
probes.0.displacement.0= 0.005, within 1.000000 × 10⁻⁶ relativereading not recorded on this pageprobes.0.displacement.1= -7.500000 × 10⁻⁵, within 1.000000 × 10⁻⁶ relativereading not recorded on this pageprobes.1.stress.0= 10, within 1.000000 × 10⁻⁶ relativereading not recorded on this pagesummary.peak_von_mises= 10, within 1.000000 × 10⁻⁶ relativereading not recorded on this pagesummary.max_displacement= 0.005005, within 1.000000 × 10⁻⁵ relativereading not recorded on this pageconvergence.status= convergedmisseddiffersr0003Lame thick cylinder, ri 50, ro 100, open ends, p 10 inside (quarter model on symmetry planes): hoop stress 16.667 at the bore and 6.667 outside, bore radial displacement 0.0049167 mm, peak von Mises 23.333 at the bore, all within 1%; the peak converges. Solved with the AMG-CG branch (solver amg) that large parts usepassed
probes.0.stress.1= 16.6667, within 1 %reading not recorded on this pageprobes.1.stress.1= 6.6667, within 1 %reading not recorded on this pageprobes.2.stress.1= 9.2593, within 1 %reading not recorded on this pageprobes.0.displacement.0= 0.004917, within 1 %reading not recorded on this pagesummary.peak_von_mises= 23.3333, within 1 %reading not recorded on this pageconvergence.status= convergedmisseddifferssummary.applied.0= 10000, within 1.000000 × 10⁻⁶ relativereading not recorded on this pagescene.legend_max_is_reported_peak= truemisseddiffersscene.bounds_max.0= 100, within 1.000000 × 10⁻⁶reading not recorded on this pager0004Solid cylinder r 10, 100 long on z, base clamped, traction 10 MPa along z on the far end picked by a box: the load is t π r² = 3141.59 N within 0.1% (the curved face's area), the stress at mid-length is t = 10 MPa within 1% (St Venant: 2.5 diameters from the clamp)passed
summary.applied.2= 3141.593, within 0.1 %reading not recorded on this pageprobes.0.stress.2= 10, within 1 %reading not recorded on this pageprobes.1.stress.2= 10, within 1 %reading not recorded on this pageselections.1.area= 314.1593, within 0.1 %reading not recorded on this pager0005Pin-loaded lug: plate 60 × 20 × 5 mm held at x = 0, a pin pulls its hole (r 4 at x = 45) with 1000 N (cosine bearing pressure): the assembled load is 1000 N, the reactions balance it, and the shank carries F/A = 10 MPa at x = 20 within 2% (St Venant: 16 mm from the hole, 20 from the wall)passed
summary.applied.0= 1000, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagesummary.reactions.0= -1000, within 1.000000 × 10⁻⁶ relativereading not recorded on this pageprobes.0.stress.0= 10, within 2 %reading not recorded on this pagesummary.bbox_max.2= 2.5, within 1.000000 × 10⁻⁶reading not recorded on this pager0006The cantilever read from a STEP file (
samples/bar_200x10x10_mm.step, written by OpenCASCADE): the part is 200 mm long (units read as mm) and its tip deflection is 1.6031 mm within 1%passedsummary.bbox_max.0= 200, within 0.001reading not recorded on this pagesummary.bbox_max.2= 10, within 0.001reading not recorded on this pageprobes.0.displacement.2= -1.6031, within 1 %reading not recorded on this page
Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.
Inputs
| Name | Unit | Default | Meaning |
|---|---|---|---|
name | A name for the part (the scene's title). | ||
part | The solid. {kind: box, size: [lx, ly, lz], origin?} | {kind: cylinder, radius, length, axis?: x|y|z|[ax,ay,az], base?: [x,y,z], angle_deg?: 360} | {kind: tube, inner_radius, outer_radius, length, axis?, base?, angle_deg?} (angle_deg < 360 gives a sector, e.g. a quarter model) | {kind: extrude, outline: [[x, y], ...], holes?: [{center: [x, y], radius}], fillets?: [{at: [x, y] (an outline corner), radius}], thickness, z₀? (default -thickness/2: mid-plane at z = 0)} | {kind: step} with the step input, or {kind: step, sample: <file in the instrument's samples/>}. | ||
step | A STEP file (.step/.stp) of one solid, in millimetres, for part {kind: step}. | ||
material | {E, ν, yield?} in the model's units (mm, N, MPa: steel E 210000, ν 0.3). With yield, the safety factor is yield / the governing peak. | ||
mesh_size | model length | Largest element edge. About a third of the thinnest wall is a start; curved faces are graded finer (curve_elements). | |
supports | [{at: selector, fix?: ["x", "y", "z"] (default all: held), label?}]. A symmetry plane is a support fixing the direction normal to it; a plane held only along its normal counts as one (symmetry: true/false overrides) and is not a 'support' for the peak away from supports, since a frictionless roller makes no singularity. Selectors pick faces of the part (every point of a face must satisfy it): {"plane": "x", "at": 0} the face(s) at x = 0; {"box": {"min": [x, y, z], "max": [x, y, z]}} faces inside a box; {"hole": {"center": [x, y, z], "axis": "z", "radius": r}} a hole's (or a cylinder's) wall. Optional "tol" widens the match. | ||
loads | [{kind: pressure, at, p} (p > 0 pushes into the part) | {kind: force, at, force: [Fx, Fy, Fz]} (total, spread evenly over the faces' area) | {kind: traction, at, t: [tx, ty, tz]} (force per area) | {kind: bearing, at: {hole: ...}, force: [Fx, Fy, Fz]} (a pin pushing on a hole: pressure ~ cos on the half facing the load, scaled to the total), label?}. Selectors pick faces of the part (every point of a face must satisfy it): {"plane": "x", "at": 0} the face(s) at x = 0; {"box": {"min": [x, y, z], "max": [x, y, z]}} faces inside a box; {"hole": {"center": [x, y, z], "axis": "z", "radius": r}} a hole's (or a cylinder's) wall. Optional "tol" widens the match. | ||
probes | Points [x, y, z]; each returns the displacement, stress [sxx, syy, szz, syz, sxz, sxy] and von Mises there (interpolated in the element holding it). | ||
convergence | true | Run the mesh convergence check (re-solves the part with finer balls of elements around each peak). | |
solver | auto | auto (SciPy direct up to 60 000 free dofs, PyAMG smoothed aggregation + CG beyond), direct, or amg. | |
curve_elements | 24 | Elements around a full circle on curved faces (gmsh Mesh.MeshSizeFromCurvature). | |
stress_unit | MPa | The stress unit the inputs imply, for the legend. |
Readings
| Name | Unit | Meaning |
|---|---|---|
summary | peak_away_finest, peak_away_status, safety_factor_away (the peak away from supports on the finest mesh of the check, its status, yield over it), peak_von_mises(_at), peak_von_mises_free(_at) (away from supports: farther than 1.5 mesh_size from every held node), governing_peak (the value the part is judged by, on the finest mesh of the check), governing, safety_factor, max_displacement(_at, _vector), applied and reactions [x, y, z], equilibrium_error |applied + reactions| / |applied|, residual, solver, elements, nodes, dofs, quality_min/mean (gmsh minSICN: 1 regular, 0 flat), bbox_min/max | |
convergence | status converged | notConverged | singular | notChecked, reason, points [{label, at, sizes, values, change, ratio, slope, extrapolated, status}], governing (index into points) | |
warnings | ||
probes | ||
selections | each support and load: faces picked and their area | |
scene.glb | ||
results.csv | ||
nodes.csv | ||
part.step |
Try the call
Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.