@theerapat-s28/ts-structural-eng-tools 1.5.0 → 2.0.1

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 (178) hide show
  1. package/README.md +34 -3
  2. package/dist/core/constants/frame.constant.d.ts +14 -0
  3. package/dist/core/constants/frame.constant.js +18 -0
  4. package/dist/core/constants/frame.constant.js.map +1 -0
  5. package/dist/core/errors/frame-analysis.error.d.ts +33 -0
  6. package/dist/core/errors/frame-analysis.error.js +74 -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 +12 -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 +15 -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 +70 -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/elements/beam-3d-stiffness.js +84 -0
  35. package/dist/esm/fea/frame/elements/beam-3d-stiffness.js.map +1 -0
  36. package/dist/esm/fea/frame/elements/fixed-end-forces.js +75 -0
  37. package/dist/esm/fea/frame/elements/fixed-end-forces.js.map +1 -0
  38. package/dist/esm/fea/frame/elements/static-condensation.js +55 -0
  39. package/dist/esm/fea/frame/elements/static-condensation.js.map +1 -0
  40. package/dist/esm/fea/frame/index.js +6 -0
  41. package/dist/esm/fea/frame/index.js.map +1 -0
  42. package/dist/esm/fea/frame/post/demand-envelope.js +97 -0
  43. package/dist/esm/fea/frame/post/demand-envelope.js.map +1 -0
  44. package/dist/esm/fea/frame/post/envelope.js +59 -0
  45. package/dist/esm/fea/frame/post/envelope.js.map +1 -0
  46. package/dist/esm/fea/frame/post/member-diagram.js +332 -0
  47. package/dist/esm/fea/frame/post/member-diagram.js.map +1 -0
  48. package/dist/esm/fea/frame/post/present-state.js +106 -0
  49. package/dist/esm/fea/frame/post/present-state.js.map +1 -0
  50. package/dist/esm/fea/frame/solver/analyze-frame.js +123 -0
  51. package/dist/esm/fea/frame/solver/analyze-frame.js.map +1 -0
  52. package/dist/esm/fea/frame/solver/boundary-conditions.js +33 -0
  53. package/dist/esm/fea/frame/solver/boundary-conditions.js.map +1 -0
  54. package/dist/esm/fea/frame/solver/combinations.js +69 -0
  55. package/dist/esm/fea/frame/solver/combinations.js.map +1 -0
  56. package/dist/esm/fea/frame/solver/frame-system.js +122 -0
  57. package/dist/esm/fea/frame/solver/frame-system.js.map +1 -0
  58. package/dist/esm/fea/frame/solver/global-assembly.js +27 -0
  59. package/dist/esm/fea/frame/solver/global-assembly.js.map +1 -0
  60. package/dist/esm/fea/frame/solver/load-case-solver.js +119 -0
  61. package/dist/esm/fea/frame/solver/load-case-solver.js.map +1 -0
  62. package/dist/esm/fea/frame/transformation/coordinate-transform.js +71 -0
  63. package/dist/esm/fea/frame/transformation/coordinate-transform.js.map +1 -0
  64. package/dist/esm/fea/frame/types/model.type.js +2 -0
  65. package/dist/esm/fea/frame/types/model.type.js.map +1 -0
  66. package/dist/esm/fea/frame/types/results.type.js +2 -0
  67. package/dist/esm/fea/frame/types/results.type.js.map +1 -0
  68. package/dist/esm/fea/frame/validation/validate-model.js +292 -0
  69. package/dist/esm/fea/frame/validation/validate-model.js.map +1 -0
  70. package/dist/esm/fea/index.js +3 -0
  71. package/dist/esm/fea/index.js.map +1 -0
  72. package/dist/esm/index.js +10 -0
  73. package/dist/esm/index.js.map +1 -0
  74. package/dist/esm/package.json +1 -0
  75. package/dist/esm/rc/general.js +32 -0
  76. package/dist/esm/rc/general.js.map +1 -0
  77. package/dist/esm/rc/index.js +5 -0
  78. package/dist/esm/rc/index.js.map +1 -0
  79. package/dist/esm/rc/rc-bar-layout.js +89 -0
  80. package/dist/esm/rc/rc-bar-layout.js.map +1 -0
  81. package/dist/esm/rc/rc-beam-design.js +320 -0
  82. package/dist/esm/rc/rc-beam-design.js.map +1 -0
  83. package/dist/esm/rc/rc-section-properties.js +55 -0
  84. package/dist/esm/rc/rc-section-properties.js.map +1 -0
  85. package/dist/esm/strengthening/index.js +4 -0
  86. package/dist/esm/strengthening/index.js.map +1 -0
  87. package/dist/esm/strengthening/rc-beam-plate-interface-bolts.js +338 -0
  88. package/dist/esm/strengthening/rc-beam-plate-interface-bolts.js.map +1 -0
  89. package/dist/esm/strengthening/rc-beam-side-plate-shear.js +381 -0
  90. package/dist/esm/strengthening/rc-beam-side-plate-shear.js.map +1 -0
  91. package/dist/esm/strengthening/rc-beam-steel-plate-jacketing.js +90 -0
  92. package/dist/esm/strengthening/rc-beam-steel-plate-jacketing.js.map +1 -0
  93. package/dist/esm/utils/index.js +5 -0
  94. package/dist/esm/utils/index.js.map +1 -0
  95. package/dist/esm/utils/math.js +30 -0
  96. package/dist/esm/utils/math.js.map +1 -0
  97. package/dist/esm/utils/matrix.js +145 -0
  98. package/dist/esm/utils/matrix.js.map +1 -0
  99. package/dist/esm/utils/merge-warning.js +11 -0
  100. package/dist/esm/utils/merge-warning.js.map +1 -0
  101. package/dist/esm/utils/skyline.js +151 -0
  102. package/dist/esm/utils/skyline.js.map +1 -0
  103. package/dist/fea/frame/elements/beam-3d-stiffness.d.ts +29 -0
  104. package/dist/fea/frame/elements/beam-3d-stiffness.js +90 -0
  105. package/dist/fea/frame/elements/beam-3d-stiffness.js.map +1 -0
  106. package/dist/fea/frame/elements/fixed-end-forces.d.ts +22 -0
  107. package/dist/fea/frame/elements/fixed-end-forces.js +79 -0
  108. package/dist/fea/frame/elements/fixed-end-forces.js.map +1 -0
  109. package/dist/fea/frame/elements/static-condensation.d.ts +19 -0
  110. package/dist/fea/frame/elements/static-condensation.js +59 -0
  111. package/dist/fea/frame/elements/static-condensation.js.map +1 -0
  112. package/dist/fea/frame/index.d.ts +9 -0
  113. package/dist/fea/frame/index.js +16 -0
  114. package/dist/fea/frame/index.js.map +1 -0
  115. package/dist/fea/frame/post/demand-envelope.d.ts +36 -0
  116. package/dist/fea/frame/post/demand-envelope.js +101 -0
  117. package/dist/fea/frame/post/demand-envelope.js.map +1 -0
  118. package/dist/fea/frame/post/envelope.d.ts +8 -0
  119. package/dist/fea/frame/post/envelope.js +63 -0
  120. package/dist/fea/frame/post/envelope.js.map +1 -0
  121. package/dist/fea/frame/post/member-diagram.d.ts +26 -0
  122. package/dist/fea/frame/post/member-diagram.js +336 -0
  123. package/dist/fea/frame/post/member-diagram.js.map +1 -0
  124. package/dist/fea/frame/post/present-state.d.ts +19 -0
  125. package/dist/fea/frame/post/present-state.js +111 -0
  126. package/dist/fea/frame/post/present-state.js.map +1 -0
  127. package/dist/fea/frame/solver/analyze-frame.d.ts +67 -0
  128. package/dist/fea/frame/solver/analyze-frame.js +128 -0
  129. package/dist/fea/frame/solver/analyze-frame.js.map +1 -0
  130. package/dist/fea/frame/solver/boundary-conditions.d.ts +14 -0
  131. package/dist/fea/frame/solver/boundary-conditions.js +37 -0
  132. package/dist/fea/frame/solver/boundary-conditions.js.map +1 -0
  133. package/dist/fea/frame/solver/combinations.d.ts +11 -0
  134. package/dist/fea/frame/solver/combinations.js +73 -0
  135. package/dist/fea/frame/solver/combinations.js.map +1 -0
  136. package/dist/fea/frame/solver/frame-system.d.ts +42 -0
  137. package/dist/fea/frame/solver/frame-system.js +126 -0
  138. package/dist/fea/frame/solver/frame-system.js.map +1 -0
  139. package/dist/fea/frame/solver/global-assembly.d.ts +17 -0
  140. package/dist/fea/frame/solver/global-assembly.js +33 -0
  141. package/dist/fea/frame/solver/global-assembly.js.map +1 -0
  142. package/dist/fea/frame/solver/load-case-solver.d.ts +34 -0
  143. package/dist/fea/frame/solver/load-case-solver.js +124 -0
  144. package/dist/fea/frame/solver/load-case-solver.js.map +1 -0
  145. package/dist/fea/frame/transformation/coordinate-transform.d.ts +21 -0
  146. package/dist/fea/frame/transformation/coordinate-transform.js +76 -0
  147. package/dist/fea/frame/transformation/coordinate-transform.js.map +1 -0
  148. package/dist/fea/frame/types/model.type.d.ts +112 -0
  149. package/dist/fea/frame/types/model.type.js +3 -0
  150. package/dist/fea/frame/types/model.type.js.map +1 -0
  151. package/dist/fea/frame/types/results.type.d.ts +134 -0
  152. package/dist/fea/frame/types/results.type.js +3 -0
  153. package/dist/fea/frame/types/results.type.js.map +1 -0
  154. package/dist/fea/frame/validation/validate-model.d.ts +18 -0
  155. package/dist/fea/frame/validation/validate-model.js +298 -0
  156. package/dist/fea/frame/validation/validate-model.js.map +1 -0
  157. package/dist/fea/index.d.ts +1 -0
  158. package/dist/fea/index.js +19 -0
  159. package/dist/fea/index.js.map +1 -0
  160. package/dist/index.d.ts +8 -4
  161. package/dist/index.js +37 -1
  162. package/dist/index.js.map +1 -1
  163. package/dist/rc/index.d.ts +2 -0
  164. package/dist/rc/index.js +3 -1
  165. package/dist/rc/index.js.map +1 -1
  166. package/dist/rc/rc-section-properties.d.ts +35 -0
  167. package/dist/rc/rc-section-properties.js +59 -0
  168. package/dist/rc/rc-section-properties.js.map +1 -0
  169. package/dist/utils/index.d.ts +4 -0
  170. package/dist/utils/index.js +19 -1
  171. package/dist/utils/index.js.map +1 -1
  172. package/dist/utils/matrix.d.ts +45 -0
  173. package/dist/utils/matrix.js +157 -0
  174. package/dist/utils/matrix.js.map +1 -0
  175. package/dist/utils/skyline.d.ts +49 -0
  176. package/dist/utils/skyline.js +161 -0
  177. package/dist/utils/skyline.js.map +1 -0
  178. package/package.json +20 -2
@@ -0,0 +1,320 @@
1
+ import { RCDesignError, Errors } from "../core/errors/rc-design.error.js";
2
+ import * as MyMath from "../utils/math.js";
3
+ import { isSinglyReinforced, } from "../core/types/rc-beam.type.js";
4
+ import * as RCConstants from "../core/constants/rc.constant.js";
5
+ import { concreteBeta } from "./general.js";
6
+ /**
7
+ * Calculates the nominal moment capacity (φMn) of a rectangular RC beam section.
8
+ *
9
+ * Supports both singly and doubly reinforced sections. Automatically determines
10
+ * the reinforcement configuration from the input and applies ACI 318-19 checks.
11
+ *
12
+ * Compression steel below the neutral axis is handled by strain compatibility —
13
+ * it acts in tension and reduces Mn, with a warning — rather than rejected.
14
+ *
15
+ * @param section - Beam cross-section properties (singly or doubly reinforced)
16
+ * @returns Object containing `phiMn` (kN·m), `calculationDetails`, `unit`, and `warnings`
17
+ * @throws {RCDesignError} 102 if the section is not tension controlled
18
+ */
19
+ export const rectBeamMomentCapacity = (section) => {
20
+ const warnings = [];
21
+ const minSteel = Math.max((0.25 * Math.sqrt(section.fc_) * section.b * section.d) / section.fy, (1.4 * section.b * section.d) / section.fy);
22
+ if (section.As < minSteel) {
23
+ // Add a warning if the area of steel is less than the minimum required.
24
+ warnings.push({
25
+ reference: "ACI318-19, 9.6.1.2",
26
+ message: `As (${section.As} mm2) < min required (${minSteel} mm2)`,
27
+ });
28
+ }
29
+ if (section.fy > 550) {
30
+ // Add a warning if the yield strength of steel is greater than 550 MPa.
31
+ warnings.push({
32
+ reference: "ACI318-19, 9.6.1.2",
33
+ message: `fy (${section.fy} MPa) > 550 MPa, consider using high-strength steel.`,
34
+ });
35
+ }
36
+ let Mn;
37
+ let calculationDetails;
38
+ if (isSinglyReinforced(section)) {
39
+ // Singly reinforced section
40
+ const result = calculateRectSinglyMn({
41
+ Es: section.Es,
42
+ fy: section.fy,
43
+ fc_: section.fc_,
44
+ As: section.As,
45
+ b: section.b,
46
+ h: section.h,
47
+ d: section.d,
48
+ });
49
+ Mn = result.Mn;
50
+ calculationDetails = result.calculationDetails;
51
+ warnings.push(...result.warnings);
52
+ }
53
+ else {
54
+ // Doubly reinforced section
55
+ const doublySection = section;
56
+ const result = calculateRectDoublyMn({
57
+ Es: doublySection.Es,
58
+ fy: doublySection.fy,
59
+ fc_: doublySection.fc_,
60
+ As: doublySection.As,
61
+ As_: doublySection.As_,
62
+ b: doublySection.b,
63
+ h: doublySection.h,
64
+ d: doublySection.d,
65
+ d_: doublySection.d_,
66
+ });
67
+ Mn = result.Mn;
68
+ calculationDetails = result.calculationDetails;
69
+ warnings.push(...result.warnings);
70
+ }
71
+ // Return the results
72
+ return {
73
+ phiMn: MyMath.roundToDecimalPlaces(RCConstants.FLEXURAL_STRENGTH_REDUCTION_FACTOR * Mn, 2),
74
+ calculationDetails: calculationDetails,
75
+ unit: "kN-m",
76
+ warnings: warnings,
77
+ };
78
+ };
79
+ /**
80
+ * Calculates the concrete contribution to shear capacity (φVc) of a beam section
81
+ * per ACI 318-19 22.5.5.1, Table 22.5.5.1(a): Vc = 0.17 λ √f'c bw d
82
+ *
83
+ * @param section - Shear section properties (fc_, bw, d, optional lambda)
84
+ * @returns Object containing `phiVc` (kN), `calculationDetails`, `unit`, and `warnings`
85
+ */
86
+ export const concreteShearCapacity = (section) => {
87
+ const warnings = [];
88
+ const lambda = section.lambda ?? 1.0;
89
+ const sqrtFc = Math.sqrt(section.fc_);
90
+ if (sqrtFc > RCConstants.SQRT_FC_SHEAR_LIMIT) {
91
+ warnings.push({
92
+ reference: "ACI318-19, 22.5.3.1",
93
+ message: `sqrt(fc') (${MyMath.roundToDecimalPlaces(sqrtFc, 2)}) > ${RCConstants.SQRT_FC_SHEAR_LIMIT} MPa limit for Vc; capped at ${RCConstants.SQRT_FC_SHEAR_LIMIT} MPa unless minimum shear reinforcement per 9.6.3.3 is provided.`,
94
+ });
95
+ }
96
+ const cappedSqrtFc = Math.min(sqrtFc, RCConstants.SQRT_FC_SHEAR_LIMIT);
97
+ const Vc = RCConstants.CONCRETE_SHEAR_VC_COEFFICIENT * lambda * cappedSqrtFc * section.bw * section.d; // N
98
+ return {
99
+ phiVc: MyMath.roundToDecimalPlaces(RCConstants.SHEAR_STRENGTH_REDUCTION_FACTOR * Vc * 0.001, 2),
100
+ calculationDetails: {
101
+ Vc: MyMath.roundToDecimalPlaces(Vc * 0.001, 2),
102
+ lambda,
103
+ },
104
+ unit: "kN",
105
+ warnings,
106
+ };
107
+ };
108
+ /**
109
+ * Calculates the stirrup (shear reinforcement) contribution to shear capacity (φVs)
110
+ * of a beam section per ACI 318-19 22.5.10.5.3: Vs = Av fyt d / s
111
+ *
112
+ * @param section - Stirrup shear properties (fc_, bw, d, Av, fyt, s)
113
+ * @returns Object containing `phiVs` (kN), `calculationDetails`, `unit`, and `warnings`
114
+ * @throws {RCDesignError} If Vs exceeds the ACI 318-19 22.5.1.2 maximum (section too small)
115
+ */
116
+ export const stirrupShearCapacity = (section) => {
117
+ const warnings = [];
118
+ const { fc_, bw, d, Av, fyt, s } = section;
119
+ const Vs = (Av * fyt * d) / s; // N
120
+ const maxVs = RCConstants.MAX_VS_COEFFICIENT * Math.sqrt(fc_) * bw * d; // N
121
+ if (Vs > maxVs) {
122
+ throw new RCDesignError(Errors.SHEAR_STRENGTH_EXCEEDS_MAX);
123
+ }
124
+ return {
125
+ phiVs: MyMath.roundToDecimalPlaces(RCConstants.SHEAR_STRENGTH_REDUCTION_FACTOR * Vs * 0.001, 2),
126
+ calculationDetails: {
127
+ Vs: MyMath.roundToDecimalPlaces(Vs * 0.001, 2),
128
+ maxVs: MyMath.roundToDecimalPlaces(maxVs * 0.001, 2),
129
+ },
130
+ unit: "kN",
131
+ warnings,
132
+ };
133
+ };
134
+ /**
135
+ * Checks whether shear reinforcement (stirrups) is required at a section, and if so,
136
+ * whether it may be at the code minimum or must be designed for strength, per
137
+ * ACI 318-19 9.6.3.1 (requirement thresholds), 9.6.3.3 (Av,min), and 9.7.6.2.2 (max spacing).
138
+ *
139
+ * If `Av` and `s` are supplied, the provided reinforcement is checked against the
140
+ * required Av/s ratio and maximum spacing, adding warnings on shortfalls.
141
+ *
142
+ * @param input - Section and demand properties (fc_, bw, d, Vu, fyt, optional Av, s, lambda)
143
+ * @returns Object containing requirement classification, required Av/s and max spacing, and warnings
144
+ * @throws {RCDesignError} If required Vs exceeds the ACI 318-19 22.5.1.2 maximum (section too small)
145
+ */
146
+ export const checkStirrupRequirement = (input) => {
147
+ const warnings = [];
148
+ const { fc_, bw, d, Vu, fyt, Av, s } = input;
149
+ const { phiVc, calculationDetails } = concreteShearCapacity({
150
+ fc_,
151
+ bw,
152
+ d,
153
+ lambda: input.lambda,
154
+ });
155
+ const Vc = calculationDetails.Vc; // kN
156
+ const halfPhiVc = 0.5 * phiVc;
157
+ let required = false;
158
+ let minimumOnly = false;
159
+ let requiredAvOverS = 0; // mm^2/mm
160
+ let maxSpacing = null;
161
+ if (Vu > halfPhiVc) {
162
+ required = true;
163
+ const sqrtFc = Math.sqrt(fc_);
164
+ const minAvOverS = Math.max((RCConstants.MIN_AV_SQRT_FC_COEFFICIENT * sqrtFc * bw) / fyt, (RCConstants.MIN_AV_ABSOLUTE_COEFFICIENT * bw) / fyt);
165
+ if (Vu <= phiVc) {
166
+ minimumOnly = true;
167
+ requiredAvOverS = minAvOverS;
168
+ maxSpacing =
169
+ RCConstants.MAX_STIRRUP_SPACING_LOW_VS_DEPTH_FACTOR * d <
170
+ RCConstants.MAX_STIRRUP_SPACING_LOW_VS
171
+ ? RCConstants.MAX_STIRRUP_SPACING_LOW_VS_DEPTH_FACTOR * d
172
+ : RCConstants.MAX_STIRRUP_SPACING_LOW_VS;
173
+ }
174
+ else {
175
+ const requiredVs = Vu / RCConstants.SHEAR_STRENGTH_REDUCTION_FACTOR - Vc; // kN
176
+ const maxVs = RCConstants.MAX_VS_COEFFICIENT * sqrtFc * bw * d * 0.001; // kN
177
+ if (requiredVs > maxVs) {
178
+ throw new RCDesignError(Errors.SHEAR_STRENGTH_EXCEEDS_MAX);
179
+ }
180
+ const strengthAvOverS = (requiredVs * 1000) / (fyt * d); // mm^2/mm
181
+ requiredAvOverS = Math.max(minAvOverS, strengthAvOverS);
182
+ const vsThreshold = RCConstants.VS_SPACING_THRESHOLD_COEFFICIENT * sqrtFc * bw * d * 0.001; // kN
183
+ maxSpacing =
184
+ requiredVs <= vsThreshold
185
+ ? Math.min(RCConstants.MAX_STIRRUP_SPACING_LOW_VS_DEPTH_FACTOR * d, RCConstants.MAX_STIRRUP_SPACING_LOW_VS)
186
+ : Math.min(RCConstants.MAX_STIRRUP_SPACING_HIGH_VS_DEPTH_FACTOR * d, RCConstants.MAX_STIRRUP_SPACING_HIGH_VS);
187
+ }
188
+ if (Av !== undefined && s !== undefined) {
189
+ const providedAvOverS = Av / s;
190
+ if (providedAvOverS < requiredAvOverS) {
191
+ warnings.push({
192
+ reference: "ACI318-19, 9.6.3.1",
193
+ message: `Provided Av/s (${MyMath.roundToDecimalPlaces(providedAvOverS, 4)} mm2/mm) < required Av/s (${MyMath.roundToDecimalPlaces(requiredAvOverS, 4)} mm2/mm).`,
194
+ });
195
+ }
196
+ if (maxSpacing !== null && s > maxSpacing) {
197
+ warnings.push({
198
+ reference: "ACI318-19, 9.7.6.2.2",
199
+ message: `Provided spacing s (${s} mm) > max allowed spacing (${MyMath.roundToDecimalPlaces(maxSpacing, 2)} mm).`,
200
+ });
201
+ }
202
+ }
203
+ }
204
+ return {
205
+ required,
206
+ minimumOnly,
207
+ calculationDetails: {
208
+ phiVc,
209
+ halfPhiVc: MyMath.roundToDecimalPlaces(halfPhiVc, 2),
210
+ requiredAvOverS: MyMath.roundToDecimalPlaces(requiredAvOverS, 4),
211
+ maxSpacing: maxSpacing === null ? null : MyMath.roundToDecimalPlaces(maxSpacing, 2),
212
+ },
213
+ unit: "kN",
214
+ warnings,
215
+ };
216
+ };
217
+ const calculateRectSinglyMn = (singlySection) => {
218
+ const { Es, fy, fc_, As, b, d } = singlySection;
219
+ const warnings = [];
220
+ const steelYieldStrain = fy / Es;
221
+ const Ac = (As * fy) / (0.85 * fc_);
222
+ const beta1 = concreteBeta(fc_);
223
+ const a = Ac / b;
224
+ const c = a / beta1;
225
+ const tensileSteelStrain = (RCConstants.CONCRETE_ULTIMATE_STRAIN * (d - c)) / c;
226
+ if (tensileSteelStrain < steelYieldStrain + RCConstants.CONCRETE_ULTIMATE_STRAIN) {
227
+ throw new RCDesignError(Errors.TENSILE_STEEL_NOT_YIELDING);
228
+ }
229
+ const y_ = a / 2;
230
+ return {
231
+ Mn: As * fy * (d - y_) * 0.001 * 0.001, // Convert to kN-m
232
+ calculationDetails: {
233
+ c: MyMath.roundToDecimalPlaces(c, 2),
234
+ a: MyMath.roundToDecimalPlaces(a, 2),
235
+ beta1: MyMath.roundToDecimalPlaces(beta1, 3),
236
+ d: d,
237
+ As: As,
238
+ ro: MyMath.roundToDecimalPlaces(As / (b * d), 6),
239
+ },
240
+ warnings: warnings,
241
+ };
242
+ };
243
+ const calculateRectDoublyMn = (doublySection) => {
244
+ const { Es, fy, fc_, As, As_, b, d, d_ } = doublySection;
245
+ const warnings = [];
246
+ const steelYieldStrain = fy / Es;
247
+ const beta1 = concreteBeta(fc_);
248
+ // Compression-positive: negative once d_ falls below the neutral axis, where
249
+ // the "compression" steel is really in tension.
250
+ const compressionSteelStrainAt = (neutralAxis) => (RCConstants.CONCRETE_ULTIMATE_STRAIN * (neutralAxis - d_)) / neutralAxis;
251
+ // Tension-positive, the opposite convention.
252
+ const tensileSteelStrainAt = (neutralAxis) => (RCConstants.CONCRETE_ULTIMATE_STRAIN * (d - neutralAxis)) / neutralAxis;
253
+ // First solve assuming the compression steel stays elastic and the tensile
254
+ // steel yields, so its force is Es * strain: solve for c by quadratic.
255
+ const A = 0.85 * fc_ * b * beta1;
256
+ const B = RCConstants.CONCRETE_ULTIMATE_STRAIN * As_ * Es - As * fy;
257
+ const C = -RCConstants.CONCRETE_ULTIMATE_STRAIN * As_ * Es * d_;
258
+ // Compression steel above the concrete face (a top plate) makes d_ negative,
259
+ // and both roots are then positive — so pick the root the elastic assumption
260
+ // actually holds for rather than simply the larger one.
261
+ const roots = MyMath.solveQuadratic(A, B, C).filter((root) => root > 0);
262
+ const elasticRoot = roots.find((root) => Math.abs(Es * compressionSteelStrainAt(root)) <= fy);
263
+ let c;
264
+ let fs_;
265
+ if (elasticRoot !== undefined) {
266
+ c = elasticRoot;
267
+ fs_ = Es * compressionSteelStrainAt(c);
268
+ }
269
+ else {
270
+ // No solution keeps the compression steel elastic, so re-solve equilibrium
271
+ // with it at its yield stress (ACI318-19, 20.2.2.4). Steel below the
272
+ // neutral axis yields in tension instead, reversing the sign.
273
+ const yieldsInCompression = roots.length === 0 || compressionSteelStrainAt(roots[0]) > 0;
274
+ fs_ = yieldsInCompression ? fy : -fy;
275
+ c = ((As - (yieldsInCompression ? As_ : -As_)) * fy) / (0.85 * fc_ * b * beta1);
276
+ }
277
+ if (c <= 0) {
278
+ // Compression steel alone outweighs the tension steel: no equilibrium
279
+ // exists with the tension steel yielding, so the section is not tension
280
+ // controlled by definition.
281
+ throw new RCDesignError(Errors.TENSILE_STEEL_NOT_YIELDING);
282
+ }
283
+ const a = c * beta1;
284
+ const tensileSteelStrain = tensileSteelStrainAt(c);
285
+ if (tensileSteelStrain < steelYieldStrain + RCConstants.CONCRETE_ULTIMATE_STRAIN) {
286
+ throw new RCDesignError(Errors.TENSILE_STEEL_NOT_YIELDING);
287
+ }
288
+ // A section whose compression steel sits below the neutral axis is still a
289
+ // valid section — that steel simply acts in tension and reduces Mn, which
290
+ // the negative fs_ already accounts for. Warn rather than reject it.
291
+ if (d_ > c) {
292
+ warnings.push({
293
+ reference: "ACI318-19, 22.2.1.2",
294
+ message: `d' (${MyMath.roundToDecimalPlaces(d_, 2)} mm) > c (${MyMath.roundToDecimalPlaces(c, 2)} mm): ` +
295
+ `the compression steel lies below the neutral axis and acts in tension ` +
296
+ `(fs' = ${MyMath.roundToDecimalPlaces(fs_, 2)} MPa), reducing Mn.`,
297
+ });
298
+ }
299
+ const y_ = a / 2;
300
+ const Ac = b * a;
301
+ return {
302
+ Mn: (0.85 * fc_ * Ac * (d - y_) + As_ * fs_ * (d - d_)) * 0.001 * 0.001, // Convert to kN-m
303
+ calculationDetails: {
304
+ c: MyMath.roundToDecimalPlaces(c, 2),
305
+ a: MyMath.roundToDecimalPlaces(a, 2),
306
+ beta1: MyMath.roundToDecimalPlaces(beta1, 3),
307
+ d: d,
308
+ d_: d_,
309
+ As: As,
310
+ As_: As_,
311
+ fs_: MyMath.roundToDecimalPlaces(fs_, 2),
312
+ ro: MyMath.roundToDecimalPlaces(As / (b * d), 6),
313
+ // Compression reinforcement ratio on the same basis as ro, so the two are
314
+ // directly comparable.
315
+ ro_: MyMath.roundToDecimalPlaces(As_ / (b * d), 6),
316
+ },
317
+ warnings: warnings,
318
+ };
319
+ };
320
+ //# sourceMappingURL=rc-beam-design.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rc-beam-design.js","sourceRoot":"","sources":["../../../src/rc/rc-beam-design.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAE1C,OAAO,EAOL,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AAItC,OAAO,KAAK,WAAW,MAAM,iCAAiC,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAqBzC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,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,GAAG;YACR,GAAG,EAAE,MAAM,CAAC,oBAAoB,CAAC,GAAG,EAAE,CAAC,CAAC;YACxC,EAAE,EAAE,MAAM,CAAC,oBAAoB,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;YAChD,0EAA0E;YAC1E,uBAAuB;YACvB,GAAG,EAAE,MAAM,CAAC,oBAAoB,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;SACnD;QACD,QAAQ,EAAE,QAAQ;KACnB,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,55 @@
1
+ import { BEAM_INERTIA_MODIFIER, COLUMN_INERTIA_MODIFIER, CONCRETE_POISSON_RATIO, CONCRETE_UNIT_WEIGHT, } from "../core/constants/frame.constant.js";
2
+ import { concreteElasticModulus } from "./general.js";
3
+ /**
4
+ * Saint-Venant torsion constant of a solid rectangle:
5
+ * `J = a·t³·(1/3 − 0.21·(t/a)·(1 − t⁴/(12a⁴)))`, with a the longer and t the shorter side.
6
+ */
7
+ const rectangleTorsionConstant = (b, h) => {
8
+ const a = Math.max(b, h);
9
+ const t = Math.min(b, h);
10
+ return a * t ** 3 * (1 / 3 - 0.21 * (t / a) * (1 - t ** 4 / (12 * a ** 4)));
11
+ };
12
+ /**
13
+ * Converts a rectangular RC beam section into `SectionProperties` for frame analysis.
14
+ *
15
+ * Local 2 is taken along the depth `h` and local 3 along the width `b`, so
16
+ * `I33 = m·b·h³/12` (major axis) and `I22 = m·h·b³/12`, where m is the inertia modifier.
17
+ * The modifier is applied to the bending inertias only; A and J are gross values, and the
18
+ * unit weight (for self-weight) acts on the gross area.
19
+ *
20
+ * @param section - Rectangular RC section (uses `fc_`, `b` and `h`)
21
+ * @param options - Member type or explicit inertia modifier, Poisson's ratio
22
+ * @returns Object containing `sectionProperties`, `calculationDetails`, `unit`, and `warnings`
23
+ */
24
+ export const rectBeamToSectionProperties = (section, options = {}) => {
25
+ const warnings = [];
26
+ const member = options.member ?? "beam";
27
+ const modifier = options.inertiaModifier ??
28
+ (member === "beam" ? BEAM_INERTIA_MODIFIER : member === "column" ? COLUMN_INERTIA_MODIFIER : 1);
29
+ const nu = options.poissonRatio ?? CONCRETE_POISSON_RATIO;
30
+ const unitWeight = options.unitWeight ?? CONCRETE_UNIT_WEIGHT;
31
+ const { fc_, b, h } = section;
32
+ if (modifier === 1) {
33
+ warnings.push({
34
+ reference: "ACI318-19, 6.6.3.1.1",
35
+ message: "Gross-section inertia used; elastic analysis at factored load level should use the reduced moments of inertia (0.35Ig beams, 0.70Ig columns).",
36
+ });
37
+ }
38
+ const E = concreteElasticModulus(fc_);
39
+ const sectionProperties = {
40
+ E,
41
+ G: E / (2 * (1 + nu)),
42
+ A: b * h,
43
+ I22: (modifier * h * b ** 3) / 12,
44
+ I33: (modifier * b * h ** 3) / 12,
45
+ J: rectangleTorsionConstant(b, h),
46
+ unitWeight,
47
+ };
48
+ return {
49
+ sectionProperties,
50
+ calculationDetails: { inertiaModifier: modifier, poissonRatio: nu, unitWeight },
51
+ unit: "N, mm, MPa",
52
+ warnings,
53
+ };
54
+ };
55
+ //# sourceMappingURL=rc-section-properties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rc-section-properties.js","sourceRoot":"","sources":["../../../src/rc/rc-section-properties.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,oCAAoC,CAAC;AAK5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAanD;;;GAGG;AACH,MAAM,wBAAwB,GAAG,CAAC,CAAS,EAAE,CAAS,EAAU,EAAE;IAChE,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACzB,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACzB,OA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CAAC,QAAQ,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE;QACjC,GAAG,EAAE,CAAC,QAAQ,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE;QACjC,CAAC,EAAE,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC;QACjC,UAAU;KACX,CAAC;IAEF,OAAO;QACL,iBAAiB;QACjB,kBAAkB,EAAE,EAAE,eAAe,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,EAAE,UAAU,EAAE;QAC/E,IAAI,EAAE,YAAY;QAClB,QAAQ;KACT,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { calculateSteelJacketedBeamMomentCapacity } from "./rc-beam-steel-plate-jacketing.js";
2
+ export { plateInterfaceShearFlow, boltShearCapacity, plateInterfaceBoltRequirement, } from "./rc-beam-plate-interface-bolts.js";
3
+ export { sidePlateShearCapacityByWebYielding, sidePlateShearCapacityByTensionTie, compareSidePlateShearCapacity, } from "./rc-beam-side-plate-shear.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/strengthening/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wCAAwC,EAAE,MAAM,iCAAiC,CAAC;AAC3F,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,mCAAmC,EACnC,kCAAkC,EAClC,6BAA6B,GAC9B,MAAM,4BAA4B,CAAC"}