@rulecad/fea 0.2.14 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,76 @@
2
2
 
3
3
  What changed in each release, for someone upgrading a workspace.
4
4
 
5
+ ## 0.4.0: the stress of each cell is worked out by the one von Mises formula; frame sizing refuses a choice without a strength or section modulus, and frames refuse keys they do not know; needs Node 22.13 or later, the version the kit is tested on; frame sizing can give each design its own end springs; frame sizing names the members its stress limit could not check, and refuses options it does not use
6
+
7
+ ### Changed
8
+
9
+ - `stress()` now calls `vonMises()` rather than writing the same formula out again, so a fix to it is made in one
10
+ place. The figures are the same, except that a stress so small that rounding made the sum under the square root a
11
+ hair below zero now reads 0 rather than not-a-number. Two values the code never read are gone. No printed size
12
+ moves, and nothing a design or a check does changes.
13
+
14
+ - @rulecad/fea now states Node 22.13 or later in its `engines`, the same lowest Node as every rulecad package, and the
15
+ tests run on exactly Node 22.13.0 as well as the newest Node 24. Node 20 reached the end of its support on 30 April
16
+ 2026, and the kit's packages stated five different lowest versions, some of them too low: on Node 20.6 to 20.9 `cad`
17
+ stopped at start-up with "Unexpected token 'with'", and on Node 22.0 to 22.12 every `cad` command that runs a design
18
+ stops, because the sandbox designs run in cannot start there. npm gave no warning at install for either.
19
+
20
+ Upgrading: on a Node older than 22.13, npm now warns at install that this package needs Node 22.13; install Node 22.13
21
+ or later (24 recommended). Nothing else changes, and no printed size moves.
22
+
23
+ ### Fixed
24
+
25
+ - `sizing` with a stress limit passed over, without a word, any member whose material had no strength or whose section had no section modulus, and then called the lightest section good: a 5 mm bar at 96,000 MPa came back as meeting every limit. Now every choice a group may take is asked, before anything is solved, for a strength (its own material's, or the member's where it gives no material) and a section modulus (`cy` and `cz`, or `Wy` and `Wz`). One without is refused by name: `fea.frame.material` or `fea.frame.section`, with `choice` and `group`.
26
+ - `frame()`, `statics()`, `buckling()` and `modes()` took any key and ignored the ones they did not know, so `load:` for `loads:` gave a frame that did not move, which reads as perfectly stiff. A key that the model, an element, a load, `frame()`'s options or a solve's options do not have is now refused as `fea.frame.input`, naming the nearest key it has (`did you mean "loads"?`, and `suggest` on the error). `sizing` also refuses unknown keys in a load case (`cases`) and in a limit (`limits.stress`, `limits.buckling`, `limits.frequency`, each `limits.deflection`).
27
+
28
+ - `sizing(model, o)` with a stress limit passed over, without a word, every member outside the groups whose material
29
+ has no strength or whose section has no section modulus (so no stress is read in it): a join's rigid link, a
30
+ panel. The result read as if the whole frame had been held to the limit. It now returns `unchecked`, each such
31
+ member once (by the member its pieces came from) with why: `{ member: 'join 3', why: 'no strength and no section
32
+ modulus' }`. It is empty where every member was checked, and where there is no stress limit.
33
+ - `sizing` took an option, `bounds`, that nothing read: it is now refused by name, as any other option it does not
34
+ take.
35
+ - A choice's keys were never checked, so a misspelt `mass` (`mas`) was passed over and the choice weighed from its
36
+ density instead. A choice now takes `name`, `section`, `material`, `mass`, `cost` and `roll`, and may carry
37
+ `profile` and `title` for the caller's own use (`profileChoices` in @rulecad/frames gives both); any other key is
38
+ refused by name (`fea.frame.input`), with the nearest key it takes.
39
+
40
+ Upgrading: a call that passed `bounds`, or a choice with a key other than these, is now refused: take it out (it was
41
+ never read). Nothing else changes, and no printed size moves.
42
+
43
+ ### Added
44
+
45
+ - `statics(model, o)`, `buckling(model, o)` and `modes(model, o)` say in their types that they take the solve's own options (`loads`, `gravity`, `masses`, `samples`, `count`) beside `shear`, as they always did.
46
+ - A frame's material says in its types that it takes `strength` (MPa), which sizing's stress limit reads.
47
+
48
+ Upgrading: a call that passes a key a frame does not use, or misspells one, now gets an error where it got a result; take the key out or spell it as the error says. Sizing with a stress limit now refuses a choice without a strength or section modulus: give each one, or leave the stress limit out. Results that were right before do not change, and no printed size moves.
49
+
50
+ - `sizing(model, o)` takes `ends`: a function of a design (each group's choice by name) that gives the element end
51
+ springs that change with it, `{ [element id]: { a, b } }`. Each end given takes the place of the frame's own for
52
+ that design; the ends it leaves out are kept. A join's stiffness follows the size of the beams it joins, so a
53
+ frame of joined beams can now be sized with each section on its own join's spring rather than the drawn one's.
54
+ It is asked once a design, of the frame alone: the other frames in a model list (the same frame joined other
55
+ ways, its joins rigid) keep their ends. Refused by name (`fea.frame.input`): an `ends` that is not a function, or
56
+ that returns anything but `{ [element id]: { a, b } }` naming elements of the frame.
57
+
58
+ Upgrading: nothing changes for a call without `ends`. No printed size moves.
59
+
60
+ ## 0.3.0: the stress at a part's surface, and a warning where the grid is too coarse to read it
61
+
62
+ ### Added
63
+
64
+ - `analyse()` returns `surface`: each solid cell's von Mises stress at the part's surface, beside `stress`. `stress` is read at each cell's centre, half a cell inside the part, so where the part bends it reads the peak stress low by about one cell's share of the member's depth: 27 to 30% low at the four cells through that the README recommends, 10% at ten. `surface` comes within 2% of beam theory from four cells through, in 2D and 3D. Read a part's strength from `surface`.
65
+ - `surfaceStress(g, u, modulus, nu, density)` gives the same reading for any solution, with each node's value as well as each cell's.
66
+ - `analyse()` returns `findings`: a warning (`fea.coarse-stress`, in the kit's shape `{ level, text, code, values, at, box }`) for each load whose peak stress is in a member under eight cells through, where even the surface reading can be a few percent out.
67
+ - The README's grid-fineness table now says how far each stress reading is out at each number of cells through the depth.
68
+
69
+ ### Changed
70
+
71
+ - The package's tests compare a cantilever's tip with beam theory including shear (Timoshenko's), and no longer check a field (`converged`) that `solve` never returned.
72
+
73
+ Upgrading: nothing changes for existing results. `stress`, `u`, `compliance` and `deflection` keep their values; `surface` and `findings` are new. A check that judges strength from `stress` reads low: move it to `surface` (the kit's own checks move in the next release). No printed size changes.
74
+
5
75
  ## 0.2.14: motor reactions, racking and joins in frame sizing
6
76
  ### Added
7
77
 
package/README.md CHANGED
@@ -18,7 +18,9 @@ load[2 * g.node(100, 5) + 1] = -10; // 10 N down at the right en
18
18
  const r = analyse({ grid: g, density: new Float64Array(1000).fill(1), material: { E: 2680, nu: 0.36 }, thickness: 5, fixed, loads: [load] });
19
19
  r.u[0]; // each node's movement: x at 2n, y at 2n + 1
20
20
  r.compliance[0]; // the load times how far it moved (N·mm): lower is stiffer
21
- r.stress[0]; // each cell's von Mises stress (MPa)
21
+ r.stress[0]; // each cell's von Mises stress (MPa) at its centre: reads bending stress low (see How fine a grid)
22
+ r.surface[0]; // each solid cell's von Mises stress (MPa) at the part's surface: use this for strength
23
+ r.findings; // [{ level, text, code, values, at, box }]: a warning where the peak stress is in a member under 8 cells through
22
24
  r.deflection[0]; // { most, at }: the largest movement of solid material, and where
23
25
  r.thin; // { share, cells }: how much of the part is in members under 4 cells thick (thinShare), where a cell's stiffness is rough
24
26
  ```
@@ -36,9 +38,21 @@ r.thin; // { share, cells }: how much of the part is in members under
36
38
  iterations, where plain `cg` takes 371.
37
39
  - **Solving again:** `solve(...)` returns `again(loads)`, which solves more right-hand sides on the same matrix,
38
40
  reusing its factorisation or preconditioner: an adjoint, for a gradient.
41
+ - **Stress at the surface:** `stress` is read at each cell's centre, half a cell inside the part. In bending the
42
+ stress peaks at the surface, so in a member n cells through the centre stress reads low by about one cell's share:
43
+ 27 to 30% low at 4 cells, 10% at 10. `surface` (and `surfaceStress(g, u, modulus, nu, density)`, which also gives
44
+ each node's value) reads each cell at its corners and averages each stress component over the solid cells round
45
+ each node. At a corner it takes two thirds of what the cell's strains say and one third of the stress that
46
+ reproduces the forces on the cell's corners: square cells bend a little too stiffly, so their strains alone read
47
+ low (6% at 4 cells in 3D), and the second reading errs the other way by about twice as much. A cell under half
48
+ density keeps its centre stress. `analyse` adds a warning to `findings` (code `fea.coarse-stress`) for each load
49
+ whose peak surface stress is in a member under 8 cells through, counted along the directions the stress changes
50
+ fastest there (the shortest of them). At a sharp inside corner, or a curved edge stepped into cells, the peak keeps rising as cells shrink:
51
+ the stress concentrates there beyond what any grid settles on, so read it with care (a real part has a fillet).
39
52
  - **Stress at a point:** `centreStress(h, nu, dim)` is the matrix from a cell's movements to the stress at its centre
40
53
  (for Young's modulus 1), and `vonMises(s, dim, grad)` gives von Mises stress and, optionally, its gradient. Stress
41
- limits in @rulecad/topopt use both.
54
+ limits in @rulecad/topopt use both, so they read each cell at its centre, for the gradient (topopt's README says
55
+ why); the kit's strength checks read `surface`.
42
56
  - **Backends:** the few operations `cg` repeats (the stiffness product, its diagonal, dot products) sit behind a small
43
57
  interface. `jsBackend`, plain JavaScript in 64-bit floats, is the reference; a WebGPU or TensorFlow.js backend
44
58
  implements the same and passes `backend-suite.mjs` in this repository. The matrix is assembled in blocks (a node's
@@ -46,27 +60,33 @@ r.thin; // { share, cells }: how much of the part is in members under
46
60
  symmetric Gauss-Seidel through those blocks.
47
61
  - **Threads:** `import { threadsBackend } from '@rulecad/fea/threads'` (Node only) shares each product over the
48
62
  machine's cores (`FEA_THREADS` to say how many), the rest as `jsBackend`. On a 134,000-unknown grid a product takes
49
- 6.8 ms on seven threads against 19 ms on one, and an optimisation step about a third of the time. It needs Node 22
50
- or later: on Node 20 a product now and then came out wrong when the workers let go of an old operator's shared
51
- memory (a few solves in sixty, more with more threads, none on Node 22 or 24), so there it is plain JavaScript
52
- under another name (its `name` says so).
53
-
54
- Tested against beam theory: a cantilever's tip moves within 1% of `F L³ / 3 E I` in 2D, and within 2% in 3D.
63
+ 6.8 ms on seven threads against 19 ms on one, and an optimisation step about a third of the time. On Node 20, below
64
+ the kit's floor, a product now and then came out wrong when the workers let go of an old operator's shared memory
65
+ (a few solves in sixty, more with more threads, none on Node 22 or 24), so there it is plain JavaScript under
66
+ another name (its `name` says so).
67
+
68
+ Tested against beam theory with shear (Timoshenko's, `F L³ / 3 E I + F L / κ G A`): a cantilever's tip moves within
69
+ 1% of it in 2D at 10 cells through, and within 3% in 3D at 8, never more. The surface stress of a cantilever 4, 8 or
70
+ 10 cells deep is tested within 5% of `M c / I` at mid-span and a beam's depth from the support, in 2D and 3D (it
71
+ comes within 2%); right at a clamped edge the stress concentrates, and beam theory doesn't hold.
55
72
  Multigrid is tested against the direct solver with stiffnesses a millionfold apart.
56
73
 
57
74
  **How fine a grid.** The cells are exact for a part that only stretches, and converge on beam theory with shear
58
75
  (Timoshenko's) as they shrink. What matters is how many cells cross the depth of whatever bends:
59
76
 
60
- | Cells through the depth | Too stiff by |
61
- |---|---|
62
- | 1 | about 32% |
63
- | 2 | about 11% |
64
- | 4 | about 3% |
65
- | 10 | under 1% |
77
+ | Cells through the depth | Too stiff by | `stress` (cell centres) reads low by | `surface` is out by |
78
+ |---|---|---|---|
79
+ | 1 | about 32% | about 94% | about 24% low |
80
+ | 2 | about 11% | about 55% | about 5% low |
81
+ | 4 | about 3% (4% in 3D) | about 27% (29% in 3D) | under 1% |
82
+ | 8 | about 1% | about 13% | about 1% high |
83
+ | 10 | under 1% | about 10% | about 1% high |
84
+ | 20 | under 0.5% | about 5% | under 1% high |
66
85
 
67
- So give every member that bends at least four cells, and check a final shape on cells half the size: if the
68
- stiffness moves by more than a few percent, the grid was too coarse. (Measured on cantilevers and a simply supported
69
- beam, in 2D and 3D.)
86
+ So give every member that bends at least four cells, read its strength from `surface`, not `stress`, and check a
87
+ final shape on cells half the size: if the stiffness or the peak stress moves by more than a few percent, the grid
88
+ was too coarse. (Stiffness measured on cantilevers and a simply supported beam, in 2D and 3D; stress on a cantilever
89
+ 100 × 10 mm at mid-span, against `M c / I`, in 2D, and in 3D where they differ.)
70
90
 
71
91
  ## Frames of beams
72
92
 
@@ -167,7 +187,13 @@ not above 0 (`fea.frame.section`), a material (`fea.frame.material`), an `up` al
167
187
  (`fea.frame.load`, `fea.frame.mass`), nothing held (`fea.frame.unheld`), a mechanism (`fea.frame.mechanism`, with
168
188
  `loose`: the freedoms nothing resists, by node), and buckling with nothing in compression
169
189
  (`fea.frame.compression`). A node that every element end is pinned to has rotations nothing turns: they are held
170
- still and reported as 0, and a moment put on one is refused.
190
+ still and reported as 0, and a moment put on one is refused. A key that the model, an element, a load, `frame()`'s
191
+ options or a solve's options do not have is refused too (`fea.frame.input`, with the nearest key it has as
192
+ `suggest`): `statics({ load: [...] })` for `loads` would otherwise solve the model's own loads, and a model with
193
+ `load` for `loads` would not move at all, which reads as a perfectly stiff frame. `frame()` takes `shear`;
194
+ `statics` takes `loads`, `gravity`, `masses` and `samples`; `buckling` `count`, `loads`, `gravity` and `masses`;
195
+ `modes` `count` and `masses`; and `statics(model, o)`, `buckling(model, o)` and `modes(model, o)` take `shear` as
196
+ well as their solve's.
171
197
 
172
198
  **Units.** mm, N, MPa, rad, N·mm; springs in N/mm and N·mm/rad; masses in kg, densities in g/cm³, gravity in N/kg;
173
199
  frequencies in Hz. In the modal solve stiffness is N/mm and mass kg. A newton is a kg·m/s² and lengths are mm, so
@@ -231,7 +257,7 @@ A braced box of 50 beams (108 unknowns) solves statically in about 3 ms on a lap
231
257
  posts) from a list, so the frame meets its limits for the least mass, or the least cost where every choice gives
232
258
  one. Each design is the same frame with its groups' sections, materials and rolls changed, solved under every load
233
259
  case. A frame of tubes from a layout optimiser and a frame of extrusions from an assembly go through the same solver
234
- and the same limits.
260
+ and the same limits. Any option it does not take is refused by name (`fea.frame.input`).
235
261
 
236
262
  ```js
237
263
  import { sizing } from '@rulecad/fea/frame';
@@ -253,11 +279,12 @@ r.groups[0]; // { name: 'legs', choice: 'bar 10', lighter: null, governs: null
253
279
  | Part | Shape | Notes |
254
280
  |---|---|---|
255
281
  | `groups` | `{ name: [members] }` | Each member an element's `id`, or the member its pieces came from (`of`). Members in no group keep their sections |
256
- | `choices` | `[{ name, section, material, mass, cost, roll }]` | `material` its own (the member's if left out), with `strength` in MPa for the stress limit; `mass` and `cost` per metre (mass from the area and density if left out); `roll` degrees added to the member's roll, the same section turned (a 20 x 40 on edge) |
282
+ | `choices` | `[{ name, section, material, mass, cost, roll }]` | `material` its own (the member's if left out), with `strength` in MPa for the stress limit; `mass` and `cost` per metre (mass from the area and density if left out); `roll` degrees added to the member's roll, the same section turned (a 20 x 40 on edge). A choice may also carry `profile` and `title` for the caller's own use (`profileChoices` gives both); any other key is refused by name (`fea.frame.input`), so a misspelt `mass` is not passed over |
257
283
  | `only` | `{ group: [choice names] }` | The choices a group may take (all of them if left out) |
258
284
  | `fits` | `(design) => [{ where, why }]` | Whether a design's choices go together, given each group's choice by name: what does not (a join between two groups that one's choice cannot make with the other's), empty where it fits. A design that does not fit is never solved |
285
+ | `ends` | `(design) => { [element id]: { a, b } }` | Each design's own end springs, given each group's choice by name: the element ends that change with it (a join's spring follows the size of the beams it joins), each end given in place of the frame's own, the rest kept. Asked once a design, for the frame alone: the others in a model list keep theirs |
259
286
  | `limits.deflection` | `[{ node, limit, along, cases }]` or `[{ member, limit, from, to, along, cases }]` | mm, along `along` (gravity's direction, else the whole movement); a member between two distances from its start; `cases` the load cases it holds in, by label (every case where left out) |
260
- | `limits.stress` | `{ margin }` | Each member's peak `abs(N)/A + abs(My)/Wy + abs(Mz)/Wz`, times the margin, under its material's strength |
287
+ | `limits.stress` | `{ margin }` | Each member's peak `abs(N)/A + abs(My)/Wy + abs(Mz)/Wz`, times the margin, under its material's strength. Every choice a group may take needs a strength (its own material's, or the member's where it has none) and a section modulus (`cy` and `cz`, or `Wy` and `Wz`): one without is refused by name before anything is solved (`fea.frame.material`, `fea.frame.section`), as its stress could not be read and the lightest section would come back as meeting the limit |
261
288
  | `limits.buckling` | `{ factor, euler }` | The whole frame's first buckling factor at least `factor` (members cut into `pieces`, 4); with `euler` (the effective length factor K) each grouped member in compression also carries `factor` times its force under `π² E I / (K L)²`, I the lesser second moment |
262
289
  | `limits.frequency` | `{ Hz }` | The lowest mode at least this |
263
290
  | `cases` | `[{ label, loads, masses, inertia, gravity, limits }]` | Load cases: `loads` and `masses` as `statics` takes them; `inertia` masses whose weight is already in `loads` and which ring in the modes only; `gravity` the case's own (`[0, 0, 0]` for a side push alone); `limits` the limits it is held to by name (every one where left out) |
@@ -280,11 +307,18 @@ with the others' (`fits` lists something), that set it: `governs` is `{ limit: '
280
307
  margin is its own members' nearest check. Where no design meets the limits, `ok` is
281
308
  false and the result is the design that came nearest, with `worst` saying which limit it breaks and by how much.
282
309
 
310
+ **What the stress limit could not check.** A member outside every group keeps its own section and material, and it
311
+ is held to the stress limit too where it can be. One whose material has no strength, or whose section has no section
312
+ modulus (so no stress is read in it: a join's rigid link, a panel), cannot be; it is not refused, but it is named in
313
+ `unchecked`, once each (by the member its pieces came from), with why: `{ member: 'join 3', why: 'no strength and no
314
+ section modulus' }`. It is empty where every member was checked, and where there is no stress limit.
315
+
283
316
  **Designs that fit.** With `fits`, only designs whose choices go together are solved: the steps start from the
284
317
  lightest design that fits, found lightest first. Where none of the list's designs fits, sizing is refused
285
318
  (`fea.frame.fit`, with the first thing that does not fit).
286
319
 
287
- **Limits of sizing.** The geometry stays as drawn: a deeper section moves no node, so joints that hang off a
320
+ **Limits of sizing.** The geometry stays as drawn: a deeper section moves no node (its end springs change only
321
+ through `ends`), so joints that hang off a
288
322
  member's face by its width keep their drawn offsets. The search is over the list given; it does not invent a section.
289
323
 
290
324
 
package/fea.d.mts CHANGED
@@ -60,16 +60,40 @@ export function vonMises(s: ArrayLike<number>, dim: 2 | 3, grad?: Float64Array):
60
60
  * @returns {Float64Array}
61
61
  */
62
62
  export function stress(g: Grid, u: Float64Array, modulus: Float64Array, nu: number): Float64Array;
63
+ /**
64
+ * The stress at the part's surface, where bending puts its peak. `stress` reads each cell at its centre, half a cell
65
+ * inside the surface: in a member n cells through it reads the bending stress low by about one cell's share (27% at 4
66
+ * cells, 10% at 10). This reads each cell's stress at its corners instead, averages each stress component over the
67
+ * solid cells (density 0.5 or more) round each node, and gives von Mises there (patch recovery). Averaging over the
68
+ * cells round a node cancels the false shear a square cell shows at its corners when it bends. At a corner the stress
69
+ * is two thirds the cell's strains read there, and one third the stress field that reproduces the forces on its corners
70
+ * (BALANCED_SHARE): the strains alone read low where the cells bend too stiffly. A 4-cell-deep cantilever's surface
71
+ * stress is within 2% of M c / I, in 2D and 3D, away from the clamped end. At a sharp inside corner, or a curved edge stepped into cells, the
72
+ * peak keeps rising as the cells shrink: the stress there is concentrated beyond what any grid settles on. A node
73
+ * with no solid cell round it is averaged over the cells it has.
74
+ * @param {Grid} g @param {Float64Array} u @param {Float64Array} modulus each cell's Young's modulus (MPa) @param {number} nu
75
+ * @param {ArrayLike<number>} [density] each cell's density, 0 to 1 (all solid if left out)
76
+ * @returns {{ nodes: Float64Array, cells: Float64Array }} nodes: von Mises (MPa) at each node; cells: for a solid cell,
77
+ * the largest of its corners' (its surface stress), and for a cell under 0.5, its centre stress (as `stress`)
78
+ */
79
+ export function surfaceStress(g: Grid, u: Float64Array, modulus: Float64Array, nu: number, density?: ArrayLike<number>): {
80
+ nodes: Float64Array;
81
+ cells: Float64Array;
82
+ };
63
83
  /**
64
84
  * Analyse a part: each cell's density (0 empty to 1 solid; Young's modulus scales with density^penal, never below
65
85
  * E × 1e-9 so empty cells don't leave the matrix singular), supports and loads. In 2D the part is a plate of the given
66
86
  * thickness; in 3D thickness is not used.
67
87
  * @param {{ grid: Grid, density: Float64Array, material: Material, thickness?: number, fixed: Uint8Array, loads: Float64Array[], penal?: number, method?: 'direct' | 'cg' | 'mg', backend?: typeof jsBackend }} o
68
- * @returns {{ u: Float64Array[], compliance: number[], stress: Float64Array[], deflection: { most: number, at: number[] }[] }}
69
- * compliance: f · u per load (N·mm): the work the load does; lower is stiffer. deflection: the largest movement
70
- * of any node in solid material, and where.
88
+ * @returns {{ u: Float64Array[], thin: { share: number, cells: number }, compliance: number[], stress: Float64Array[], surface: Float64Array[], findings: { level: 'warn', text: string, code: string, values: { surface: number, centre: number, cells: number, need: number, load: number }, at: number[], box: { lo: number[], hi: number[] } }[], deflection: { most: number, at: number[] }[] }}
89
+ * compliance: f · u per load (N·mm): the work the load does; lower is stiffer. stress: each cell's von Mises stress
90
+ * (MPa) at its centre, which reads bending stress low by about one cell's share of the member's depth (27% at 4
91
+ * cells through, 10% at 10). surface: each solid cell's von Mises stress at its surface, the largest of its corners'
92
+ * (surfaceStress): within 2% of beam theory at 4 cells through; use it for strength. findings: a warning
93
+ * (fea.coarse-stress) for each load whose peak surface stress is in a member under 8 cells through. deflection: the
94
+ * largest movement of any node in solid material, and where.
71
95
  */
72
- export function analyse({ grid: g, density, material, thickness, fixed, loads, penal, method, backend }: {
96
+ export function analyse({ grid: g, density, material, thickness, fixed, loads, penal, method, backend, }: {
73
97
  grid: Grid;
74
98
  density: Float64Array;
75
99
  material: Material;
@@ -81,8 +105,30 @@ export function analyse({ grid: g, density, material, thickness, fixed, loads, p
81
105
  backend?: typeof jsBackend;
82
106
  }): {
83
107
  u: Float64Array[];
108
+ thin: {
109
+ share: number;
110
+ cells: number;
111
+ };
84
112
  compliance: number[];
85
113
  stress: Float64Array[];
114
+ surface: Float64Array[];
115
+ findings: {
116
+ level: "warn";
117
+ text: string;
118
+ code: string;
119
+ values: {
120
+ surface: number;
121
+ centre: number;
122
+ cells: number;
123
+ need: number;
124
+ load: number;
125
+ };
126
+ at: number[];
127
+ box: {
128
+ lo: number[];
129
+ hi: number[];
130
+ };
131
+ }[];
86
132
  deflection: {
87
133
  most: number;
88
134
  at: number[];