@theerapat-s28/ts-structural-eng-tools 1.5.0 → 2.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 (193) hide show
  1. package/README.md +57 -6
  2. package/dist/core/constants/frame.constant.d.ts +19 -0
  3. package/dist/core/constants/frame.constant.js +23 -0
  4. package/dist/core/constants/frame.constant.js.map +1 -0
  5. package/dist/core/errors/frame-analysis.error.d.ts +36 -0
  6. package/dist/core/errors/frame-analysis.error.js +86 -0
  7. package/dist/core/errors/frame-analysis.error.js.map +1 -0
  8. package/dist/core/index.d.ts +4 -0
  9. package/dist/core/index.js +13 -1
  10. package/dist/core/index.js.map +1 -1
  11. package/dist/core/types/section-properties.type.d.ts +13 -0
  12. package/dist/core/types/section-properties.type.js +3 -0
  13. package/dist/core/types/section-properties.type.js.map +1 -0
  14. package/dist/esm/core/constants/frame.constant.js +20 -0
  15. package/dist/esm/core/constants/frame.constant.js.map +1 -0
  16. package/dist/esm/core/constants/rc.constant.js +63 -0
  17. package/dist/esm/core/constants/rc.constant.js.map +1 -0
  18. package/dist/esm/core/errors/frame-analysis.error.js +82 -0
  19. package/dist/esm/core/errors/frame-analysis.error.js.map +1 -0
  20. package/dist/esm/core/errors/rc-design.error.js +64 -0
  21. package/dist/esm/core/errors/rc-design.error.js.map +1 -0
  22. package/dist/esm/core/index.js +9 -0
  23. package/dist/esm/core/index.js.map +1 -0
  24. package/dist/esm/core/types/output-message.type.js +2 -0
  25. package/dist/esm/core/types/output-message.type.js.map +1 -0
  26. package/dist/esm/core/types/plate-jacketing.type.js +18 -0
  27. package/dist/esm/core/types/plate-jacketing.type.js.map +1 -0
  28. package/dist/esm/core/types/rc-beam.type.js +11 -0
  29. package/dist/esm/core/types/rc-beam.type.js.map +1 -0
  30. package/dist/esm/core/types/section-properties.type.js +2 -0
  31. package/dist/esm/core/types/section-properties.type.js.map +1 -0
  32. package/dist/esm/core/types/unit.type.js +2 -0
  33. package/dist/esm/core/types/unit.type.js.map +1 -0
  34. package/dist/esm/fea/frame/area/area-geometry.js +132 -0
  35. package/dist/esm/fea/frame/area/area-geometry.js.map +1 -0
  36. package/dist/esm/fea/frame/area/distribute-area-loads.js +267 -0
  37. package/dist/esm/fea/frame/area/distribute-area-loads.js.map +1 -0
  38. package/dist/esm/fea/frame/area/edge-members.js +62 -0
  39. package/dist/esm/fea/frame/area/edge-members.js.map +1 -0
  40. package/dist/esm/fea/frame/elements/beam-3d-stiffness.js +84 -0
  41. package/dist/esm/fea/frame/elements/beam-3d-stiffness.js.map +1 -0
  42. package/dist/esm/fea/frame/elements/fixed-end-forces.js +88 -0
  43. package/dist/esm/fea/frame/elements/fixed-end-forces.js.map +1 -0
  44. package/dist/esm/fea/frame/elements/static-condensation.js +55 -0
  45. package/dist/esm/fea/frame/elements/static-condensation.js.map +1 -0
  46. package/dist/esm/fea/frame/index.js +7 -0
  47. package/dist/esm/fea/frame/index.js.map +1 -0
  48. package/dist/esm/fea/frame/post/demand-envelope.js +97 -0
  49. package/dist/esm/fea/frame/post/demand-envelope.js.map +1 -0
  50. package/dist/esm/fea/frame/post/envelope.js +59 -0
  51. package/dist/esm/fea/frame/post/envelope.js.map +1 -0
  52. package/dist/esm/fea/frame/post/member-diagram.js +375 -0
  53. package/dist/esm/fea/frame/post/member-diagram.js.map +1 -0
  54. package/dist/esm/fea/frame/post/present-state.js +106 -0
  55. package/dist/esm/fea/frame/post/present-state.js.map +1 -0
  56. package/dist/esm/fea/frame/solver/analyze-frame.js +131 -0
  57. package/dist/esm/fea/frame/solver/analyze-frame.js.map +1 -0
  58. package/dist/esm/fea/frame/solver/boundary-conditions.js +33 -0
  59. package/dist/esm/fea/frame/solver/boundary-conditions.js.map +1 -0
  60. package/dist/esm/fea/frame/solver/combinations.js +69 -0
  61. package/dist/esm/fea/frame/solver/combinations.js.map +1 -0
  62. package/dist/esm/fea/frame/solver/frame-system.js +122 -0
  63. package/dist/esm/fea/frame/solver/frame-system.js.map +1 -0
  64. package/dist/esm/fea/frame/solver/global-assembly.js +27 -0
  65. package/dist/esm/fea/frame/solver/global-assembly.js.map +1 -0
  66. package/dist/esm/fea/frame/solver/load-case-solver.js +133 -0
  67. package/dist/esm/fea/frame/solver/load-case-solver.js.map +1 -0
  68. package/dist/esm/fea/frame/transformation/coordinate-transform.js +71 -0
  69. package/dist/esm/fea/frame/transformation/coordinate-transform.js.map +1 -0
  70. package/dist/esm/fea/frame/types/model.type.js +2 -0
  71. package/dist/esm/fea/frame/types/model.type.js.map +1 -0
  72. package/dist/esm/fea/frame/types/results.type.js +2 -0
  73. package/dist/esm/fea/frame/types/results.type.js.map +1 -0
  74. package/dist/esm/fea/frame/validation/validate-model.js +389 -0
  75. package/dist/esm/fea/frame/validation/validate-model.js.map +1 -0
  76. package/dist/esm/fea/index.js +3 -0
  77. package/dist/esm/fea/index.js.map +1 -0
  78. package/dist/esm/index.js +10 -0
  79. package/dist/esm/index.js.map +1 -0
  80. package/dist/esm/package.json +1 -0
  81. package/dist/esm/rc/general.js +32 -0
  82. package/dist/esm/rc/general.js.map +1 -0
  83. package/dist/esm/rc/index.js +5 -0
  84. package/dist/esm/rc/index.js.map +1 -0
  85. package/dist/esm/rc/rc-bar-layout.js +89 -0
  86. package/dist/esm/rc/rc-bar-layout.js.map +1 -0
  87. package/dist/esm/rc/rc-beam-design.js +320 -0
  88. package/dist/esm/rc/rc-beam-design.js.map +1 -0
  89. package/dist/esm/rc/rc-section-properties.js +55 -0
  90. package/dist/esm/rc/rc-section-properties.js.map +1 -0
  91. package/dist/esm/strengthening/index.js +4 -0
  92. package/dist/esm/strengthening/index.js.map +1 -0
  93. package/dist/esm/strengthening/rc-beam-plate-interface-bolts.js +338 -0
  94. package/dist/esm/strengthening/rc-beam-plate-interface-bolts.js.map +1 -0
  95. package/dist/esm/strengthening/rc-beam-side-plate-shear.js +381 -0
  96. package/dist/esm/strengthening/rc-beam-side-plate-shear.js.map +1 -0
  97. package/dist/esm/strengthening/rc-beam-steel-plate-jacketing.js +90 -0
  98. package/dist/esm/strengthening/rc-beam-steel-plate-jacketing.js.map +1 -0
  99. package/dist/esm/utils/index.js +5 -0
  100. package/dist/esm/utils/index.js.map +1 -0
  101. package/dist/esm/utils/math.js +30 -0
  102. package/dist/esm/utils/math.js.map +1 -0
  103. package/dist/esm/utils/matrix.js +145 -0
  104. package/dist/esm/utils/matrix.js.map +1 -0
  105. package/dist/esm/utils/merge-warning.js +11 -0
  106. package/dist/esm/utils/merge-warning.js.map +1 -0
  107. package/dist/esm/utils/skyline.js +151 -0
  108. package/dist/esm/utils/skyline.js.map +1 -0
  109. package/dist/fea/frame/area/area-geometry.d.ts +56 -0
  110. package/dist/fea/frame/area/area-geometry.js +142 -0
  111. package/dist/fea/frame/area/area-geometry.js.map +1 -0
  112. package/dist/fea/frame/area/distribute-area-loads.d.ts +30 -0
  113. package/dist/fea/frame/area/distribute-area-loads.js +272 -0
  114. package/dist/fea/frame/area/distribute-area-loads.js.map +1 -0
  115. package/dist/fea/frame/area/edge-members.d.ts +25 -0
  116. package/dist/fea/frame/area/edge-members.js +67 -0
  117. package/dist/fea/frame/area/edge-members.js.map +1 -0
  118. package/dist/fea/frame/elements/beam-3d-stiffness.d.ts +29 -0
  119. package/dist/fea/frame/elements/beam-3d-stiffness.js +90 -0
  120. package/dist/fea/frame/elements/beam-3d-stiffness.js.map +1 -0
  121. package/dist/fea/frame/elements/fixed-end-forces.d.ts +36 -0
  122. package/dist/fea/frame/elements/fixed-end-forces.js +93 -0
  123. package/dist/fea/frame/elements/fixed-end-forces.js.map +1 -0
  124. package/dist/fea/frame/elements/static-condensation.d.ts +19 -0
  125. package/dist/fea/frame/elements/static-condensation.js +59 -0
  126. package/dist/fea/frame/elements/static-condensation.js.map +1 -0
  127. package/dist/fea/frame/index.d.ts +10 -0
  128. package/dist/fea/frame/index.js +18 -0
  129. package/dist/fea/frame/index.js.map +1 -0
  130. package/dist/fea/frame/post/demand-envelope.d.ts +36 -0
  131. package/dist/fea/frame/post/demand-envelope.js +101 -0
  132. package/dist/fea/frame/post/demand-envelope.js.map +1 -0
  133. package/dist/fea/frame/post/envelope.d.ts +8 -0
  134. package/dist/fea/frame/post/envelope.js +63 -0
  135. package/dist/fea/frame/post/envelope.js.map +1 -0
  136. package/dist/fea/frame/post/member-diagram.d.ts +26 -0
  137. package/dist/fea/frame/post/member-diagram.js +379 -0
  138. package/dist/fea/frame/post/member-diagram.js.map +1 -0
  139. package/dist/fea/frame/post/present-state.d.ts +19 -0
  140. package/dist/fea/frame/post/present-state.js +111 -0
  141. package/dist/fea/frame/post/present-state.js.map +1 -0
  142. package/dist/fea/frame/solver/analyze-frame.d.ts +70 -0
  143. package/dist/fea/frame/solver/analyze-frame.js +136 -0
  144. package/dist/fea/frame/solver/analyze-frame.js.map +1 -0
  145. package/dist/fea/frame/solver/boundary-conditions.d.ts +14 -0
  146. package/dist/fea/frame/solver/boundary-conditions.js +37 -0
  147. package/dist/fea/frame/solver/boundary-conditions.js.map +1 -0
  148. package/dist/fea/frame/solver/combinations.d.ts +11 -0
  149. package/dist/fea/frame/solver/combinations.js +73 -0
  150. package/dist/fea/frame/solver/combinations.js.map +1 -0
  151. package/dist/fea/frame/solver/frame-system.d.ts +42 -0
  152. package/dist/fea/frame/solver/frame-system.js +126 -0
  153. package/dist/fea/frame/solver/frame-system.js.map +1 -0
  154. package/dist/fea/frame/solver/global-assembly.d.ts +17 -0
  155. package/dist/fea/frame/solver/global-assembly.js +33 -0
  156. package/dist/fea/frame/solver/global-assembly.js.map +1 -0
  157. package/dist/fea/frame/solver/load-case-solver.d.ts +34 -0
  158. package/dist/fea/frame/solver/load-case-solver.js +138 -0
  159. package/dist/fea/frame/solver/load-case-solver.js.map +1 -0
  160. package/dist/fea/frame/transformation/coordinate-transform.d.ts +21 -0
  161. package/dist/fea/frame/transformation/coordinate-transform.js +76 -0
  162. package/dist/fea/frame/transformation/coordinate-transform.js.map +1 -0
  163. package/dist/fea/frame/types/model.type.d.ts +170 -0
  164. package/dist/fea/frame/types/model.type.js +3 -0
  165. package/dist/fea/frame/types/model.type.js.map +1 -0
  166. package/dist/fea/frame/types/results.type.d.ts +134 -0
  167. package/dist/fea/frame/types/results.type.js +3 -0
  168. package/dist/fea/frame/types/results.type.js.map +1 -0
  169. package/dist/fea/frame/validation/validate-model.d.ts +18 -0
  170. package/dist/fea/frame/validation/validate-model.js +395 -0
  171. package/dist/fea/frame/validation/validate-model.js.map +1 -0
  172. package/dist/fea/index.d.ts +1 -0
  173. package/dist/fea/index.js +19 -0
  174. package/dist/fea/index.js.map +1 -0
  175. package/dist/index.d.ts +8 -4
  176. package/dist/index.js +37 -1
  177. package/dist/index.js.map +1 -1
  178. package/dist/rc/index.d.ts +2 -0
  179. package/dist/rc/index.js +3 -1
  180. package/dist/rc/index.js.map +1 -1
  181. package/dist/rc/rc-section-properties.d.ts +35 -0
  182. package/dist/rc/rc-section-properties.js +59 -0
  183. package/dist/rc/rc-section-properties.js.map +1 -0
  184. package/dist/utils/index.d.ts +4 -0
  185. package/dist/utils/index.js +19 -1
  186. package/dist/utils/index.js.map +1 -1
  187. package/dist/utils/matrix.d.ts +45 -0
  188. package/dist/utils/matrix.js +157 -0
  189. package/dist/utils/matrix.js.map +1 -0
  190. package/dist/utils/skyline.d.ts +49 -0
  191. package/dist/utils/skyline.js +161 -0
  192. package/dist/utils/skyline.js.map +1 -0
  193. package/package.json +28 -4
@@ -0,0 +1,338 @@
1
+ import { RCDesignError, Errors } from "../core/errors/rc-design.error.js";
2
+ import * as MyMath from "../utils/math.js";
3
+ import * as RCConstants from "../core/constants/rc.constant.js";
4
+ import { concreteElasticModulus } from "../rc/general.js";
5
+ import { isSinglyReinforced, } from "../core/types/rc-beam.type.js";
6
+ import { hasTopPlate, hasBottomPlate, } from "../core/types/plate-jacketing.type.js";
7
+ const resolveGeometry = (section, plates) => {
8
+ const tTop = hasTopPlate(plates) ? plates.topSteelThickness : 0;
9
+ const tBottom = hasBottomPlate(plates) ? plates.bottomSteelThickness : 0;
10
+ const ATop = hasTopPlate(plates) ? plates.topSteelWidth * tTop : 0;
11
+ const ABottom = hasBottomPlate(plates) ? plates.bottomSteelWidth * tBottom : 0;
12
+ const singly = isSinglyReinforced(section);
13
+ const doubly = section;
14
+ return {
15
+ tTop,
16
+ tBottom,
17
+ ATop,
18
+ ABottom,
19
+ yTop: tTop / 2,
20
+ yBottom: tTop + section.h + tBottom / 2,
21
+ yConcreteTop: tTop,
22
+ yConcreteBottom: tTop + section.h,
23
+ yTensionSteel: tTop + section.d,
24
+ yCompSteel: singly ? null : tTop + doubly.d_,
25
+ As_: singly ? 0 : doubly.As_,
26
+ };
27
+ };
28
+ const validateGeometry = (section, geo) => {
29
+ if (section.b <= 0 ||
30
+ section.h <= 0 ||
31
+ section.d <= 0 ||
32
+ section.d >= section.h ||
33
+ section.As <= 0) {
34
+ throw new RCDesignError(Errors.PLATE_OUTSIDE_SECTION);
35
+ }
36
+ if (geo.yCompSteel !== null && geo.yCompSteel >= geo.yTensionSteel) {
37
+ throw new RCDesignError(Errors.PLATE_OUTSIDE_SECTION);
38
+ }
39
+ };
40
+ /**
41
+ * Solves the cracked-section neutral axis depth (from the datum) by setting the
42
+ * first moment of the transformed areas about the neutral axis to zero.
43
+ *
44
+ * @param compSteelInCompression - Whether the compression rebar is assumed to sit
45
+ * above the neutral axis, which decides between the (n-1) and n modular ratios
46
+ */
47
+ const solveCrackedNeutralAxis = (section, geo, ns, np, compSteelInCompression) => {
48
+ const { b } = section;
49
+ const AsTr = ns * section.As;
50
+ const ATopTr = np * geo.ATop;
51
+ const ABottomTr = np * geo.ABottom;
52
+ // Compression rebar displaces concrete that is already counted in the block,
53
+ // so it is transformed with (n - 1); below the neutral axis it acts in tension
54
+ // and takes the full n.
55
+ const AsCompTr = compSteelInCompression ? (ns - 1) * geo.As_ : ns * geo.As_;
56
+ const a = b / 2;
57
+ const bq = -b * geo.yConcreteTop + ATopTr + AsCompTr + AsTr + ABottomTr;
58
+ const c = (b * geo.yConcreteTop * geo.yConcreteTop) / 2 -
59
+ ATopTr * geo.yTop -
60
+ AsCompTr * (geo.yCompSteel ?? 0) -
61
+ AsTr * geo.yTensionSteel -
62
+ ABottomTr * geo.yBottom;
63
+ const roots = MyMath.solveQuadratic(a, bq, c);
64
+ const valid = roots.filter((root) => root > geo.yConcreteTop && root < geo.yConcreteBottom);
65
+ return valid.length > 0 ? Math.max(...valid) : null;
66
+ };
67
+ /**
68
+ * Builds the transformed-section parts and the neutral axis depth for the
69
+ * requested section state.
70
+ */
71
+ const buildTransformedSection = (section, geo, ns, np, sectionState, warnings) => {
72
+ const parts = [];
73
+ if (geo.ATop > 0) {
74
+ parts.push({
75
+ A: np * geo.ATop,
76
+ y: geo.yTop,
77
+ I: (np * (geo.ATop / geo.tTop) * geo.tTop ** 3) / 12,
78
+ });
79
+ }
80
+ if (geo.ABottom > 0) {
81
+ parts.push({
82
+ A: np * geo.ABottom,
83
+ y: geo.yBottom,
84
+ I: (np * (geo.ABottom / geo.tBottom) * geo.tBottom ** 3) / 12,
85
+ });
86
+ }
87
+ let ybar;
88
+ if (sectionState === "uncracked") {
89
+ parts.push({
90
+ A: section.b * section.h,
91
+ y: geo.yConcreteTop + section.h / 2,
92
+ I: (section.b * section.h ** 3) / 12,
93
+ });
94
+ parts.push({ A: (ns - 1) * section.As, y: geo.yTensionSteel, I: 0 });
95
+ if (geo.As_ > 0 && geo.yCompSteel !== null) {
96
+ parts.push({ A: (ns - 1) * geo.As_, y: geo.yCompSteel, I: 0 });
97
+ }
98
+ const sumA = parts.reduce((acc, part) => acc + part.A, 0);
99
+ ybar = parts.reduce((acc, part) => acc + part.A * part.y, 0) / sumA;
100
+ }
101
+ else {
102
+ let compSteelInCompression = true;
103
+ let na = solveCrackedNeutralAxis(section, geo, ns, np, true);
104
+ if (na !== null && geo.yCompSteel !== null && geo.yCompSteel > na) {
105
+ // The assumed compression rebar is actually below the neutral axis; re-solve
106
+ // with it on the tension side.
107
+ compSteelInCompression = false;
108
+ na = solveCrackedNeutralAxis(section, geo, ns, np, false);
109
+ warnings.push({
110
+ reference: "ACI318-19, 22.2.2.1",
111
+ message: "Compression reinforcement lies below the cracked neutral axis; it was transformed as tension steel.",
112
+ });
113
+ }
114
+ if (na === null) {
115
+ throw new RCDesignError(Errors.CRACKED_NA_NOT_FOUND);
116
+ }
117
+ ybar = na;
118
+ const c = ybar - geo.yConcreteTop; // depth of the concrete compression zone
119
+ parts.push({
120
+ A: section.b * c,
121
+ y: geo.yConcreteTop + c / 2,
122
+ I: (section.b * c ** 3) / 12,
123
+ });
124
+ parts.push({ A: ns * section.As, y: geo.yTensionSteel, I: 0 });
125
+ if (geo.As_ > 0 && geo.yCompSteel !== null) {
126
+ parts.push({
127
+ A: compSteelInCompression ? (ns - 1) * geo.As_ : ns * geo.As_,
128
+ y: geo.yCompSteel,
129
+ I: 0,
130
+ });
131
+ }
132
+ }
133
+ const Itr = parts.reduce((acc, part) => acc + part.I + part.A * (part.y - ybar) ** 2, 0);
134
+ return { ybar, Itr };
135
+ };
136
+ /**
137
+ * Calculates the horizontal shear flow that must be transferred across each
138
+ * concrete-to-plate interface of a steel plate jacketed beam, q = V·Q/I, using an
139
+ * elastic transformed section.
140
+ *
141
+ * `Q` at an interface is the first moment of the area beyond that cut — the plate
142
+ * itself — while `ybar` and `Itr` come from one solve that includes every plate
143
+ * present, so adding a top plate also changes the bottom interface shear flow.
144
+ *
145
+ * @param input - Section, plate properties, factored shear V (kN), and section state
146
+ * @returns Object containing per-interface `top`/`bottom` shear flow (`null` when the
147
+ * plate is absent), `calculationDetails`, `unit`, and `warnings`
148
+ * @throws {RCDesignError} If V is not positive or no plate is present (201), the
149
+ * geometry is inconsistent (203), or no cracked neutral axis exists (204)
150
+ */
151
+ export const plateInterfaceShearFlow = (input) => {
152
+ const warnings = [];
153
+ const { section, plates, V } = input;
154
+ const sectionState = input.sectionState ?? "cracked";
155
+ if (V <= 0 || (!hasTopPlate(plates) && !hasBottomPlate(plates))) {
156
+ throw new RCDesignError(Errors.NON_POSITIVE_SHEAR_FLOW);
157
+ }
158
+ const geo = resolveGeometry(section, plates);
159
+ validateGeometry(section, geo);
160
+ const Ec = concreteElasticModulus(section.fc_);
161
+ const ns = section.Es / Ec;
162
+ const np = plates.Es / Ec;
163
+ const { ybar, Itr } = buildTransformedSection(section, geo, ns, np, sectionState, warnings);
164
+ const VinN = V * 1000;
165
+ const interfaceAt = (A, y) => {
166
+ const Q = np * A * Math.abs(y - ybar);
167
+ return {
168
+ q: MyMath.roundToDecimalPlaces((VinN * Q) / Itr, 2),
169
+ Q: MyMath.roundToDecimalPlaces(Q, 0),
170
+ leverArm: MyMath.roundToDecimalPlaces(Math.abs(y - ybar), 2),
171
+ };
172
+ };
173
+ if (geo.ATop > 0 && geo.yTop > ybar) {
174
+ warnings.push({
175
+ reference: "ACI318-19, 22.2.2.1",
176
+ message: "Top plate centroid lies below the neutral axis; the plate is in tension, so the assumed compression-face behaviour does not apply.",
177
+ });
178
+ }
179
+ return {
180
+ top: geo.ATop > 0 ? interfaceAt(geo.ATop, geo.yTop) : null,
181
+ bottom: geo.ABottom > 0 ? interfaceAt(geo.ABottom, geo.yBottom) : null,
182
+ calculationDetails: {
183
+ Ec: MyMath.roundToDecimalPlaces(Ec, 2),
184
+ ns: MyMath.roundToDecimalPlaces(ns, 3),
185
+ np: MyMath.roundToDecimalPlaces(np, 3),
186
+ ybar: MyMath.roundToDecimalPlaces(ybar, 2),
187
+ Itr: MyMath.roundToDecimalPlaces(Itr, 0),
188
+ sectionState,
189
+ },
190
+ unit: "N/mm",
191
+ warnings,
192
+ };
193
+ };
194
+ /**
195
+ * Calculates the design shear strength of a single anchor bolt from the steel
196
+ * strength per ACI 318-19 17.7.1.2b, Vsa = 0.6 Ase,V futa, with φ = 0.65 from
197
+ * Table 17.5.3 and the futa cap of 17.6.1.2.
198
+ *
199
+ * Concrete breakout (17.7.2) and pryout (17.7.3) depend on edge distances, anchor
200
+ * spacing and embedment depth, and are NOT evaluated here — a warning always says so.
201
+ * Supply `phiVboltOverride` to use a manufacturer or ESR value instead.
202
+ *
203
+ * @param bolt - Anchor properties (Ase, futa, optional fya, diameter, shearPlanes, override)
204
+ * @returns Object containing `phiVbolt` (kN), `calculationDetails`, `unit`, and `warnings`
205
+ * @throws {RCDesignError} If the resolved capacity is not positive (202)
206
+ */
207
+ export const boltShearCapacity = (bolt) => {
208
+ const warnings = [];
209
+ const shearPlanes = bolt.shearPlanes ?? 1;
210
+ warnings.push({
211
+ reference: "ACI318-19, 17.7.2",
212
+ message: "Only anchor steel strength in shear is evaluated; concrete breakout and pryout must be checked separately.",
213
+ });
214
+ if (bolt.phiVboltOverride !== undefined) {
215
+ if (bolt.phiVboltOverride <= 0) {
216
+ throw new RCDesignError(Errors.INVALID_BOLT_CAPACITY);
217
+ }
218
+ return {
219
+ phiVbolt: MyMath.roundToDecimalPlaces(bolt.phiVboltOverride, 2),
220
+ calculationDetails: { source: "override", shearPlanes },
221
+ unit: "kN",
222
+ warnings,
223
+ };
224
+ }
225
+ if (bolt.Ase <= 0 || bolt.futa <= 0 || shearPlanes <= 0) {
226
+ throw new RCDesignError(Errors.INVALID_BOLT_CAPACITY);
227
+ }
228
+ const cap = Math.min(bolt.fya !== undefined ? RCConstants.ANCHOR_FUTA_FYA_FACTOR * bolt.fya : Infinity, RCConstants.MAX_ANCHOR_FUTA);
229
+ const futaEffective = Math.min(bolt.futa, cap);
230
+ if (futaEffective < bolt.futa) {
231
+ warnings.push({
232
+ reference: "ACI318-19, 17.6.1.2",
233
+ message: `futa (${bolt.futa} MPa) exceeds the limit of min(1.9*fya, ${RCConstants.MAX_ANCHOR_FUTA} MPa); capped at ${MyMath.roundToDecimalPlaces(futaEffective, 2)} MPa.`,
234
+ });
235
+ }
236
+ const Vsa = RCConstants.ANCHOR_STEEL_SHEAR_COEFFICIENT * bolt.Ase * futaEffective * shearPlanes; // N
237
+ return {
238
+ phiVbolt: MyMath.roundToDecimalPlaces(RCConstants.ANCHOR_SHEAR_STRENGTH_REDUCTION_FACTOR * Vsa * 0.001, 2),
239
+ calculationDetails: {
240
+ source: "ACI318-19, 17.7.1.2b",
241
+ Vsa: MyMath.roundToDecimalPlaces(Vsa * 0.001, 2),
242
+ futaEffective: MyMath.roundToDecimalPlaces(futaEffective, 2),
243
+ shearPlanes,
244
+ },
245
+ unit: "kN",
246
+ warnings,
247
+ };
248
+ };
249
+ const designInterface = (demand, plateArea, plateFy, phiVboltKN, boltsPerRow, transferLength, label, warnings) => {
250
+ const phiVboltN = phiVboltKN * 1000;
251
+ // Spacing that keeps the bolt row capacity at or above the shear flow demand
252
+ const spacingFromShearFlow = (boltsPerRow * phiVboltN) / demand.q; // mm
253
+ let requiredSpacing = spacingFromShearFlow;
254
+ if (requiredSpacing > RCConstants.MAX_PLATE_BOLT_SPACING) {
255
+ requiredSpacing = RCConstants.MAX_PLATE_BOLT_SPACING;
256
+ warnings.push({
257
+ message: `${label} plate: shear flow allows a pitch of ${MyMath.roundToDecimalPlaces(spacingFromShearFlow, 1)} mm, capped at the detailing limit of ${RCConstants.MAX_PLATE_BOLT_SPACING} mm.`,
258
+ });
259
+ }
260
+ const rows = Math.ceil(transferLength / requiredSpacing) + 1;
261
+ const boltCountFromShearFlow = rows * boltsPerRow;
262
+ // The plate must also develop its own yield force over the transfer length
263
+ const plateForce = plateArea * plateFy; // N
264
+ const boltCountFromPlateForce = Math.ceil(plateForce / phiVboltN);
265
+ const governedBy = boltCountFromPlateForce > boltCountFromShearFlow ? "plateForce" : "shearFlow";
266
+ const boltCount = Math.max(boltCountFromShearFlow, boltCountFromPlateForce);
267
+ return {
268
+ q: demand.q,
269
+ Q: demand.Q,
270
+ leverArm: demand.leverArm,
271
+ requiredSpacing: MyMath.roundToDecimalPlaces(requiredSpacing, 1),
272
+ boltCount,
273
+ governedBy,
274
+ calculationDetails: {
275
+ spacingFromShearFlow: MyMath.roundToDecimalPlaces(spacingFromShearFlow, 1),
276
+ rows,
277
+ boltCountFromShearFlow,
278
+ boltCountFromPlateForce,
279
+ plateForce: MyMath.roundToDecimalPlaces(plateForce * 0.001, 2),
280
+ },
281
+ };
282
+ };
283
+ /**
284
+ * Determines the bolts required to transfer horizontal shear across each
285
+ * concrete-to-plate interface of a steel plate jacketed beam.
286
+ *
287
+ * For each plate present, the required bolt pitch follows from the interface shear
288
+ * flow (s = n·φVbolt / q) and the bolt count is taken as the larger of that pitch
289
+ * over the transfer length and the count needed to develop the full plate yield
290
+ * force (Ap·fy / φVbolt). `governedBy` reports which one controls.
291
+ *
292
+ * @param input - Section, plates, V (kN), bolt properties, bolts per row, and transfer length (mm)
293
+ * @returns Object containing per-interface `top`/`bottom` results (`null` when the plate
294
+ * is absent), `calculationDetails`, `unit`, and `warnings`
295
+ * @throws {RCDesignError} If V is not positive or no plate is present (201), the bolt
296
+ * capacity is invalid (202), the geometry is inconsistent (203), or no cracked
297
+ * neutral axis exists (204)
298
+ */
299
+ export const plateInterfaceBoltRequirement = (input) => {
300
+ const { plates, bolt, boltsPerRow, transferLength } = input;
301
+ if (boltsPerRow <= 0 || transferLength <= 0) {
302
+ throw new RCDesignError(Errors.PLATE_OUTSIDE_SECTION);
303
+ }
304
+ const flow = plateInterfaceShearFlow(input);
305
+ const boltResult = boltShearCapacity(bolt);
306
+ const warnings = [...flow.warnings, ...boltResult.warnings];
307
+ const geo = resolveGeometry(input.section, plates);
308
+ const top = flow.top !== null
309
+ ? designInterface(flow.top, geo.ATop, plates.fy, boltResult.phiVbolt, boltsPerRow, transferLength, "top", warnings)
310
+ : null;
311
+ const bottom = flow.bottom !== null
312
+ ? designInterface(flow.bottom, geo.ABottom, plates.fy, boltResult.phiVbolt, boltsPerRow, transferLength, "bottom", warnings)
313
+ : null;
314
+ if (bolt.diameter !== undefined) {
315
+ const minSpacing = RCConstants.MIN_ANCHOR_SPACING_DIAMETER_FACTOR * bolt.diameter;
316
+ for (const result of [top, bottom]) {
317
+ if (result !== null && result.requiredSpacing < minSpacing) {
318
+ warnings.push({
319
+ reference: "ACI318-19, 17.9.2",
320
+ message: `Required pitch (${result.requiredSpacing} mm) is below the minimum anchor spacing of 4*da (${minSpacing} mm); use a larger bolt or more bolts per row.`,
321
+ });
322
+ }
323
+ }
324
+ }
325
+ return {
326
+ top,
327
+ bottom,
328
+ calculationDetails: {
329
+ ...flow.calculationDetails,
330
+ phiVbolt: boltResult.phiVbolt,
331
+ boltsPerRow,
332
+ transferLength,
333
+ },
334
+ unit: "kN",
335
+ warnings,
336
+ };
337
+ };
338
+ //# sourceMappingURL=rc-beam-plate-interface-bolts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rc-beam-plate-interface-bolts.js","sourceRoot":"","sources":["../../../src/strengthening/rc-beam-plate-interface-bolts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,KAAK,WAAW,MAAM,iCAAiC,CAAC;AAE/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAGL,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAML,WAAW,EACX,cAAc,GACf,MAAM,sCAAsC,CAAC;AAuC9C,MAAM,eAAe,GAAG,CACtB,OAAwB,EACxB,MAA0B,EACR,EAAE;IACpB,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAE,MAAM,CAAC,iBAA4B,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAE,MAAM,CAAC,oBAA+B,CAAC,CAAC,CAAC,CAAC,CAAC;IAErF,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAE,MAAM,CAAC,aAAwB,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/E,MAAM,OAAO,GAAG,cA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