@theerapat-s28/ts-structural-eng-tools 1.4.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.
- package/README.md +44 -4
- package/dist/core/constants/frame.constant.d.ts +14 -0
- package/dist/core/constants/frame.constant.js +18 -0
- package/dist/core/constants/frame.constant.js.map +1 -0
- package/dist/core/constants/rc.constant.d.ts +7 -0
- package/dist/core/constants/rc.constant.js +20 -1
- package/dist/core/constants/rc.constant.js.map +1 -1
- package/dist/core/errors/frame-analysis.error.d.ts +33 -0
- package/dist/core/errors/frame-analysis.error.js +74 -0
- package/dist/core/errors/frame-analysis.error.js.map +1 -0
- package/dist/core/errors/rc-design.error.js +8 -0
- package/dist/core/errors/rc-design.error.js.map +1 -1
- package/dist/core/index.d.ts +7 -3
- package/dist/core/index.js +16 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/types/plate-jacketing.type.d.ts +37 -0
- package/dist/core/types/plate-jacketing.type.js +8 -0
- package/dist/core/types/plate-jacketing.type.js.map +1 -1
- package/dist/core/types/section-properties.type.d.ts +13 -0
- package/dist/core/types/section-properties.type.js +3 -0
- package/dist/core/types/section-properties.type.js.map +1 -0
- package/dist/esm/core/constants/frame.constant.js +15 -0
- package/dist/esm/core/constants/frame.constant.js.map +1 -0
- package/dist/esm/core/constants/rc.constant.js +63 -0
- package/dist/esm/core/constants/rc.constant.js.map +1 -0
- package/dist/esm/core/errors/frame-analysis.error.js +70 -0
- package/dist/esm/core/errors/frame-analysis.error.js.map +1 -0
- package/dist/esm/core/errors/rc-design.error.js +64 -0
- package/dist/esm/core/errors/rc-design.error.js.map +1 -0
- package/dist/esm/core/index.js +9 -0
- package/dist/esm/core/index.js.map +1 -0
- package/dist/esm/core/types/output-message.type.js +2 -0
- package/dist/esm/core/types/output-message.type.js.map +1 -0
- package/dist/esm/core/types/plate-jacketing.type.js +18 -0
- package/dist/esm/core/types/plate-jacketing.type.js.map +1 -0
- package/dist/esm/core/types/rc-beam.type.js +11 -0
- package/dist/esm/core/types/rc-beam.type.js.map +1 -0
- package/dist/esm/core/types/section-properties.type.js +2 -0
- package/dist/esm/core/types/section-properties.type.js.map +1 -0
- package/dist/esm/core/types/unit.type.js +2 -0
- package/dist/esm/core/types/unit.type.js.map +1 -0
- package/dist/esm/fea/frame/elements/beam-3d-stiffness.js +84 -0
- package/dist/esm/fea/frame/elements/beam-3d-stiffness.js.map +1 -0
- package/dist/esm/fea/frame/elements/fixed-end-forces.js +75 -0
- package/dist/esm/fea/frame/elements/fixed-end-forces.js.map +1 -0
- package/dist/esm/fea/frame/elements/static-condensation.js +55 -0
- package/dist/esm/fea/frame/elements/static-condensation.js.map +1 -0
- package/dist/esm/fea/frame/index.js +6 -0
- package/dist/esm/fea/frame/index.js.map +1 -0
- package/dist/esm/fea/frame/post/demand-envelope.js +97 -0
- package/dist/esm/fea/frame/post/demand-envelope.js.map +1 -0
- package/dist/esm/fea/frame/post/envelope.js +59 -0
- package/dist/esm/fea/frame/post/envelope.js.map +1 -0
- package/dist/esm/fea/frame/post/member-diagram.js +332 -0
- package/dist/esm/fea/frame/post/member-diagram.js.map +1 -0
- package/dist/esm/fea/frame/post/present-state.js +106 -0
- package/dist/esm/fea/frame/post/present-state.js.map +1 -0
- package/dist/esm/fea/frame/solver/analyze-frame.js +123 -0
- package/dist/esm/fea/frame/solver/analyze-frame.js.map +1 -0
- package/dist/esm/fea/frame/solver/boundary-conditions.js +33 -0
- package/dist/esm/fea/frame/solver/boundary-conditions.js.map +1 -0
- package/dist/esm/fea/frame/solver/combinations.js +69 -0
- package/dist/esm/fea/frame/solver/combinations.js.map +1 -0
- package/dist/esm/fea/frame/solver/frame-system.js +122 -0
- package/dist/esm/fea/frame/solver/frame-system.js.map +1 -0
- package/dist/esm/fea/frame/solver/global-assembly.js +27 -0
- package/dist/esm/fea/frame/solver/global-assembly.js.map +1 -0
- package/dist/esm/fea/frame/solver/load-case-solver.js +119 -0
- package/dist/esm/fea/frame/solver/load-case-solver.js.map +1 -0
- package/dist/esm/fea/frame/transformation/coordinate-transform.js +71 -0
- package/dist/esm/fea/frame/transformation/coordinate-transform.js.map +1 -0
- package/dist/esm/fea/frame/types/model.type.js +2 -0
- package/dist/esm/fea/frame/types/model.type.js.map +1 -0
- package/dist/esm/fea/frame/types/results.type.js +2 -0
- package/dist/esm/fea/frame/types/results.type.js.map +1 -0
- package/dist/esm/fea/frame/validation/validate-model.js +292 -0
- package/dist/esm/fea/frame/validation/validate-model.js.map +1 -0
- package/dist/esm/fea/index.js +3 -0
- package/dist/esm/fea/index.js.map +1 -0
- package/dist/esm/index.js +10 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/rc/general.js +32 -0
- package/dist/esm/rc/general.js.map +1 -0
- package/dist/esm/rc/index.js +5 -0
- package/dist/esm/rc/index.js.map +1 -0
- package/dist/esm/rc/rc-bar-layout.js +89 -0
- package/dist/esm/rc/rc-bar-layout.js.map +1 -0
- package/dist/esm/rc/rc-beam-design.js +320 -0
- package/dist/esm/rc/rc-beam-design.js.map +1 -0
- package/dist/esm/rc/rc-section-properties.js +55 -0
- package/dist/esm/rc/rc-section-properties.js.map +1 -0
- package/dist/esm/strengthening/index.js +4 -0
- package/dist/esm/strengthening/index.js.map +1 -0
- package/dist/esm/strengthening/rc-beam-plate-interface-bolts.js +338 -0
- package/dist/esm/strengthening/rc-beam-plate-interface-bolts.js.map +1 -0
- package/dist/esm/strengthening/rc-beam-side-plate-shear.js +381 -0
- package/dist/esm/strengthening/rc-beam-side-plate-shear.js.map +1 -0
- package/dist/esm/strengthening/rc-beam-steel-plate-jacketing.js +90 -0
- package/dist/esm/strengthening/rc-beam-steel-plate-jacketing.js.map +1 -0
- package/dist/esm/utils/index.js +5 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/esm/utils/math.js +30 -0
- package/dist/esm/utils/math.js.map +1 -0
- package/dist/esm/utils/matrix.js +145 -0
- package/dist/esm/utils/matrix.js.map +1 -0
- package/dist/esm/utils/merge-warning.js +11 -0
- package/dist/esm/utils/merge-warning.js.map +1 -0
- package/dist/esm/utils/skyline.js +151 -0
- package/dist/esm/utils/skyline.js.map +1 -0
- package/dist/fea/frame/elements/beam-3d-stiffness.d.ts +29 -0
- package/dist/fea/frame/elements/beam-3d-stiffness.js +90 -0
- package/dist/fea/frame/elements/beam-3d-stiffness.js.map +1 -0
- package/dist/fea/frame/elements/fixed-end-forces.d.ts +22 -0
- package/dist/fea/frame/elements/fixed-end-forces.js +79 -0
- package/dist/fea/frame/elements/fixed-end-forces.js.map +1 -0
- package/dist/fea/frame/elements/static-condensation.d.ts +19 -0
- package/dist/fea/frame/elements/static-condensation.js +59 -0
- package/dist/fea/frame/elements/static-condensation.js.map +1 -0
- package/dist/fea/frame/index.d.ts +9 -0
- package/dist/fea/frame/index.js +16 -0
- package/dist/fea/frame/index.js.map +1 -0
- package/dist/fea/frame/post/demand-envelope.d.ts +36 -0
- package/dist/fea/frame/post/demand-envelope.js +101 -0
- package/dist/fea/frame/post/demand-envelope.js.map +1 -0
- package/dist/fea/frame/post/envelope.d.ts +8 -0
- package/dist/fea/frame/post/envelope.js +63 -0
- package/dist/fea/frame/post/envelope.js.map +1 -0
- package/dist/fea/frame/post/member-diagram.d.ts +26 -0
- package/dist/fea/frame/post/member-diagram.js +336 -0
- package/dist/fea/frame/post/member-diagram.js.map +1 -0
- package/dist/fea/frame/post/present-state.d.ts +19 -0
- package/dist/fea/frame/post/present-state.js +111 -0
- package/dist/fea/frame/post/present-state.js.map +1 -0
- package/dist/fea/frame/solver/analyze-frame.d.ts +67 -0
- package/dist/fea/frame/solver/analyze-frame.js +128 -0
- package/dist/fea/frame/solver/analyze-frame.js.map +1 -0
- package/dist/fea/frame/solver/boundary-conditions.d.ts +14 -0
- package/dist/fea/frame/solver/boundary-conditions.js +37 -0
- package/dist/fea/frame/solver/boundary-conditions.js.map +1 -0
- package/dist/fea/frame/solver/combinations.d.ts +11 -0
- package/dist/fea/frame/solver/combinations.js +73 -0
- package/dist/fea/frame/solver/combinations.js.map +1 -0
- package/dist/fea/frame/solver/frame-system.d.ts +42 -0
- package/dist/fea/frame/solver/frame-system.js +126 -0
- package/dist/fea/frame/solver/frame-system.js.map +1 -0
- package/dist/fea/frame/solver/global-assembly.d.ts +17 -0
- package/dist/fea/frame/solver/global-assembly.js +33 -0
- package/dist/fea/frame/solver/global-assembly.js.map +1 -0
- package/dist/fea/frame/solver/load-case-solver.d.ts +34 -0
- package/dist/fea/frame/solver/load-case-solver.js +124 -0
- package/dist/fea/frame/solver/load-case-solver.js.map +1 -0
- package/dist/fea/frame/transformation/coordinate-transform.d.ts +21 -0
- package/dist/fea/frame/transformation/coordinate-transform.js +76 -0
- package/dist/fea/frame/transformation/coordinate-transform.js.map +1 -0
- package/dist/fea/frame/types/model.type.d.ts +112 -0
- package/dist/fea/frame/types/model.type.js +3 -0
- package/dist/fea/frame/types/model.type.js.map +1 -0
- package/dist/fea/frame/types/results.type.d.ts +134 -0
- package/dist/fea/frame/types/results.type.js +3 -0
- package/dist/fea/frame/types/results.type.js.map +1 -0
- package/dist/fea/frame/validation/validate-model.d.ts +18 -0
- package/dist/fea/frame/validation/validate-model.js +298 -0
- package/dist/fea/frame/validation/validate-model.js.map +1 -0
- package/dist/fea/index.d.ts +1 -0
- package/dist/fea/index.js +19 -0
- package/dist/fea/index.js.map +1 -0
- package/dist/index.d.ts +9 -5
- package/dist/index.js +44 -1
- package/dist/index.js.map +1 -1
- package/dist/rc/index.d.ts +2 -0
- package/dist/rc/index.js +3 -1
- package/dist/rc/index.js.map +1 -1
- package/dist/rc/rc-section-properties.d.ts +35 -0
- package/dist/rc/rc-section-properties.js +59 -0
- package/dist/rc/rc-section-properties.js.map +1 -0
- package/dist/strengthening/index.d.ts +1 -0
- package/dist/strengthening/index.js +5 -1
- package/dist/strengthening/index.js.map +1 -1
- package/dist/strengthening/rc-beam-side-plate-shear.d.ts +254 -0
- package/dist/strengthening/rc-beam-side-plate-shear.js +420 -0
- package/dist/strengthening/rc-beam-side-plate-shear.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +19 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/matrix.d.ts +45 -0
- package/dist/utils/matrix.js +157 -0
- package/dist/utils/matrix.js.map +1 -0
- package/dist/utils/skyline.d.ts +49 -0
- package/dist/utils/skyline.js +161 -0
- package/dist/utils/skyline.js.map +1 -0
- package/package.json +20 -2
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.compareSidePlateShearCapacity = exports.sidePlateShearCapacityByTensionTie = exports.sidePlateShearCapacityByWebYielding = void 0;
|
|
37
|
+
const rc_design_error_1 = require("../core/errors/rc-design.error");
|
|
38
|
+
const MyMath = __importStar(require("../utils/math"));
|
|
39
|
+
const RCConstants = __importStar(require("../core/constants/rc.constant"));
|
|
40
|
+
const rc_beam_design_1 = require("../rc/rc-beam-design");
|
|
41
|
+
const rc_beam_plate_interface_bolts_1 = require("./rc-beam-plate-interface-bolts");
|
|
42
|
+
const plate_jacketing_type_1 = require("../core/types/plate-jacketing.type");
|
|
43
|
+
const resolveSidePlateGeometry = (plates) => {
|
|
44
|
+
const sides = plates.sides ?? RCConstants.DEFAULT_SIDE_PLATE_SIDES;
|
|
45
|
+
const Es = plates.Es ?? RCConstants.DEFAULT_PLATE_ELASTIC_MODULUS;
|
|
46
|
+
const strips = plates.configuration === "strips";
|
|
47
|
+
// A continuous plate is the limiting case of strips with wp = s, so it carries
|
|
48
|
+
// a coverage ratio of 1 and the vertical orientation the model assumes.
|
|
49
|
+
const wp = strips ? (plates.width ?? 0) : null;
|
|
50
|
+
const s = strips ? (plates.spacing ?? 0) : null;
|
|
51
|
+
const angle = strips
|
|
52
|
+
? (plates.angle ?? RCConstants.DEFAULT_SIDE_PLATE_ANGLE)
|
|
53
|
+
: RCConstants.DEFAULT_SIDE_PLATE_ANGLE;
|
|
54
|
+
return {
|
|
55
|
+
sides,
|
|
56
|
+
tp: plates.thickness,
|
|
57
|
+
dp: plates.depth,
|
|
58
|
+
wp,
|
|
59
|
+
s,
|
|
60
|
+
coverageRatio: strips && s !== null && s > 0 ? wp / s : 1,
|
|
61
|
+
angleRad: (angle * Math.PI) / 180,
|
|
62
|
+
Es,
|
|
63
|
+
fy: plates.fy,
|
|
64
|
+
configuration: plates.configuration,
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
const validateSidePlateGeometry = (section, plates, geo) => {
|
|
68
|
+
if (!(0, plate_jacketing_type_1.hasSidePlate)(plates) ||
|
|
69
|
+
geo.fy <= 0 ||
|
|
70
|
+
geo.Es <= 0 ||
|
|
71
|
+
(geo.sides !== 1 && geo.sides !== 2) ||
|
|
72
|
+
section.bw <= 0 ||
|
|
73
|
+
section.d <= 0 ||
|
|
74
|
+
geo.dp > section.d) {
|
|
75
|
+
throw new rc_design_error_1.RCDesignError(rc_design_error_1.Errors.SIDE_PLATE_GEOMETRY_INVALID);
|
|
76
|
+
}
|
|
77
|
+
if (geo.configuration === "strips") {
|
|
78
|
+
const wp = geo.wp ?? 0;
|
|
79
|
+
const s = geo.s ?? 0;
|
|
80
|
+
// A strip wider than its pitch is a continuous plate described wrongly, and
|
|
81
|
+
// an inclination outside (0, 90] has no meaning in the tie model.
|
|
82
|
+
if (wp <= 0 || s <= 0 || wp > s || geo.angleRad <= 0 || geo.angleRad > Math.PI / 2) {
|
|
83
|
+
throw new rc_design_error_1.RCDesignError(rc_design_error_1.Errors.SIDE_PLATE_GEOMETRY_INVALID);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (plates.anchorage !== undefined) {
|
|
87
|
+
const { boltsPerRow, rowSpacing } = plates.anchorage;
|
|
88
|
+
if (boltsPerRow <= 0 || rowSpacing <= 0) {
|
|
89
|
+
throw new rc_design_error_1.RCDesignError(rc_design_error_1.Errors.SIDE_PLATE_GEOMETRY_INVALID);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Shear capacity of the section before strengthening: φVc + φVs.
|
|
95
|
+
*
|
|
96
|
+
* A section with no stirrups (`Av <= 0` or `s <= 0`) contributes φVs = 0 rather
|
|
97
|
+
* than dividing by a zero spacing.
|
|
98
|
+
*
|
|
99
|
+
* An existing Vs beyond the ACI 318-19 22.5.1.2 maximum reaches `stirrupShearCapacity`
|
|
100
|
+
* as error 105 ("section too small for shear"). In the strengthening context the
|
|
101
|
+
* useful diagnosis is the more specific one — the web is already at its ceiling, so
|
|
102
|
+
* no added plate force can be developed — so it is re-thrown as 206.
|
|
103
|
+
*/
|
|
104
|
+
const baselineShearCapacity = (section) => {
|
|
105
|
+
const concrete = (0, rc_beam_design_1.concreteShearCapacity)(section);
|
|
106
|
+
const hasStirrups = section.Av > 0 && section.s > 0;
|
|
107
|
+
let stirrups;
|
|
108
|
+
if (hasStirrups) {
|
|
109
|
+
try {
|
|
110
|
+
stirrups = (0, rc_beam_design_1.stirrupShearCapacity)(section);
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
if (error instanceof rc_design_error_1.RCDesignError && error.code === rc_design_error_1.Errors.SHEAR_STRENGTH_EXCEEDS_MAX.code) {
|
|
114
|
+
throw new rc_design_error_1.RCDesignError(rc_design_error_1.Errors.STRENGTHENED_SHEAR_NO_HEADROOM);
|
|
115
|
+
}
|
|
116
|
+
throw error;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
stirrups = { phiVs: 0, calculationDetails: { Vs: 0 }, warnings: [] };
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
phiVn: MyMath.roundToDecimalPlaces(concrete.phiVc + stirrups.phiVs, 2),
|
|
124
|
+
phiVc: concrete.phiVc,
|
|
125
|
+
phiVs: stirrups.phiVs,
|
|
126
|
+
Vc: concrete.calculationDetails.Vc,
|
|
127
|
+
Vs: stirrups.calculationDetails.Vs,
|
|
128
|
+
warnings: [...concrete.warnings, ...stirrups.warnings],
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Design strength the bolt group can drag into the concrete across a 45° crack.
|
|
133
|
+
*
|
|
134
|
+
* The crack's horizontal projection is taken as `dp`, so the rows anchoring the
|
|
135
|
+
* plate beyond it number `floor(dp / rowSpacing)`, at least one — the same
|
|
136
|
+
* `dfv / sf` counting ACI 440.2R uses for bonded shear reinforcement.
|
|
137
|
+
*
|
|
138
|
+
* The returned value already carries the anchor φ of 0.65 from `boltShearCapacity`,
|
|
139
|
+
* so it is compared against the plate's φVp on a design-strength basis.
|
|
140
|
+
*/
|
|
141
|
+
const anchorageCapacity = (anchorage, geo, warnings) => {
|
|
142
|
+
const boltResult = (0, rc_beam_plate_interface_bolts_1.boltShearCapacity)(anchorage.bolt);
|
|
143
|
+
warnings.push(...boltResult.warnings);
|
|
144
|
+
const exactRows = geo.dp / anchorage.rowSpacing;
|
|
145
|
+
const rows = Math.max(1, Math.floor(exactRows));
|
|
146
|
+
if (exactRows < 1) {
|
|
147
|
+
warnings.push({
|
|
148
|
+
message: `Bolt row spacing (${anchorage.rowSpacing} mm) exceeds the engaged plate depth (${geo.dp} mm); only one row was taken as crossing the assumed 45 degree crack.`,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
// Same minimum anchor spacing `plateInterfaceBoltRequirement` checks, so the two
|
|
152
|
+
// strengthening paths hold bolt layouts to one rule.
|
|
153
|
+
if (anchorage.bolt.diameter !== undefined) {
|
|
154
|
+
const minSpacing = RCConstants.MIN_ANCHOR_SPACING_DIAMETER_FACTOR * anchorage.bolt.diameter;
|
|
155
|
+
if (anchorage.rowSpacing < minSpacing) {
|
|
156
|
+
warnings.push({
|
|
157
|
+
reference: "ACI318-19, 17.9.2",
|
|
158
|
+
message: `Bolt row spacing (${anchorage.rowSpacing} mm) is below the minimum anchor spacing of 4*da (${minSpacing} mm); use a larger pitch, a smaller bolt, or fewer rows.`,
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
phiVanchorage: MyMath.roundToDecimalPlaces(geo.sides * rows * anchorage.boltsPerRow * boltResult.phiVbolt, 2),
|
|
164
|
+
rows,
|
|
165
|
+
phiVbolt: boltResult.phiVbolt,
|
|
166
|
+
boltsPerRow: anchorage.boltsPerRow,
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
/** Detailing and modelling warnings shared by both capacity models. */
|
|
170
|
+
const collectCommonWarnings = (section, plates, geo, warnings) => {
|
|
171
|
+
warnings.push({
|
|
172
|
+
message: "ACI 318-19 contains no provisions for steel side plates in shear; this capacity is an engineering model, not a code-sanctioned calculation, and must be confirmed against test data or a specialist review.",
|
|
173
|
+
});
|
|
174
|
+
if (geo.dp < section.d) {
|
|
175
|
+
warnings.push({
|
|
176
|
+
message: `Engaged plate depth dp (${geo.dp} mm) is less than the effective depth d (${section.d} mm); only the plated depth was taken as resisting shear.`,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
// Strip pitch is checked against ACI 318-19 9.7.6.2.2 alone, in `assembleResult`
|
|
180
|
+
// where Vp is known. ACI 440.2R-17 11.4.2 defers to the ACI 318 limits for internal
|
|
181
|
+
// steel shear reinforcement rather than imposing its own, so that one check
|
|
182
|
+
// satisfies both documents. (The `wf + d/4` rule of ACI 440.2R-08 did not survive
|
|
183
|
+
// into the 2017 edition and is deliberately not applied.)
|
|
184
|
+
if (geo.sides === 1) {
|
|
185
|
+
warnings.push({
|
|
186
|
+
message: "A plate on one face only loads the section eccentrically; the resulting torsion and out-of-plane twist are not captured by this in-plane shear model and must be assessed separately.",
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
if (plates.anchorage === undefined) {
|
|
190
|
+
warnings.push({
|
|
191
|
+
message: "No anchorage was supplied, so the reported capacity assumes the plate is fully developed; the bolt group or bond must be checked separately.",
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* Applies the ACI 318-19 22.5.1.2 web crushing cap and the anchorage limit, then
|
|
197
|
+
* assembles the `before`/`after` result both models return.
|
|
198
|
+
*
|
|
199
|
+
* The cap `Vs + Vp <= 0.66 sqrt(fc') bw d` — mirrored for bonded shear
|
|
200
|
+
* strengthening by ACI 440.2R-17 11.4.3, Eq. (11.4.3) — is a property of the concrete web, so
|
|
201
|
+
* it limits the plate force the web can host rather than invalidating the design:
|
|
202
|
+
* the plate contribution is truncated to the remaining headroom and a warning
|
|
203
|
+
* says so. Only a section whose existing Vs already exhausts the cap throws,
|
|
204
|
+
* because there no strengthening at all can be developed.
|
|
205
|
+
*
|
|
206
|
+
* @param VpNominal - Plate nominal shear contribution in N, before φ and before
|
|
207
|
+
* any model-specific reduction factor
|
|
208
|
+
* @param reductionFactor - Model-specific factor applied to the plate term only
|
|
209
|
+
* (1.0 for web yielding, psi_f for the tension tie)
|
|
210
|
+
*/
|
|
211
|
+
const assembleResult = (section, plates, geo, VpNominal, reductionFactor, method, modelDetails, warnings) => {
|
|
212
|
+
const before = baselineShearCapacity(section);
|
|
213
|
+
const baseWarnings = [...before.warnings, ...warnings];
|
|
214
|
+
const VpModelKN = VpNominal * reductionFactor * 0.001;
|
|
215
|
+
const maxVsKN = RCConstants.MAX_VS_COEFFICIENT * Math.sqrt(section.fc_) * section.bw * section.d * 0.001;
|
|
216
|
+
const headroomKN = maxVsKN - before.Vs;
|
|
217
|
+
if (headroomKN <= 0) {
|
|
218
|
+
throw new rc_design_error_1.RCDesignError(rc_design_error_1.Errors.STRENGTHENED_SHEAR_NO_HEADROOM);
|
|
219
|
+
}
|
|
220
|
+
const VpEffectiveKN = Math.min(VpModelKN, headroomKN);
|
|
221
|
+
const webCrushingGoverns = VpEffectiveKN < VpModelKN;
|
|
222
|
+
if (webCrushingGoverns) {
|
|
223
|
+
baseWarnings.push({
|
|
224
|
+
reference: "ACI318-19, 22.5.1.2",
|
|
225
|
+
message: `Plate contribution of ${MyMath.roundToDecimalPlaces(VpModelKN, 2)} kN truncated to the remaining web capacity of ${MyMath.roundToDecimalPlaces(headroomKN, 2)} kN, so that Vs + Vp stays within 0.66*sqrt(fc')*bw*d (${MyMath.roundToDecimalPlaces(maxVsKN, 2)} kN); a thinner or shallower plate carries the section just as far.`,
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
// ACI 318-19 9.7.6.2.2 halves the permitted spacing once the shear reinforcement
|
|
229
|
+
// carries more than 0.33*sqrt(fc')*bw*d. The plate is what usually pushes a section
|
|
230
|
+
// over that threshold, so the limit is keyed off Vs + Vp rather than Vs alone.
|
|
231
|
+
if (geo.configuration === "strips" && geo.s !== null) {
|
|
232
|
+
const sqrtFc = Math.sqrt(section.fc_);
|
|
233
|
+
const vsThresholdKN = RCConstants.VS_SPACING_THRESHOLD_COEFFICIENT * sqrtFc * section.bw * section.d * 0.001;
|
|
234
|
+
const highShear = before.Vs + VpEffectiveKN > vsThresholdKN;
|
|
235
|
+
const maxSpacing = highShear
|
|
236
|
+
? Math.min(RCConstants.MAX_STIRRUP_SPACING_HIGH_VS_DEPTH_FACTOR * section.d, RCConstants.MAX_STIRRUP_SPACING_HIGH_VS)
|
|
237
|
+
: Math.min(RCConstants.MAX_STIRRUP_SPACING_LOW_VS_DEPTH_FACTOR * section.d, RCConstants.MAX_STIRRUP_SPACING_LOW_VS);
|
|
238
|
+
if (geo.s > maxSpacing) {
|
|
239
|
+
baseWarnings.push({
|
|
240
|
+
reference: "ACI318-19, 9.7.6.2.2",
|
|
241
|
+
message: `Strip pitch (${geo.s} mm) exceeds the maximum shear reinforcement spacing of ${MyMath.roundToDecimalPlaces(maxSpacing, 2)} mm${highShear ? `, tightened because Vs + Vp (${MyMath.roundToDecimalPlaces(before.Vs + VpEffectiveKN, 2)} kN) exceeds 0.33*sqrt(fc')*bw*d (${MyMath.roundToDecimalPlaces(vsThresholdKN, 2)} kN)` : ""}; a diagonal crack can pass between strips without crossing one.`,
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
const phiVpPlate = MyMath.roundToDecimalPlaces(RCConstants.SHEAR_STRENGTH_REDUCTION_FACTOR * VpEffectiveKN, 2);
|
|
246
|
+
const anchorage = plates.anchorage !== undefined ? anchorageCapacity(plates.anchorage, geo, baseWarnings) : null;
|
|
247
|
+
const anchorageGoverns = anchorage !== null && anchorage.phiVanchorage < phiVpPlate;
|
|
248
|
+
const phiVp = anchorageGoverns
|
|
249
|
+
? anchorage.phiVanchorage
|
|
250
|
+
: phiVpPlate;
|
|
251
|
+
let governedBy = "plateCapacity";
|
|
252
|
+
if (anchorageGoverns) {
|
|
253
|
+
governedBy = "anchorage";
|
|
254
|
+
}
|
|
255
|
+
else if (webCrushingGoverns) {
|
|
256
|
+
governedBy = "webCrushing";
|
|
257
|
+
}
|
|
258
|
+
return {
|
|
259
|
+
method,
|
|
260
|
+
before: {
|
|
261
|
+
phiVn: before.phiVn,
|
|
262
|
+
calculationDetails: {
|
|
263
|
+
phiVc: before.phiVc,
|
|
264
|
+
phiVs: before.phiVs,
|
|
265
|
+
Vc: before.Vc,
|
|
266
|
+
Vs: before.Vs,
|
|
267
|
+
},
|
|
268
|
+
unit: "kN",
|
|
269
|
+
warnings: before.warnings,
|
|
270
|
+
},
|
|
271
|
+
after: {
|
|
272
|
+
phiVn: MyMath.roundToDecimalPlaces(before.phiVn + phiVp, 2),
|
|
273
|
+
phiVp: MyMath.roundToDecimalPlaces(phiVp, 2),
|
|
274
|
+
governedBy,
|
|
275
|
+
calculationDetails: {
|
|
276
|
+
phiVc: before.phiVc,
|
|
277
|
+
phiVs: before.phiVs,
|
|
278
|
+
Vp: MyMath.roundToDecimalPlaces(VpModelKN, 2),
|
|
279
|
+
VpEffective: MyMath.roundToDecimalPlaces(VpEffectiveKN, 2),
|
|
280
|
+
maxVs: MyMath.roundToDecimalPlaces(maxVsKN, 2),
|
|
281
|
+
headroom: MyMath.roundToDecimalPlaces(headroomKN, 2),
|
|
282
|
+
phiVpPlate,
|
|
283
|
+
phiVanchorage: anchorage !== null ? anchorage.phiVanchorage : null,
|
|
284
|
+
anchorageRows: anchorage !== null ? anchorage.rows : null,
|
|
285
|
+
phiVbolt: anchorage !== null ? anchorage.phiVbolt : null,
|
|
286
|
+
sides: geo.sides,
|
|
287
|
+
coverageRatio: MyMath.roundToDecimalPlaces(geo.coverageRatio, 4),
|
|
288
|
+
...modelDetails,
|
|
289
|
+
},
|
|
290
|
+
unit: "kN",
|
|
291
|
+
warnings: baseWarnings,
|
|
292
|
+
},
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
/**
|
|
296
|
+
* Shear capacity of a beam strengthened with bolted steel side plates, treating
|
|
297
|
+
* each plate as a supplementary web that resists in-plane shear.
|
|
298
|
+
*
|
|
299
|
+
* The plate reaches the von Mises shear yield stress of 0.6 fy (AISC 360 G2.1):
|
|
300
|
+
*
|
|
301
|
+
* - continuous: `Vp = nSides · 0.6 fy · tp · dp`
|
|
302
|
+
* - strips: `Vp = nSides · 0.6 fy · tp · dp · wp / s`
|
|
303
|
+
*
|
|
304
|
+
* Strips are handled as the fraction `wp / s` of a continuous web, which is an
|
|
305
|
+
* approximation — a discrete strip works more as a tension tie than as a web
|
|
306
|
+
* panel, which is what `sidePlateShearCapacityByTensionTie` models. Run both and
|
|
307
|
+
* take the lower value, or call `compareSidePlateShearCapacity`.
|
|
308
|
+
*
|
|
309
|
+
* ACI 318-19 has no provisions for steel side plates in shear; a warning always
|
|
310
|
+
* says so.
|
|
311
|
+
*
|
|
312
|
+
* @param section - Original beam shear properties (fc_, bw, d, Av, fyt, s, optional lambda)
|
|
313
|
+
* @param plates - Side plate geometry, strength, layout, and optional anchorage
|
|
314
|
+
* @returns `before` and `after` results, each with `phiVn` (kN), `calculationDetails`,
|
|
315
|
+
* `unit`, and `warnings`; `after` also carries `phiVp` and `governedBy`
|
|
316
|
+
* @throws {RCDesignError} 205 if the plate geometry is inconsistent, 206 if the
|
|
317
|
+
* existing Vs leaves no headroom under the ACI 318-19 22.5.1.2 maximum, 202 if
|
|
318
|
+
* the supplied bolt capacity is invalid
|
|
319
|
+
*/
|
|
320
|
+
const sidePlateShearCapacityByWebYielding = (section, plates) => {
|
|
321
|
+
const warnings = [];
|
|
322
|
+
const geo = resolveSidePlateGeometry(plates);
|
|
323
|
+
validateSidePlateGeometry(section, plates, geo);
|
|
324
|
+
collectCommonWarnings(section, plates, geo, warnings);
|
|
325
|
+
const tauY = RCConstants.PLATE_SHEAR_YIELD_COEFFICIENT * geo.fy; // MPa
|
|
326
|
+
const VpNominal = geo.sides * tauY * geo.tp * geo.dp * geo.coverageRatio; // N
|
|
327
|
+
// AISC 360 G2.1(a): beyond this slenderness the panel buckles in shear before it
|
|
328
|
+
// yields. The concrete restrains the inner face, so this is a warning, not a limit.
|
|
329
|
+
const slenderness = geo.dp / geo.tp;
|
|
330
|
+
const slendernessLimit = RCConstants.PLATE_SHEAR_SLENDERNESS_COEFFICIENT * Math.sqrt(geo.Es / geo.fy);
|
|
331
|
+
if (slenderness > slendernessLimit) {
|
|
332
|
+
warnings.push({
|
|
333
|
+
reference: "AISC360-22, G2.1",
|
|
334
|
+
message: `Plate slenderness dp/tp (${MyMath.roundToDecimalPlaces(slenderness, 1)}) exceeds 2.24*sqrt(Es/fy) (${MyMath.roundToDecimalPlaces(slendernessLimit, 1)}); shear buckling may precede yielding unless the plate is stiffened or continuously restrained by the concrete.`,
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
return assembleResult(section, plates, geo, VpNominal, 1.0, "webYielding", {
|
|
338
|
+
tauY: MyMath.roundToDecimalPlaces(tauY, 2),
|
|
339
|
+
slenderness: MyMath.roundToDecimalPlaces(slenderness, 1),
|
|
340
|
+
slendernessLimit: MyMath.roundToDecimalPlaces(slendernessLimit, 1),
|
|
341
|
+
}, warnings);
|
|
342
|
+
};
|
|
343
|
+
exports.sidePlateShearCapacityByWebYielding = sidePlateShearCapacityByWebYielding;
|
|
344
|
+
/**
|
|
345
|
+
* Shear capacity of a beam strengthened with bolted steel side plates, treating
|
|
346
|
+
* each plate as a tension tie crossing the diagonal crack, following the bonded
|
|
347
|
+
* shear reinforcement model of ACI 440.2R-17 §11.4 with steel in place of FRP:
|
|
348
|
+
*
|
|
349
|
+
* `Vp = nSides · tp · wp · ffe · (sin α + cos α) · dp / s`
|
|
350
|
+
*
|
|
351
|
+
* with `ffe = min(fy, Es · 0.004)` — the 0.004 strain cap of 440.2R §11.4, which
|
|
352
|
+
* keeps the crack tight enough for aggregate interlock — and the additional
|
|
353
|
+
* reduction factor `psi_f = 0.85` for two-sided bonded strengthening. A continuous
|
|
354
|
+
* plate is the case `wp = s`, `α = 90°`.
|
|
355
|
+
*
|
|
356
|
+
* Note that for structural steel `Es · 0.004 = 800 MPa` sits above any normal `fy`,
|
|
357
|
+
* so the strain cap does not bind and the tie reaches yield; this model therefore
|
|
358
|
+
* usually returns a higher capacity than `sidePlateShearCapacityByWebYielding` for
|
|
359
|
+
* a continuous plate. Neither is code-sanctioned for steel side plates — a warning
|
|
360
|
+
* always says so.
|
|
361
|
+
*
|
|
362
|
+
* @param section - Original beam shear properties (fc_, bw, d, Av, fyt, s, optional lambda)
|
|
363
|
+
* @param plates - Side plate geometry, strength, layout, and optional anchorage
|
|
364
|
+
* @returns `before` and `after` results, each with `phiVn` (kN), `calculationDetails`,
|
|
365
|
+
* `unit`, and `warnings`; `after` also carries `phiVp` and `governedBy`
|
|
366
|
+
* @throws {RCDesignError} 205 if the plate geometry is inconsistent, 206 if the
|
|
367
|
+
* existing Vs leaves no headroom under the ACI 318-19 22.5.1.2 maximum, 202 if
|
|
368
|
+
* the supplied bolt capacity is invalid
|
|
369
|
+
*/
|
|
370
|
+
const sidePlateShearCapacityByTensionTie = (section, plates) => {
|
|
371
|
+
const warnings = [];
|
|
372
|
+
const geo = resolveSidePlateGeometry(plates);
|
|
373
|
+
validateSidePlateGeometry(section, plates, geo);
|
|
374
|
+
collectCommonWarnings(section, plates, geo, warnings);
|
|
375
|
+
const strainLimitedStress = geo.Es * RCConstants.SIDE_PLATE_EFFECTIVE_STRAIN_LIMIT; // MPa
|
|
376
|
+
const ffe = Math.min(geo.fy, strainLimitedStress);
|
|
377
|
+
if (ffe < geo.fy) {
|
|
378
|
+
warnings.push({
|
|
379
|
+
reference: "ACI440.2R-17, 11.4",
|
|
380
|
+
message: `Effective plate stress limited to ${MyMath.roundToDecimalPlaces(ffe, 2)} MPa by the 0.004 strain cap, below fy (${geo.fy} MPa); the plate does not reach yield.`,
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
const orientation = Math.sin(geo.angleRad) + Math.cos(geo.angleRad);
|
|
384
|
+
const VpNominal = geo.sides * geo.tp * ffe * geo.dp * geo.coverageRatio * orientation; // N
|
|
385
|
+
return assembleResult(section, plates, geo, VpNominal, RCConstants.SIDE_PLATE_REDUCTION_FACTOR_PSI, "tensionTie", {
|
|
386
|
+
ffe: MyMath.roundToDecimalPlaces(ffe, 2),
|
|
387
|
+
strainLimitedStress: MyMath.roundToDecimalPlaces(strainLimitedStress, 2),
|
|
388
|
+
orientation: MyMath.roundToDecimalPlaces(orientation, 4),
|
|
389
|
+
psi: RCConstants.SIDE_PLATE_REDUCTION_FACTOR_PSI,
|
|
390
|
+
}, warnings);
|
|
391
|
+
};
|
|
392
|
+
exports.sidePlateShearCapacityByTensionTie = sidePlateShearCapacityByTensionTie;
|
|
393
|
+
/**
|
|
394
|
+
* Runs both side plate shear models on the same section and reports the lower
|
|
395
|
+
* result as governing, which is the intended entry point when selecting a
|
|
396
|
+
* conservative design capacity.
|
|
397
|
+
*
|
|
398
|
+
* @param section - Original beam shear properties (fc_, bw, d, Av, fyt, s, optional lambda)
|
|
399
|
+
* @param plates - Side plate geometry, strength, layout, and optional anchorage
|
|
400
|
+
* @returns `webYielding` and `tensionTie` results plus `governing`, holding the
|
|
401
|
+
* lower `phiVn`, its `phiVp`, and the `method` that produced it
|
|
402
|
+
* @throws {RCDesignError} Whatever either model throws — see their documentation
|
|
403
|
+
*/
|
|
404
|
+
const compareSidePlateShearCapacity = (section, plates) => {
|
|
405
|
+
const webYielding = (0, exports.sidePlateShearCapacityByWebYielding)(section, plates);
|
|
406
|
+
const tensionTie = (0, exports.sidePlateShearCapacityByTensionTie)(section, plates);
|
|
407
|
+
const governing = tensionTie.after.phiVn < webYielding.after.phiVn ? tensionTie : webYielding;
|
|
408
|
+
return {
|
|
409
|
+
webYielding,
|
|
410
|
+
tensionTie,
|
|
411
|
+
governing: {
|
|
412
|
+
method: governing.method,
|
|
413
|
+
phiVn: governing.after.phiVn,
|
|
414
|
+
phiVp: governing.after.phiVp,
|
|
415
|
+
governedBy: governing.after.governedBy,
|
|
416
|
+
},
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
exports.compareSidePlateShearCapacity = compareSidePlateShearCapacity;
|
|
420
|
+
//# sourceMappingURL=rc-beam-side-plate-shear.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rc-beam-side-plate-shear.js","sourceRoot":"","sources":["../../src/strengthening/rc-beam-side-plate-shear.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAyE;AACzE,wDAA0C;AAC1C,6EAA+D;AAE/D,2DAAqF;AAErF,mFAAoE;AAIpE,+EAK8C;AAuC9C,MAAM,wBAAwB,GAAG,CAAC,MAA2B,EAAqB,EAAE;IAClF,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,WAAW,CAAC,wBAAwB,CAAC;IACnE,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,IAAI,WAAW,CAAC,6BAA6B,CAAC;IAClE,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,KAAK,QAAQ,CAAC;IAEjD,+EAA+E;IAC/E,wEAAwE;IACxE,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/C,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC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BAAoB,CAAC,WAAW,EAAE,CAAC,CAAC;QACxD,GAAG,EAAE,WAAW,CAAC,+BAA+B;KACjD,EACD,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC;AArCW,QAAA,kCAAkC,sCAqC7C;AAEF;;;;;;;;;;GAUG;AACI,MAAM,6BAA6B,GAAG,CAC3C,OAA4B,EAC5B,MAA2B,EAC3B,EAAE;IACF,MAAM,WAAW,GAAG,IAAA,2CAAmC,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACzE,MAAM,UAAU,GAAG,IAAA,0CAAkC,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAEvE,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC;IAE9F,OAAO;QACL,WAAW;QACX,UAAU;QACV,SAAS,EAAE;YACT,MAAM,EAAE,SAAS,CAAC,MAAM;YACxB,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,KAAK;YAC5B,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,KAAK;YAC5B,UAAU,EAAE,SAAS,CAAC,KAAK,CAAC,UAAU;SACvC;KACF,CAAC;AACJ,CAAC,CAAC;AAnBW,QAAA,6BAA6B,iCAmBxC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export { solveQuadratic, roundToDecimalPlaces } from "./math";
|
|
2
2
|
export { mergeWarnings } from "./merge-warning";
|
|
3
|
+
export type { Matrix } from "./matrix";
|
|
4
|
+
export { zeros, identity, transpose, matMul, matVec, choleskyFactor, choleskySolveFactored, choleskySolve, solveLinearSystem, } from "./matrix";
|
|
5
|
+
export type { SkylineMatrix } from "./skyline";
|
|
6
|
+
export { createSkyline, skylineAdd, skylineGet, skylineSize, skylineFactor, skylineSolve, reverseCuthillMcKee, } from "./skyline";
|
package/dist/utils/index.js
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mergeWarnings = exports.roundToDecimalPlaces = exports.solveQuadratic = void 0;
|
|
3
|
+
exports.reverseCuthillMcKee = exports.skylineSolve = exports.skylineFactor = exports.skylineSize = exports.skylineGet = exports.skylineAdd = exports.createSkyline = exports.solveLinearSystem = exports.choleskySolve = exports.choleskySolveFactored = exports.choleskyFactor = exports.matVec = exports.matMul = exports.transpose = exports.identity = exports.zeros = exports.mergeWarnings = exports.roundToDecimalPlaces = exports.solveQuadratic = void 0;
|
|
4
4
|
var math_1 = require("./math");
|
|
5
5
|
Object.defineProperty(exports, "solveQuadratic", { enumerable: true, get: function () { return math_1.solveQuadratic; } });
|
|
6
6
|
Object.defineProperty(exports, "roundToDecimalPlaces", { enumerable: true, get: function () { return math_1.roundToDecimalPlaces; } });
|
|
7
7
|
var merge_warning_1 = require("./merge-warning");
|
|
8
8
|
Object.defineProperty(exports, "mergeWarnings", { enumerable: true, get: function () { return merge_warning_1.mergeWarnings; } });
|
|
9
|
+
var matrix_1 = require("./matrix");
|
|
10
|
+
Object.defineProperty(exports, "zeros", { enumerable: true, get: function () { return matrix_1.zeros; } });
|
|
11
|
+
Object.defineProperty(exports, "identity", { enumerable: true, get: function () { return matrix_1.identity; } });
|
|
12
|
+
Object.defineProperty(exports, "transpose", { enumerable: true, get: function () { return matrix_1.transpose; } });
|
|
13
|
+
Object.defineProperty(exports, "matMul", { enumerable: true, get: function () { return matrix_1.matMul; } });
|
|
14
|
+
Object.defineProperty(exports, "matVec", { enumerable: true, get: function () { return matrix_1.matVec; } });
|
|
15
|
+
Object.defineProperty(exports, "choleskyFactor", { enumerable: true, get: function () { return matrix_1.choleskyFactor; } });
|
|
16
|
+
Object.defineProperty(exports, "choleskySolveFactored", { enumerable: true, get: function () { return matrix_1.choleskySolveFactored; } });
|
|
17
|
+
Object.defineProperty(exports, "choleskySolve", { enumerable: true, get: function () { return matrix_1.choleskySolve; } });
|
|
18
|
+
Object.defineProperty(exports, "solveLinearSystem", { enumerable: true, get: function () { return matrix_1.solveLinearSystem; } });
|
|
19
|
+
var skyline_1 = require("./skyline");
|
|
20
|
+
Object.defineProperty(exports, "createSkyline", { enumerable: true, get: function () { return skyline_1.createSkyline; } });
|
|
21
|
+
Object.defineProperty(exports, "skylineAdd", { enumerable: true, get: function () { return skyline_1.skylineAdd; } });
|
|
22
|
+
Object.defineProperty(exports, "skylineGet", { enumerable: true, get: function () { return skyline_1.skylineGet; } });
|
|
23
|
+
Object.defineProperty(exports, "skylineSize", { enumerable: true, get: function () { return skyline_1.skylineSize; } });
|
|
24
|
+
Object.defineProperty(exports, "skylineFactor", { enumerable: true, get: function () { return skyline_1.skylineFactor; } });
|
|
25
|
+
Object.defineProperty(exports, "skylineSolve", { enumerable: true, get: function () { return skyline_1.skylineSolve; } });
|
|
26
|
+
Object.defineProperty(exports, "reverseCuthillMcKee", { enumerable: true, get: function () { return skyline_1.reverseCuthillMcKee; } });
|
|
9
27
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA,+BAA8D;AAArD,sGAAA,cAAc,OAAA;AAAE,4GAAA,oBAAoB,OAAA;AAC7C,iDAAgD;AAAvC,8GAAA,aAAa,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA,+BAA8D;AAArD,sGAAA,cAAc,OAAA;AAAE,4GAAA,oBAAoB,OAAA;AAC7C,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AAEtB,mCAUkB;AAThB,+FAAA,KAAK,OAAA;AACL,kGAAA,QAAQ,OAAA;AACR,mGAAA,SAAS,OAAA;AACT,gGAAA,MAAM,OAAA;AACN,gGAAA,MAAM,OAAA;AACN,wGAAA,cAAc,OAAA;AACd,+GAAA,qBAAqB,OAAA;AACrB,uGAAA,aAAa,OAAA;AACb,2GAAA,iBAAiB,OAAA;AAGnB,qCAQmB;AAPjB,wGAAA,aAAa,OAAA;AACb,qGAAA,UAAU,OAAA;AACV,qGAAA,UAAU,OAAA;AACV,sGAAA,WAAW,OAAA;AACX,wGAAA,aAAa,OAAA;AACb,uGAAA,YAAY,OAAA;AACZ,8GAAA,mBAAmB,OAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export type Matrix = number[][];
|
|
2
|
+
/** Returns an m×n zero matrix. */
|
|
3
|
+
export declare const zeros: (m: number, n: number) => Matrix;
|
|
4
|
+
/** Returns the n×n identity matrix. */
|
|
5
|
+
export declare const identity: (n: number) => Matrix;
|
|
6
|
+
/** Returns the transpose of a matrix. */
|
|
7
|
+
export declare const transpose: (A: Matrix) => Matrix;
|
|
8
|
+
/** Returns the product A·B of an m×n and an n×p matrix. */
|
|
9
|
+
export declare const matMul: (A: Matrix, B: Matrix) => Matrix;
|
|
10
|
+
/** Returns the product A·x of an m×n matrix and an n-vector. */
|
|
11
|
+
export declare const matVec: (A: Matrix, x: number[]) => number[];
|
|
12
|
+
/**
|
|
13
|
+
* Cholesky factorisation A = L·Lᵀ of a symmetric positive-definite matrix.
|
|
14
|
+
*
|
|
15
|
+
* @param A - Symmetric matrix (only the lower triangle is read)
|
|
16
|
+
* @param tolerance - A pivot at or below `tolerance` times its own diagonal term is treated as zero
|
|
17
|
+
* @returns The lower-triangular factor L, or `null` when A is not positive definite (singular or a mechanism)
|
|
18
|
+
*/
|
|
19
|
+
export declare const choleskyFactor: (A: Matrix, tolerance?: number) => Matrix | null;
|
|
20
|
+
/**
|
|
21
|
+
* Solves A·x = b from the Cholesky factor L of A (forward then back substitution), so one
|
|
22
|
+
* factorisation serves any number of right-hand sides.
|
|
23
|
+
*
|
|
24
|
+
* @param L - Lower-triangular factor from `choleskyFactor`
|
|
25
|
+
* @param b - Right-hand side
|
|
26
|
+
*/
|
|
27
|
+
export declare const choleskySolveFactored: (L: Matrix, b: number[]) => number[];
|
|
28
|
+
/**
|
|
29
|
+
* Solves A·x = b for a symmetric positive-definite A by Cholesky factorisation.
|
|
30
|
+
*
|
|
31
|
+
* @param A - Symmetric matrix (only the lower triangle is read)
|
|
32
|
+
* @param b - Right-hand side
|
|
33
|
+
* @param tolerance - A pivot at or below `tolerance` times its own diagonal term is treated as zero
|
|
34
|
+
* @returns The solution, or `null` when A is not positive definite (singular or a mechanism)
|
|
35
|
+
*/
|
|
36
|
+
export declare const choleskySolve: (A: Matrix, b: number[], tolerance?: number) => number[] | null;
|
|
37
|
+
/**
|
|
38
|
+
* Solves A·X = B for a general square A by Gaussian elimination with partial pivoting.
|
|
39
|
+
*
|
|
40
|
+
* @param A - n×n matrix
|
|
41
|
+
* @param B - n×p right-hand-side matrix
|
|
42
|
+
* @param tolerance - A pivot at or below `tolerance` times the largest entry of A is treated as zero
|
|
43
|
+
* @returns The n×p solution, or `null` when A is singular
|
|
44
|
+
*/
|
|
45
|
+
export declare const solveLinearSystem: (A: Matrix, B: Matrix, tolerance?: number) => Matrix | null;
|