@atmaticai/agent-tools-core 1.0.0 → 1.0.2
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/dist/index-BKeYao0B.d.mts +320 -0
- package/dist/index-BKeYao0B.d.ts +320 -0
- package/dist/index-BZDcrPs-.d.mts +316 -0
- package/dist/index-BZDcrPs-.d.ts +316 -0
- package/dist/{index-RVqNunxE.d.mts → index-Hw4godS8.d.mts} +25 -2
- package/dist/{index-RVqNunxE.d.ts → index-Hw4godS8.d.ts} +25 -2
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1161 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1160 -1
- package/dist/index.mjs.map +1 -1
- package/dist/pdf/index.d.mts +1 -1
- package/dist/pdf/index.d.ts +1 -1
- package/dist/pdf/index.js +82 -0
- package/dist/pdf/index.js.map +1 -1
- package/dist/pdf/index.mjs +81 -1
- package/dist/pdf/index.mjs.map +1 -1
- package/dist/physics/index.d.mts +1 -0
- package/dist/physics/index.d.ts +1 -0
- package/dist/physics/index.js +467 -0
- package/dist/physics/index.js.map +1 -0
- package/dist/physics/index.mjs +435 -0
- package/dist/physics/index.mjs.map +1 -0
- package/dist/settings/index.d.mts +1 -1
- package/dist/settings/index.d.ts +1 -1
- package/dist/settings/index.js +6 -2
- package/dist/settings/index.js.map +1 -1
- package/dist/settings/index.mjs +6 -2
- package/dist/settings/index.mjs.map +1 -1
- package/dist/structural/index.d.mts +1 -0
- package/dist/structural/index.d.ts +1 -0
- package/dist/structural/index.js +608 -0
- package/dist/structural/index.js.map +1 -0
- package/dist/structural/index.mjs +588 -0
- package/dist/structural/index.mjs.map +1 -0
- package/package.json +12 -2
- package/README.md +0 -742
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
interface NormalStressResult {
|
|
2
|
+
force: number;
|
|
3
|
+
area: number;
|
|
4
|
+
stress: number;
|
|
5
|
+
unit: string;
|
|
6
|
+
}
|
|
7
|
+
interface ShearStressResult {
|
|
8
|
+
force: number;
|
|
9
|
+
area: number;
|
|
10
|
+
stress: number;
|
|
11
|
+
unit: string;
|
|
12
|
+
}
|
|
13
|
+
interface StrainResult {
|
|
14
|
+
deltaLength: number;
|
|
15
|
+
originalLength: number;
|
|
16
|
+
strain: number;
|
|
17
|
+
unit: string;
|
|
18
|
+
}
|
|
19
|
+
interface YoungsModulusResult {
|
|
20
|
+
stress: number;
|
|
21
|
+
strain: number;
|
|
22
|
+
youngsModulus: number;
|
|
23
|
+
unit: string;
|
|
24
|
+
}
|
|
25
|
+
interface FactorOfSafetyResult {
|
|
26
|
+
ultimateStress: number;
|
|
27
|
+
workingStress: number;
|
|
28
|
+
factorOfSafety: number;
|
|
29
|
+
}
|
|
30
|
+
interface HoopStressResult {
|
|
31
|
+
pressure: number;
|
|
32
|
+
radius: number;
|
|
33
|
+
thickness: number;
|
|
34
|
+
hoopStress: number;
|
|
35
|
+
longitudinalStress: number;
|
|
36
|
+
unit: string;
|
|
37
|
+
}
|
|
38
|
+
type BeamLoadType = 'point-center' | 'point-custom' | 'uniform' | 'triangular';
|
|
39
|
+
type CantileverLoadType = 'point-end' | 'point-custom' | 'uniform';
|
|
40
|
+
interface BeamResult {
|
|
41
|
+
length: number;
|
|
42
|
+
load: number;
|
|
43
|
+
loadType: string;
|
|
44
|
+
reactionLeft: number;
|
|
45
|
+
reactionRight: number;
|
|
46
|
+
maxMoment: number;
|
|
47
|
+
maxShear: number;
|
|
48
|
+
maxDeflection: number | null;
|
|
49
|
+
momentUnit: string;
|
|
50
|
+
shearUnit: string;
|
|
51
|
+
deflectionUnit: string | null;
|
|
52
|
+
}
|
|
53
|
+
interface CantileverResult {
|
|
54
|
+
length: number;
|
|
55
|
+
load: number;
|
|
56
|
+
loadType: string;
|
|
57
|
+
reactionForce: number;
|
|
58
|
+
reactionMoment: number;
|
|
59
|
+
maxMoment: number;
|
|
60
|
+
maxShear: number;
|
|
61
|
+
maxDeflection: number | null;
|
|
62
|
+
momentUnit: string;
|
|
63
|
+
shearUnit: string;
|
|
64
|
+
deflectionUnit: string | null;
|
|
65
|
+
}
|
|
66
|
+
type EndCondition = 'pinned-pinned' | 'fixed-free' | 'fixed-pinned' | 'fixed-fixed';
|
|
67
|
+
interface EulerBucklingResult {
|
|
68
|
+
elasticModulus: number;
|
|
69
|
+
momentOfInertia: number;
|
|
70
|
+
length: number;
|
|
71
|
+
endCondition: EndCondition;
|
|
72
|
+
effectiveLengthFactor: number;
|
|
73
|
+
effectiveLength: number;
|
|
74
|
+
criticalLoad: number;
|
|
75
|
+
unit: string;
|
|
76
|
+
}
|
|
77
|
+
type ColumnClassification = 'short' | 'intermediate' | 'long';
|
|
78
|
+
interface SlendernessRatioResult {
|
|
79
|
+
effectiveLength: number;
|
|
80
|
+
radiusOfGyration: number;
|
|
81
|
+
slendernessRatio: number;
|
|
82
|
+
classification: ColumnClassification;
|
|
83
|
+
}
|
|
84
|
+
interface RectangleSectionResult {
|
|
85
|
+
width: number;
|
|
86
|
+
height: number;
|
|
87
|
+
area: number;
|
|
88
|
+
Ixx: number;
|
|
89
|
+
Iyy: number;
|
|
90
|
+
Sx: number;
|
|
91
|
+
Sy: number;
|
|
92
|
+
rx: number;
|
|
93
|
+
ry: number;
|
|
94
|
+
}
|
|
95
|
+
interface CircularSectionResult {
|
|
96
|
+
diameter: number;
|
|
97
|
+
area: number;
|
|
98
|
+
I: number;
|
|
99
|
+
S: number;
|
|
100
|
+
r: number;
|
|
101
|
+
}
|
|
102
|
+
interface HollowCircularSectionResult {
|
|
103
|
+
outerDiameter: number;
|
|
104
|
+
innerDiameter: number;
|
|
105
|
+
area: number;
|
|
106
|
+
I: number;
|
|
107
|
+
S: number;
|
|
108
|
+
r: number;
|
|
109
|
+
}
|
|
110
|
+
interface IBeamSectionResult {
|
|
111
|
+
flangeWidth: number;
|
|
112
|
+
flangeThickness: number;
|
|
113
|
+
webHeight: number;
|
|
114
|
+
webThickness: number;
|
|
115
|
+
totalHeight: number;
|
|
116
|
+
area: number;
|
|
117
|
+
Ixx: number;
|
|
118
|
+
Iyy: number;
|
|
119
|
+
Sx: number;
|
|
120
|
+
Sy: number;
|
|
121
|
+
rx: number;
|
|
122
|
+
ry: number;
|
|
123
|
+
}
|
|
124
|
+
type FoundationType = 'strip' | 'square' | 'circular';
|
|
125
|
+
type EarthPressureType = 'active' | 'passive' | 'at-rest';
|
|
126
|
+
interface TerzaghiBearingResult {
|
|
127
|
+
cohesion: number;
|
|
128
|
+
depth: number;
|
|
129
|
+
unitWeight: number;
|
|
130
|
+
frictionAngle: number;
|
|
131
|
+
foundationType: FoundationType;
|
|
132
|
+
bearingCapacity: number;
|
|
133
|
+
Nc: number;
|
|
134
|
+
Nq: number;
|
|
135
|
+
Ngamma: number;
|
|
136
|
+
unit: string;
|
|
137
|
+
}
|
|
138
|
+
interface LateralEarthPressureResult {
|
|
139
|
+
unitWeight: number;
|
|
140
|
+
height: number;
|
|
141
|
+
frictionAngle: number;
|
|
142
|
+
pressureType: EarthPressureType;
|
|
143
|
+
coefficient: number;
|
|
144
|
+
pressureAtBase: number;
|
|
145
|
+
totalForce: number;
|
|
146
|
+
pressureUnit: string;
|
|
147
|
+
forceUnit: string;
|
|
148
|
+
}
|
|
149
|
+
interface SettlementResult {
|
|
150
|
+
load: number;
|
|
151
|
+
area: number;
|
|
152
|
+
elasticModulus: number;
|
|
153
|
+
thickness: number;
|
|
154
|
+
stress: number;
|
|
155
|
+
settlement: number;
|
|
156
|
+
unit: string;
|
|
157
|
+
}
|
|
158
|
+
interface MaterialProperties {
|
|
159
|
+
name: string;
|
|
160
|
+
category: string;
|
|
161
|
+
E: number;
|
|
162
|
+
fy: number;
|
|
163
|
+
fu: number;
|
|
164
|
+
density: number;
|
|
165
|
+
poissonsRatio: number;
|
|
166
|
+
thermalExpansion: number;
|
|
167
|
+
Eunit: string;
|
|
168
|
+
fyUnit: string;
|
|
169
|
+
fuUnit: string;
|
|
170
|
+
densityUnit: string;
|
|
171
|
+
thermalExpansionUnit: string;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Normal stress: σ = F / A
|
|
176
|
+
*/
|
|
177
|
+
declare function normalStress(force: number, area: number): NormalStressResult;
|
|
178
|
+
/**
|
|
179
|
+
* Shear stress: τ = V / A
|
|
180
|
+
*/
|
|
181
|
+
declare function shearStress(force: number, area: number): ShearStressResult;
|
|
182
|
+
/**
|
|
183
|
+
* Strain: ε = ΔL / L
|
|
184
|
+
*/
|
|
185
|
+
declare function strain(deltaLength: number, originalLength: number): StrainResult;
|
|
186
|
+
/**
|
|
187
|
+
* Young's modulus: E = σ / ε
|
|
188
|
+
*/
|
|
189
|
+
declare function youngsModulus(stress: number, strainVal: number): YoungsModulusResult;
|
|
190
|
+
/**
|
|
191
|
+
* Factor of safety: FoS = σ_ultimate / σ_working
|
|
192
|
+
*/
|
|
193
|
+
declare function factorOfSafety(ultimateStress: number, workingStress: number): FactorOfSafetyResult;
|
|
194
|
+
/**
|
|
195
|
+
* Hoop stress for thin-walled pressure vessels:
|
|
196
|
+
* σ_hoop = pR / t
|
|
197
|
+
* σ_longitudinal = pR / (2t)
|
|
198
|
+
*/
|
|
199
|
+
declare function hoopStress(pressure: number, radius: number, thickness: number): HoopStressResult;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Simply supported beam analysis.
|
|
203
|
+
* Returns reactions, max moment, max shear, and max deflection (if E and I provided).
|
|
204
|
+
*/
|
|
205
|
+
declare function simplySupported(length: number, load: number, loadType: BeamLoadType, E?: number, I?: number, loadPosition?: number): BeamResult;
|
|
206
|
+
/**
|
|
207
|
+
* Cantilever beam analysis.
|
|
208
|
+
* Returns reaction force, reaction moment, max moment, max shear, and max deflection (if E and I provided).
|
|
209
|
+
*/
|
|
210
|
+
declare function cantilever(length: number, load: number, loadType: CantileverLoadType, E?: number, I?: number, loadPosition?: number): CantileverResult;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Euler's critical buckling load: Pcr = π²EI / Le²
|
|
214
|
+
* Le = K * L (effective length)
|
|
215
|
+
*/
|
|
216
|
+
declare function eulerBuckling(E: number, I: number, length: number, endCondition: EndCondition): EulerBucklingResult;
|
|
217
|
+
/**
|
|
218
|
+
* Slenderness ratio: λ = Le / r
|
|
219
|
+
* Classification: short (< 30), intermediate (30-120), long (> 120)
|
|
220
|
+
*/
|
|
221
|
+
declare function slendernessRatio(effectiveLength: number, radiusOfGyration: number): SlendernessRatioResult;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Rectangular cross-section properties.
|
|
225
|
+
* Ixx = bh³/12, Iyy = hb³/12
|
|
226
|
+
*/
|
|
227
|
+
declare function rectangleSection(width: number, height: number): RectangleSectionResult;
|
|
228
|
+
/**
|
|
229
|
+
* Solid circular cross-section properties.
|
|
230
|
+
* I = πd⁴/64
|
|
231
|
+
*/
|
|
232
|
+
declare function circularSection(diameter: number): CircularSectionResult;
|
|
233
|
+
/**
|
|
234
|
+
* Hollow circular cross-section properties.
|
|
235
|
+
* I = π(D⁴ - d⁴)/64
|
|
236
|
+
*/
|
|
237
|
+
declare function hollowCircularSection(outerDiameter: number, innerDiameter: number): HollowCircularSectionResult;
|
|
238
|
+
/**
|
|
239
|
+
* I-beam (wide flange) cross-section properties.
|
|
240
|
+
* Uses parallel axis theorem for Ixx.
|
|
241
|
+
*/
|
|
242
|
+
declare function iBeamSection(flangeWidth: number, flangeThickness: number, webHeight: number, webThickness: number): IBeamSectionResult;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Bearing capacity for shallow foundations using Terzaghi's equation form
|
|
246
|
+
* with Meyerhof/Vesic bearing capacity factors.
|
|
247
|
+
* q_ult = c·Nc·sc + γ·D·Nq + 0.5·γ·B·Nγ·sγ
|
|
248
|
+
* Shape factors: strip (1, 1), square (1.3, 0.8), circular (1.3, 0.6)
|
|
249
|
+
*/
|
|
250
|
+
declare function terzaghiBearing(cohesion: number, depth: number, unitWeight: number, frictionAngle: number, foundationType: FoundationType): TerzaghiBearingResult;
|
|
251
|
+
/**
|
|
252
|
+
* Rankine lateral earth pressure.
|
|
253
|
+
* Active: Ka = tan²(45° - φ/2)
|
|
254
|
+
* Passive: Kp = tan²(45° + φ/2)
|
|
255
|
+
* At-rest: K0 = 1 - sin(φ) (Jaky's formula)
|
|
256
|
+
*/
|
|
257
|
+
declare function lateralEarthPressure(unitWeight: number, height: number, frictionAngle: number, pressureType: EarthPressureType): LateralEarthPressureResult;
|
|
258
|
+
/**
|
|
259
|
+
* Elastic settlement: δ = (q · H) / E
|
|
260
|
+
* where q = P / A is the applied stress.
|
|
261
|
+
*/
|
|
262
|
+
declare function settlement(load: number, area: number, elasticModulus: number, thickness: number): SettlementResult;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Get material properties by name (case-insensitive partial match).
|
|
266
|
+
*/
|
|
267
|
+
declare function getMaterial(name: string): MaterialProperties;
|
|
268
|
+
/**
|
|
269
|
+
* List materials, optionally filtered by category.
|
|
270
|
+
*/
|
|
271
|
+
declare function listMaterials(category?: string): MaterialProperties[];
|
|
272
|
+
|
|
273
|
+
type index_BeamLoadType = BeamLoadType;
|
|
274
|
+
type index_BeamResult = BeamResult;
|
|
275
|
+
type index_CantileverLoadType = CantileverLoadType;
|
|
276
|
+
type index_CantileverResult = CantileverResult;
|
|
277
|
+
type index_CircularSectionResult = CircularSectionResult;
|
|
278
|
+
type index_ColumnClassification = ColumnClassification;
|
|
279
|
+
type index_EarthPressureType = EarthPressureType;
|
|
280
|
+
type index_EndCondition = EndCondition;
|
|
281
|
+
type index_EulerBucklingResult = EulerBucklingResult;
|
|
282
|
+
type index_FactorOfSafetyResult = FactorOfSafetyResult;
|
|
283
|
+
type index_FoundationType = FoundationType;
|
|
284
|
+
type index_HollowCircularSectionResult = HollowCircularSectionResult;
|
|
285
|
+
type index_HoopStressResult = HoopStressResult;
|
|
286
|
+
type index_IBeamSectionResult = IBeamSectionResult;
|
|
287
|
+
type index_LateralEarthPressureResult = LateralEarthPressureResult;
|
|
288
|
+
type index_MaterialProperties = MaterialProperties;
|
|
289
|
+
type index_NormalStressResult = NormalStressResult;
|
|
290
|
+
type index_RectangleSectionResult = RectangleSectionResult;
|
|
291
|
+
type index_SettlementResult = SettlementResult;
|
|
292
|
+
type index_ShearStressResult = ShearStressResult;
|
|
293
|
+
type index_SlendernessRatioResult = SlendernessRatioResult;
|
|
294
|
+
type index_StrainResult = StrainResult;
|
|
295
|
+
type index_TerzaghiBearingResult = TerzaghiBearingResult;
|
|
296
|
+
type index_YoungsModulusResult = YoungsModulusResult;
|
|
297
|
+
declare const index_cantilever: typeof cantilever;
|
|
298
|
+
declare const index_circularSection: typeof circularSection;
|
|
299
|
+
declare const index_eulerBuckling: typeof eulerBuckling;
|
|
300
|
+
declare const index_factorOfSafety: typeof factorOfSafety;
|
|
301
|
+
declare const index_getMaterial: typeof getMaterial;
|
|
302
|
+
declare const index_hollowCircularSection: typeof hollowCircularSection;
|
|
303
|
+
declare const index_hoopStress: typeof hoopStress;
|
|
304
|
+
declare const index_iBeamSection: typeof iBeamSection;
|
|
305
|
+
declare const index_lateralEarthPressure: typeof lateralEarthPressure;
|
|
306
|
+
declare const index_listMaterials: typeof listMaterials;
|
|
307
|
+
declare const index_normalStress: typeof normalStress;
|
|
308
|
+
declare const index_rectangleSection: typeof rectangleSection;
|
|
309
|
+
declare const index_settlement: typeof settlement;
|
|
310
|
+
declare const index_shearStress: typeof shearStress;
|
|
311
|
+
declare const index_simplySupported: typeof simplySupported;
|
|
312
|
+
declare const index_slendernessRatio: typeof slendernessRatio;
|
|
313
|
+
declare const index_strain: typeof strain;
|
|
314
|
+
declare const index_terzaghiBearing: typeof terzaghiBearing;
|
|
315
|
+
declare const index_youngsModulus: typeof youngsModulus;
|
|
316
|
+
declare namespace index {
|
|
317
|
+
export { type index_BeamLoadType as BeamLoadType, type index_BeamResult as BeamResult, type index_CantileverLoadType as CantileverLoadType, type index_CantileverResult as CantileverResult, type index_CircularSectionResult as CircularSectionResult, type index_ColumnClassification as ColumnClassification, type index_EarthPressureType as EarthPressureType, type index_EndCondition as EndCondition, type index_EulerBucklingResult as EulerBucklingResult, type index_FactorOfSafetyResult as FactorOfSafetyResult, type index_FoundationType as FoundationType, type index_HollowCircularSectionResult as HollowCircularSectionResult, type index_HoopStressResult as HoopStressResult, type index_IBeamSectionResult as IBeamSectionResult, type index_LateralEarthPressureResult as LateralEarthPressureResult, type index_MaterialProperties as MaterialProperties, type index_NormalStressResult as NormalStressResult, type index_RectangleSectionResult as RectangleSectionResult, type index_SettlementResult as SettlementResult, type index_ShearStressResult as ShearStressResult, type index_SlendernessRatioResult as SlendernessRatioResult, type index_StrainResult as StrainResult, type index_TerzaghiBearingResult as TerzaghiBearingResult, type index_YoungsModulusResult as YoungsModulusResult, index_cantilever as cantilever, index_circularSection as circularSection, index_eulerBuckling as eulerBuckling, index_factorOfSafety as factorOfSafety, index_getMaterial as getMaterial, index_hollowCircularSection as hollowCircularSection, index_hoopStress as hoopStress, index_iBeamSection as iBeamSection, index_lateralEarthPressure as lateralEarthPressure, index_listMaterials as listMaterials, index_normalStress as normalStress, index_rectangleSection as rectangleSection, index_settlement as settlement, index_shearStress as shearStress, index_simplySupported as simplySupported, index_slendernessRatio as slendernessRatio, index_strain as strain, index_terzaghiBearing as terzaghiBearing, index_youngsModulus as youngsModulus };
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export { simplySupported as A, type BeamLoadType as B, type CantileverLoadType as C, slendernessRatio as D, type EarthPressureType as E, type FactorOfSafetyResult as F, strain as G, type HollowCircularSectionResult as H, type IBeamSectionResult as I, terzaghiBearing as J, youngsModulus as K, type LateralEarthPressureResult as L, type MaterialProperties as M, type NormalStressResult as N, type RectangleSectionResult as R, type SettlementResult as S, type TerzaghiBearingResult as T, type YoungsModulusResult as Y, type BeamResult as a, type CantileverResult as b, type CircularSectionResult as c, type ColumnClassification as d, type EndCondition as e, type EulerBucklingResult as f, type FoundationType as g, type HoopStressResult as h, index as i, type ShearStressResult as j, type SlendernessRatioResult as k, type StrainResult as l, cantilever as m, circularSection as n, eulerBuckling as o, factorOfSafety as p, getMaterial as q, hollowCircularSection as r, hoopStress as s, iBeamSection as t, lateralEarthPressure as u, listMaterials as v, normalStress as w, rectangleSection as x, settlement as y, shearStress as z };
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
interface NormalStressResult {
|
|
2
|
+
force: number;
|
|
3
|
+
area: number;
|
|
4
|
+
stress: number;
|
|
5
|
+
unit: string;
|
|
6
|
+
}
|
|
7
|
+
interface ShearStressResult {
|
|
8
|
+
force: number;
|
|
9
|
+
area: number;
|
|
10
|
+
stress: number;
|
|
11
|
+
unit: string;
|
|
12
|
+
}
|
|
13
|
+
interface StrainResult {
|
|
14
|
+
deltaLength: number;
|
|
15
|
+
originalLength: number;
|
|
16
|
+
strain: number;
|
|
17
|
+
unit: string;
|
|
18
|
+
}
|
|
19
|
+
interface YoungsModulusResult {
|
|
20
|
+
stress: number;
|
|
21
|
+
strain: number;
|
|
22
|
+
youngsModulus: number;
|
|
23
|
+
unit: string;
|
|
24
|
+
}
|
|
25
|
+
interface FactorOfSafetyResult {
|
|
26
|
+
ultimateStress: number;
|
|
27
|
+
workingStress: number;
|
|
28
|
+
factorOfSafety: number;
|
|
29
|
+
}
|
|
30
|
+
interface HoopStressResult {
|
|
31
|
+
pressure: number;
|
|
32
|
+
radius: number;
|
|
33
|
+
thickness: number;
|
|
34
|
+
hoopStress: number;
|
|
35
|
+
longitudinalStress: number;
|
|
36
|
+
unit: string;
|
|
37
|
+
}
|
|
38
|
+
type BeamLoadType = 'point-center' | 'point-custom' | 'uniform' | 'triangular';
|
|
39
|
+
type CantileverLoadType = 'point-end' | 'point-custom' | 'uniform';
|
|
40
|
+
interface BeamResult {
|
|
41
|
+
length: number;
|
|
42
|
+
load: number;
|
|
43
|
+
loadType: string;
|
|
44
|
+
reactionLeft: number;
|
|
45
|
+
reactionRight: number;
|
|
46
|
+
maxMoment: number;
|
|
47
|
+
maxShear: number;
|
|
48
|
+
maxDeflection: number | null;
|
|
49
|
+
momentUnit: string;
|
|
50
|
+
shearUnit: string;
|
|
51
|
+
deflectionUnit: string | null;
|
|
52
|
+
}
|
|
53
|
+
interface CantileverResult {
|
|
54
|
+
length: number;
|
|
55
|
+
load: number;
|
|
56
|
+
loadType: string;
|
|
57
|
+
reactionForce: number;
|
|
58
|
+
reactionMoment: number;
|
|
59
|
+
maxMoment: number;
|
|
60
|
+
maxShear: number;
|
|
61
|
+
maxDeflection: number | null;
|
|
62
|
+
momentUnit: string;
|
|
63
|
+
shearUnit: string;
|
|
64
|
+
deflectionUnit: string | null;
|
|
65
|
+
}
|
|
66
|
+
type EndCondition = 'pinned-pinned' | 'fixed-free' | 'fixed-pinned' | 'fixed-fixed';
|
|
67
|
+
interface EulerBucklingResult {
|
|
68
|
+
elasticModulus: number;
|
|
69
|
+
momentOfInertia: number;
|
|
70
|
+
length: number;
|
|
71
|
+
endCondition: EndCondition;
|
|
72
|
+
effectiveLengthFactor: number;
|
|
73
|
+
effectiveLength: number;
|
|
74
|
+
criticalLoad: number;
|
|
75
|
+
unit: string;
|
|
76
|
+
}
|
|
77
|
+
type ColumnClassification = 'short' | 'intermediate' | 'long';
|
|
78
|
+
interface SlendernessRatioResult {
|
|
79
|
+
effectiveLength: number;
|
|
80
|
+
radiusOfGyration: number;
|
|
81
|
+
slendernessRatio: number;
|
|
82
|
+
classification: ColumnClassification;
|
|
83
|
+
}
|
|
84
|
+
interface RectangleSectionResult {
|
|
85
|
+
width: number;
|
|
86
|
+
height: number;
|
|
87
|
+
area: number;
|
|
88
|
+
Ixx: number;
|
|
89
|
+
Iyy: number;
|
|
90
|
+
Sx: number;
|
|
91
|
+
Sy: number;
|
|
92
|
+
rx: number;
|
|
93
|
+
ry: number;
|
|
94
|
+
}
|
|
95
|
+
interface CircularSectionResult {
|
|
96
|
+
diameter: number;
|
|
97
|
+
area: number;
|
|
98
|
+
I: number;
|
|
99
|
+
S: number;
|
|
100
|
+
r: number;
|
|
101
|
+
}
|
|
102
|
+
interface HollowCircularSectionResult {
|
|
103
|
+
outerDiameter: number;
|
|
104
|
+
innerDiameter: number;
|
|
105
|
+
area: number;
|
|
106
|
+
I: number;
|
|
107
|
+
S: number;
|
|
108
|
+
r: number;
|
|
109
|
+
}
|
|
110
|
+
interface IBeamSectionResult {
|
|
111
|
+
flangeWidth: number;
|
|
112
|
+
flangeThickness: number;
|
|
113
|
+
webHeight: number;
|
|
114
|
+
webThickness: number;
|
|
115
|
+
totalHeight: number;
|
|
116
|
+
area: number;
|
|
117
|
+
Ixx: number;
|
|
118
|
+
Iyy: number;
|
|
119
|
+
Sx: number;
|
|
120
|
+
Sy: number;
|
|
121
|
+
rx: number;
|
|
122
|
+
ry: number;
|
|
123
|
+
}
|
|
124
|
+
type FoundationType = 'strip' | 'square' | 'circular';
|
|
125
|
+
type EarthPressureType = 'active' | 'passive' | 'at-rest';
|
|
126
|
+
interface TerzaghiBearingResult {
|
|
127
|
+
cohesion: number;
|
|
128
|
+
depth: number;
|
|
129
|
+
unitWeight: number;
|
|
130
|
+
frictionAngle: number;
|
|
131
|
+
foundationType: FoundationType;
|
|
132
|
+
bearingCapacity: number;
|
|
133
|
+
Nc: number;
|
|
134
|
+
Nq: number;
|
|
135
|
+
Ngamma: number;
|
|
136
|
+
unit: string;
|
|
137
|
+
}
|
|
138
|
+
interface LateralEarthPressureResult {
|
|
139
|
+
unitWeight: number;
|
|
140
|
+
height: number;
|
|
141
|
+
frictionAngle: number;
|
|
142
|
+
pressureType: EarthPressureType;
|
|
143
|
+
coefficient: number;
|
|
144
|
+
pressureAtBase: number;
|
|
145
|
+
totalForce: number;
|
|
146
|
+
pressureUnit: string;
|
|
147
|
+
forceUnit: string;
|
|
148
|
+
}
|
|
149
|
+
interface SettlementResult {
|
|
150
|
+
load: number;
|
|
151
|
+
area: number;
|
|
152
|
+
elasticModulus: number;
|
|
153
|
+
thickness: number;
|
|
154
|
+
stress: number;
|
|
155
|
+
settlement: number;
|
|
156
|
+
unit: string;
|
|
157
|
+
}
|
|
158
|
+
interface MaterialProperties {
|
|
159
|
+
name: string;
|
|
160
|
+
category: string;
|
|
161
|
+
E: number;
|
|
162
|
+
fy: number;
|
|
163
|
+
fu: number;
|
|
164
|
+
density: number;
|
|
165
|
+
poissonsRatio: number;
|
|
166
|
+
thermalExpansion: number;
|
|
167
|
+
Eunit: string;
|
|
168
|
+
fyUnit: string;
|
|
169
|
+
fuUnit: string;
|
|
170
|
+
densityUnit: string;
|
|
171
|
+
thermalExpansionUnit: string;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Normal stress: σ = F / A
|
|
176
|
+
*/
|
|
177
|
+
declare function normalStress(force: number, area: number): NormalStressResult;
|
|
178
|
+
/**
|
|
179
|
+
* Shear stress: τ = V / A
|
|
180
|
+
*/
|
|
181
|
+
declare function shearStress(force: number, area: number): ShearStressResult;
|
|
182
|
+
/**
|
|
183
|
+
* Strain: ε = ΔL / L
|
|
184
|
+
*/
|
|
185
|
+
declare function strain(deltaLength: number, originalLength: number): StrainResult;
|
|
186
|
+
/**
|
|
187
|
+
* Young's modulus: E = σ / ε
|
|
188
|
+
*/
|
|
189
|
+
declare function youngsModulus(stress: number, strainVal: number): YoungsModulusResult;
|
|
190
|
+
/**
|
|
191
|
+
* Factor of safety: FoS = σ_ultimate / σ_working
|
|
192
|
+
*/
|
|
193
|
+
declare function factorOfSafety(ultimateStress: number, workingStress: number): FactorOfSafetyResult;
|
|
194
|
+
/**
|
|
195
|
+
* Hoop stress for thin-walled pressure vessels:
|
|
196
|
+
* σ_hoop = pR / t
|
|
197
|
+
* σ_longitudinal = pR / (2t)
|
|
198
|
+
*/
|
|
199
|
+
declare function hoopStress(pressure: number, radius: number, thickness: number): HoopStressResult;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Simply supported beam analysis.
|
|
203
|
+
* Returns reactions, max moment, max shear, and max deflection (if E and I provided).
|
|
204
|
+
*/
|
|
205
|
+
declare function simplySupported(length: number, load: number, loadType: BeamLoadType, E?: number, I?: number, loadPosition?: number): BeamResult;
|
|
206
|
+
/**
|
|
207
|
+
* Cantilever beam analysis.
|
|
208
|
+
* Returns reaction force, reaction moment, max moment, max shear, and max deflection (if E and I provided).
|
|
209
|
+
*/
|
|
210
|
+
declare function cantilever(length: number, load: number, loadType: CantileverLoadType, E?: number, I?: number, loadPosition?: number): CantileverResult;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Euler's critical buckling load: Pcr = π²EI / Le²
|
|
214
|
+
* Le = K * L (effective length)
|
|
215
|
+
*/
|
|
216
|
+
declare function eulerBuckling(E: number, I: number, length: number, endCondition: EndCondition): EulerBucklingResult;
|
|
217
|
+
/**
|
|
218
|
+
* Slenderness ratio: λ = Le / r
|
|
219
|
+
* Classification: short (< 30), intermediate (30-120), long (> 120)
|
|
220
|
+
*/
|
|
221
|
+
declare function slendernessRatio(effectiveLength: number, radiusOfGyration: number): SlendernessRatioResult;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Rectangular cross-section properties.
|
|
225
|
+
* Ixx = bh³/12, Iyy = hb³/12
|
|
226
|
+
*/
|
|
227
|
+
declare function rectangleSection(width: number, height: number): RectangleSectionResult;
|
|
228
|
+
/**
|
|
229
|
+
* Solid circular cross-section properties.
|
|
230
|
+
* I = πd⁴/64
|
|
231
|
+
*/
|
|
232
|
+
declare function circularSection(diameter: number): CircularSectionResult;
|
|
233
|
+
/**
|
|
234
|
+
* Hollow circular cross-section properties.
|
|
235
|
+
* I = π(D⁴ - d⁴)/64
|
|
236
|
+
*/
|
|
237
|
+
declare function hollowCircularSection(outerDiameter: number, innerDiameter: number): HollowCircularSectionResult;
|
|
238
|
+
/**
|
|
239
|
+
* I-beam (wide flange) cross-section properties.
|
|
240
|
+
* Uses parallel axis theorem for Ixx.
|
|
241
|
+
*/
|
|
242
|
+
declare function iBeamSection(flangeWidth: number, flangeThickness: number, webHeight: number, webThickness: number): IBeamSectionResult;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Bearing capacity for shallow foundations using Terzaghi's equation form
|
|
246
|
+
* with Meyerhof/Vesic bearing capacity factors.
|
|
247
|
+
* q_ult = c·Nc·sc + γ·D·Nq + 0.5·γ·B·Nγ·sγ
|
|
248
|
+
* Shape factors: strip (1, 1), square (1.3, 0.8), circular (1.3, 0.6)
|
|
249
|
+
*/
|
|
250
|
+
declare function terzaghiBearing(cohesion: number, depth: number, unitWeight: number, frictionAngle: number, foundationType: FoundationType): TerzaghiBearingResult;
|
|
251
|
+
/**
|
|
252
|
+
* Rankine lateral earth pressure.
|
|
253
|
+
* Active: Ka = tan²(45° - φ/2)
|
|
254
|
+
* Passive: Kp = tan²(45° + φ/2)
|
|
255
|
+
* At-rest: K0 = 1 - sin(φ) (Jaky's formula)
|
|
256
|
+
*/
|
|
257
|
+
declare function lateralEarthPressure(unitWeight: number, height: number, frictionAngle: number, pressureType: EarthPressureType): LateralEarthPressureResult;
|
|
258
|
+
/**
|
|
259
|
+
* Elastic settlement: δ = (q · H) / E
|
|
260
|
+
* where q = P / A is the applied stress.
|
|
261
|
+
*/
|
|
262
|
+
declare function settlement(load: number, area: number, elasticModulus: number, thickness: number): SettlementResult;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Get material properties by name (case-insensitive partial match).
|
|
266
|
+
*/
|
|
267
|
+
declare function getMaterial(name: string): MaterialProperties;
|
|
268
|
+
/**
|
|
269
|
+
* List materials, optionally filtered by category.
|
|
270
|
+
*/
|
|
271
|
+
declare function listMaterials(category?: string): MaterialProperties[];
|
|
272
|
+
|
|
273
|
+
type index_BeamLoadType = BeamLoadType;
|
|
274
|
+
type index_BeamResult = BeamResult;
|
|
275
|
+
type index_CantileverLoadType = CantileverLoadType;
|
|
276
|
+
type index_CantileverResult = CantileverResult;
|
|
277
|
+
type index_CircularSectionResult = CircularSectionResult;
|
|
278
|
+
type index_ColumnClassification = ColumnClassification;
|
|
279
|
+
type index_EarthPressureType = EarthPressureType;
|
|
280
|
+
type index_EndCondition = EndCondition;
|
|
281
|
+
type index_EulerBucklingResult = EulerBucklingResult;
|
|
282
|
+
type index_FactorOfSafetyResult = FactorOfSafetyResult;
|
|
283
|
+
type index_FoundationType = FoundationType;
|
|
284
|
+
type index_HollowCircularSectionResult = HollowCircularSectionResult;
|
|
285
|
+
type index_HoopStressResult = HoopStressResult;
|
|
286
|
+
type index_IBeamSectionResult = IBeamSectionResult;
|
|
287
|
+
type index_LateralEarthPressureResult = LateralEarthPressureResult;
|
|
288
|
+
type index_MaterialProperties = MaterialProperties;
|
|
289
|
+
type index_NormalStressResult = NormalStressResult;
|
|
290
|
+
type index_RectangleSectionResult = RectangleSectionResult;
|
|
291
|
+
type index_SettlementResult = SettlementResult;
|
|
292
|
+
type index_ShearStressResult = ShearStressResult;
|
|
293
|
+
type index_SlendernessRatioResult = SlendernessRatioResult;
|
|
294
|
+
type index_StrainResult = StrainResult;
|
|
295
|
+
type index_TerzaghiBearingResult = TerzaghiBearingResult;
|
|
296
|
+
type index_YoungsModulusResult = YoungsModulusResult;
|
|
297
|
+
declare const index_cantilever: typeof cantilever;
|
|
298
|
+
declare const index_circularSection: typeof circularSection;
|
|
299
|
+
declare const index_eulerBuckling: typeof eulerBuckling;
|
|
300
|
+
declare const index_factorOfSafety: typeof factorOfSafety;
|
|
301
|
+
declare const index_getMaterial: typeof getMaterial;
|
|
302
|
+
declare const index_hollowCircularSection: typeof hollowCircularSection;
|
|
303
|
+
declare const index_hoopStress: typeof hoopStress;
|
|
304
|
+
declare const index_iBeamSection: typeof iBeamSection;
|
|
305
|
+
declare const index_lateralEarthPressure: typeof lateralEarthPressure;
|
|
306
|
+
declare const index_listMaterials: typeof listMaterials;
|
|
307
|
+
declare const index_normalStress: typeof normalStress;
|
|
308
|
+
declare const index_rectangleSection: typeof rectangleSection;
|
|
309
|
+
declare const index_settlement: typeof settlement;
|
|
310
|
+
declare const index_shearStress: typeof shearStress;
|
|
311
|
+
declare const index_simplySupported: typeof simplySupported;
|
|
312
|
+
declare const index_slendernessRatio: typeof slendernessRatio;
|
|
313
|
+
declare const index_strain: typeof strain;
|
|
314
|
+
declare const index_terzaghiBearing: typeof terzaghiBearing;
|
|
315
|
+
declare const index_youngsModulus: typeof youngsModulus;
|
|
316
|
+
declare namespace index {
|
|
317
|
+
export { type index_BeamLoadType as BeamLoadType, type index_BeamResult as BeamResult, type index_CantileverLoadType as CantileverLoadType, type index_CantileverResult as CantileverResult, type index_CircularSectionResult as CircularSectionResult, type index_ColumnClassification as ColumnClassification, type index_EarthPressureType as EarthPressureType, type index_EndCondition as EndCondition, type index_EulerBucklingResult as EulerBucklingResult, type index_FactorOfSafetyResult as FactorOfSafetyResult, type index_FoundationType as FoundationType, type index_HollowCircularSectionResult as HollowCircularSectionResult, type index_HoopStressResult as HoopStressResult, type index_IBeamSectionResult as IBeamSectionResult, type index_LateralEarthPressureResult as LateralEarthPressureResult, type index_MaterialProperties as MaterialProperties, type index_NormalStressResult as NormalStressResult, type index_RectangleSectionResult as RectangleSectionResult, type index_SettlementResult as SettlementResult, type index_ShearStressResult as ShearStressResult, type index_SlendernessRatioResult as SlendernessRatioResult, type index_StrainResult as StrainResult, type index_TerzaghiBearingResult as TerzaghiBearingResult, type index_YoungsModulusResult as YoungsModulusResult, index_cantilever as cantilever, index_circularSection as circularSection, index_eulerBuckling as eulerBuckling, index_factorOfSafety as factorOfSafety, index_getMaterial as getMaterial, index_hollowCircularSection as hollowCircularSection, index_hoopStress as hoopStress, index_iBeamSection as iBeamSection, index_lateralEarthPressure as lateralEarthPressure, index_listMaterials as listMaterials, index_normalStress as normalStress, index_rectangleSection as rectangleSection, index_settlement as settlement, index_shearStress as shearStress, index_simplySupported as simplySupported, index_slendernessRatio as slendernessRatio, index_strain as strain, index_terzaghiBearing as terzaghiBearing, index_youngsModulus as youngsModulus };
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export { simplySupported as A, type BeamLoadType as B, type CantileverLoadType as C, slendernessRatio as D, type EarthPressureType as E, type FactorOfSafetyResult as F, strain as G, type HollowCircularSectionResult as H, type IBeamSectionResult as I, terzaghiBearing as J, youngsModulus as K, type LateralEarthPressureResult as L, type MaterialProperties as M, type NormalStressResult as N, type RectangleSectionResult as R, type SettlementResult as S, type TerzaghiBearingResult as T, type YoungsModulusResult as Y, type BeamResult as a, type CantileverResult as b, type CircularSectionResult as c, type ColumnClassification as d, type EndCondition as e, type EulerBucklingResult as f, type FoundationType as g, type HoopStressResult as h, index as i, type ShearStressResult as j, type SlendernessRatioResult as k, type StrainResult as l, cantilever as m, circularSection as n, eulerBuckling as o, factorOfSafety as p, getMaterial as q, hollowCircularSection as r, hoopStress as s, iBeamSection as t, lateralEarthPressure as u, listMaterials as v, normalStress as w, rectangleSection as x, settlement as y, shearStress as z };
|