@theerapat-s28/ts-structural-eng-tools 2.3.0 → 3.1.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 (115) hide show
  1. package/CHANGELOG.md +80 -1
  2. package/README.md +35 -11
  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/elements/shell/dkq-plate.js +109 -0
  19. package/dist/esm/fea/frame/elements/shell/dkq-plate.js.map +1 -0
  20. package/dist/esm/fea/frame/elements/shell/flat-shell.js +111 -0
  21. package/dist/esm/fea/frame/elements/shell/flat-shell.js.map +1 -0
  22. package/dist/esm/fea/frame/elements/shell/membrane-quad.js +107 -0
  23. package/dist/esm/fea/frame/elements/shell/membrane-quad.js.map +1 -0
  24. package/dist/esm/fea/frame/elements/shell/quad-geometry.js +127 -0
  25. package/dist/esm/fea/frame/elements/shell/quad-geometry.js.map +1 -0
  26. package/dist/esm/fea/frame/elements/shell/rigidity.js +19 -0
  27. package/dist/esm/fea/frame/elements/shell/rigidity.js.map +1 -0
  28. package/dist/esm/fea/frame/elements/shell/shell-axes.js +97 -0
  29. package/dist/esm/fea/frame/elements/shell/shell-axes.js.map +1 -0
  30. package/dist/esm/fea/frame/mesh/expand-model.js +129 -0
  31. package/dist/esm/fea/frame/mesh/expand-model.js.map +1 -0
  32. package/dist/esm/fea/frame/mesh/mesh-shells.js +239 -0
  33. package/dist/esm/fea/frame/mesh/mesh-shells.js.map +1 -0
  34. package/dist/esm/fea/frame/post/envelope.js +38 -1
  35. package/dist/esm/fea/frame/post/envelope.js.map +1 -1
  36. package/dist/esm/fea/frame/post/member-diagram.js +51 -2
  37. package/dist/esm/fea/frame/post/member-diagram.js.map +1 -1
  38. package/dist/esm/fea/frame/post/present-state.js +34 -16
  39. package/dist/esm/fea/frame/post/present-state.js.map +1 -1
  40. package/dist/esm/fea/frame/post/shell-forces.js +111 -0
  41. package/dist/esm/fea/frame/post/shell-forces.js.map +1 -0
  42. package/dist/esm/fea/frame/solver/analyze-frame.js +27 -7
  43. package/dist/esm/fea/frame/solver/analyze-frame.js.map +1 -1
  44. package/dist/esm/fea/frame/solver/auto-restraint.js +58 -10
  45. package/dist/esm/fea/frame/solver/auto-restraint.js.map +1 -1
  46. package/dist/esm/fea/frame/solver/frame-system.js +148 -40
  47. package/dist/esm/fea/frame/solver/frame-system.js.map +1 -1
  48. package/dist/esm/fea/frame/solver/global-assembly.js +5 -3
  49. package/dist/esm/fea/frame/solver/global-assembly.js.map +1 -1
  50. package/dist/esm/fea/frame/solver/load-case-solver.js +102 -9
  51. package/dist/esm/fea/frame/solver/load-case-solver.js.map +1 -1
  52. package/dist/esm/fea/frame/validation/validate-model.js +120 -3
  53. package/dist/esm/fea/frame/validation/validate-model.js.map +1 -1
  54. package/dist/esm/index.js +1 -1
  55. package/dist/esm/index.js.map +1 -1
  56. package/dist/fea/frame/elements/shell/dkq-plate.d.ts +50 -0
  57. package/dist/fea/frame/elements/shell/dkq-plate.js +115 -0
  58. package/dist/fea/frame/elements/shell/dkq-plate.js.map +1 -0
  59. package/dist/fea/frame/elements/shell/flat-shell.d.ts +63 -0
  60. package/dist/fea/frame/elements/shell/flat-shell.js +118 -0
  61. package/dist/fea/frame/elements/shell/flat-shell.js.map +1 -0
  62. package/dist/fea/frame/elements/shell/membrane-quad.d.ts +61 -0
  63. package/dist/fea/frame/elements/shell/membrane-quad.js +113 -0
  64. package/dist/fea/frame/elements/shell/membrane-quad.js.map +1 -0
  65. package/dist/fea/frame/elements/shell/quad-geometry.d.ts +71 -0
  66. package/dist/fea/frame/elements/shell/quad-geometry.js +136 -0
  67. package/dist/fea/frame/elements/shell/quad-geometry.js.map +1 -0
  68. package/dist/fea/frame/elements/shell/rigidity.d.ts +14 -0
  69. package/dist/fea/frame/elements/shell/rigidity.js +23 -0
  70. package/dist/fea/frame/elements/shell/rigidity.js.map +1 -0
  71. package/dist/fea/frame/elements/shell/shell-axes.d.ts +43 -0
  72. package/dist/fea/frame/elements/shell/shell-axes.js +102 -0
  73. package/dist/fea/frame/elements/shell/shell-axes.js.map +1 -0
  74. package/dist/fea/frame/index.d.ts +2 -2
  75. package/dist/fea/frame/mesh/expand-model.d.ts +29 -0
  76. package/dist/fea/frame/mesh/expand-model.js +133 -0
  77. package/dist/fea/frame/mesh/expand-model.js.map +1 -0
  78. package/dist/fea/frame/mesh/mesh-shells.d.ts +38 -0
  79. package/dist/fea/frame/mesh/mesh-shells.js +244 -0
  80. package/dist/fea/frame/mesh/mesh-shells.js.map +1 -0
  81. package/dist/fea/frame/post/envelope.js +38 -1
  82. package/dist/fea/frame/post/envelope.js.map +1 -1
  83. package/dist/fea/frame/post/member-diagram.d.ts +21 -1
  84. package/dist/fea/frame/post/member-diagram.js +53 -3
  85. package/dist/fea/frame/post/member-diagram.js.map +1 -1
  86. package/dist/fea/frame/post/present-state.d.ts +3 -2
  87. package/dist/fea/frame/post/present-state.js +33 -15
  88. package/dist/fea/frame/post/present-state.js.map +1 -1
  89. package/dist/fea/frame/post/shell-forces.d.ts +27 -0
  90. package/dist/fea/frame/post/shell-forces.js +116 -0
  91. package/dist/fea/frame/post/shell-forces.js.map +1 -0
  92. package/dist/fea/frame/solver/analyze-frame.d.ts +8 -4
  93. package/dist/fea/frame/solver/analyze-frame.js +27 -7
  94. package/dist/fea/frame/solver/analyze-frame.js.map +1 -1
  95. package/dist/fea/frame/solver/auto-restraint.d.ts +23 -10
  96. package/dist/fea/frame/solver/auto-restraint.js +60 -11
  97. package/dist/fea/frame/solver/auto-restraint.js.map +1 -1
  98. package/dist/fea/frame/solver/frame-system.d.ts +47 -8
  99. package/dist/fea/frame/solver/frame-system.js +146 -38
  100. package/dist/fea/frame/solver/frame-system.js.map +1 -1
  101. package/dist/fea/frame/solver/global-assembly.d.ts +11 -0
  102. package/dist/fea/frame/solver/global-assembly.js +7 -4
  103. package/dist/fea/frame/solver/global-assembly.js.map +1 -1
  104. package/dist/fea/frame/solver/load-case-solver.d.ts +11 -1
  105. package/dist/fea/frame/solver/load-case-solver.js +100 -7
  106. package/dist/fea/frame/solver/load-case-solver.js.map +1 -1
  107. package/dist/fea/frame/types/model.type.d.ts +82 -4
  108. package/dist/fea/frame/types/results.type.d.ts +61 -1
  109. package/dist/fea/frame/validation/validate-model.d.ts +3 -2
  110. package/dist/fea/frame/validation/validate-model.js +120 -3
  111. package/dist/fea/frame/validation/validate-model.js.map +1 -1
  112. package/dist/index.d.ts +2 -2
  113. package/dist/index.js +3 -2
  114. package/dist/index.js.map +1 -1
  115. package/package.json +1 -1
@@ -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,C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AAoB,wBA0B/B;AAEF;;;;;;;;GAQG;AACI,MAAM,gBAAgB,GAAG,CAC9B,MAAuB,EACvB,UAA+B,EAC/B,KAAK,GAAG,CAAC,EACS,EAAE;IACpB,MAAM,IAAI,GAAG,IAAA,sBAAS,EAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACtC,MAAM,UAAU,GAAG,IAAA,2BAAmB,EAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,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,yCAAuE;AAoBvE;;;;;;;;;;;GAWG;AACI,MAAM,kBAAkB,GAAG,CAChC,OAAwB,EACxB,EAAU,EACV,GAAW,EACS,EAAE;IACtB,MAAM,QAAQ,GAAG,IAAA,4BAAY,EAAC,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;IAChD,MAAM,MAAM,GAAG,IAAA,6BAAa,EAAC,EAAE,EAAE,GAAG,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,IAAA,oCAAoB,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACvD,MAAM,KAAK,GAAG,IAAA,oCAAoB,EAAC,QAAQ,EAAE,IAAA,4BAAY,EAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;IAEpE,sCAAsC;IACtC,MAAM,EAAE,GAAG,IAAI,KAAK,CAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACzC,MAAM,EAAE,GAAG,IAAI,KAAK,CAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACzC,MAAM,EAAE,GAAG,IAAI,KAAK,CAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACzC,MAAM,EAAE,GAAG,IAAI,KAAK,CAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACzC,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC/C,KAAK,IAAI,CAAC,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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;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[];
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cornerAreas = exports.cartesianDerivatives = exports.quadJacobian = exports.serendipityShape = exports.midsideShape = exports.bilinearShape = exports.GAUSS_3X3 = exports.GAUSS_2X2 = void 0;
4
+ /** Natural coordinates (ξ, η) of the four corners, counter-clockwise about the normal. */
5
+ const CORNER_XI = [-1, 1, 1, -1];
6
+ const CORNER_ETA = [-1, -1, 1, 1];
7
+ const GAUSS = 1 / Math.sqrt(3);
8
+ /**
9
+ * 2×2 Gauss rule over the parent square −1 ≤ ξ, η ≤ 1: points (±1/√3, ±1/√3), weight 1 each.
10
+ * Exact for polynomials up to cubic in each of ξ and η.
11
+ */
12
+ exports.GAUSS_2X2 = [
13
+ { xi: -GAUSS, eta: -GAUSS, weight: 1 },
14
+ { xi: GAUSS, eta: -GAUSS, weight: 1 },
15
+ { xi: GAUSS, eta: GAUSS, weight: 1 },
16
+ { xi: -GAUSS, eta: GAUSS, weight: 1 },
17
+ ];
18
+ const GAUSS_3 = Math.sqrt(0.6);
19
+ const GAUSS_3_POINTS = [
20
+ { at: -GAUSS_3, weight: 5 / 9 },
21
+ { at: 0, weight: 8 / 9 },
22
+ { at: GAUSS_3, weight: 5 / 9 },
23
+ ];
24
+ /**
25
+ * 3×3 Gauss rule over the parent square: points 0 and ±√0.6 in each direction, weights the
26
+ * products of 5/9, 8/9, 5/9. Exact for polynomials up to quintic in each of ξ and η.
27
+ */
28
+ exports.GAUSS_3X3 = GAUSS_3_POINTS.flatMap((p) => GAUSS_3_POINTS.map((q) => ({ xi: p.at, eta: q.at, weight: p.weight * q.weight })));
29
+ /** Bilinear corner functions `Nᵢ = ¼(1 + ξᵢξ)(1 + ηᵢη)`, i = 1…4. */
30
+ const bilinearShape = (xi, eta) => {
31
+ const N = [];
32
+ const dXi = [];
33
+ const dEta = [];
34
+ for (let i = 0; i < 4; i++) {
35
+ const a = CORNER_XI[i];
36
+ const b = CORNER_ETA[i];
37
+ N.push(0.25 * (1 + a * xi) * (1 + b * eta));
38
+ dXi.push(0.25 * a * (1 + b * eta));
39
+ dEta.push(0.25 * b * (1 + a * xi));
40
+ }
41
+ return { N, dXi, dEta };
42
+ };
43
+ exports.bilinearShape = bilinearShape;
44
+ /**
45
+ * Mid-side functions N₅…N₈, one per edge 1→2, 2→3, 3→4, 4→1 (index k = edge from corner k to
46
+ * corner k + 1): 1 at the edge's midpoint and 0 at every corner and every other midpoint.
47
+ */
48
+ const midsideShape = (xi, eta) => ({
49
+ N: [
50
+ 0.5 * (1 - xi * xi) * (1 - eta),
51
+ 0.5 * (1 + xi) * (1 - eta * eta),
52
+ 0.5 * (1 - xi * xi) * (1 + eta),
53
+ 0.5 * (1 - xi) * (1 - eta * eta),
54
+ ],
55
+ dXi: [-xi * (1 - eta), 0.5 * (1 - eta * eta), -xi * (1 + eta), -0.5 * (1 - eta * eta)],
56
+ dEta: [-0.5 * (1 - xi * xi), -(1 + xi) * eta, 0.5 * (1 - xi * xi), -(1 - xi) * eta],
57
+ });
58
+ exports.midsideShape = midsideShape;
59
+ /**
60
+ * 8-node serendipity functions: the corner functions
61
+ * `Nᵢ = ¼(1 + ξᵢξ)(1 + ηᵢη)(ξᵢξ + ηᵢη − 1)`, i = 1…4, followed by the mid-side functions
62
+ * N₅…N₈ of `midsideShape`. Each is 1 at its own node and 0 at the other seven.
63
+ */
64
+ const serendipityShape = (xi, eta) => {
65
+ const N = [];
66
+ const dXi = [];
67
+ const dEta = [];
68
+ for (let i = 0; i < 4; i++) {
69
+ const a = CORNER_XI[i];
70
+ const b = CORNER_ETA[i];
71
+ N.push(0.25 * (1 + a * xi) * (1 + b * eta) * (a * xi + b * eta - 1));
72
+ dXi.push(0.25 * a * (1 + b * eta) * (2 * a * xi + b * eta));
73
+ dEta.push(0.25 * b * (1 + a * xi) * (a * xi + 2 * b * eta));
74
+ }
75
+ const mid = (0, exports.midsideShape)(xi, eta);
76
+ return { N: [...N, ...mid.N], dXi: [...dXi, ...mid.dXi], dEta: [...dEta, ...mid.dEta] };
77
+ };
78
+ exports.serendipityShape = serendipityShape;
79
+ /**
80
+ * Jacobian of the bilinear map from the parent square to a quadrilateral.
81
+ *
82
+ * @param corners - The four corners in the element plane (mm), counter-clockwise
83
+ * @param xi - Natural coordinate ξ
84
+ * @param eta - Natural coordinate η
85
+ * @returns `det J` and `J⁻¹`; `det J > 0` everywhere for a convex, counter-clockwise quad
86
+ */
87
+ const quadJacobian = (corners, xi, eta) => {
88
+ const { dXi, dEta } = (0, exports.bilinearShape)(xi, eta);
89
+ let xXi = 0;
90
+ let yXi = 0;
91
+ let xEta = 0;
92
+ let yEta = 0;
93
+ for (let i = 0; i < 4; i++) {
94
+ xXi += dXi[i] * corners[i][0];
95
+ yXi += dXi[i] * corners[i][1];
96
+ xEta += dEta[i] * corners[i][0];
97
+ yEta += dEta[i] * corners[i][1];
98
+ }
99
+ const detJ = xXi * yEta - yXi * xEta;
100
+ return {
101
+ detJ,
102
+ inverse: [
103
+ [yEta / detJ, -yXi / detJ],
104
+ [-xEta / detJ, xXi / detJ],
105
+ ],
106
+ };
107
+ };
108
+ exports.quadJacobian = quadJacobian;
109
+ /**
110
+ * Converts ξ, η derivatives of shape functions to x, y derivatives: `[N,x; N,y] = J⁻¹·[N,ξ; N,η]`.
111
+ *
112
+ * @returns `dX[i]` and `dY[i]` for every function i of `shape`
113
+ */
114
+ const cartesianDerivatives = ({ inverse }, shape) => ({
115
+ dX: shape.dXi.map((d, i) => inverse[0][0] * d + inverse[0][1] * shape.dEta[i]),
116
+ dY: shape.dXi.map((d, i) => inverse[1][0] * d + inverse[1][1] * shape.dEta[i]),
117
+ });
118
+ exports.cartesianDerivatives = cartesianDerivatives;
119
+ /**
120
+ * Integrals `∫ Nᵢ dA` of the bilinear corner functions over a quad (2×2 Gauss, exact): the
121
+ * share of a uniform surface load each corner takes. They sum to the quad's area; each is
122
+ * A/4 for a parallelogram.
123
+ *
124
+ * @param corners - The four corners in the element plane (mm), counter-clockwise
125
+ * @returns Four areas in mm²
126
+ */
127
+ const cornerAreas = (corners) => {
128
+ const areas = [0, 0, 0, 0];
129
+ for (const { xi, eta, weight } of exports.GAUSS_2X2) {
130
+ const { detJ } = (0, exports.quadJacobian)(corners, xi, eta);
131
+ (0, exports.bilinearShape)(xi, eta).N.forEach((n, i) => (areas[i] += n * detJ * weight));
132
+ }
133
+ return areas;
134
+ };
135
+ exports.cornerAreas = cornerAreas;
136
+ //# sourceMappingURL=quad-geometry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quad-geometry.js","sourceRoot":"","sources":["../../../../../src/fea/frame/elements/shell/quad-geometry.ts"],"names":[],"mappings":";;;AAGA,0FAA0F;AAC1F,MAAM,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAU,CAAC;AAC1C,MAAM,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU,CAAC;AAE3C,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAA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,EAAE;IAChE,MAAM,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3B,KAAK,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,iBAAS,EAAE,CAAC;QAC5C,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,oBAAY,EAAC,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;QAChD,IAAA,qBAAa,EAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAPW,QAAA,WAAW,eAOtB"}
@@ -0,0 +1,14 @@
1
+ import type { Matrix } from "../../../../utils/matrix";
2
+ /** Stiffness modifiers on the components 11, 22 and 12 of a rigidity matrix (1 = unmodified). */
3
+ export type RigidityModifiers = readonly [number, number, number];
4
+ /**
5
+ * Isotropic rigidity `c·[[1, ν, 0], [ν, 1, 0], [0, 0, (1 − ν)/2]]` with stiffness modifiers applied
6
+ * as `S·D·S`, `S = diag(√f₁₁, √f₂₂, √f₁₂)`: D₁₁, D₂₂ and D₃₃ scale by their own modifier and the
7
+ * coupling D₁₂ by √(f₁₁·f₂₂), so D stays symmetric and positive definite and equal modifiers
8
+ * scale it uniformly.
9
+ *
10
+ * @param c - E·t/(1 − ν²) for a membrane, E·t³/(12(1 − ν²)) for a plate
11
+ * @param nu - Poisson's ratio
12
+ * @param modifiers - Positive modifiers [f₁₁, f₂₂, f₁₂] (default all 1)
13
+ */
14
+ export declare const isotropicRigidity: (c: number, nu: number, modifiers?: RigidityModifiers) => Matrix;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isotropicRigidity = void 0;
4
+ /**
5
+ * Isotropic rigidity `c·[[1, ν, 0], [ν, 1, 0], [0, 0, (1 − ν)/2]]` with stiffness modifiers applied
6
+ * as `S·D·S`, `S = diag(√f₁₁, √f₂₂, √f₁₂)`: D₁₁, D₂₂ and D₃₃ scale by their own modifier and the
7
+ * coupling D₁₂ by √(f₁₁·f₂₂), so D stays symmetric and positive definite and equal modifiers
8
+ * scale it uniformly.
9
+ *
10
+ * @param c - E·t/(1 − ν²) for a membrane, E·t³/(12(1 − ν²)) for a plate
11
+ * @param nu - Poisson's ratio
12
+ * @param modifiers - Positive modifiers [f₁₁, f₂₂, f₁₂] (default all 1)
13
+ */
14
+ const isotropicRigidity = (c, nu, modifiers = [1, 1, 1]) => {
15
+ const [f11, f22, f12] = modifiers;
16
+ return [
17
+ [c * f11, c * nu * Math.sqrt(f11 * f22), 0],
18
+ [c * nu * Math.sqrt(f11 * f22), c * f22, 0],
19
+ [0, 0, ((c * (1 - nu)) / 2) * f12],
20
+ ];
21
+ };
22
+ exports.isotropicRigidity = isotropicRigidity;
23
+ //# sourceMappingURL=rigidity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rigidity.js","sourceRoot":"","sources":["../../../../../src/fea/frame/elements/shell/rigidity.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;GASG;AACI,MAAM,iBAAiB,GAAG,CAC/B,CAAS,EACT,EAAU,EACV,YAA+B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAChC,EAAE;IACV,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC;IAClC,OAAO;QACL,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC;QAC3C,CAAC,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;QAC3C,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;KACnC,CAAC;AACJ,CAAC,CAAC;AAXW,QAAA,iBAAiB,qBAW5B"}
@@ -0,0 +1,43 @@
1
+ import type { Matrix } from "../../../../utils/matrix";
2
+ import { type Vec2 } from "./quad-geometry";
3
+ /** A point or vector in global axes: X, Y, Z in mm. */
4
+ export type Vec3 = [number, number, number];
5
+ /** A four-node shell element's local axes and its corners on the mean plane. */
6
+ export interface ShellAxes {
7
+ /** Direction cosines, rows = local 1, 2, 3 in global components. */
8
+ lambda: Matrix;
9
+ /** Centroid of the four corners (mm), the origin of the local coordinates. */
10
+ origin: Vec3;
11
+ /** Corners projected onto the mean plane, as local 1–2 coordinates (mm). */
12
+ corners: Vec2[];
13
+ /**
14
+ * Distance of each corner from the mean plane along local 3 (mm): +h, −h, +h, −h, with
15
+ * h = ¼(x₁ − x₂ + x₃ − x₄)·n. All zero for a flat element.
16
+ */
17
+ offsets: number[];
18
+ }
19
+ /**
20
+ * Local axes of a four-node shell element, ETABS-style, and its corners on the mean plane.
21
+ *
22
+ * - Local 3 is the unit normal `n ∥ d₁ × d₂` of the diagonals `d₁ = x₃ − x₁`, `d₂ = x₄ − x₂`: the
23
+ * right-hand rule around the nodes, as for null areas (for four nodes Newell's vector area is
24
+ * exactly `½ d₁ × d₂`).
25
+ * - Non-horizontal element: local 2 is +Z projected onto the plane (upward on a wall) and
26
+ * local 1 = 2 × 3 is horizontal.
27
+ * - Horizontal element (the normal's horizontal part below the vertical-member tolerance):
28
+ * local 1 = +X and local 2 = 3 × 1, so local 2 = +Y when local 3 = +Z.
29
+ * - `angle` then rotates local 1 and 2 about local 3 by the right-hand rule.
30
+ *
31
+ * The mean plane passes through the centroid with normal n; a warped element's corners lie
32
+ * alternately h above and below it.
33
+ *
34
+ * @param points - The four corners in global axes (mm), in order around the element
35
+ * @param angle - Rotation of local 1 and 2 about local 3 in rad (default 0)
36
+ */
37
+ export declare const shellAxes: (points: readonly Vec3[], angle?: number) => ShellAxes;
38
+ /**
39
+ * Whether four corners make a valid shell element: no repeated corner, a non-degenerate
40
+ * convex quadrilateral in order around it (det J > 0 at every corner of the bilinear map), and
41
+ * no corner farther than `SHELL_WARPING_LIMIT · √A` from the mean plane.
42
+ */
43
+ export declare const isValidShellQuad: (points: readonly Vec3[]) => boolean;