@geotechcli/core 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/brain.d.ts +39 -0
- package/dist/agents/brain.d.ts.map +1 -0
- package/dist/agents/brain.js +339 -0
- package/dist/agents/brain.js.map +1 -0
- package/dist/agents/bridge-tools.d.ts +2 -0
- package/dist/agents/bridge-tools.d.ts.map +1 -0
- package/dist/agents/bridge-tools.js +170 -0
- package/dist/agents/bridge-tools.js.map +1 -0
- package/dist/agents/data-tools.d.ts +2 -0
- package/dist/agents/data-tools.d.ts.map +1 -0
- package/dist/agents/data-tools.js +309 -0
- package/dist/agents/data-tools.js.map +1 -0
- package/dist/agents/filesystem-tools.d.ts +2 -0
- package/dist/agents/filesystem-tools.d.ts.map +1 -0
- package/dist/agents/filesystem-tools.js +267 -0
- package/dist/agents/filesystem-tools.js.map +1 -0
- package/dist/agents/guardrails.d.ts +17 -0
- package/dist/agents/guardrails.d.ts.map +1 -0
- package/dist/agents/guardrails.js +260 -0
- package/dist/agents/guardrails.js.map +1 -0
- package/dist/agents/orchestrator.d.ts +9 -0
- package/dist/agents/orchestrator.d.ts.map +1 -0
- package/dist/agents/orchestrator.js +136 -0
- package/dist/agents/orchestrator.js.map +1 -0
- package/dist/agents/safety.d.ts +9 -0
- package/dist/agents/safety.d.ts.map +1 -0
- package/dist/agents/safety.js +40 -0
- package/dist/agents/safety.js.map +1 -0
- package/dist/agents/sandbox.d.ts +34 -0
- package/dist/agents/sandbox.d.ts.map +1 -0
- package/dist/agents/sandbox.js +235 -0
- package/dist/agents/sandbox.js.map +1 -0
- package/dist/agents/swarm.d.ts +25 -0
- package/dist/agents/swarm.d.ts.map +1 -0
- package/dist/agents/swarm.js +434 -0
- package/dist/agents/swarm.js.map +1 -0
- package/dist/agents/tools.d.ts +37 -0
- package/dist/agents/tools.d.ts.map +1 -0
- package/dist/agents/tools.js +451 -0
- package/dist/agents/tools.js.map +1 -0
- package/dist/bridge/index.d.ts +52 -0
- package/dist/bridge/index.d.ts.map +1 -0
- package/dist/bridge/index.js +195 -0
- package/dist/bridge/index.js.map +1 -0
- package/dist/config/index.d.ts +106 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +217 -0
- package/dist/config/index.js.map +1 -0
- package/dist/db/index.d.ts +4 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +4 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/redis.d.ts +14 -0
- package/dist/db/redis.d.ts.map +1 -0
- package/dist/db/redis.js +204 -0
- package/dist/db/redis.js.map +1 -0
- package/dist/db/supabase.d.ts +57 -0
- package/dist/db/supabase.d.ts.map +1 -0
- package/dist/db/supabase.js +156 -0
- package/dist/db/supabase.js.map +1 -0
- package/dist/db/users.d.ts +50 -0
- package/dist/db/users.d.ts.map +1 -0
- package/dist/db/users.js +132 -0
- package/dist/db/users.js.map +1 -0
- package/dist/export/index.d.ts +51 -0
- package/dist/export/index.d.ts.map +1 -0
- package/dist/export/index.js +126 -0
- package/dist/export/index.js.map +1 -0
- package/dist/geo/bearing-capacity.d.ts +60 -0
- package/dist/geo/bearing-capacity.d.ts.map +1 -0
- package/dist/geo/bearing-capacity.js +195 -0
- package/dist/geo/bearing-capacity.js.map +1 -0
- package/dist/geo/classification.d.ts +107 -0
- package/dist/geo/classification.d.ts.map +1 -0
- package/dist/geo/classification.js +261 -0
- package/dist/geo/classification.js.map +1 -0
- package/dist/geo/index.d.ts +9 -0
- package/dist/geo/index.d.ts.map +1 -0
- package/dist/geo/index.js +9 -0
- package/dist/geo/index.js.map +1 -0
- package/dist/geo/lateral-earth-pressure.d.ts +75 -0
- package/dist/geo/lateral-earth-pressure.d.ts.map +1 -0
- package/dist/geo/lateral-earth-pressure.js +219 -0
- package/dist/geo/lateral-earth-pressure.js.map +1 -0
- package/dist/geo/liquefaction.d.ts +65 -0
- package/dist/geo/liquefaction.d.ts.map +1 -0
- package/dist/geo/liquefaction.js +163 -0
- package/dist/geo/liquefaction.js.map +1 -0
- package/dist/geo/pile-capacity.d.ts +91 -0
- package/dist/geo/pile-capacity.d.ts.map +1 -0
- package/dist/geo/pile-capacity.js +233 -0
- package/dist/geo/pile-capacity.js.map +1 -0
- package/dist/geo/settlement.d.ts +119 -0
- package/dist/geo/settlement.d.ts.map +1 -0
- package/dist/geo/settlement.js +184 -0
- package/dist/geo/settlement.js.map +1 -0
- package/dist/geo/slope-stability.d.ts +82 -0
- package/dist/geo/slope-stability.d.ts.map +1 -0
- package/dist/geo/slope-stability.js +214 -0
- package/dist/geo/slope-stability.js.map +1 -0
- package/dist/geo/tunnel/index.d.ts +2 -0
- package/dist/geo/tunnel/index.d.ts.map +1 -0
- package/dist/geo/tunnel/index.js +2 -0
- package/dist/geo/tunnel/index.js.map +1 -0
- package/dist/geo/tunnel/tbm.d.ts +135 -0
- package/dist/geo/tunnel/tbm.d.ts.map +1 -0
- package/dist/geo/tunnel/tbm.js +268 -0
- package/dist/geo/tunnel/tbm.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/ingest/ags.d.ts +42 -0
- package/dist/ingest/ags.d.ts.map +1 -0
- package/dist/ingest/ags.js +133 -0
- package/dist/ingest/ags.js.map +1 -0
- package/dist/ingest/cpt.d.ts +47 -0
- package/dist/ingest/cpt.d.ts.map +1 -0
- package/dist/ingest/cpt.js +112 -0
- package/dist/ingest/cpt.js.map +1 -0
- package/dist/ingest/index.d.ts +3 -0
- package/dist/ingest/index.d.ts.map +1 -0
- package/dist/ingest/index.js +3 -0
- package/dist/ingest/index.js.map +1 -0
- package/dist/llm/index.d.ts +5 -0
- package/dist/llm/index.d.ts.map +1 -0
- package/dist/llm/index.js +4 -0
- package/dist/llm/index.js.map +1 -0
- package/dist/llm/middleware/metering.d.ts +55 -0
- package/dist/llm/middleware/metering.d.ts.map +1 -0
- package/dist/llm/middleware/metering.js +191 -0
- package/dist/llm/middleware/metering.js.map +1 -0
- package/dist/llm/middleware/persistent-usage.d.ts +7 -0
- package/dist/llm/middleware/persistent-usage.d.ts.map +1 -0
- package/dist/llm/middleware/persistent-usage.js +108 -0
- package/dist/llm/middleware/persistent-usage.js.map +1 -0
- package/dist/llm/middleware/retry.d.ts +7 -0
- package/dist/llm/middleware/retry.d.ts.map +1 -0
- package/dist/llm/middleware/retry.js +29 -0
- package/dist/llm/middleware/retry.js.map +1 -0
- package/dist/llm/providers/anthropic.d.ts +10 -0
- package/dist/llm/providers/anthropic.d.ts.map +1 -0
- package/dist/llm/providers/anthropic.js +107 -0
- package/dist/llm/providers/anthropic.js.map +1 -0
- package/dist/llm/providers/hosted-beta.d.ts +10 -0
- package/dist/llm/providers/hosted-beta.d.ts.map +1 -0
- package/dist/llm/providers/hosted-beta.js +106 -0
- package/dist/llm/providers/hosted-beta.js.map +1 -0
- package/dist/llm/providers/huggingface.d.ts +37 -0
- package/dist/llm/providers/huggingface.d.ts.map +1 -0
- package/dist/llm/providers/huggingface.js +133 -0
- package/dist/llm/providers/huggingface.js.map +1 -0
- package/dist/llm/providers/openai-compatible.d.ts +27 -0
- package/dist/llm/providers/openai-compatible.d.ts.map +1 -0
- package/dist/llm/providers/openai-compatible.js +99 -0
- package/dist/llm/providers/openai-compatible.js.map +1 -0
- package/dist/llm/providers/zhipu.d.ts +10 -0
- package/dist/llm/providers/zhipu.d.ts.map +1 -0
- package/dist/llm/providers/zhipu.js +81 -0
- package/dist/llm/providers/zhipu.js.map +1 -0
- package/dist/llm/router.d.ts +35 -0
- package/dist/llm/router.d.ts.map +1 -0
- package/dist/llm/router.js +109 -0
- package/dist/llm/router.js.map +1 -0
- package/dist/llm/types.d.ts +63 -0
- package/dist/llm/types.d.ts.map +1 -0
- package/dist/llm/types.js +38 -0
- package/dist/llm/types.js.map +1 -0
- package/dist/meta/index.d.ts +12 -0
- package/dist/meta/index.d.ts.map +1 -0
- package/dist/meta/index.js +8 -0
- package/dist/meta/index.js.map +1 -0
- package/dist/meta/metadata.json +46 -0
- package/dist/report/index.d.ts +20 -0
- package/dist/report/index.d.ts.map +1 -0
- package/dist/report/index.js +58 -0
- package/dist/report/index.js.map +1 -0
- package/dist/standards/index.d.ts +23 -0
- package/dist/standards/index.d.ts.map +1 -0
- package/dist/standards/index.js +89 -0
- package/dist/standards/index.js.map +1 -0
- package/dist/storage/index.d.ts +114 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +465 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/vision/index.d.ts +80 -0
- package/dist/vision/index.d.ts.map +1 -0
- package/dist/vision/index.js +298 -0
- package/dist/vision/index.js.map +1 -0
- package/dist/vision/parse.d.ts +20 -0
- package/dist/vision/parse.d.ts.map +1 -0
- package/dist/vision/parse.js +75 -0
- package/dist/vision/parse.js.map +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const LiquefactionInputSchema: z.ZodObject<{
|
|
3
|
+
layers: z.ZodArray<z.ZodObject<{
|
|
4
|
+
depth: z.ZodNumber;
|
|
5
|
+
sptN: z.ZodNumber;
|
|
6
|
+
finesContent: z.ZodDefault<z.ZodNumber>;
|
|
7
|
+
unitWeight: z.ZodDefault<z.ZodNumber>;
|
|
8
|
+
waterTableDepth: z.ZodDefault<z.ZodNumber>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
depth: number;
|
|
11
|
+
unitWeight: number;
|
|
12
|
+
waterTableDepth: number;
|
|
13
|
+
sptN: number;
|
|
14
|
+
finesContent: number;
|
|
15
|
+
}, {
|
|
16
|
+
depth: number;
|
|
17
|
+
sptN: number;
|
|
18
|
+
unitWeight?: number | undefined;
|
|
19
|
+
waterTableDepth?: number | undefined;
|
|
20
|
+
finesContent?: number | undefined;
|
|
21
|
+
}>, "many">;
|
|
22
|
+
earthquakeMagnitude: z.ZodNumber;
|
|
23
|
+
pga: z.ZodNumber;
|
|
24
|
+
method: z.ZodDefault<z.ZodEnum<["boulanger-idriss-2014", "nceer"]>>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
method: "boulanger-idriss-2014" | "nceer";
|
|
27
|
+
layers: {
|
|
28
|
+
depth: number;
|
|
29
|
+
unitWeight: number;
|
|
30
|
+
waterTableDepth: number;
|
|
31
|
+
sptN: number;
|
|
32
|
+
finesContent: number;
|
|
33
|
+
}[];
|
|
34
|
+
earthquakeMagnitude: number;
|
|
35
|
+
pga: number;
|
|
36
|
+
}, {
|
|
37
|
+
layers: {
|
|
38
|
+
depth: number;
|
|
39
|
+
sptN: number;
|
|
40
|
+
unitWeight?: number | undefined;
|
|
41
|
+
waterTableDepth?: number | undefined;
|
|
42
|
+
finesContent?: number | undefined;
|
|
43
|
+
}[];
|
|
44
|
+
earthquakeMagnitude: number;
|
|
45
|
+
pga: number;
|
|
46
|
+
method?: "boulanger-idriss-2014" | "nceer" | undefined;
|
|
47
|
+
}>;
|
|
48
|
+
export type LiquefactionInput = z.infer<typeof LiquefactionInputSchema>;
|
|
49
|
+
export interface LiquefactionLayerResult {
|
|
50
|
+
depth: number;
|
|
51
|
+
N160: number;
|
|
52
|
+
N160cs: number;
|
|
53
|
+
CSR: number;
|
|
54
|
+
CRR: number;
|
|
55
|
+
factorOfSafety: number;
|
|
56
|
+
potential: 'LOW' | 'MODERATE' | 'HIGH' | 'SEVERE';
|
|
57
|
+
}
|
|
58
|
+
export interface LiquefactionResult {
|
|
59
|
+
method: string;
|
|
60
|
+
layers: LiquefactionLayerResult[];
|
|
61
|
+
estimatedSettlement: number;
|
|
62
|
+
steps: string[];
|
|
63
|
+
}
|
|
64
|
+
export declare function calculateLiquefaction(input: LiquefactionInput): LiquefactionResult;
|
|
65
|
+
//# sourceMappingURL=liquefaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liquefaction.d.ts","sourceRoot":"","sources":["../../src/geo/liquefaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,KAAK,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAC;CACnD;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,uBAAuB,EAAE,CAAC;IAClC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AA2ID,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,GAAG,kBAAkB,CA4DlF"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// Input schemas
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
export const LiquefactionInputSchema = z.object({
|
|
6
|
+
layers: z.array(z.object({
|
|
7
|
+
depth: z.number().positive().describe('Layer mid-depth (m)'),
|
|
8
|
+
sptN: z.number().nonnegative().describe('Measured SPT N-value'),
|
|
9
|
+
finesContent: z.number().min(0).max(100).default(5).describe('Fines content FC (%)'),
|
|
10
|
+
unitWeight: z.number().positive().default(18).describe('Total unit weight γ (kN/m³)'),
|
|
11
|
+
waterTableDepth: z.number().nonnegative().default(1).describe('Depth to water table (m)'),
|
|
12
|
+
})).min(1),
|
|
13
|
+
earthquakeMagnitude: z.number().min(4).max(9.5).describe('Moment magnitude Mw'),
|
|
14
|
+
pga: z.number().positive().describe('Peak ground acceleration amax (g)'),
|
|
15
|
+
method: z.enum(['boulanger-idriss-2014', 'nceer']).default('boulanger-idriss-2014'),
|
|
16
|
+
});
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
// SPT corrections
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
function correctSPT(N, depth, gamma, waterTableDepth) {
|
|
21
|
+
const sigmaV = gamma * depth;
|
|
22
|
+
const u = depth > waterTableDepth ? 9.81 * (depth - waterTableDepth) : 0;
|
|
23
|
+
const sigmaVPrime = Math.max(sigmaV - u, 1);
|
|
24
|
+
// Overburden correction CN (Liao & Whitman 1986)
|
|
25
|
+
const pa = 101.325; // atmospheric pressure kPa
|
|
26
|
+
const CN = Math.min(Math.sqrt(pa / sigmaVPrime), 1.7);
|
|
27
|
+
// Energy ratio correction (assume standard 60% energy)
|
|
28
|
+
const CE = 1.0;
|
|
29
|
+
const CB = 1.0; // standard borehole
|
|
30
|
+
const CR = depth < 3 ? 0.75 : depth < 4 ? 0.8 : depth < 6 ? 0.85 : depth < 10 ? 0.95 : 1.0;
|
|
31
|
+
const CS = 1.0; // standard sampler
|
|
32
|
+
const N160 = N * CN * CE * CB * CR * CS;
|
|
33
|
+
return { N160, sigmaV, sigmaVPrime };
|
|
34
|
+
}
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
// Fines content correction
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
function finesCorrection(N160, FC) {
|
|
39
|
+
// Boulanger & Idriss 2014 fines correction
|
|
40
|
+
const deltaN = Math.exp(1.63 + 9.7 / (FC + 0.01) - (15.7 / (FC + 0.01)) ** 2);
|
|
41
|
+
return N160 + deltaN;
|
|
42
|
+
}
|
|
43
|
+
// ---------------------------------------------------------------------------
|
|
44
|
+
// CSR calculation (simplified procedure)
|
|
45
|
+
// ---------------------------------------------------------------------------
|
|
46
|
+
function calculateCSR(sigmaV, sigmaVPrime, amax, depth) {
|
|
47
|
+
// Stress reduction factor rd (Idriss 1999)
|
|
48
|
+
let rd;
|
|
49
|
+
if (depth <= 9.15) {
|
|
50
|
+
rd = 1.0 - 0.00765 * depth;
|
|
51
|
+
}
|
|
52
|
+
else if (depth <= 23) {
|
|
53
|
+
rd = 1.174 - 0.0267 * depth;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
rd = 0.744 - 0.008 * depth;
|
|
57
|
+
}
|
|
58
|
+
rd = Math.max(rd, 0.1);
|
|
59
|
+
return 0.65 * (sigmaV / sigmaVPrime) * amax * rd;
|
|
60
|
+
}
|
|
61
|
+
// ---------------------------------------------------------------------------
|
|
62
|
+
// CRR calculation (Boulanger & Idriss 2014)
|
|
63
|
+
// ---------------------------------------------------------------------------
|
|
64
|
+
function calculateCRR_BI2014(N160cs, Mw) {
|
|
65
|
+
// CRR7.5 from Boulanger & Idriss 2014 deterministic curve
|
|
66
|
+
const x = N160cs / 14.1;
|
|
67
|
+
const CRR75 = Math.exp(x + (x ** 2) / 2.67 - (x ** 3) / 3.0 + (x ** 4) / 4.0 - 2.8);
|
|
68
|
+
// Magnitude scaling factor MSF (Boulanger & Idriss 2014)
|
|
69
|
+
const MSF = 6.9 * Math.exp(-Mw / 4.0) - 0.058;
|
|
70
|
+
const MSFclamped = Math.max(Math.min(MSF, 2.0), 0.8);
|
|
71
|
+
return CRR75 * MSFclamped;
|
|
72
|
+
}
|
|
73
|
+
// ---------------------------------------------------------------------------
|
|
74
|
+
// CRR calculation (NCEER simplified — Seed et al. 1985 / Youd et al. 2001)
|
|
75
|
+
// ---------------------------------------------------------------------------
|
|
76
|
+
function calculateCRR_NCEER(N160cs, Mw) {
|
|
77
|
+
if (N160cs >= 30) {
|
|
78
|
+
return 99; // too dense to liquefy
|
|
79
|
+
}
|
|
80
|
+
const CRR75 = 1 / (34 - N160cs) +
|
|
81
|
+
N160cs / 135 +
|
|
82
|
+
50 / (10 * N160cs + 45) ** 2 -
|
|
83
|
+
1 / 200;
|
|
84
|
+
// MSF (Idriss 1999)
|
|
85
|
+
const MSF = Math.min(Math.pow(10, 2.24) / Math.pow(Mw, 2.56), 2.0);
|
|
86
|
+
return CRR75 * MSF;
|
|
87
|
+
}
|
|
88
|
+
// ---------------------------------------------------------------------------
|
|
89
|
+
// Settlement estimation (Ishihara & Yoshimine 1992)
|
|
90
|
+
// ---------------------------------------------------------------------------
|
|
91
|
+
function estimateSettlement(layers, thicknesses) {
|
|
92
|
+
let totalSettlement = 0;
|
|
93
|
+
for (let i = 0; i < layers.length; i++) {
|
|
94
|
+
const FS = layers[i].factorOfSafety;
|
|
95
|
+
if (FS >= 1.2)
|
|
96
|
+
continue;
|
|
97
|
+
// Volumetric strain as function of FS
|
|
98
|
+
let epsilonV;
|
|
99
|
+
if (FS < 0.5) {
|
|
100
|
+
epsilonV = 5.0;
|
|
101
|
+
}
|
|
102
|
+
else if (FS < 0.8) {
|
|
103
|
+
epsilonV = 3.0;
|
|
104
|
+
}
|
|
105
|
+
else if (FS < 1.0) {
|
|
106
|
+
epsilonV = 1.5;
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
epsilonV = 0.5;
|
|
110
|
+
}
|
|
111
|
+
totalSettlement += (epsilonV / 100) * (thicknesses[i] ?? 2) * 1000;
|
|
112
|
+
}
|
|
113
|
+
return Math.round(totalSettlement);
|
|
114
|
+
}
|
|
115
|
+
// ---------------------------------------------------------------------------
|
|
116
|
+
// Main calculation
|
|
117
|
+
// ---------------------------------------------------------------------------
|
|
118
|
+
export function calculateLiquefaction(input) {
|
|
119
|
+
const v = LiquefactionInputSchema.parse(input);
|
|
120
|
+
const steps = [];
|
|
121
|
+
const results = [];
|
|
122
|
+
steps.push(`Method: ${v.method === 'boulanger-idriss-2014' ? 'Boulanger & Idriss (2014)' : 'NCEER Simplified (Youd et al. 2001)'}`);
|
|
123
|
+
steps.push(`Mw = ${v.earthquakeMagnitude}, amax = ${v.pga}g`);
|
|
124
|
+
const thicknesses = [];
|
|
125
|
+
for (const layer of v.layers) {
|
|
126
|
+
const { N160, sigmaV, sigmaVPrime } = correctSPT(layer.sptN, layer.depth, layer.unitWeight, layer.waterTableDepth);
|
|
127
|
+
const N160cs = finesCorrection(N160, layer.finesContent);
|
|
128
|
+
const CSR = calculateCSR(sigmaV, sigmaVPrime, v.pga, layer.depth);
|
|
129
|
+
const CRR = v.method === 'boulanger-idriss-2014'
|
|
130
|
+
? calculateCRR_BI2014(N160cs, v.earthquakeMagnitude)
|
|
131
|
+
: calculateCRR_NCEER(N160cs, v.earthquakeMagnitude);
|
|
132
|
+
const FS = Math.round((CRR / CSR) * 100) / 100;
|
|
133
|
+
let potential;
|
|
134
|
+
if (FS > 1.3)
|
|
135
|
+
potential = 'LOW';
|
|
136
|
+
else if (FS > 1.0)
|
|
137
|
+
potential = 'MODERATE';
|
|
138
|
+
else if (FS > 0.7)
|
|
139
|
+
potential = 'HIGH';
|
|
140
|
+
else
|
|
141
|
+
potential = 'SEVERE';
|
|
142
|
+
results.push({
|
|
143
|
+
depth: layer.depth,
|
|
144
|
+
N160: Math.round(N160 * 10) / 10,
|
|
145
|
+
N160cs: Math.round(N160cs * 10) / 10,
|
|
146
|
+
CSR: Math.round(CSR * 1000) / 1000,
|
|
147
|
+
CRR: Math.round(CRR * 1000) / 1000,
|
|
148
|
+
factorOfSafety: FS,
|
|
149
|
+
potential,
|
|
150
|
+
});
|
|
151
|
+
thicknesses.push(2); // default 2m layer thickness
|
|
152
|
+
steps.push(` z=${layer.depth}m: N₁₆₀=${N160.toFixed(1)}, (N₁)₆₀cs=${N160cs.toFixed(1)}, CSR=${CSR.toFixed(3)}, CRR=${CRR.toFixed(3)}, FS=${FS.toFixed(2)} → ${potential}`);
|
|
153
|
+
}
|
|
154
|
+
const estimatedSettlement = estimateSettlement(results, thicknesses);
|
|
155
|
+
steps.push(`Estimated liquefaction-induced settlement: ${estimatedSettlement} mm`);
|
|
156
|
+
return {
|
|
157
|
+
method: v.method,
|
|
158
|
+
layers: results,
|
|
159
|
+
estimatedSettlement,
|
|
160
|
+
steps,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=liquefaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liquefaction.js","sourceRoot":"","sources":["../../src/geo/liquefaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QACvB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;QAC5D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;QAC/D,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC;QACpF,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,6BAA6B,CAAC;QACrF,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,0BAA0B,CAAC;KAC1F,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACV,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,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;YAClB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,EAAE;YAChC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,EAAE;YACpC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI;YAClC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI;YAClC,cAAc,EAAE,EAAE;YAClB,SAAS;SACV,CAAC,CAAC;QAEH,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,6BAA6B;QAElD,KAAK,CAAC,IAAI,CACR,OAAO,KAAK,CAAC,KAAK,WAAW,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,SAAS,EAAE,CAChK,CAAC;IACJ,CAAC;IAED,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACrE,KAAK,CAAC,IAAI,CAAC,8CAA8C,mBAAmB,KAAK,CAAC,CAAC;IAEnF,OAAO;QACL,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,MAAM,EAAE,OAAO;QACf,mBAAmB;QACnB,KAAK;KACN,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PileCapacityInputSchema: z.ZodObject<{
|
|
3
|
+
pileDiameter: z.ZodNumber;
|
|
4
|
+
pileLength: z.ZodNumber;
|
|
5
|
+
pileType: z.ZodDefault<z.ZodEnum<["driven", "bored", "cfa"]>>;
|
|
6
|
+
pileShape: z.ZodDefault<z.ZodEnum<["circular", "square", "h-section"]>>;
|
|
7
|
+
layers: z.ZodArray<z.ZodObject<{
|
|
8
|
+
thickness: z.ZodNumber;
|
|
9
|
+
soilType: z.ZodEnum<["clay", "sand", "silt", "gravel", "rock"]>;
|
|
10
|
+
undrained_shear_strength: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
friction_angle: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
unit_weight: z.ZodDefault<z.ZodNumber>;
|
|
13
|
+
spt_n: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
Ko: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
thickness: number;
|
|
17
|
+
soilType: "rock" | "clay" | "sand" | "silt" | "gravel";
|
|
18
|
+
unit_weight: number;
|
|
19
|
+
undrained_shear_strength?: number | undefined;
|
|
20
|
+
friction_angle?: number | undefined;
|
|
21
|
+
spt_n?: number | undefined;
|
|
22
|
+
Ko?: number | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
thickness: number;
|
|
25
|
+
soilType: "rock" | "clay" | "sand" | "silt" | "gravel";
|
|
26
|
+
undrained_shear_strength?: number | undefined;
|
|
27
|
+
friction_angle?: number | undefined;
|
|
28
|
+
unit_weight?: number | undefined;
|
|
29
|
+
spt_n?: number | undefined;
|
|
30
|
+
Ko?: number | undefined;
|
|
31
|
+
}>, "many">;
|
|
32
|
+
waterTableDepth: z.ZodDefault<z.ZodNumber>;
|
|
33
|
+
factorOfSafety: z.ZodDefault<z.ZodNumber>;
|
|
34
|
+
method: z.ZodDefault<z.ZodEnum<["alpha", "beta", "spt-meyerhof", "auto"]>>;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
method: "auto" | "alpha" | "beta" | "spt-meyerhof";
|
|
37
|
+
factorOfSafety: number;
|
|
38
|
+
waterTableDepth: number;
|
|
39
|
+
layers: {
|
|
40
|
+
thickness: number;
|
|
41
|
+
soilType: "rock" | "clay" | "sand" | "silt" | "gravel";
|
|
42
|
+
unit_weight: number;
|
|
43
|
+
undrained_shear_strength?: number | undefined;
|
|
44
|
+
friction_angle?: number | undefined;
|
|
45
|
+
spt_n?: number | undefined;
|
|
46
|
+
Ko?: number | undefined;
|
|
47
|
+
}[];
|
|
48
|
+
pileDiameter: number;
|
|
49
|
+
pileLength: number;
|
|
50
|
+
pileType: "driven" | "bored" | "cfa";
|
|
51
|
+
pileShape: "square" | "circular" | "h-section";
|
|
52
|
+
}, {
|
|
53
|
+
layers: {
|
|
54
|
+
thickness: number;
|
|
55
|
+
soilType: "rock" | "clay" | "sand" | "silt" | "gravel";
|
|
56
|
+
undrained_shear_strength?: number | undefined;
|
|
57
|
+
friction_angle?: number | undefined;
|
|
58
|
+
unit_weight?: number | undefined;
|
|
59
|
+
spt_n?: number | undefined;
|
|
60
|
+
Ko?: number | undefined;
|
|
61
|
+
}[];
|
|
62
|
+
pileDiameter: number;
|
|
63
|
+
pileLength: number;
|
|
64
|
+
method?: "auto" | "alpha" | "beta" | "spt-meyerhof" | undefined;
|
|
65
|
+
factorOfSafety?: number | undefined;
|
|
66
|
+
waterTableDepth?: number | undefined;
|
|
67
|
+
pileType?: "driven" | "bored" | "cfa" | undefined;
|
|
68
|
+
pileShape?: "square" | "circular" | "h-section" | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
export type PileCapacityInput = z.infer<typeof PileCapacityInputSchema>;
|
|
71
|
+
export interface PileCapacityResult {
|
|
72
|
+
method: string;
|
|
73
|
+
pileType: string;
|
|
74
|
+
pileDiameter: number;
|
|
75
|
+
pileLength: number;
|
|
76
|
+
shaftResistance: number;
|
|
77
|
+
baseResistance: number;
|
|
78
|
+
ultimateCapacity: number;
|
|
79
|
+
allowableCapacity: number;
|
|
80
|
+
factorOfSafety: number;
|
|
81
|
+
shaftFrictionPerLayer: Array<{
|
|
82
|
+
depth: number;
|
|
83
|
+
thickness: number;
|
|
84
|
+
soilType: string;
|
|
85
|
+
unitShaftFriction: number;
|
|
86
|
+
shaftResistance: number;
|
|
87
|
+
}>;
|
|
88
|
+
steps: string[];
|
|
89
|
+
}
|
|
90
|
+
export declare function calculatePileCapacity(input: PileCapacityInput): PileCapacityResult;
|
|
91
|
+
//# sourceMappingURL=pile-capacity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pile-capacity.d.ts","sourceRoot":"","sources":["../../src/geo/pile-capacity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,KAAK,CAAC;QAC3B,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC,CAAC;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAqDD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,GAAG,kBAAkB,CAwJlF"}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// Pile Capacity — Axial capacity of single piles
|
|
4
|
+
//
|
|
5
|
+
// Methods:
|
|
6
|
+
// - α-method (Tomlinson) for cohesive soils (undrained)
|
|
7
|
+
// - β-method (Burland) for cohesionless soils (drained)
|
|
8
|
+
// - SPT-based (Meyerhof 1976) for driven piles in sand/gravel
|
|
9
|
+
// - API RP 2GEO for offshore piles
|
|
10
|
+
//
|
|
11
|
+
// References:
|
|
12
|
+
// - Tomlinson, M.J. (1971). "Some effects of pile driving on skin friction."
|
|
13
|
+
// - Burland, J.B. (1973). "Shaft friction of piles in clay."
|
|
14
|
+
// - Meyerhof, G.G. (1976). "Bearing capacity and settlement of pile foundations."
|
|
15
|
+
// - API RP 2GEO (2014). "Geotechnical and Foundation Design Considerations."
|
|
16
|
+
// - Eurocode 7 (EN 1997-1:2004), Section 7.6
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
export const PileCapacityInputSchema = z.object({
|
|
19
|
+
pileDiameter: z.number().positive().describe('Pile diameter or width (m)'),
|
|
20
|
+
pileLength: z.number().positive().describe('Embedded pile length L (m)'),
|
|
21
|
+
pileType: z.enum(['driven', 'bored', 'cfa']).default('driven'),
|
|
22
|
+
pileShape: z.enum(['circular', 'square', 'h-section']).default('circular'),
|
|
23
|
+
layers: z.array(z.object({
|
|
24
|
+
thickness: z.number().positive().describe('Layer thickness (m)'),
|
|
25
|
+
soilType: z.enum(['clay', 'sand', 'silt', 'gravel', 'rock']),
|
|
26
|
+
undrained_shear_strength: z.number().min(0).optional().describe('Su or cu (kPa) — for cohesive soils'),
|
|
27
|
+
friction_angle: z.number().min(0).max(50).optional().describe('φ\' (degrees) — for granular soils'),
|
|
28
|
+
unit_weight: z.number().positive().default(18).describe('γ (kN/m³)'),
|
|
29
|
+
spt_n: z.number().min(0).optional().describe('SPT N-value'),
|
|
30
|
+
Ko: z.number().positive().optional().describe('At-rest earth pressure coefficient'),
|
|
31
|
+
})).min(1),
|
|
32
|
+
waterTableDepth: z.number().min(0).default(999).describe('Water table depth (m)'),
|
|
33
|
+
factorOfSafety: z.number().positive().default(2.5),
|
|
34
|
+
method: z.enum(['alpha', 'beta', 'spt-meyerhof', 'auto']).default('auto'),
|
|
35
|
+
});
|
|
36
|
+
function degToRad(deg) {
|
|
37
|
+
return (deg * Math.PI) / 180;
|
|
38
|
+
}
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
// α coefficients (Tomlinson 1971, updated API RP 2GEO)
|
|
41
|
+
// ---------------------------------------------------------------------------
|
|
42
|
+
function getAlpha(su, pileType) {
|
|
43
|
+
// API RP 2GEO / Tomlinson correlation
|
|
44
|
+
if (pileType === 'driven') {
|
|
45
|
+
if (su <= 25)
|
|
46
|
+
return 1.0;
|
|
47
|
+
if (su <= 50)
|
|
48
|
+
return 1.0 - 0.5 * (su - 25) / 25;
|
|
49
|
+
if (su <= 100)
|
|
50
|
+
return 0.5;
|
|
51
|
+
if (su <= 200)
|
|
52
|
+
return 0.5 - 0.1 * (su - 100) / 100;
|
|
53
|
+
return 0.4;
|
|
54
|
+
}
|
|
55
|
+
// Bored piles: lower α values
|
|
56
|
+
if (su <= 25)
|
|
57
|
+
return 0.7;
|
|
58
|
+
if (su <= 50)
|
|
59
|
+
return 0.7 - 0.3 * (su - 25) / 25;
|
|
60
|
+
if (su <= 100)
|
|
61
|
+
return 0.4;
|
|
62
|
+
if (su <= 200)
|
|
63
|
+
return 0.4 - 0.1 * (su - 100) / 100;
|
|
64
|
+
return 0.3;
|
|
65
|
+
}
|
|
66
|
+
// ---------------------------------------------------------------------------
|
|
67
|
+
// β coefficients (Burland 1973)
|
|
68
|
+
// ---------------------------------------------------------------------------
|
|
69
|
+
function getBeta(phi, depth, pileType) {
|
|
70
|
+
const phiRad = degToRad(phi);
|
|
71
|
+
const Ko = 1 - Math.sin(phiRad);
|
|
72
|
+
const KoMultiplier = pileType === 'driven' ? 1.5 : 1.0;
|
|
73
|
+
const delta = pileType === 'driven' ? phi * 0.75 : phi * 0.67; // interface friction
|
|
74
|
+
return KoMultiplier * Ko * Math.tan(degToRad(delta));
|
|
75
|
+
}
|
|
76
|
+
// ---------------------------------------------------------------------------
|
|
77
|
+
// Base bearing capacity factor Nq (Berezantsev 1961)
|
|
78
|
+
// ---------------------------------------------------------------------------
|
|
79
|
+
function getBaseNq(phi) {
|
|
80
|
+
const phiRad = degToRad(phi);
|
|
81
|
+
if (phi === 0)
|
|
82
|
+
return 1;
|
|
83
|
+
return Math.exp(Math.PI * Math.tan(phiRad)) * Math.pow(Math.tan(degToRad(45 + phi / 2)), 2);
|
|
84
|
+
}
|
|
85
|
+
// ---------------------------------------------------------------------------
|
|
86
|
+
// Main calculation
|
|
87
|
+
// ---------------------------------------------------------------------------
|
|
88
|
+
export function calculatePileCapacity(input) {
|
|
89
|
+
const v = PileCapacityInputSchema.parse(input);
|
|
90
|
+
const steps = [];
|
|
91
|
+
const { pileDiameter: D, pileLength: L, pileType, layers, waterTableDepth: gwt, factorOfSafety: FS } = v;
|
|
92
|
+
// Pile geometry
|
|
93
|
+
const Ap = v.pileShape === 'circular'
|
|
94
|
+
? Math.PI * (D / 2) ** 2
|
|
95
|
+
: v.pileShape === 'square'
|
|
96
|
+
? D * D
|
|
97
|
+
: D * 0.3; // H-section approximate
|
|
98
|
+
const perimeter = v.pileShape === 'circular'
|
|
99
|
+
? Math.PI * D
|
|
100
|
+
: v.pileShape === 'square'
|
|
101
|
+
? 4 * D
|
|
102
|
+
: 2 * (D + 0.3); // H-section approximate
|
|
103
|
+
steps.push(`Pile: ${pileType} ${v.pileShape}, D=${D}m, L=${L}m`);
|
|
104
|
+
steps.push(`Base area Ab=${Ap.toFixed(4)} m², Perimeter P=${perimeter.toFixed(3)} m`);
|
|
105
|
+
// Auto-select method based on dominant soil type
|
|
106
|
+
let method = v.method;
|
|
107
|
+
if (method === 'auto') {
|
|
108
|
+
const dominantSoil = layers.reduce((a, b) => b.thickness > a.thickness ? b : a);
|
|
109
|
+
if (dominantSoil.soilType === 'clay' || dominantSoil.soilType === 'silt') {
|
|
110
|
+
method = 'alpha';
|
|
111
|
+
}
|
|
112
|
+
else if (dominantSoil.spt_n !== undefined) {
|
|
113
|
+
method = 'spt-meyerhof';
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
method = 'beta';
|
|
117
|
+
}
|
|
118
|
+
steps.push(`Auto-selected method: ${method} (dominant soil: ${dominantSoil.soilType})`);
|
|
119
|
+
}
|
|
120
|
+
// Process layers
|
|
121
|
+
let totalShaft = 0;
|
|
122
|
+
let currentDepth = 0;
|
|
123
|
+
const shaftFrictionPerLayer = [];
|
|
124
|
+
for (const layer of layers) {
|
|
125
|
+
const layerBottom = currentDepth + layer.thickness;
|
|
126
|
+
// Only process portion of layer within pile length
|
|
127
|
+
if (currentDepth >= L)
|
|
128
|
+
break;
|
|
129
|
+
const effectiveThickness = Math.min(layer.thickness, L - currentDepth);
|
|
130
|
+
const midDepth = currentDepth + effectiveThickness / 2;
|
|
131
|
+
// Effective stress at mid-depth
|
|
132
|
+
const sigma_v = layer.unit_weight * midDepth;
|
|
133
|
+
const u = midDepth > gwt ? 9.81 * (midDepth - gwt) : 0;
|
|
134
|
+
const sigma_v_eff = Math.max(sigma_v - u, 1);
|
|
135
|
+
let fs = 0; // unit shaft friction (kPa)
|
|
136
|
+
if (method === 'alpha' && layer.undrained_shear_strength !== undefined) {
|
|
137
|
+
const su = layer.undrained_shear_strength;
|
|
138
|
+
const alpha = getAlpha(su, pileType);
|
|
139
|
+
fs = alpha * su;
|
|
140
|
+
steps.push(` Layer ${currentDepth.toFixed(1)}-${(currentDepth + effectiveThickness).toFixed(1)}m: α=${alpha.toFixed(2)}, Su=${su} kPa → fs=${fs.toFixed(1)} kPa`);
|
|
141
|
+
}
|
|
142
|
+
else if (method === 'beta' && layer.friction_angle !== undefined) {
|
|
143
|
+
const phi = layer.friction_angle;
|
|
144
|
+
const beta = getBeta(phi, midDepth, pileType);
|
|
145
|
+
fs = beta * sigma_v_eff;
|
|
146
|
+
// Limit shaft friction per API RP 2GEO
|
|
147
|
+
fs = Math.min(fs, 115);
|
|
148
|
+
steps.push(` Layer ${currentDepth.toFixed(1)}-${(currentDepth + effectiveThickness).toFixed(1)}m: β=${beta.toFixed(3)}, σ'v=${sigma_v_eff.toFixed(1)} kPa → fs=${fs.toFixed(1)} kPa`);
|
|
149
|
+
}
|
|
150
|
+
else if (method === 'spt-meyerhof' && layer.spt_n !== undefined) {
|
|
151
|
+
const N = layer.spt_n;
|
|
152
|
+
if (layer.soilType === 'clay' || layer.soilType === 'silt') {
|
|
153
|
+
// Meyerhof: fs = N/2 for clay (kPa), limited
|
|
154
|
+
fs = Math.min(N / 2, 100);
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
// Meyerhof: fs = 2N for sand (kPa), limited
|
|
158
|
+
fs = Math.min(2 * N, 200);
|
|
159
|
+
}
|
|
160
|
+
steps.push(` Layer ${currentDepth.toFixed(1)}-${(currentDepth + effectiveThickness).toFixed(1)}m: SPT N=${N} → fs=${fs.toFixed(1)} kPa`);
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
// Fallback: use whichever parameter is available
|
|
164
|
+
if (layer.undrained_shear_strength !== undefined) {
|
|
165
|
+
const alpha = getAlpha(layer.undrained_shear_strength, pileType);
|
|
166
|
+
fs = alpha * layer.undrained_shear_strength;
|
|
167
|
+
}
|
|
168
|
+
else if (layer.friction_angle !== undefined) {
|
|
169
|
+
const beta = getBeta(layer.friction_angle, midDepth, pileType);
|
|
170
|
+
fs = Math.min(beta * sigma_v_eff, 115);
|
|
171
|
+
}
|
|
172
|
+
steps.push(` Layer ${currentDepth.toFixed(1)}-${(currentDepth + effectiveThickness).toFixed(1)}m: fs=${fs.toFixed(1)} kPa (fallback)`);
|
|
173
|
+
}
|
|
174
|
+
const Qs_layer = fs * perimeter * effectiveThickness;
|
|
175
|
+
totalShaft += Qs_layer;
|
|
176
|
+
shaftFrictionPerLayer.push({
|
|
177
|
+
depth: currentDepth,
|
|
178
|
+
thickness: effectiveThickness,
|
|
179
|
+
soilType: layer.soilType,
|
|
180
|
+
unitShaftFriction: Math.round(fs * 10) / 10,
|
|
181
|
+
shaftResistance: Math.round(Qs_layer * 10) / 10,
|
|
182
|
+
});
|
|
183
|
+
currentDepth = layerBottom;
|
|
184
|
+
}
|
|
185
|
+
// Base resistance
|
|
186
|
+
const baseLayer = layers[layers.length - 1];
|
|
187
|
+
const sigma_v_base = baseLayer.unit_weight * L;
|
|
188
|
+
const u_base = L > gwt ? 9.81 * (L - gwt) : 0;
|
|
189
|
+
const sigma_v_eff_base = Math.max(sigma_v_base - u_base, 1);
|
|
190
|
+
let Qb = 0;
|
|
191
|
+
if (method === 'alpha' && baseLayer.undrained_shear_strength !== undefined) {
|
|
192
|
+
const Nc = 9; // bearing capacity factor for deep foundations in clay
|
|
193
|
+
const qb = Nc * baseLayer.undrained_shear_strength;
|
|
194
|
+
Qb = qb * Ap;
|
|
195
|
+
steps.push(`Base: Nc=${Nc}, Su=${baseLayer.undrained_shear_strength} kPa → qb=${qb.toFixed(0)} kPa, Qb=${Qb.toFixed(0)} kN`);
|
|
196
|
+
}
|
|
197
|
+
else if (baseLayer.friction_angle !== undefined) {
|
|
198
|
+
const Nq = getBaseNq(baseLayer.friction_angle);
|
|
199
|
+
let qb = Nq * sigma_v_eff_base;
|
|
200
|
+
// API limit for driven piles
|
|
201
|
+
const qb_limit = pileType === 'driven' ? 12000 : 5000;
|
|
202
|
+
qb = Math.min(qb, qb_limit);
|
|
203
|
+
Qb = qb * Ap;
|
|
204
|
+
steps.push(`Base: Nq=${Nq.toFixed(1)}, σ'v=${sigma_v_eff_base.toFixed(0)} kPa → qb=${qb.toFixed(0)} kPa, Qb=${Qb.toFixed(0)} kN`);
|
|
205
|
+
}
|
|
206
|
+
else if (baseLayer.spt_n !== undefined) {
|
|
207
|
+
// Meyerhof SPT-based: qb = 400*N*Ab/D for driven, 133*N*Ab/D for bored
|
|
208
|
+
const factor = pileType === 'driven' ? 400 : 133;
|
|
209
|
+
let qb = factor * baseLayer.spt_n;
|
|
210
|
+
qb = Math.min(qb, pileType === 'driven' ? 12000 : 5000);
|
|
211
|
+
Qb = qb * Ap;
|
|
212
|
+
steps.push(`Base (SPT): qb=${factor}×N=${qb.toFixed(0)} kPa, Qb=${Qb.toFixed(0)} kN`);
|
|
213
|
+
}
|
|
214
|
+
const Qu = totalShaft + Qb;
|
|
215
|
+
const Qa = Qu / FS;
|
|
216
|
+
steps.push(`Total shaft Qs = ${totalShaft.toFixed(0)} kN`);
|
|
217
|
+
steps.push(`Total base Qb = ${Qb.toFixed(0)} kN`);
|
|
218
|
+
steps.push(`Ultimate Qu = ${Qu.toFixed(0)} kN, Allowable Qa = ${Qa.toFixed(0)} kN (FS=${FS})`);
|
|
219
|
+
return {
|
|
220
|
+
method,
|
|
221
|
+
pileType,
|
|
222
|
+
pileDiameter: D,
|
|
223
|
+
pileLength: L,
|
|
224
|
+
shaftResistance: Math.round(totalShaft),
|
|
225
|
+
baseResistance: Math.round(Qb),
|
|
226
|
+
ultimateCapacity: Math.round(Qu),
|
|
227
|
+
allowableCapacity: Math.round(Qa),
|
|
228
|
+
factorOfSafety: FS,
|
|
229
|
+
shaftFrictionPerLayer,
|
|
230
|
+
steps,
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
//# sourceMappingURL=pile-capacity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pile-capacity.js","sourceRoot":"","sources":["../../src/geo/pile-capacity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8EAA8E;AAC9E,iDAAiD;AACjD,EAAE;AACF,WAAW;AACX,0DAA0D;AAC1D,0DAA0D;AAC1D,gEAAgE;AAChE,qCAAqC;AACrC,EAAE;AACF,cAAc;AACd,+EAA+E;AAC/E,+DAA+D;AAC/D,oFAAoF;AACpF,+EAA+E;AAC/E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