@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 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/structural/stress.ts","../../src/structural/beams.ts","../../src/structural/columns.ts","../../src/structural/sections.ts","../../src/structural/soils.ts","../../src/structural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GAAQ,SAAS,WAAA,EAAY;AACnC,EAAA,MAAM,QAAA,GAAW,UAAU,MAAA,CAAO,CAAC,MAAM,CAAA,CAAE,QAAA,CAAS,WAAA,EAAY,KAAM,KAAK,CAAA;AAC3E,EAAA,IAAI,QAAA,CAAS,WAAW,CAAA,EAAG;AACzB,IAAA,MAAM,UAAA,GAAa,CAAC,GAAG,IAAI,IAAI,SAAA,CAAU,GAAA,CAAI,CAAC,CAAA,KAAM,EAAE,QAAQ,CAAC,CAAC,CAAA,CAAE,KAAK,IAAI,CAAA;AAC3E,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,gCAAA,EAAmC,QAAQ,CAAA,yBAAA,EAA4B,UAAU,CAAA,CAAE,CAAA;AAAA,EACrG;AACA,EAAA,OAAO,SAAS,GAAA,CAAI,CAAC,OAAO,EAAE,GAAG,GAAE,CAAE,CAAA;AACvC","file":"index.js","sourcesContent":["import type {\n NormalStressResult,\n ShearStressResult,\n StrainResult,\n YoungsModulusResult,\n FactorOfSafetyResult,\n HoopStressResult,\n} from './types';\n\n/**\n * Normal stress: σ = F / A\n */\nexport function normalStress(force: number, area: number): NormalStressResult {\n if (area <= 0) throw new Error('Area must be positive');\n const stress = force / area;\n return { force, area, stress, unit: 'Pa' };\n}\n\n/**\n * Shear stress: τ = V / A\n */\nexport function shearStress(force: number, area: number): ShearStressResult {\n if (area <= 0) throw new Error('Area must be positive');\n const stress = force / area;\n return { force, area, stress, unit: 'Pa' };\n}\n\n/**\n * Strain: ε = ΔL / L\n */\nexport function strain(deltaLength: number, originalLength: number): StrainResult {\n if (originalLength <= 0) throw new Error('Original length must be positive');\n const s = deltaLength / originalLength;\n return { deltaLength, originalLength, strain: s, unit: 'dimensionless' };\n}\n\n/**\n * Young's modulus: E = σ / ε\n */\nexport function youngsModulus(stress: number, strainVal: number): YoungsModulusResult {\n if (strainVal === 0) throw new Error('Strain must be non-zero');\n const E = stress / strainVal;\n return { stress, strain: strainVal, youngsModulus: E, unit: 'Pa' };\n}\n\n/**\n * Factor of safety: FoS = σ_ultimate / σ_working\n */\nexport function factorOfSafety(ultimateStress: number, workingStress: number): FactorOfSafetyResult {\n if (workingStress === 0) throw new Error('Working stress must be non-zero');\n if (ultimateStress < 0) throw new Error('Ultimate stress must be non-negative');\n if (workingStress < 0) throw new Error('Working stress must be positive');\n const fos = ultimateStress / workingStress;\n return { ultimateStress, workingStress, factorOfSafety: fos };\n}\n\n/**\n * Hoop stress for thin-walled pressure vessels:\n * σ_hoop = pR / t\n * σ_longitudinal = pR / (2t)\n */\nexport function hoopStress(pressure: number, radius: number, thickness: number): HoopStressResult {\n if (pressure < 0) throw new Error('Pressure must be non-negative');\n if (radius <= 0) throw new Error('Radius must be positive');\n if (thickness <= 0) throw new Error('Thickness must be positive');\n const hoop = (pressure * radius) / thickness;\n const longitudinal = (pressure * radius) / (2 * thickness);\n return { pressure, radius, thickness, hoopStress: hoop, longitudinalStress: longitudinal, unit: 'Pa' };\n}\n","import type { BeamResult, CantileverResult, BeamLoadType, CantileverLoadType } from './types';\n\n/**\n * Simply supported beam analysis.\n * Returns reactions, max moment, max shear, and max deflection (if E and I provided).\n */\nexport function simplySupported(\n length: number,\n load: number,\n loadType: BeamLoadType,\n E?: number,\n I?: number,\n loadPosition?: number\n): BeamResult {\n if (length <= 0) throw new Error('Length must be positive');\n if (load < 0) throw new Error('Load must be non-negative');\n\n let reactionLeft: number;\n let reactionRight: number;\n let maxMoment: number;\n let maxShear: number;\n let maxDeflection: number | null = null;\n\n const L = length;\n const P = load;\n\n switch (loadType) {\n case 'point-center': {\n reactionLeft = P / 2;\n reactionRight = P / 2;\n maxMoment = (P * L) / 4;\n maxShear = P / 2;\n if (E && I) {\n maxDeflection = (P * L * L * L) / (48 * E * I);\n }\n break;\n }\n case 'point-custom': {\n const a = loadPosition ?? L / 2;\n if (a < 0 || a > L) throw new Error('Load position must be between 0 and length');\n const b = L - a;\n reactionLeft = (P * b) / L;\n reactionRight = (P * a) / L;\n maxMoment = (P * a * b) / L;\n maxShear = Math.max(reactionLeft, reactionRight);\n if (E && I) {\n // Approximate max deflection for off-center load\n maxDeflection = (P * a * b * (a + 2 * b) * Math.sqrt(3 * a * (a + 2 * b))) / (27 * E * I * L);\n }\n break;\n }\n case 'uniform': {\n // w = total load / length (UDL intensity)\n const w = P / L;\n reactionLeft = P / 2;\n reactionRight = P / 2;\n maxMoment = (w * L * L) / 8;\n maxShear = P / 2;\n if (E && I) {\n maxDeflection = (5 * w * L * L * L * L) / (384 * E * I);\n }\n break;\n }\n case 'triangular': {\n // Triangular load from 0 at left to w_max at right, total load = w_max * L / 2 = P\n const wMax = (2 * P) / L;\n reactionLeft = P / 3;\n reactionRight = (2 * P) / 3;\n // Max moment occurs at x = L/√3 from left\n const xMax = L / Math.sqrt(3);\n maxMoment = (wMax * xMax * xMax * xMax) / (6 * L) + reactionLeft * xMax - (wMax * xMax * xMax) / (6 * L);\n // Simplified: M_max = wL²/9√3\n maxMoment = (wMax * L * L) / (9 * Math.sqrt(3));\n maxShear = (2 * P) / 3;\n if (E && I) {\n maxDeflection = (P * L * L * L) / (60 * E * I);\n }\n break;\n }\n default:\n throw new Error(`Unknown load type: ${loadType}. Use: point-center, point-custom, uniform, triangular`);\n }\n\n return {\n length,\n load,\n loadType,\n reactionLeft,\n reactionRight,\n maxMoment,\n maxShear,\n maxDeflection,\n momentUnit: 'N·m',\n shearUnit: 'N',\n deflectionUnit: maxDeflection !== null ? 'm' : null,\n };\n}\n\n/**\n * Cantilever beam analysis.\n * Returns reaction force, reaction moment, max moment, max shear, and max deflection (if E and I provided).\n */\nexport function cantilever(\n length: number,\n load: number,\n loadType: CantileverLoadType,\n E?: number,\n I?: number,\n loadPosition?: number\n): CantileverResult {\n if (length <= 0) throw new Error('Length must be positive');\n if (load < 0) throw new Error('Load must be non-negative');\n\n let reactionForce: number;\n let reactionMoment: number;\n let maxMoment: number;\n let maxShear: number;\n let maxDeflection: number | null = null;\n\n const L = length;\n const P = load;\n\n switch (loadType) {\n case 'point-end': {\n reactionForce = P;\n reactionMoment = P * L;\n maxMoment = P * L;\n maxShear = P;\n if (E && I) {\n maxDeflection = (P * L * L * L) / (3 * E * I);\n }\n break;\n }\n case 'point-custom': {\n const a = loadPosition ?? L;\n if (a < 0 || a > L) throw new Error('Load position must be between 0 and length');\n reactionForce = P;\n reactionMoment = P * a;\n maxMoment = P * a;\n maxShear = P;\n if (E && I) {\n maxDeflection = (P * a * a * (3 * L - a)) / (6 * E * I);\n }\n break;\n }\n case 'uniform': {\n const w = P / L;\n reactionForce = P;\n reactionMoment = (w * L * L) / 2;\n maxMoment = (w * L * L) / 2;\n maxShear = P;\n if (E && I) {\n maxDeflection = (w * L * L * L * L) / (8 * E * I);\n }\n break;\n }\n default:\n throw new Error(`Unknown load type: ${loadType}. Use: point-end, point-custom, uniform`);\n }\n\n return {\n length,\n load,\n loadType,\n reactionForce,\n reactionMoment,\n maxMoment,\n maxShear,\n maxDeflection,\n momentUnit: 'N·m',\n shearUnit: 'N',\n deflectionUnit: maxDeflection !== null ? 'm' : null,\n };\n}\n","import type { EndCondition, EulerBucklingResult, SlendernessRatioResult, ColumnClassification } from './types';\n\nconst K_FACTORS: Record<EndCondition, number> = {\n 'pinned-pinned': 1.0,\n 'fixed-free': 2.0,\n 'fixed-pinned': 0.7,\n 'fixed-fixed': 0.5,\n};\n\n/**\n * Euler's critical buckling load: Pcr = π²EI / Le²\n * Le = K * L (effective length)\n */\nexport function eulerBuckling(\n E: number,\n I: number,\n length: number,\n endCondition: EndCondition\n): EulerBucklingResult {\n if (E <= 0) throw new Error('Elastic modulus must be positive');\n if (I <= 0) throw new Error('Moment of inertia must be positive');\n if (length <= 0) throw new Error('Length must be positive');\n\n const K = K_FACTORS[endCondition];\n if (K === undefined) {\n throw new Error(`Unknown end condition: ${endCondition}. Use: pinned-pinned, fixed-free, fixed-pinned, fixed-fixed`);\n }\n\n const Le = K * length;\n const Pcr = (Math.PI * Math.PI * E * I) / (Le * Le);\n\n return {\n elasticModulus: E,\n momentOfInertia: I,\n length,\n endCondition,\n effectiveLengthFactor: K,\n effectiveLength: Le,\n criticalLoad: Pcr,\n unit: 'N',\n };\n}\n\n/**\n * Slenderness ratio: λ = Le / r\n * Classification: short (< 30), intermediate (30-120), long (> 120)\n */\nexport function slendernessRatio(\n effectiveLength: number,\n radiusOfGyration: number\n): SlendernessRatioResult {\n if (effectiveLength <= 0) throw new Error('Effective length must be positive');\n if (radiusOfGyration <= 0) throw new Error('Radius of gyration must be positive');\n\n const ratio = effectiveLength / radiusOfGyration;\n\n let classification: ColumnClassification;\n if (ratio < 30) {\n classification = 'short';\n } else if (ratio <= 120) {\n classification = 'intermediate';\n } else {\n classification = 'long';\n }\n\n return {\n effectiveLength,\n radiusOfGyration,\n slendernessRatio: ratio,\n classification,\n };\n}\n","import type {\n RectangleSectionResult,\n CircularSectionResult,\n HollowCircularSectionResult,\n IBeamSectionResult,\n} from './types';\n\n/**\n * Rectangular cross-section properties.\n * Ixx = bh³/12, Iyy = hb³/12\n */\nexport function rectangleSection(width: number, height: number): RectangleSectionResult {\n if (width <= 0) throw new Error('Width must be positive');\n if (height <= 0) throw new Error('Height must be positive');\n\n const area = width * height;\n const Ixx = (width * height * height * height) / 12;\n const Iyy = (height * width * width * width) / 12;\n const Sx = (width * height * height) / 6;\n const Sy = (height * width * width) / 6;\n const rx = height / Math.sqrt(12);\n const ry = width / Math.sqrt(12);\n\n return { width, height, area, Ixx, Iyy, Sx, Sy, rx, ry };\n}\n\n/**\n * Solid circular cross-section properties.\n * I = πd⁴/64\n */\nexport function circularSection(diameter: number): CircularSectionResult {\n if (diameter <= 0) throw new Error('Diameter must be positive');\n\n const r2 = diameter / 2;\n const area = Math.PI * r2 * r2;\n const I = (Math.PI * diameter * diameter * diameter * diameter) / 64;\n const S = (Math.PI * diameter * diameter * diameter) / 32;\n const r = diameter / 4;\n\n return { diameter, area, I, S, r };\n}\n\n/**\n * Hollow circular cross-section properties.\n * I = π(D⁴ - d⁴)/64\n */\nexport function hollowCircularSection(outerDiameter: number, innerDiameter: number): HollowCircularSectionResult {\n if (outerDiameter <= 0) throw new Error('Outer diameter must be positive');\n if (innerDiameter < 0) throw new Error('Inner diameter must be non-negative');\n if (innerDiameter >= outerDiameter) throw new Error('Inner diameter must be less than outer diameter');\n\n const D = outerDiameter;\n const d = innerDiameter;\n const area = (Math.PI / 4) * (D * D - d * d);\n const I = (Math.PI / 64) * (D * D * D * D - d * d * d * d);\n const S = (Math.PI / (32 * D)) * (D * D * D * D - d * d * d * d);\n const r = Math.sqrt(I / area);\n\n return { outerDiameter, innerDiameter, area, I, S, r };\n}\n\n/**\n * I-beam (wide flange) cross-section properties.\n * Uses parallel axis theorem for Ixx.\n */\nexport function iBeamSection(\n flangeWidth: number,\n flangeThickness: number,\n webHeight: number,\n webThickness: number\n): IBeamSectionResult {\n if (flangeWidth <= 0) throw new Error('Flange width must be positive');\n if (flangeThickness <= 0) throw new Error('Flange thickness must be positive');\n if (webHeight <= 0) throw new Error('Web height must be positive');\n if (webThickness <= 0) throw new Error('Web thickness must be positive');\n\n const totalHeight = webHeight + 2 * flangeThickness;\n\n // Areas\n const flangeArea = flangeWidth * flangeThickness;\n const webArea = webHeight * webThickness;\n const area = 2 * flangeArea + webArea;\n\n // Ixx using parallel axis theorem\n // Web contribution: bh³/12 (centroidal)\n const IxxWeb = (webThickness * webHeight * webHeight * webHeight) / 12;\n // Flange contribution: bh³/12 + Ad² for each flange\n const IxxFlangeSelf = (flangeWidth * flangeThickness * flangeThickness * flangeThickness) / 12;\n const flangeCenterDist = (webHeight + flangeThickness) / 2;\n const IxxFlangeParallel = flangeArea * flangeCenterDist * flangeCenterDist;\n const Ixx = IxxWeb + 2 * (IxxFlangeSelf + IxxFlangeParallel);\n\n // Iyy\n const IyyFlanges = 2 * (flangeThickness * flangeWidth * flangeWidth * flangeWidth) / 12;\n const IyyWeb = (webHeight * webThickness * webThickness * webThickness) / 12;\n const Iyy = IyyFlanges + IyyWeb;\n\n // Section moduli\n const Sx = (2 * Ixx) / totalHeight;\n const Sy = (2 * Iyy) / flangeWidth;\n\n // Radii of gyration\n const rx = Math.sqrt(Ixx / area);\n const ry = Math.sqrt(Iyy / area);\n\n return {\n flangeWidth,\n flangeThickness,\n webHeight,\n webThickness,\n totalHeight,\n area,\n Ixx,\n Iyy,\n Sx,\n Sy,\n rx,\n ry,\n };\n}\n","import type {\n TerzaghiBearingResult,\n LateralEarthPressureResult,\n SettlementResult,\n FoundationType,\n EarthPressureType,\n} from './types';\n\n/**\n * General bearing capacity factors (Meyerhof/Reissner/Vesic formulation).\n * Nq from Reissner (1924), Nc from Prandtl (1921), Nγ from Vesic (1973).\n * These are the most widely used factors in modern geotechnical practice.\n */\nfunction bearingCapacityFactors(frictionAngleDeg: number): { Nc: number; Nq: number; Ngamma: number } {\n const phi = (frictionAngleDeg * Math.PI) / 180;\n\n // Nq = tan²(45 + φ/2) · e^(π·tanφ) (Reissner, 1924)\n const tan45half = Math.tan(Math.PI / 4 + phi / 2);\n const Nq = tan45half * tan45half * Math.exp(Math.PI * Math.tan(phi));\n\n // Nc = (Nq - 1) · cot(φ) (Prandtl, 1921; for φ > 0)\n let Nc: number;\n if (frictionAngleDeg === 0) {\n Nc = 5.14; // Prandtl's exact value: (2 + π)\n } else {\n Nc = (Nq - 1) / Math.tan(phi);\n }\n\n // Nγ = 2(Nq + 1)·tan(φ) (Vesic, 1973 approximation)\n const Ngamma = 2 * (Nq + 1) * Math.tan(phi);\n\n return { Nc, Nq, Ngamma };\n}\n\n/**\n * Bearing capacity for shallow foundations using Terzaghi's equation form\n * with Meyerhof/Vesic bearing capacity factors.\n * q_ult = c·Nc·sc + γ·D·Nq + 0.5·γ·B·Nγ·sγ\n * Shape factors: strip (1, 1), square (1.3, 0.8), circular (1.3, 0.6)\n */\nexport function terzaghiBearing(\n cohesion: number,\n depth: number,\n unitWeight: number,\n frictionAngle: number,\n foundationType: FoundationType\n): TerzaghiBearingResult {\n if (cohesion < 0) throw new Error('Cohesion must be non-negative');\n if (depth < 0) throw new Error('Depth must be non-negative');\n if (unitWeight <= 0) throw new Error('Unit weight must be positive');\n if (frictionAngle < 0 || frictionAngle > 50) throw new Error('Friction angle must be between 0 and 50 degrees');\n\n const { Nc, Nq, Ngamma } = bearingCapacityFactors(frictionAngle);\n\n let sc: number;\n let sgamma: number;\n switch (foundationType) {\n case 'strip':\n sc = 1.0;\n sgamma = 1.0;\n break;\n case 'square':\n sc = 1.3;\n sgamma = 0.8;\n break;\n case 'circular':\n sc = 1.3;\n sgamma = 0.6;\n break;\n default:\n throw new Error(`Unknown foundation type: ${foundationType}. Use: strip, square, circular`);\n }\n\n // q_ult = c·Nc·sc + γ·D·Nq + 0.5·γ·B·Nγ·sγ\n // For general formula, B is treated as unit width\n const bearingCapacity = cohesion * Nc * sc + unitWeight * depth * Nq + 0.5 * unitWeight * 1.0 * Ngamma * sgamma;\n\n return {\n cohesion,\n depth,\n unitWeight,\n frictionAngle,\n foundationType,\n bearingCapacity,\n Nc,\n Nq,\n Ngamma,\n unit: 'Pa',\n };\n}\n\n/**\n * Rankine lateral earth pressure.\n * Active: Ka = tan²(45° - φ/2)\n * Passive: Kp = tan²(45° + φ/2)\n * At-rest: K0 = 1 - sin(φ) (Jaky's formula)\n */\nexport function lateralEarthPressure(\n unitWeight: number,\n height: number,\n frictionAngle: number,\n pressureType: EarthPressureType\n): LateralEarthPressureResult {\n if (unitWeight <= 0) throw new Error('Unit weight must be positive');\n if (height <= 0) throw new Error('Height must be positive');\n if (frictionAngle < 0 || frictionAngle > 50) throw new Error('Friction angle must be between 0 and 50 degrees');\n\n const phi = (frictionAngle * Math.PI) / 180;\n let coefficient: number;\n\n switch (pressureType) {\n case 'active':\n coefficient = Math.pow(Math.tan(Math.PI / 4 - phi / 2), 2);\n break;\n case 'passive':\n coefficient = Math.pow(Math.tan(Math.PI / 4 + phi / 2), 2);\n break;\n case 'at-rest':\n coefficient = 1 - Math.sin(phi);\n break;\n default:\n throw new Error(`Unknown pressure type: ${pressureType}. Use: active, passive, at-rest`);\n }\n\n const pressureAtBase = coefficient * unitWeight * height;\n const totalForce = 0.5 * pressureAtBase * height;\n\n return {\n unitWeight,\n height,\n frictionAngle,\n pressureType,\n coefficient,\n pressureAtBase,\n totalForce,\n pressureUnit: 'Pa',\n forceUnit: 'N/m',\n };\n}\n\n/**\n * Elastic settlement: δ = (q · H) / E\n * where q = P / A is the applied stress.\n */\nexport function settlement(\n load: number,\n area: number,\n elasticModulus: number,\n thickness: number\n): SettlementResult {\n if (load < 0) throw new Error('Load must be non-negative');\n if (area <= 0) throw new Error('Area must be positive');\n if (elasticModulus <= 0) throw new Error('Elastic modulus must be positive');\n if (thickness <= 0) throw new Error('Thickness must be positive');\n\n const stress = load / area;\n const settl = (stress * thickness) / elasticModulus;\n\n return {\n load,\n area,\n elasticModulus,\n thickness,\n stress,\n settlement: settl,\n unit: 'm',\n };\n}\n","import type { MaterialProperties } from './types';\n\nconst MATERIALS: MaterialProperties[] = [\n {\n name: 'ASTM A36 Steel',\n category: 'steel',\n E: 200e9,\n fy: 250e6,\n fu: 400e6,\n density: 7850,\n poissonsRatio: 0.26,\n thermalExpansion: 12e-6,\n Eunit: 'Pa',\n fyUnit: 'Pa',\n fuUnit: 'Pa',\n densityUnit: 'kg/m³',\n thermalExpansionUnit: '1/°C',\n },\n {\n name: 'ASTM A992 Steel',\n category: 'steel',\n E: 200e9,\n fy: 345e6,\n fu: 450e6,\n density: 7850,\n poissonsRatio: 0.26,\n thermalExpansion: 12e-6,\n Eunit: 'Pa',\n fyUnit: 'Pa',\n fuUnit: 'Pa',\n densityUnit: 'kg/m³',\n thermalExpansionUnit: '1/°C',\n },\n {\n name: 'Stainless Steel 304',\n category: 'steel',\n E: 193e9,\n fy: 215e6,\n fu: 515e6,\n density: 7930,\n poissonsRatio: 0.29,\n thermalExpansion: 17.3e-6,\n Eunit: 'Pa',\n fyUnit: 'Pa',\n fuUnit: 'Pa',\n densityUnit: 'kg/m³',\n thermalExpansionUnit: '1/°C',\n },\n {\n name: 'Aluminum 6061-T6',\n category: 'aluminum',\n E: 68.9e9,\n fy: 276e6,\n fu: 310e6,\n density: 2700,\n poissonsRatio: 0.33,\n thermalExpansion: 23.6e-6,\n Eunit: 'Pa',\n fyUnit: 'Pa',\n fuUnit: 'Pa',\n densityUnit: 'kg/m³',\n thermalExpansionUnit: '1/°C',\n },\n {\n name: 'Aluminum 2024-T3',\n category: 'aluminum',\n E: 73.1e9,\n fy: 345e6,\n fu: 483e6,\n density: 2780,\n poissonsRatio: 0.33,\n thermalExpansion: 23.2e-6,\n Eunit: 'Pa',\n fyUnit: 'Pa',\n fuUnit: 'Pa',\n densityUnit: 'kg/m³',\n thermalExpansionUnit: '1/°C',\n },\n {\n name: 'Concrete C20/25',\n category: 'concrete',\n E: 30e9,\n fy: 20e6,\n fu: 25e6,\n density: 2400,\n poissonsRatio: 0.2,\n thermalExpansion: 10e-6,\n Eunit: 'Pa',\n fyUnit: 'Pa',\n fuUnit: 'Pa',\n densityUnit: 'kg/m³',\n thermalExpansionUnit: '1/°C',\n },\n {\n name: 'Concrete C30/37',\n category: 'concrete',\n E: 33e9,\n fy: 30e6,\n fu: 37e6,\n density: 2400,\n poissonsRatio: 0.2,\n thermalExpansion: 10e-6,\n Eunit: 'Pa',\n fyUnit: 'Pa',\n fuUnit: 'Pa',\n densityUnit: 'kg/m³',\n thermalExpansionUnit: '1/°C',\n },\n {\n name: 'Concrete C40/50',\n category: 'concrete',\n E: 35e9,\n fy: 40e6,\n fu: 50e6,\n density: 2400,\n poissonsRatio: 0.2,\n thermalExpansion: 10e-6,\n Eunit: 'Pa',\n fyUnit: 'Pa',\n fuUnit: 'Pa',\n densityUnit: 'kg/m³',\n thermalExpansionUnit: '1/°C',\n },\n {\n name: 'Douglas Fir',\n category: 'timber',\n E: 12.4e9,\n fy: 36e6,\n fu: 52e6,\n density: 530,\n poissonsRatio: 0.29,\n thermalExpansion: 3.6e-6,\n Eunit: 'Pa',\n fyUnit: 'Pa',\n fuUnit: 'Pa',\n densityUnit: 'kg/m³',\n thermalExpansionUnit: '1/°C',\n },\n {\n name: 'Southern Pine',\n category: 'timber',\n E: 13.7e9,\n fy: 41e6,\n fu: 59e6,\n density: 560,\n poissonsRatio: 0.33,\n thermalExpansion: 3.6e-6,\n Eunit: 'Pa',\n fyUnit: 'Pa',\n fuUnit: 'Pa',\n densityUnit: 'kg/m³',\n thermalExpansionUnit: '1/°C',\n },\n {\n name: 'Copper C11000',\n category: 'other',\n E: 130e9,\n fy: 69e6,\n fu: 220e6,\n density: 8940,\n poissonsRatio: 0.33,\n thermalExpansion: 17.3e-6,\n Eunit: 'Pa',\n fyUnit: 'Pa',\n fuUnit: 'Pa',\n densityUnit: 'kg/m³',\n thermalExpansionUnit: '1/°C',\n },\n];\n\n/**\n * Get material properties by name (case-insensitive partial match).\n */\nexport function getMaterial(name: string): MaterialProperties {\n const lower = name.toLowerCase();\n const found = MATERIALS.find((m) => m.name.toLowerCase().includes(lower));\n if (!found) {\n const available = MATERIALS.map((m) => m.name).join(', ');\n throw new Error(`Material \"${name}\" not found. Available: ${available}`);\n }\n return { ...found };\n}\n\n/**\n * List materials, optionally filtered by category.\n */\nexport function listMaterials(category?: string): MaterialProperties[] {\n if (!category) return MATERIALS.map((m) => ({ ...m }));\n const lower = category.toLowerCase();\n const filtered = MATERIALS.filter((m) => m.category.toLowerCase() === lower);\n if (filtered.length === 0) {\n const categories = [...new Set(MATERIALS.map((m) => m.category))].join(', ');\n throw new Error(`No materials found in category \"${category}\". Available categories: ${categories}`);\n }\n return filtered.map((m) => ({ ...m }));\n}\n"]}
|
|
@@ -0,0 +1,588 @@
|
|
|
1
|
+
// src/structural/stress.ts
|
|
2
|
+
function normalStress(force, area) {
|
|
3
|
+
if (area <= 0) throw new Error("Area must be positive");
|
|
4
|
+
const stress = force / area;
|
|
5
|
+
return { force, area, stress, unit: "Pa" };
|
|
6
|
+
}
|
|
7
|
+
function shearStress(force, area) {
|
|
8
|
+
if (area <= 0) throw new Error("Area must be positive");
|
|
9
|
+
const stress = force / area;
|
|
10
|
+
return { force, area, stress, unit: "Pa" };
|
|
11
|
+
}
|
|
12
|
+
function strain(deltaLength, originalLength) {
|
|
13
|
+
if (originalLength <= 0) throw new Error("Original length must be positive");
|
|
14
|
+
const s = deltaLength / originalLength;
|
|
15
|
+
return { deltaLength, originalLength, strain: s, unit: "dimensionless" };
|
|
16
|
+
}
|
|
17
|
+
function youngsModulus(stress, strainVal) {
|
|
18
|
+
if (strainVal === 0) throw new Error("Strain must be non-zero");
|
|
19
|
+
const E = stress / strainVal;
|
|
20
|
+
return { stress, strain: strainVal, youngsModulus: E, unit: "Pa" };
|
|
21
|
+
}
|
|
22
|
+
function factorOfSafety(ultimateStress, workingStress) {
|
|
23
|
+
if (workingStress === 0) throw new Error("Working stress must be non-zero");
|
|
24
|
+
if (ultimateStress < 0) throw new Error("Ultimate stress must be non-negative");
|
|
25
|
+
if (workingStress < 0) throw new Error("Working stress must be positive");
|
|
26
|
+
const fos = ultimateStress / workingStress;
|
|
27
|
+
return { ultimateStress, workingStress, factorOfSafety: fos };
|
|
28
|
+
}
|
|
29
|
+
function hoopStress(pressure, radius, thickness) {
|
|
30
|
+
if (pressure < 0) throw new Error("Pressure must be non-negative");
|
|
31
|
+
if (radius <= 0) throw new Error("Radius must be positive");
|
|
32
|
+
if (thickness <= 0) throw new Error("Thickness must be positive");
|
|
33
|
+
const hoop = pressure * radius / thickness;
|
|
34
|
+
const longitudinal = pressure * radius / (2 * thickness);
|
|
35
|
+
return { pressure, radius, thickness, hoopStress: hoop, longitudinalStress: longitudinal, unit: "Pa" };
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// src/structural/beams.ts
|
|
39
|
+
function simplySupported(length, load, loadType, E, I, loadPosition) {
|
|
40
|
+
if (length <= 0) throw new Error("Length must be positive");
|
|
41
|
+
if (load < 0) throw new Error("Load must be non-negative");
|
|
42
|
+
let reactionLeft;
|
|
43
|
+
let reactionRight;
|
|
44
|
+
let maxMoment;
|
|
45
|
+
let maxShear;
|
|
46
|
+
let maxDeflection = null;
|
|
47
|
+
const L = length;
|
|
48
|
+
const P = load;
|
|
49
|
+
switch (loadType) {
|
|
50
|
+
case "point-center": {
|
|
51
|
+
reactionLeft = P / 2;
|
|
52
|
+
reactionRight = P / 2;
|
|
53
|
+
maxMoment = P * L / 4;
|
|
54
|
+
maxShear = P / 2;
|
|
55
|
+
if (E && I) {
|
|
56
|
+
maxDeflection = P * L * L * L / (48 * E * I);
|
|
57
|
+
}
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
case "point-custom": {
|
|
61
|
+
const a = loadPosition ?? L / 2;
|
|
62
|
+
if (a < 0 || a > L) throw new Error("Load position must be between 0 and length");
|
|
63
|
+
const b = L - a;
|
|
64
|
+
reactionLeft = P * b / L;
|
|
65
|
+
reactionRight = P * a / L;
|
|
66
|
+
maxMoment = P * a * b / L;
|
|
67
|
+
maxShear = Math.max(reactionLeft, reactionRight);
|
|
68
|
+
if (E && I) {
|
|
69
|
+
maxDeflection = P * a * b * (a + 2 * b) * Math.sqrt(3 * a * (a + 2 * b)) / (27 * E * I * L);
|
|
70
|
+
}
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
case "uniform": {
|
|
74
|
+
const w = P / L;
|
|
75
|
+
reactionLeft = P / 2;
|
|
76
|
+
reactionRight = P / 2;
|
|
77
|
+
maxMoment = w * L * L / 8;
|
|
78
|
+
maxShear = P / 2;
|
|
79
|
+
if (E && I) {
|
|
80
|
+
maxDeflection = 5 * w * L * L * L * L / (384 * E * I);
|
|
81
|
+
}
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
case "triangular": {
|
|
85
|
+
const wMax = 2 * P / L;
|
|
86
|
+
reactionLeft = P / 3;
|
|
87
|
+
reactionRight = 2 * P / 3;
|
|
88
|
+
const xMax = L / Math.sqrt(3);
|
|
89
|
+
maxMoment = wMax * xMax * xMax * xMax / (6 * L) + reactionLeft * xMax - wMax * xMax * xMax / (6 * L);
|
|
90
|
+
maxMoment = wMax * L * L / (9 * Math.sqrt(3));
|
|
91
|
+
maxShear = 2 * P / 3;
|
|
92
|
+
if (E && I) {
|
|
93
|
+
maxDeflection = P * L * L * L / (60 * E * I);
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
default:
|
|
98
|
+
throw new Error(`Unknown load type: ${loadType}. Use: point-center, point-custom, uniform, triangular`);
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
length,
|
|
102
|
+
load,
|
|
103
|
+
loadType,
|
|
104
|
+
reactionLeft,
|
|
105
|
+
reactionRight,
|
|
106
|
+
maxMoment,
|
|
107
|
+
maxShear,
|
|
108
|
+
maxDeflection,
|
|
109
|
+
momentUnit: "N\xB7m",
|
|
110
|
+
shearUnit: "N",
|
|
111
|
+
deflectionUnit: maxDeflection !== null ? "m" : null
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
function cantilever(length, load, loadType, E, I, loadPosition) {
|
|
115
|
+
if (length <= 0) throw new Error("Length must be positive");
|
|
116
|
+
if (load < 0) throw new Error("Load must be non-negative");
|
|
117
|
+
let reactionForce;
|
|
118
|
+
let reactionMoment;
|
|
119
|
+
let maxMoment;
|
|
120
|
+
let maxShear;
|
|
121
|
+
let maxDeflection = null;
|
|
122
|
+
const L = length;
|
|
123
|
+
const P = load;
|
|
124
|
+
switch (loadType) {
|
|
125
|
+
case "point-end": {
|
|
126
|
+
reactionForce = P;
|
|
127
|
+
reactionMoment = P * L;
|
|
128
|
+
maxMoment = P * L;
|
|
129
|
+
maxShear = P;
|
|
130
|
+
if (E && I) {
|
|
131
|
+
maxDeflection = P * L * L * L / (3 * E * I);
|
|
132
|
+
}
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
case "point-custom": {
|
|
136
|
+
const a = loadPosition ?? L;
|
|
137
|
+
if (a < 0 || a > L) throw new Error("Load position must be between 0 and length");
|
|
138
|
+
reactionForce = P;
|
|
139
|
+
reactionMoment = P * a;
|
|
140
|
+
maxMoment = P * a;
|
|
141
|
+
maxShear = P;
|
|
142
|
+
if (E && I) {
|
|
143
|
+
maxDeflection = P * a * a * (3 * L - a) / (6 * E * I);
|
|
144
|
+
}
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
case "uniform": {
|
|
148
|
+
const w = P / L;
|
|
149
|
+
reactionForce = P;
|
|
150
|
+
reactionMoment = w * L * L / 2;
|
|
151
|
+
maxMoment = w * L * L / 2;
|
|
152
|
+
maxShear = P;
|
|
153
|
+
if (E && I) {
|
|
154
|
+
maxDeflection = w * L * L * L * L / (8 * E * I);
|
|
155
|
+
}
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
default:
|
|
159
|
+
throw new Error(`Unknown load type: ${loadType}. Use: point-end, point-custom, uniform`);
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
length,
|
|
163
|
+
load,
|
|
164
|
+
loadType,
|
|
165
|
+
reactionForce,
|
|
166
|
+
reactionMoment,
|
|
167
|
+
maxMoment,
|
|
168
|
+
maxShear,
|
|
169
|
+
maxDeflection,
|
|
170
|
+
momentUnit: "N\xB7m",
|
|
171
|
+
shearUnit: "N",
|
|
172
|
+
deflectionUnit: maxDeflection !== null ? "m" : null
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// src/structural/columns.ts
|
|
177
|
+
var K_FACTORS = {
|
|
178
|
+
"pinned-pinned": 1,
|
|
179
|
+
"fixed-free": 2,
|
|
180
|
+
"fixed-pinned": 0.7,
|
|
181
|
+
"fixed-fixed": 0.5
|
|
182
|
+
};
|
|
183
|
+
function eulerBuckling(E, I, length, endCondition) {
|
|
184
|
+
if (E <= 0) throw new Error("Elastic modulus must be positive");
|
|
185
|
+
if (I <= 0) throw new Error("Moment of inertia must be positive");
|
|
186
|
+
if (length <= 0) throw new Error("Length must be positive");
|
|
187
|
+
const K = K_FACTORS[endCondition];
|
|
188
|
+
if (K === void 0) {
|
|
189
|
+
throw new Error(`Unknown end condition: ${endCondition}. Use: pinned-pinned, fixed-free, fixed-pinned, fixed-fixed`);
|
|
190
|
+
}
|
|
191
|
+
const Le = K * length;
|
|
192
|
+
const Pcr = Math.PI * Math.PI * E * I / (Le * Le);
|
|
193
|
+
return {
|
|
194
|
+
elasticModulus: E,
|
|
195
|
+
momentOfInertia: I,
|
|
196
|
+
length,
|
|
197
|
+
endCondition,
|
|
198
|
+
effectiveLengthFactor: K,
|
|
199
|
+
effectiveLength: Le,
|
|
200
|
+
criticalLoad: Pcr,
|
|
201
|
+
unit: "N"
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
function slendernessRatio(effectiveLength, radiusOfGyration) {
|
|
205
|
+
if (effectiveLength <= 0) throw new Error("Effective length must be positive");
|
|
206
|
+
if (radiusOfGyration <= 0) throw new Error("Radius of gyration must be positive");
|
|
207
|
+
const ratio = effectiveLength / radiusOfGyration;
|
|
208
|
+
let classification;
|
|
209
|
+
if (ratio < 30) {
|
|
210
|
+
classification = "short";
|
|
211
|
+
} else if (ratio <= 120) {
|
|
212
|
+
classification = "intermediate";
|
|
213
|
+
} else {
|
|
214
|
+
classification = "long";
|
|
215
|
+
}
|
|
216
|
+
return {
|
|
217
|
+
effectiveLength,
|
|
218
|
+
radiusOfGyration,
|
|
219
|
+
slendernessRatio: ratio,
|
|
220
|
+
classification
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// src/structural/sections.ts
|
|
225
|
+
function rectangleSection(width, height) {
|
|
226
|
+
if (width <= 0) throw new Error("Width must be positive");
|
|
227
|
+
if (height <= 0) throw new Error("Height must be positive");
|
|
228
|
+
const area = width * height;
|
|
229
|
+
const Ixx = width * height * height * height / 12;
|
|
230
|
+
const Iyy = height * width * width * width / 12;
|
|
231
|
+
const Sx = width * height * height / 6;
|
|
232
|
+
const Sy = height * width * width / 6;
|
|
233
|
+
const rx = height / Math.sqrt(12);
|
|
234
|
+
const ry = width / Math.sqrt(12);
|
|
235
|
+
return { width, height, area, Ixx, Iyy, Sx, Sy, rx, ry };
|
|
236
|
+
}
|
|
237
|
+
function circularSection(diameter) {
|
|
238
|
+
if (diameter <= 0) throw new Error("Diameter must be positive");
|
|
239
|
+
const r2 = diameter / 2;
|
|
240
|
+
const area = Math.PI * r2 * r2;
|
|
241
|
+
const I = Math.PI * diameter * diameter * diameter * diameter / 64;
|
|
242
|
+
const S = Math.PI * diameter * diameter * diameter / 32;
|
|
243
|
+
const r = diameter / 4;
|
|
244
|
+
return { diameter, area, I, S, r };
|
|
245
|
+
}
|
|
246
|
+
function hollowCircularSection(outerDiameter, innerDiameter) {
|
|
247
|
+
if (outerDiameter <= 0) throw new Error("Outer diameter must be positive");
|
|
248
|
+
if (innerDiameter < 0) throw new Error("Inner diameter must be non-negative");
|
|
249
|
+
if (innerDiameter >= outerDiameter) throw new Error("Inner diameter must be less than outer diameter");
|
|
250
|
+
const D = outerDiameter;
|
|
251
|
+
const d = innerDiameter;
|
|
252
|
+
const area = Math.PI / 4 * (D * D - d * d);
|
|
253
|
+
const I = Math.PI / 64 * (D * D * D * D - d * d * d * d);
|
|
254
|
+
const S = Math.PI / (32 * D) * (D * D * D * D - d * d * d * d);
|
|
255
|
+
const r = Math.sqrt(I / area);
|
|
256
|
+
return { outerDiameter, innerDiameter, area, I, S, r };
|
|
257
|
+
}
|
|
258
|
+
function iBeamSection(flangeWidth, flangeThickness, webHeight, webThickness) {
|
|
259
|
+
if (flangeWidth <= 0) throw new Error("Flange width must be positive");
|
|
260
|
+
if (flangeThickness <= 0) throw new Error("Flange thickness must be positive");
|
|
261
|
+
if (webHeight <= 0) throw new Error("Web height must be positive");
|
|
262
|
+
if (webThickness <= 0) throw new Error("Web thickness must be positive");
|
|
263
|
+
const totalHeight = webHeight + 2 * flangeThickness;
|
|
264
|
+
const flangeArea = flangeWidth * flangeThickness;
|
|
265
|
+
const webArea = webHeight * webThickness;
|
|
266
|
+
const area = 2 * flangeArea + webArea;
|
|
267
|
+
const IxxWeb = webThickness * webHeight * webHeight * webHeight / 12;
|
|
268
|
+
const IxxFlangeSelf = flangeWidth * flangeThickness * flangeThickness * flangeThickness / 12;
|
|
269
|
+
const flangeCenterDist = (webHeight + flangeThickness) / 2;
|
|
270
|
+
const IxxFlangeParallel = flangeArea * flangeCenterDist * flangeCenterDist;
|
|
271
|
+
const Ixx = IxxWeb + 2 * (IxxFlangeSelf + IxxFlangeParallel);
|
|
272
|
+
const IyyFlanges = 2 * (flangeThickness * flangeWidth * flangeWidth * flangeWidth) / 12;
|
|
273
|
+
const IyyWeb = webHeight * webThickness * webThickness * webThickness / 12;
|
|
274
|
+
const Iyy = IyyFlanges + IyyWeb;
|
|
275
|
+
const Sx = 2 * Ixx / totalHeight;
|
|
276
|
+
const Sy = 2 * Iyy / flangeWidth;
|
|
277
|
+
const rx = Math.sqrt(Ixx / area);
|
|
278
|
+
const ry = Math.sqrt(Iyy / area);
|
|
279
|
+
return {
|
|
280
|
+
flangeWidth,
|
|
281
|
+
flangeThickness,
|
|
282
|
+
webHeight,
|
|
283
|
+
webThickness,
|
|
284
|
+
totalHeight,
|
|
285
|
+
area,
|
|
286
|
+
Ixx,
|
|
287
|
+
Iyy,
|
|
288
|
+
Sx,
|
|
289
|
+
Sy,
|
|
290
|
+
rx,
|
|
291
|
+
ry
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// src/structural/soils.ts
|
|
296
|
+
function bearingCapacityFactors(frictionAngleDeg) {
|
|
297
|
+
const phi = frictionAngleDeg * Math.PI / 180;
|
|
298
|
+
const tan45half = Math.tan(Math.PI / 4 + phi / 2);
|
|
299
|
+
const Nq = tan45half * tan45half * Math.exp(Math.PI * Math.tan(phi));
|
|
300
|
+
let Nc;
|
|
301
|
+
if (frictionAngleDeg === 0) {
|
|
302
|
+
Nc = 5.14;
|
|
303
|
+
} else {
|
|
304
|
+
Nc = (Nq - 1) / Math.tan(phi);
|
|
305
|
+
}
|
|
306
|
+
const Ngamma = 2 * (Nq + 1) * Math.tan(phi);
|
|
307
|
+
return { Nc, Nq, Ngamma };
|
|
308
|
+
}
|
|
309
|
+
function terzaghiBearing(cohesion, depth, unitWeight, frictionAngle, foundationType) {
|
|
310
|
+
if (cohesion < 0) throw new Error("Cohesion must be non-negative");
|
|
311
|
+
if (depth < 0) throw new Error("Depth must be non-negative");
|
|
312
|
+
if (unitWeight <= 0) throw new Error("Unit weight must be positive");
|
|
313
|
+
if (frictionAngle < 0 || frictionAngle > 50) throw new Error("Friction angle must be between 0 and 50 degrees");
|
|
314
|
+
const { Nc, Nq, Ngamma } = bearingCapacityFactors(frictionAngle);
|
|
315
|
+
let sc;
|
|
316
|
+
let sgamma;
|
|
317
|
+
switch (foundationType) {
|
|
318
|
+
case "strip":
|
|
319
|
+
sc = 1;
|
|
320
|
+
sgamma = 1;
|
|
321
|
+
break;
|
|
322
|
+
case "square":
|
|
323
|
+
sc = 1.3;
|
|
324
|
+
sgamma = 0.8;
|
|
325
|
+
break;
|
|
326
|
+
case "circular":
|
|
327
|
+
sc = 1.3;
|
|
328
|
+
sgamma = 0.6;
|
|
329
|
+
break;
|
|
330
|
+
default:
|
|
331
|
+
throw new Error(`Unknown foundation type: ${foundationType}. Use: strip, square, circular`);
|
|
332
|
+
}
|
|
333
|
+
const bearingCapacity = cohesion * Nc * sc + unitWeight * depth * Nq + 0.5 * unitWeight * 1 * Ngamma * sgamma;
|
|
334
|
+
return {
|
|
335
|
+
cohesion,
|
|
336
|
+
depth,
|
|
337
|
+
unitWeight,
|
|
338
|
+
frictionAngle,
|
|
339
|
+
foundationType,
|
|
340
|
+
bearingCapacity,
|
|
341
|
+
Nc,
|
|
342
|
+
Nq,
|
|
343
|
+
Ngamma,
|
|
344
|
+
unit: "Pa"
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
function lateralEarthPressure(unitWeight, height, frictionAngle, pressureType) {
|
|
348
|
+
if (unitWeight <= 0) throw new Error("Unit weight must be positive");
|
|
349
|
+
if (height <= 0) throw new Error("Height must be positive");
|
|
350
|
+
if (frictionAngle < 0 || frictionAngle > 50) throw new Error("Friction angle must be between 0 and 50 degrees");
|
|
351
|
+
const phi = frictionAngle * Math.PI / 180;
|
|
352
|
+
let coefficient;
|
|
353
|
+
switch (pressureType) {
|
|
354
|
+
case "active":
|
|
355
|
+
coefficient = Math.pow(Math.tan(Math.PI / 4 - phi / 2), 2);
|
|
356
|
+
break;
|
|
357
|
+
case "passive":
|
|
358
|
+
coefficient = Math.pow(Math.tan(Math.PI / 4 + phi / 2), 2);
|
|
359
|
+
break;
|
|
360
|
+
case "at-rest":
|
|
361
|
+
coefficient = 1 - Math.sin(phi);
|
|
362
|
+
break;
|
|
363
|
+
default:
|
|
364
|
+
throw new Error(`Unknown pressure type: ${pressureType}. Use: active, passive, at-rest`);
|
|
365
|
+
}
|
|
366
|
+
const pressureAtBase = coefficient * unitWeight * height;
|
|
367
|
+
const totalForce = 0.5 * pressureAtBase * height;
|
|
368
|
+
return {
|
|
369
|
+
unitWeight,
|
|
370
|
+
height,
|
|
371
|
+
frictionAngle,
|
|
372
|
+
pressureType,
|
|
373
|
+
coefficient,
|
|
374
|
+
pressureAtBase,
|
|
375
|
+
totalForce,
|
|
376
|
+
pressureUnit: "Pa",
|
|
377
|
+
forceUnit: "N/m"
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
function settlement(load, area, elasticModulus, thickness) {
|
|
381
|
+
if (load < 0) throw new Error("Load must be non-negative");
|
|
382
|
+
if (area <= 0) throw new Error("Area must be positive");
|
|
383
|
+
if (elasticModulus <= 0) throw new Error("Elastic modulus must be positive");
|
|
384
|
+
if (thickness <= 0) throw new Error("Thickness must be positive");
|
|
385
|
+
const stress = load / area;
|
|
386
|
+
const settl = stress * thickness / elasticModulus;
|
|
387
|
+
return {
|
|
388
|
+
load,
|
|
389
|
+
area,
|
|
390
|
+
elasticModulus,
|
|
391
|
+
thickness,
|
|
392
|
+
stress,
|
|
393
|
+
settlement: settl,
|
|
394
|
+
unit: "m"
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// src/structural/materials.ts
|
|
399
|
+
var MATERIALS = [
|
|
400
|
+
{
|
|
401
|
+
name: "ASTM A36 Steel",
|
|
402
|
+
category: "steel",
|
|
403
|
+
E: 2e11,
|
|
404
|
+
fy: 25e7,
|
|
405
|
+
fu: 4e8,
|
|
406
|
+
density: 7850,
|
|
407
|
+
poissonsRatio: 0.26,
|
|
408
|
+
thermalExpansion: 12e-6,
|
|
409
|
+
Eunit: "Pa",
|
|
410
|
+
fyUnit: "Pa",
|
|
411
|
+
fuUnit: "Pa",
|
|
412
|
+
densityUnit: "kg/m\xB3",
|
|
413
|
+
thermalExpansionUnit: "1/\xB0C"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
name: "ASTM A992 Steel",
|
|
417
|
+
category: "steel",
|
|
418
|
+
E: 2e11,
|
|
419
|
+
fy: 345e6,
|
|
420
|
+
fu: 45e7,
|
|
421
|
+
density: 7850,
|
|
422
|
+
poissonsRatio: 0.26,
|
|
423
|
+
thermalExpansion: 12e-6,
|
|
424
|
+
Eunit: "Pa",
|
|
425
|
+
fyUnit: "Pa",
|
|
426
|
+
fuUnit: "Pa",
|
|
427
|
+
densityUnit: "kg/m\xB3",
|
|
428
|
+
thermalExpansionUnit: "1/\xB0C"
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
name: "Stainless Steel 304",
|
|
432
|
+
category: "steel",
|
|
433
|
+
E: 193e9,
|
|
434
|
+
fy: 215e6,
|
|
435
|
+
fu: 515e6,
|
|
436
|
+
density: 7930,
|
|
437
|
+
poissonsRatio: 0.29,
|
|
438
|
+
thermalExpansion: 173e-7,
|
|
439
|
+
Eunit: "Pa",
|
|
440
|
+
fyUnit: "Pa",
|
|
441
|
+
fuUnit: "Pa",
|
|
442
|
+
densityUnit: "kg/m\xB3",
|
|
443
|
+
thermalExpansionUnit: "1/\xB0C"
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
name: "Aluminum 6061-T6",
|
|
447
|
+
category: "aluminum",
|
|
448
|
+
E: 689e8,
|
|
449
|
+
fy: 276e6,
|
|
450
|
+
fu: 31e7,
|
|
451
|
+
density: 2700,
|
|
452
|
+
poissonsRatio: 0.33,
|
|
453
|
+
thermalExpansion: 236e-7,
|
|
454
|
+
Eunit: "Pa",
|
|
455
|
+
fyUnit: "Pa",
|
|
456
|
+
fuUnit: "Pa",
|
|
457
|
+
densityUnit: "kg/m\xB3",
|
|
458
|
+
thermalExpansionUnit: "1/\xB0C"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
name: "Aluminum 2024-T3",
|
|
462
|
+
category: "aluminum",
|
|
463
|
+
E: 731e8,
|
|
464
|
+
fy: 345e6,
|
|
465
|
+
fu: 483e6,
|
|
466
|
+
density: 2780,
|
|
467
|
+
poissonsRatio: 0.33,
|
|
468
|
+
thermalExpansion: 232e-7,
|
|
469
|
+
Eunit: "Pa",
|
|
470
|
+
fyUnit: "Pa",
|
|
471
|
+
fuUnit: "Pa",
|
|
472
|
+
densityUnit: "kg/m\xB3",
|
|
473
|
+
thermalExpansionUnit: "1/\xB0C"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
name: "Concrete C20/25",
|
|
477
|
+
category: "concrete",
|
|
478
|
+
E: 3e10,
|
|
479
|
+
fy: 2e7,
|
|
480
|
+
fu: 25e6,
|
|
481
|
+
density: 2400,
|
|
482
|
+
poissonsRatio: 0.2,
|
|
483
|
+
thermalExpansion: 1e-5,
|
|
484
|
+
Eunit: "Pa",
|
|
485
|
+
fyUnit: "Pa",
|
|
486
|
+
fuUnit: "Pa",
|
|
487
|
+
densityUnit: "kg/m\xB3",
|
|
488
|
+
thermalExpansionUnit: "1/\xB0C"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
name: "Concrete C30/37",
|
|
492
|
+
category: "concrete",
|
|
493
|
+
E: 33e9,
|
|
494
|
+
fy: 3e7,
|
|
495
|
+
fu: 37e6,
|
|
496
|
+
density: 2400,
|
|
497
|
+
poissonsRatio: 0.2,
|
|
498
|
+
thermalExpansion: 1e-5,
|
|
499
|
+
Eunit: "Pa",
|
|
500
|
+
fyUnit: "Pa",
|
|
501
|
+
fuUnit: "Pa",
|
|
502
|
+
densityUnit: "kg/m\xB3",
|
|
503
|
+
thermalExpansionUnit: "1/\xB0C"
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
name: "Concrete C40/50",
|
|
507
|
+
category: "concrete",
|
|
508
|
+
E: 35e9,
|
|
509
|
+
fy: 4e7,
|
|
510
|
+
fu: 5e7,
|
|
511
|
+
density: 2400,
|
|
512
|
+
poissonsRatio: 0.2,
|
|
513
|
+
thermalExpansion: 1e-5,
|
|
514
|
+
Eunit: "Pa",
|
|
515
|
+
fyUnit: "Pa",
|
|
516
|
+
fuUnit: "Pa",
|
|
517
|
+
densityUnit: "kg/m\xB3",
|
|
518
|
+
thermalExpansionUnit: "1/\xB0C"
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
name: "Douglas Fir",
|
|
522
|
+
category: "timber",
|
|
523
|
+
E: 124e8,
|
|
524
|
+
fy: 36e6,
|
|
525
|
+
fu: 52e6,
|
|
526
|
+
density: 530,
|
|
527
|
+
poissonsRatio: 0.29,
|
|
528
|
+
thermalExpansion: 36e-7,
|
|
529
|
+
Eunit: "Pa",
|
|
530
|
+
fyUnit: "Pa",
|
|
531
|
+
fuUnit: "Pa",
|
|
532
|
+
densityUnit: "kg/m\xB3",
|
|
533
|
+
thermalExpansionUnit: "1/\xB0C"
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
name: "Southern Pine",
|
|
537
|
+
category: "timber",
|
|
538
|
+
E: 137e8,
|
|
539
|
+
fy: 41e6,
|
|
540
|
+
fu: 59e6,
|
|
541
|
+
density: 560,
|
|
542
|
+
poissonsRatio: 0.33,
|
|
543
|
+
thermalExpansion: 36e-7,
|
|
544
|
+
Eunit: "Pa",
|
|
545
|
+
fyUnit: "Pa",
|
|
546
|
+
fuUnit: "Pa",
|
|
547
|
+
densityUnit: "kg/m\xB3",
|
|
548
|
+
thermalExpansionUnit: "1/\xB0C"
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
name: "Copper C11000",
|
|
552
|
+
category: "other",
|
|
553
|
+
E: 13e10,
|
|
554
|
+
fy: 69e6,
|
|
555
|
+
fu: 22e7,
|
|
556
|
+
density: 8940,
|
|
557
|
+
poissonsRatio: 0.33,
|
|
558
|
+
thermalExpansion: 173e-7,
|
|
559
|
+
Eunit: "Pa",
|
|
560
|
+
fyUnit: "Pa",
|
|
561
|
+
fuUnit: "Pa",
|
|
562
|
+
densityUnit: "kg/m\xB3",
|
|
563
|
+
thermalExpansionUnit: "1/\xB0C"
|
|
564
|
+
}
|
|
565
|
+
];
|
|
566
|
+
function getMaterial(name) {
|
|
567
|
+
const lower = name.toLowerCase();
|
|
568
|
+
const found = MATERIALS.find((m) => m.name.toLowerCase().includes(lower));
|
|
569
|
+
if (!found) {
|
|
570
|
+
const available = MATERIALS.map((m) => m.name).join(", ");
|
|
571
|
+
throw new Error(`Material "${name}" not found. Available: ${available}`);
|
|
572
|
+
}
|
|
573
|
+
return { ...found };
|
|
574
|
+
}
|
|
575
|
+
function listMaterials(category) {
|
|
576
|
+
if (!category) return MATERIALS.map((m) => ({ ...m }));
|
|
577
|
+
const lower = category.toLowerCase();
|
|
578
|
+
const filtered = MATERIALS.filter((m) => m.category.toLowerCase() === lower);
|
|
579
|
+
if (filtered.length === 0) {
|
|
580
|
+
const categories = [...new Set(MATERIALS.map((m) => m.category))].join(", ");
|
|
581
|
+
throw new Error(`No materials found in category "${category}". Available categories: ${categories}`);
|
|
582
|
+
}
|
|
583
|
+
return filtered.map((m) => ({ ...m }));
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
export { cantilever, circularSection, eulerBuckling, factorOfSafety, getMaterial, hollowCircularSection, hoopStress, iBeamSection, lateralEarthPressure, listMaterials, normalStress, rectangleSection, settlement, shearStress, simplySupported, slendernessRatio, strain, terzaghiBearing, youngsModulus };
|
|
587
|
+
//# sourceMappingURL=index.mjs.map
|
|
588
|
+
//# sourceMappingURL=index.mjs.map
|