@theerapat-s28/ts-structural-eng-tools 2.2.0 → 3.0.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.
Files changed (120) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/README.md +8 -5
  3. package/dist/core/constants/frame.constant.d.ts +15 -0
  4. package/dist/core/constants/frame.constant.js +16 -1
  5. package/dist/core/constants/frame.constant.js.map +1 -1
  6. package/dist/core/errors/frame-analysis.error.d.ts +1 -0
  7. package/dist/core/errors/frame-analysis.error.js +18 -2
  8. package/dist/core/errors/frame-analysis.error.js.map +1 -1
  9. package/dist/core/index.d.ts +1 -1
  10. package/dist/core/index.js +2 -1
  11. package/dist/core/index.js.map +1 -1
  12. package/dist/esm/core/constants/frame.constant.js +15 -0
  13. package/dist/esm/core/constants/frame.constant.js.map +1 -1
  14. package/dist/esm/core/errors/frame-analysis.error.js +18 -2
  15. package/dist/esm/core/errors/frame-analysis.error.js.map +1 -1
  16. package/dist/esm/core/index.js +1 -1
  17. package/dist/esm/core/index.js.map +1 -1
  18. package/dist/esm/fea/frame/area/distribute-area-loads.js +10 -5
  19. package/dist/esm/fea/frame/area/distribute-area-loads.js.map +1 -1
  20. package/dist/esm/fea/frame/elements/shell/dkq-plate.js +109 -0
  21. package/dist/esm/fea/frame/elements/shell/dkq-plate.js.map +1 -0
  22. package/dist/esm/fea/frame/elements/shell/flat-shell.js +111 -0
  23. package/dist/esm/fea/frame/elements/shell/flat-shell.js.map +1 -0
  24. package/dist/esm/fea/frame/elements/shell/membrane-quad.js +107 -0
  25. package/dist/esm/fea/frame/elements/shell/membrane-quad.js.map +1 -0
  26. package/dist/esm/fea/frame/elements/shell/quad-geometry.js +127 -0
  27. package/dist/esm/fea/frame/elements/shell/quad-geometry.js.map +1 -0
  28. package/dist/esm/fea/frame/elements/shell/rigidity.js +19 -0
  29. package/dist/esm/fea/frame/elements/shell/rigidity.js.map +1 -0
  30. package/dist/esm/fea/frame/elements/shell/shell-axes.js +97 -0
  31. package/dist/esm/fea/frame/elements/shell/shell-axes.js.map +1 -0
  32. package/dist/esm/fea/frame/mesh/expand-model.js +129 -0
  33. package/dist/esm/fea/frame/mesh/expand-model.js.map +1 -0
  34. package/dist/esm/fea/frame/mesh/mesh-shells.js +239 -0
  35. package/dist/esm/fea/frame/mesh/mesh-shells.js.map +1 -0
  36. package/dist/esm/fea/frame/post/envelope.js +38 -1
  37. package/dist/esm/fea/frame/post/envelope.js.map +1 -1
  38. package/dist/esm/fea/frame/post/member-diagram.js +51 -2
  39. package/dist/esm/fea/frame/post/member-diagram.js.map +1 -1
  40. package/dist/esm/fea/frame/post/present-state.js +34 -16
  41. package/dist/esm/fea/frame/post/present-state.js.map +1 -1
  42. package/dist/esm/fea/frame/post/shell-forces.js +111 -0
  43. package/dist/esm/fea/frame/post/shell-forces.js.map +1 -0
  44. package/dist/esm/fea/frame/solver/analyze-frame.js +27 -7
  45. package/dist/esm/fea/frame/solver/analyze-frame.js.map +1 -1
  46. package/dist/esm/fea/frame/solver/auto-restraint.js +58 -10
  47. package/dist/esm/fea/frame/solver/auto-restraint.js.map +1 -1
  48. package/dist/esm/fea/frame/solver/frame-system.js +148 -40
  49. package/dist/esm/fea/frame/solver/frame-system.js.map +1 -1
  50. package/dist/esm/fea/frame/solver/global-assembly.js +5 -3
  51. package/dist/esm/fea/frame/solver/global-assembly.js.map +1 -1
  52. package/dist/esm/fea/frame/solver/load-case-solver.js +111 -11
  53. package/dist/esm/fea/frame/solver/load-case-solver.js.map +1 -1
  54. package/dist/esm/fea/frame/validation/validate-model.js +133 -3
  55. package/dist/esm/fea/frame/validation/validate-model.js.map +1 -1
  56. package/dist/esm/index.js +1 -1
  57. package/dist/esm/index.js.map +1 -1
  58. package/dist/fea/frame/area/distribute-area-loads.d.ts +3 -2
  59. package/dist/fea/frame/area/distribute-area-loads.js +10 -5
  60. package/dist/fea/frame/area/distribute-area-loads.js.map +1 -1
  61. package/dist/fea/frame/elements/shell/dkq-plate.d.ts +50 -0
  62. package/dist/fea/frame/elements/shell/dkq-plate.js +115 -0
  63. package/dist/fea/frame/elements/shell/dkq-plate.js.map +1 -0
  64. package/dist/fea/frame/elements/shell/flat-shell.d.ts +63 -0
  65. package/dist/fea/frame/elements/shell/flat-shell.js +118 -0
  66. package/dist/fea/frame/elements/shell/flat-shell.js.map +1 -0
  67. package/dist/fea/frame/elements/shell/membrane-quad.d.ts +61 -0
  68. package/dist/fea/frame/elements/shell/membrane-quad.js +113 -0
  69. package/dist/fea/frame/elements/shell/membrane-quad.js.map +1 -0
  70. package/dist/fea/frame/elements/shell/quad-geometry.d.ts +71 -0
  71. package/dist/fea/frame/elements/shell/quad-geometry.js +136 -0
  72. package/dist/fea/frame/elements/shell/quad-geometry.js.map +1 -0
  73. package/dist/fea/frame/elements/shell/rigidity.d.ts +14 -0
  74. package/dist/fea/frame/elements/shell/rigidity.js +23 -0
  75. package/dist/fea/frame/elements/shell/rigidity.js.map +1 -0
  76. package/dist/fea/frame/elements/shell/shell-axes.d.ts +43 -0
  77. package/dist/fea/frame/elements/shell/shell-axes.js +102 -0
  78. package/dist/fea/frame/elements/shell/shell-axes.js.map +1 -0
  79. package/dist/fea/frame/index.d.ts +2 -2
  80. package/dist/fea/frame/mesh/expand-model.d.ts +29 -0
  81. package/dist/fea/frame/mesh/expand-model.js +133 -0
  82. package/dist/fea/frame/mesh/expand-model.js.map +1 -0
  83. package/dist/fea/frame/mesh/mesh-shells.d.ts +38 -0
  84. package/dist/fea/frame/mesh/mesh-shells.js +244 -0
  85. package/dist/fea/frame/mesh/mesh-shells.js.map +1 -0
  86. package/dist/fea/frame/post/envelope.js +38 -1
  87. package/dist/fea/frame/post/envelope.js.map +1 -1
  88. package/dist/fea/frame/post/member-diagram.d.ts +21 -1
  89. package/dist/fea/frame/post/member-diagram.js +53 -3
  90. package/dist/fea/frame/post/member-diagram.js.map +1 -1
  91. package/dist/fea/frame/post/present-state.d.ts +3 -2
  92. package/dist/fea/frame/post/present-state.js +33 -15
  93. package/dist/fea/frame/post/present-state.js.map +1 -1
  94. package/dist/fea/frame/post/shell-forces.d.ts +27 -0
  95. package/dist/fea/frame/post/shell-forces.js +116 -0
  96. package/dist/fea/frame/post/shell-forces.js.map +1 -0
  97. package/dist/fea/frame/solver/analyze-frame.d.ts +8 -4
  98. package/dist/fea/frame/solver/analyze-frame.js +27 -7
  99. package/dist/fea/frame/solver/analyze-frame.js.map +1 -1
  100. package/dist/fea/frame/solver/auto-restraint.d.ts +23 -10
  101. package/dist/fea/frame/solver/auto-restraint.js +60 -11
  102. package/dist/fea/frame/solver/auto-restraint.js.map +1 -1
  103. package/dist/fea/frame/solver/frame-system.d.ts +47 -8
  104. package/dist/fea/frame/solver/frame-system.js +146 -38
  105. package/dist/fea/frame/solver/frame-system.js.map +1 -1
  106. package/dist/fea/frame/solver/global-assembly.d.ts +11 -0
  107. package/dist/fea/frame/solver/global-assembly.js +7 -4
  108. package/dist/fea/frame/solver/global-assembly.js.map +1 -1
  109. package/dist/fea/frame/solver/load-case-solver.d.ts +11 -1
  110. package/dist/fea/frame/solver/load-case-solver.js +109 -9
  111. package/dist/fea/frame/solver/load-case-solver.js.map +1 -1
  112. package/dist/fea/frame/types/model.type.d.ts +95 -3
  113. package/dist/fea/frame/types/results.type.d.ts +61 -1
  114. package/dist/fea/frame/validation/validate-model.d.ts +3 -2
  115. package/dist/fea/frame/validation/validate-model.js +133 -3
  116. package/dist/fea/frame/validation/validate-model.js.map +1 -1
  117. package/dist/index.d.ts +2 -2
  118. package/dist/index.js +3 -2
  119. package/dist/index.js.map +1 -1
  120. package/package.json +1 -1
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dkqPlateStiffness = exports.plateRigidity = exports.dkqCurvatureRows = void 0;
4
+ const matrix_1 = require("../../../../utils/matrix");
5
+ const quad_geometry_1 = require("./quad-geometry");
6
+ const rigidity_1 = require("./rigidity");
7
+ const edgeCoefficients = (corners) => [0, 1, 2, 3].map((k) => {
8
+ const [xi, yi] = corners[k];
9
+ const [xj, yj] = corners[(k + 1) % 4];
10
+ const x = xi - xj;
11
+ const y = yi - yj;
12
+ const l2 = x * x + y * y;
13
+ return {
14
+ a: -x / l2,
15
+ b: (0.75 * x * y) / l2,
16
+ c: (0.25 * x * x - 0.5 * y * y) / l2,
17
+ d: -y / l2,
18
+ e: (0.25 * y * y - 0.5 * x * x) / l2,
19
+ };
20
+ });
21
+ /**
22
+ * The rotations of the normal `βx = Hxᵀ·U`, `βy = Hyᵀ·U` (or a derivative of them), given the
23
+ * eight serendipity values `F` (or the same derivative of them): corners in `F[0…3]`, mid-sides
24
+ * of edges 1→2, 2→3, 3→4, 4→1 in `F[4…7]`.
25
+ */
26
+ const rotationRows = (edges, F) => {
27
+ const Hx = new Array(12).fill(0);
28
+ const Hy = new Array(12).fill(0);
29
+ for (let i = 0; i < 4; i++) {
30
+ // m: the edge that starts at corner i; k: the edge that ends at it
31
+ const m = i;
32
+ const k = (i + 3) % 4;
33
+ const Fm = F[4 + m];
34
+ const Fk = F[4 + k];
35
+ const em = edges[m];
36
+ const ek = edges[k];
37
+ Hx[3 * i] = 1.5 * (em.a * Fm - ek.a * Fk);
38
+ Hx[3 * i + 1] = em.b * Fm + ek.b * Fk;
39
+ Hx[3 * i + 2] = F[i] - em.c * Fm - ek.c * Fk;
40
+ Hy[3 * i] = 1.5 * (em.d * Fm - ek.d * Fk);
41
+ Hy[3 * i + 1] = -F[i] + em.e * Fm + ek.e * Fk;
42
+ Hy[3 * i + 2] = -Hx[3 * i + 1];
43
+ }
44
+ return { Hx, Hy };
45
+ };
46
+ /**
47
+ * Curvature–displacement rows of the discrete Kirchhoff quadrilateral (DKQ) at (ξ, η).
48
+ *
49
+ * The rotations of the normal βx, βy (with u = z·βx, v = z·βy) are interpolated over the 8
50
+ * serendipity nodes; the Kirchhoff condition at the corners (βx = −w,x, βy = −w,y), a cubic w
51
+ * along each edge with ∫(w,s + βs) ds = 0, and a normal rotation linear along each edge
52
+ * eliminate the mid-side values (Batoz & Ben Tahar 1982). The geometry map stays bilinear.
53
+ *
54
+ * @param corners - The four corners in the element plane (mm), counter-clockwise
55
+ * @param xi - Natural coordinate ξ
56
+ * @param eta - Natural coordinate η
57
+ */
58
+ const dkqCurvatureRows = (corners, xi, eta) => {
59
+ const jacobian = (0, quad_geometry_1.quadJacobian)(corners, xi, eta);
60
+ const shape = (0, quad_geometry_1.serendipityShape)(xi, eta);
61
+ const edges = edgeCoefficients(corners);
62
+ const dXi = rotationRows(edges, shape.dXi);
63
+ const dEta = rotationRows(edges, shape.dEta);
64
+ const [[j11, j12], [j21, j22]] = jacobian.inverse;
65
+ const B = [[], [], []];
66
+ for (let p = 0; p < 12; p++) {
67
+ const HxX = j11 * dXi.Hx[p] + j12 * dEta.Hx[p];
68
+ const HxY = j21 * dXi.Hx[p] + j22 * dEta.Hx[p];
69
+ const HyX = j11 * dXi.Hy[p] + j12 * dEta.Hy[p];
70
+ const HyY = j21 * dXi.Hy[p] + j22 * dEta.Hy[p];
71
+ B[0].push(HxX);
72
+ B[1].push(HyY);
73
+ B[2].push(HxY + HyX);
74
+ }
75
+ return { B, detJ: jacobian.detJ };
76
+ };
77
+ exports.dkqCurvatureRows = dkqCurvatureRows;
78
+ /**
79
+ * Plate bending rigidity `E·t³/(12(1 − ν²))·[[1, ν, 0], [ν, 1, 0], [0, 0, (1 − ν)/2]]`
80
+ * (N·mm), with the stiffness modifiers applied (see `isotropicRigidity`).
81
+ */
82
+ const plateRigidity = ({ E, nu, t, modifiers }) => (0, rigidity_1.isotropicRigidity)((E * t ** 3) / (12 * (1 - nu * nu)), nu, modifiers);
83
+ exports.plateRigidity = plateRigidity;
84
+ /**
85
+ * Local stiffness of the discrete Kirchhoff quadrilateral (DKQ, Batoz & Ben Tahar 1982), a thin
86
+ * plate element without transverse shear deformation, integrated with 2×2 Gauss points.
87
+ *
88
+ * The DOFs are `[w₁ θx₁ θy₁ … w₄ θx₄ θy₄]`: the deflection along the element normal and the
89
+ * right-handed rotations about the element's x and y axes (θx = w,y, θy = −w,x), at corners listed
90
+ * counter-clockwise about the normal. The quad must be convex (det J > 0 throughout), which
91
+ * validation guarantees.
92
+ *
93
+ * @param corners - The four corners in the element plane (mm)
94
+ * @param properties - E (MPa), ν and thickness t (mm)
95
+ * @returns The symmetric 12×12 stiffness in N and mm (N/mm, N, N·mm/rad); exactly three
96
+ * zero-energy modes, the out-of-plane rigid-body motions
97
+ */
98
+ const dkqPlateStiffness = (corners, properties) => {
99
+ const D = (0, exports.plateRigidity)(properties);
100
+ const k = (0, matrix_1.zeros)(12, 12);
101
+ for (const { xi, eta, weight } of quad_geometry_1.GAUSS_2X2) {
102
+ const { B, detJ } = (0, exports.dkqCurvatureRows)(corners, xi, eta);
103
+ const scale = detJ * weight;
104
+ // Bᵀ·D·B via D·B
105
+ const DB = D.map((row) => B[0].map((_, a) => row[0] * B[0][a] + row[1] * B[1][a] + row[2] * B[2][a]));
106
+ for (let a = 0; a < 12; a++) {
107
+ for (let b = 0; b < 12; b++) {
108
+ k[a][b] += (B[0][a] * DB[0][b] + B[1][a] * DB[1][b] + B[2][a] * DB[2][b]) * scale;
109
+ }
110
+ }
111
+ }
112
+ return k;
113
+ };
114
+ exports.dkqPlateStiffness = dkqPlateStiffness;
115
+ //# sourceMappingURL=dkq-plate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dkq-plate.js","sourceRoot":"","sources":["../../../../../src/fea/frame/elements/shell/dkq-plate.ts"],"names":[],"mappings":";;;AAAA,8CAAuD;AAEvD,mDAAuF;AACvF,yCAAuE;AA2BvE,MAAM,gBAAgB,GAAG,CAAC,OAAwB,EAAsB,EAAE,CACxE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;IACrB,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAA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CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAC3E,CAAC;QACF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC5B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;YACpF,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AApBW,QAAA,iBAAiB,qBAoB5B"}
@@ -0,0 +1,63 @@
1
+ import { type Matrix } from "../../../../utils/matrix";
2
+ import type { Vec2 } from "./quad-geometry";
3
+ import type { RigidityModifiers } from "./rigidity";
4
+ import { type ShellAxes, type Vec3 } from "./shell-axes";
5
+ /** How a shell element carries load: in its plane, in bending, or both. */
6
+ export type ShellType = "shell" | "membrane" | "plate";
7
+ /** Material, thickness and behaviour of a flat shell element. */
8
+ export interface FlatShellProperties {
9
+ E: number;
10
+ nu: number;
11
+ t: number;
12
+ type: ShellType;
13
+ /** Membrane stiffness modifiers f11, f22, f12 along local 1 and 2 (default all 1). */
14
+ membraneModifiers?: RigidityModifiers;
15
+ /** Bending stiffness modifiers m11, m22, m12 along local 1 and 2 (default all 1). */
16
+ bendingModifiers?: RigidityModifiers;
17
+ }
18
+ /** A flat shell element ready for assembly. */
19
+ export interface FlatShellElement {
20
+ axes: ShellAxes;
21
+ /** Per corner, global DOFs at the real node → local DOFs at its projection (6×6). */
22
+ transforms: Matrix[];
23
+ /** 24×24 stiffness over the local DOFs `[u₁ u₂ u₃ r₁ r₂ r₃]` of the projected corners. */
24
+ kLocal: Matrix;
25
+ /** 24×24 stiffness over the global DOFs `[ux uy uz rx ry rz]` of the real corners. */
26
+ kGlobal: Matrix;
27
+ }
28
+ /**
29
+ * Local stiffness of a flat four-node shell: the drilling membrane (`membraneQuadStiffness`) on
30
+ * u₁, u₂, r₃ and the DKQ plate (`dkqPlateStiffness`) on u₃, r₁, r₂ of every corner. For a flat
31
+ * element of uniform section the two do not couple. `"membrane"` and `"plate"` keep only their
32
+ * own part, leaving the other DOFs without stiffness.
33
+ *
34
+ * @param corners - The four corners in the element plane (mm), counter-clockwise
35
+ * @param properties - Material, thickness, type and stiffness modifiers
36
+ * @returns The 24×24 stiffness over `[u₁ u₂ u₃ r₁ r₂ r₃]` per corner (N and mm)
37
+ */
38
+ export declare const flatShellLocalStiffness: (corners: readonly Vec2[], properties: FlatShellProperties) => Matrix;
39
+ /**
40
+ * Per corner, the 6×6 transformation from the global DOFs at the real node to the local DOFs at
41
+ * its projection on the mean plane: the direction cosines λ on translations and rotations, plus
42
+ * a rigid link across the offset h along local 3, `u_proj = u + θ × (−h·e₃)`, which adds
43
+ * `−h·r₂` to u₁ and `+h·r₁` to u₂. For a flat element it is just λ.
44
+ */
45
+ export declare const shellNodeTransforms: ({ lambda, offsets }: ShellAxes) => Matrix[];
46
+ /**
47
+ * Transforms a 24×24 local shell stiffness to global DOFs block by block,
48
+ * `k_ab = T_aᵀ·k_local,ab·T_b`, without forming the 24×24 transformation.
49
+ *
50
+ * @param kLocal - Stiffness over the local DOFs of the projected corners
51
+ * @param transforms - The four corner transformations from `shellNodeTransforms`
52
+ */
53
+ export declare const shellGlobalStiffness: (kLocal: Matrix, transforms: Matrix[]) => Matrix;
54
+ /**
55
+ * A flat four-node shell element (drilling membrane plus DKQ plate) built on the mean plane of
56
+ * its corners, linked rigidly to the real corners when they are not coplanar.
57
+ *
58
+ * @param points - The four corners in global axes (mm), in order around the element; local 3
59
+ * follows the right-hand rule around them
60
+ * @param properties - Material, thickness, type and stiffness modifiers
61
+ * @param angle - Rotation of local 1 and 2 about local 3 in rad (default 0)
62
+ */
63
+ export declare const flatShellElement: (points: readonly Vec3[], properties: FlatShellProperties, angle?: number) => FlatShellElement;
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.flatShellElement = exports.shellGlobalStiffness = exports.shellNodeTransforms = exports.flatShellLocalStiffness = void 0;
4
+ const matrix_1 = require("../../../../utils/matrix");
5
+ const dkq_plate_1 = require("./dkq-plate");
6
+ const membrane_quad_1 = require("./membrane-quad");
7
+ const shell_axes_1 = require("./shell-axes");
8
+ /** Positions of the membrane DOFs [u, v, θz] and the plate DOFs [w, θx, θy] among a node's six. */
9
+ const MEMBRANE_DOFS = [0, 1, 5];
10
+ const PLATE_DOFS = [2, 3, 4];
11
+ /**
12
+ * Local stiffness of a flat four-node shell: the drilling membrane (`membraneQuadStiffness`) on
13
+ * u₁, u₂, r₃ and the DKQ plate (`dkqPlateStiffness`) on u₃, r₁, r₂ of every corner. For a flat
14
+ * element of uniform section the two do not couple. `"membrane"` and `"plate"` keep only their
15
+ * own part, leaving the other DOFs without stiffness.
16
+ *
17
+ * @param corners - The four corners in the element plane (mm), counter-clockwise
18
+ * @param properties - Material, thickness, type and stiffness modifiers
19
+ * @returns The 24×24 stiffness over `[u₁ u₂ u₃ r₁ r₂ r₃]` per corner (N and mm)
20
+ */
21
+ const flatShellLocalStiffness = (corners, properties) => {
22
+ const { E, nu, t, type } = properties;
23
+ const k = (0, matrix_1.zeros)(24, 24);
24
+ const scatter = (part, dofs) => {
25
+ for (let a = 0; a < 12; a++) {
26
+ const i = 6 * Math.floor(a / 3) + dofs[a % 3];
27
+ for (let b = 0; b < 12; b++)
28
+ k[i][6 * Math.floor(b / 3) + dofs[b % 3]] += part[a][b];
29
+ }
30
+ };
31
+ if (type !== "plate") {
32
+ const membrane = { E, nu, t, modifiers: properties.membraneModifiers };
33
+ scatter((0, membrane_quad_1.membraneQuadStiffness)(corners, membrane), MEMBRANE_DOFS);
34
+ }
35
+ if (type !== "membrane") {
36
+ const plate = { E, nu, t, modifiers: properties.bendingModifiers };
37
+ scatter((0, dkq_plate_1.dkqPlateStiffness)(corners, plate), PLATE_DOFS);
38
+ }
39
+ return k;
40
+ };
41
+ exports.flatShellLocalStiffness = flatShellLocalStiffness;
42
+ /**
43
+ * Per corner, the 6×6 transformation from the global DOFs at the real node to the local DOFs at
44
+ * its projection on the mean plane: the direction cosines λ on translations and rotations, plus
45
+ * a rigid link across the offset h along local 3, `u_proj = u + θ × (−h·e₃)`, which adds
46
+ * `−h·r₂` to u₁ and `+h·r₁` to u₂. For a flat element it is just λ.
47
+ */
48
+ const shellNodeTransforms = ({ lambda, offsets }) => offsets.map((h) => {
49
+ const T = (0, matrix_1.zeros)(6, 6);
50
+ for (let i = 0; i < 3; i++) {
51
+ for (let j = 0; j < 3; j++) {
52
+ T[i][j] = lambda[i][j];
53
+ T[3 + i][3 + j] = lambda[i][j];
54
+ }
55
+ }
56
+ for (let j = 0; j < 3; j++) {
57
+ T[0][3 + j] = -h * lambda[1][j];
58
+ T[1][3 + j] = h * lambda[0][j];
59
+ }
60
+ return T;
61
+ });
62
+ exports.shellNodeTransforms = shellNodeTransforms;
63
+ /**
64
+ * Transforms a 24×24 local shell stiffness to global DOFs block by block,
65
+ * `k_ab = T_aᵀ·k_local,ab·T_b`, without forming the 24×24 transformation.
66
+ *
67
+ * @param kLocal - Stiffness over the local DOFs of the projected corners
68
+ * @param transforms - The four corner transformations from `shellNodeTransforms`
69
+ */
70
+ const shellGlobalStiffness = (kLocal, transforms) => {
71
+ const k = (0, matrix_1.zeros)(24, 24);
72
+ for (let a = 0; a < 4; a++) {
73
+ for (let b = 0; b < 4; b++) {
74
+ const Ta = transforms[a];
75
+ const Tb = transforms[b];
76
+ // block·T_b
77
+ const right = (0, matrix_1.zeros)(6, 6);
78
+ for (let i = 0; i < 6; i++) {
79
+ for (let m = 0; m < 6; m++) {
80
+ const v = kLocal[6 * a + i][6 * b + m];
81
+ if (v === 0)
82
+ continue;
83
+ for (let j = 0; j < 6; j++)
84
+ right[i][j] += v * Tb[m][j];
85
+ }
86
+ }
87
+ // T_aᵀ·(block·T_b)
88
+ for (let i = 0; i < 6; i++) {
89
+ for (let m = 0; m < 6; m++) {
90
+ const v = Ta[m][i];
91
+ if (v === 0)
92
+ continue;
93
+ for (let j = 0; j < 6; j++)
94
+ k[6 * a + i][6 * b + j] += v * right[m][j];
95
+ }
96
+ }
97
+ }
98
+ }
99
+ return k;
100
+ };
101
+ exports.shellGlobalStiffness = shellGlobalStiffness;
102
+ /**
103
+ * A flat four-node shell element (drilling membrane plus DKQ plate) built on the mean plane of
104
+ * its corners, linked rigidly to the real corners when they are not coplanar.
105
+ *
106
+ * @param points - The four corners in global axes (mm), in order around the element; local 3
107
+ * follows the right-hand rule around them
108
+ * @param properties - Material, thickness, type and stiffness modifiers
109
+ * @param angle - Rotation of local 1 and 2 about local 3 in rad (default 0)
110
+ */
111
+ const flatShellElement = (points, properties, angle = 0) => {
112
+ const axes = (0, shell_axes_1.shellAxes)(points, angle);
113
+ const transforms = (0, exports.shellNodeTransforms)(axes);
114
+ const kLocal = (0, exports.flatShellLocalStiffness)(axes.corners, properties);
115
+ return { axes, transforms, kLocal, kGlobal: (0, exports.shellGlobalStiffness)(kLocal, transforms) };
116
+ };
117
+ exports.flatShellElement = flatShellElement;
118
+ //# sourceMappingURL=flat-shell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flat-shell.js","sourceRoot":"","sources":["../../../../../src/fea/frame/elements/shell/flat-shell.ts"],"names":[],"mappings":";;;AAAA,8CAAuD;AAEvD,2CAAgD;AAChD,mDAAwD;AAGxD,6CAAoE;AA4BpE,mGAAmG;AACnG,MAAM,aAAa,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAChC,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAE7B;;;;;;;;;GASG;AACI,MAAM,uBAAuB,GAAG,CACrC,OAAwB,EACxB,UAA+B,EACvB,EAAE;IACV,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC;IACtC,MAAM,CAAC,GAAG,IAAA,cAAK,EAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACxB,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,IAAc,EAAE,EAAE;QAC/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5B,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YAC9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE;gBAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvF,CAAC;IACH,CAAC,CAAC;IACF,IAAI,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IAAA,+BAAuB,EAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACjE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,IAAA,4BAAoB,EAAC,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC;AACzF,CAAC,CAAC;AATW,QAAA,gBAAgB,oBAS3B"}
@@ -0,0 +1,61 @@
1
+ import { type Matrix } from "../../../../utils/matrix";
2
+ import { type Vec2 } from "./quad-geometry";
3
+ import { type RigidityModifiers } from "./rigidity";
4
+ /** Material and thickness of a membrane: E in MPa, ν, t in mm. */
5
+ export interface MembraneProperties {
6
+ E: number;
7
+ nu: number;
8
+ t: number;
9
+ /** Stiffness modifiers on the 11, 22 and 12 components of the rigidity (default all 1). */
10
+ modifiers?: RigidityModifiers;
11
+ }
12
+ /** Strain rows of the drilling membrane at one point, over the 12 DOFs `[u₁ v₁ θ₁ … u₄ v₄ θ₄]`. */
13
+ export interface MembraneStrainRows {
14
+ /** Rows of εx, εy and γxy (1/mm, or 1/mm per rad for the θ columns). */
15
+ B: Matrix;
16
+ /** Row of θ − ω, the drilling rotation minus the material rotation ω = ½(v,x − u,y). */
17
+ rotation: number[];
18
+ detJ: number;
19
+ }
20
+ /**
21
+ * Strain–displacement rows of the four-node membrane with drilling rotations at (ξ, η).
22
+ *
23
+ * Displacements are bilinear plus Allman-type edge terms: for the edge from corner i to corner
24
+ * j (counter-clockwise) with mid-side function N_k,
25
+ * `u += N_k·(y_j − y_i)/8·(θ_j − θ_i)` and `v += N_k·(x_i − x_j)/8·(θ_j − θ_i)`, a quadratic
26
+ * bulge along the edge's outward normal that matches the difference of the corner rotations.
27
+ *
28
+ * @param corners - The four corners in the element plane (mm), counter-clockwise
29
+ * @param xi - Natural coordinate ξ
30
+ * @param eta - Natural coordinate η
31
+ */
32
+ export declare const membraneStrainRows: (corners: readonly Vec2[], xi: number, eta: number) => MembraneStrainRows;
33
+ /**
34
+ * Plane-stress membrane rigidity `E·t/(1 − ν²)·[[1, ν, 0], [ν, 1, 0], [0, 0, (1 − ν)/2]]`
35
+ * (N/mm), with the stiffness modifiers applied (see `isotropicRigidity`).
36
+ */
37
+ export declare const membraneRigidity: ({ E, nu, t, modifiers }: MembraneProperties) => Matrix;
38
+ /**
39
+ * Local stiffness of the four-node membrane with drilling rotations (after Ibrahimbegovic,
40
+ * Taylor & Wilson 1990): bilinear displacements plus Allman-type edge terms, and the
41
+ * Hughes–Brezzi penalty `½·γ·t·∫(θ − ω)² dA` with `γ = penaltyRatio · G`.
42
+ *
43
+ * - The strain energy is integrated with 3×3 Gauss points. With 2×2 the edge terms leave a
44
+ * spurious zero-energy mode in rectangular elements (alternating corner rotations whose
45
+ * normal strains vanish exactly at the 2×2 points).
46
+ * - The penalty is integrated at the centre (one point). With 2×2 it over-constrains distorted
47
+ * elements and they lock as γ grows; at the centre it only ties the element's mean rotation
48
+ * to the material, so results hardly change with γ.
49
+ * - Stiffness modifiers scale the rigidity only; the penalty keeps the unmodified G.
50
+ *
51
+ * The DOFs are `[u₁ v₁ θ₁ … u₄ v₄ θ₄]`: in-plane displacements along the element's x and y and
52
+ * the rotation about its normal, right-handed, at corners listed counter-clockwise about that
53
+ * normal. The quad must be convex (det J > 0 throughout), which validation guarantees.
54
+ *
55
+ * @param corners - The four corners in the element plane (mm)
56
+ * @param properties - E (MPa), ν and thickness t (mm)
57
+ * @param penaltyRatio - γ / G (default `DRILLING_PENALTY_RATIO`)
58
+ * @returns The symmetric 12×12 stiffness in N and mm (N/mm, N, N·mm/rad); exactly three
59
+ * zero-energy modes, the in-plane rigid-body motions
60
+ */
61
+ export declare const membraneQuadStiffness: (corners: readonly Vec2[], properties: MembraneProperties, penaltyRatio?: number) => Matrix;
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.membraneQuadStiffness = exports.membraneRigidity = exports.membraneStrainRows = void 0;
4
+ const frame_constant_1 = require("../../../../core/constants/frame.constant");
5
+ const matrix_1 = require("../../../../utils/matrix");
6
+ const quad_geometry_1 = require("./quad-geometry");
7
+ const rigidity_1 = require("./rigidity");
8
+ /**
9
+ * Strain–displacement rows of the four-node membrane with drilling rotations at (ξ, η).
10
+ *
11
+ * Displacements are bilinear plus Allman-type edge terms: for the edge from corner i to corner
12
+ * j (counter-clockwise) with mid-side function N_k,
13
+ * `u += N_k·(y_j − y_i)/8·(θ_j − θ_i)` and `v += N_k·(x_i − x_j)/8·(θ_j − θ_i)`, a quadratic
14
+ * bulge along the edge's outward normal that matches the difference of the corner rotations.
15
+ *
16
+ * @param corners - The four corners in the element plane (mm), counter-clockwise
17
+ * @param xi - Natural coordinate ξ
18
+ * @param eta - Natural coordinate η
19
+ */
20
+ const membraneStrainRows = (corners, xi, eta) => {
21
+ const jacobian = (0, quad_geometry_1.quadJacobian)(corners, xi, eta);
22
+ const corner = (0, quad_geometry_1.bilinearShape)(xi, eta);
23
+ const cornerD = (0, quad_geometry_1.cartesianDerivatives)(jacobian, corner);
24
+ const edgeD = (0, quad_geometry_1.cartesianDerivatives)(jacobian, (0, quad_geometry_1.midsideShape)(xi, eta));
25
+ // u,x u,y v,x v,y over the 12 DOFs
26
+ const ux = new Array(12).fill(0);
27
+ const uy = new Array(12).fill(0);
28
+ const vx = new Array(12).fill(0);
29
+ const vy = new Array(12).fill(0);
30
+ const rotation = new Array(12).fill(0);
31
+ for (let i = 0; i < 4; i++) {
32
+ ux[3 * i] = cornerD.dX[i];
33
+ uy[3 * i] = cornerD.dY[i];
34
+ vx[3 * i + 1] = cornerD.dX[i];
35
+ vy[3 * i + 1] = cornerD.dY[i];
36
+ rotation[3 * i + 2] = corner.N[i];
37
+ }
38
+ for (let k = 0; k < 4; k++) {
39
+ const i = k;
40
+ const j = (k + 1) % 4;
41
+ // (y_j − y_i, x_i − x_j) is the edge length times its outward normal
42
+ const cu = (corners[j][1] - corners[i][1]) / 8;
43
+ const cv = (corners[i][0] - corners[j][0]) / 8;
44
+ for (const [node, sign] of [
45
+ [j, 1],
46
+ [i, -1],
47
+ ]) {
48
+ const theta = 3 * node + 2;
49
+ ux[theta] += sign * cu * edgeD.dX[k];
50
+ uy[theta] += sign * cu * edgeD.dY[k];
51
+ vx[theta] += sign * cv * edgeD.dX[k];
52
+ vy[theta] += sign * cv * edgeD.dY[k];
53
+ }
54
+ }
55
+ for (let a = 0; a < 12; a++)
56
+ rotation[a] -= 0.5 * (vx[a] - uy[a]);
57
+ return { B: [ux, vy, uy.map((v, a) => v + vx[a])], rotation, detJ: jacobian.detJ };
58
+ };
59
+ exports.membraneStrainRows = membraneStrainRows;
60
+ /**
61
+ * Plane-stress membrane rigidity `E·t/(1 − ν²)·[[1, ν, 0], [ν, 1, 0], [0, 0, (1 − ν)/2]]`
62
+ * (N/mm), with the stiffness modifiers applied (see `isotropicRigidity`).
63
+ */
64
+ const membraneRigidity = ({ E, nu, t, modifiers }) => (0, rigidity_1.isotropicRigidity)((E * t) / (1 - nu * nu), nu, modifiers);
65
+ exports.membraneRigidity = membraneRigidity;
66
+ /**
67
+ * Local stiffness of the four-node membrane with drilling rotations (after Ibrahimbegovic,
68
+ * Taylor & Wilson 1990): bilinear displacements plus Allman-type edge terms, and the
69
+ * Hughes–Brezzi penalty `½·γ·t·∫(θ − ω)² dA` with `γ = penaltyRatio · G`.
70
+ *
71
+ * - The strain energy is integrated with 3×3 Gauss points. With 2×2 the edge terms leave a
72
+ * spurious zero-energy mode in rectangular elements (alternating corner rotations whose
73
+ * normal strains vanish exactly at the 2×2 points).
74
+ * - The penalty is integrated at the centre (one point). With 2×2 it over-constrains distorted
75
+ * elements and they lock as γ grows; at the centre it only ties the element's mean rotation
76
+ * to the material, so results hardly change with γ.
77
+ * - Stiffness modifiers scale the rigidity only; the penalty keeps the unmodified G.
78
+ *
79
+ * The DOFs are `[u₁ v₁ θ₁ … u₄ v₄ θ₄]`: in-plane displacements along the element's x and y and
80
+ * the rotation about its normal, right-handed, at corners listed counter-clockwise about that
81
+ * normal. The quad must be convex (det J > 0 throughout), which validation guarantees.
82
+ *
83
+ * @param corners - The four corners in the element plane (mm)
84
+ * @param properties - E (MPa), ν and thickness t (mm)
85
+ * @param penaltyRatio - γ / G (default `DRILLING_PENALTY_RATIO`)
86
+ * @returns The symmetric 12×12 stiffness in N and mm (N/mm, N, N·mm/rad); exactly three
87
+ * zero-energy modes, the in-plane rigid-body motions
88
+ */
89
+ const membraneQuadStiffness = (corners, properties, penaltyRatio = frame_constant_1.DRILLING_PENALTY_RATIO) => {
90
+ const D = (0, exports.membraneRigidity)(properties);
91
+ const k = (0, matrix_1.zeros)(12, 12);
92
+ for (const { xi, eta, weight } of quad_geometry_1.GAUSS_3X3) {
93
+ const { B, detJ } = (0, exports.membraneStrainRows)(corners, xi, eta);
94
+ const scale = detJ * weight;
95
+ // Bᵀ·D·B via D·B
96
+ const DB = D.map((row) => B[0].map((_, a) => row[0] * B[0][a] + row[1] * B[1][a] + row[2] * B[2][a]));
97
+ for (let a = 0; a < 12; a++) {
98
+ for (let b = 0; b < 12; b++) {
99
+ k[a][b] += (B[0][a] * DB[0][b] + B[1][a] * DB[1][b] + B[2][a] * DB[2][b]) * scale;
100
+ }
101
+ }
102
+ }
103
+ // one-point rule at the centre: weight 4
104
+ const { rotation, detJ } = (0, exports.membraneStrainRows)(corners, 0, 0);
105
+ const penalty = ((penaltyRatio * properties.E * properties.t) / (2 * (1 + properties.nu))) * detJ * 4;
106
+ for (let a = 0; a < 12; a++) {
107
+ for (let b = 0; b < 12; b++)
108
+ k[a][b] += penalty * rotation[a] * rotation[b];
109
+ }
110
+ return k;
111
+ };
112
+ exports.membraneQuadStiffness = membraneQuadStiffness;
113
+ //# sourceMappingURL=membrane-quad.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"membrane-quad.js","sourceRoot":"","sources":["../../../../../src/fea/frame/elements/shell/membrane-quad.ts"],"names":[],"mappings":";;;AAAA,uEAA4E;AAC5E,8CAAuD;AAEvD,mDAOyB;AACzB,yCA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C;QACH,CAAC;IACH,CAAC;IAED,yCAAyC;IACzC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAA,0BAAkB,EAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7D,MAAM,OAAO,GACX,CAAC,CAAC,YAAY,GAAG,UAAU,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;IACxF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE;YAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AA7BW,QAAA,qBAAqB,yBA6BhC"}
@@ -0,0 +1,71 @@
1
+ /** A point in an element's own plane: local x, y in mm. */
2
+ export type Vec2 = [number, number];
3
+ /**
4
+ * 2×2 Gauss rule over the parent square −1 ≤ ξ, η ≤ 1: points (±1/√3, ±1/√3), weight 1 each.
5
+ * Exact for polynomials up to cubic in each of ξ and η.
6
+ */
7
+ export declare const GAUSS_2X2: readonly {
8
+ xi: number;
9
+ eta: number;
10
+ weight: number;
11
+ }[];
12
+ /**
13
+ * 3×3 Gauss rule over the parent square: points 0 and ±√0.6 in each direction, weights the
14
+ * products of 5/9, 8/9, 5/9. Exact for polynomials up to quintic in each of ξ and η.
15
+ */
16
+ export declare const GAUSS_3X3: readonly {
17
+ xi: number;
18
+ eta: number;
19
+ weight: number;
20
+ }[];
21
+ /** Shape-function values and their derivatives with respect to ξ and η at one point. */
22
+ export interface ShapeValues {
23
+ N: number[];
24
+ dXi: number[];
25
+ dEta: number[];
26
+ }
27
+ /** Bilinear corner functions `Nᵢ = ¼(1 + ξᵢξ)(1 + ηᵢη)`, i = 1…4. */
28
+ export declare const bilinearShape: (xi: number, eta: number) => ShapeValues;
29
+ /**
30
+ * Mid-side functions N₅…N₈, one per edge 1→2, 2→3, 3→4, 4→1 (index k = edge from corner k to
31
+ * corner k + 1): 1 at the edge's midpoint and 0 at every corner and every other midpoint.
32
+ */
33
+ export declare const midsideShape: (xi: number, eta: number) => ShapeValues;
34
+ /**
35
+ * 8-node serendipity functions: the corner functions
36
+ * `Nᵢ = ¼(1 + ξᵢξ)(1 + ηᵢη)(ξᵢξ + ηᵢη − 1)`, i = 1…4, followed by the mid-side functions
37
+ * N₅…N₈ of `midsideShape`. Each is 1 at its own node and 0 at the other seven.
38
+ */
39
+ export declare const serendipityShape: (xi: number, eta: number) => ShapeValues;
40
+ /** The bilinear map's Jacobian at one point, as needed to turn ξ, η derivatives into x, y ones. */
41
+ export interface QuadJacobian {
42
+ detJ: number;
43
+ inverse: [Vec2, Vec2];
44
+ }
45
+ /**
46
+ * Jacobian of the bilinear map from the parent square to a quadrilateral.
47
+ *
48
+ * @param corners - The four corners in the element plane (mm), counter-clockwise
49
+ * @param xi - Natural coordinate ξ
50
+ * @param eta - Natural coordinate η
51
+ * @returns `det J` and `J⁻¹`; `det J > 0` everywhere for a convex, counter-clockwise quad
52
+ */
53
+ export declare const quadJacobian: (corners: readonly Vec2[], xi: number, eta: number) => QuadJacobian;
54
+ /**
55
+ * Converts ξ, η derivatives of shape functions to x, y derivatives: `[N,x; N,y] = J⁻¹·[N,ξ; N,η]`.
56
+ *
57
+ * @returns `dX[i]` and `dY[i]` for every function i of `shape`
58
+ */
59
+ export declare const cartesianDerivatives: ({ inverse }: QuadJacobian, shape: Pick<ShapeValues, "dXi" | "dEta">) => {
60
+ dX: number[];
61
+ dY: number[];
62
+ };
63
+ /**
64
+ * Integrals `∫ Nᵢ dA` of the bilinear corner functions over a quad (2×2 Gauss, exact): the
65
+ * share of a uniform surface load each corner takes. They sum to the quad's area; each is
66
+ * A/4 for a parallelogram.
67
+ *
68
+ * @param corners - The four corners in the element plane (mm), counter-clockwise
69
+ * @returns Four areas in mm²
70
+ */
71
+ export declare const cornerAreas: (corners: readonly Vec2[]) => number[];