feat(ground): 해상 selectable with MSL levels, 고조위·저조위, and checks

- Rules confirmed (승인 2026-10-26): datum MSL; 고조위 HWL and 저조위 LWL as
  two levels; 세굴 깊이 as for 하상; 파랑과 선박 하중 excluded from this scope.
- Checks: G13 levels missing, G10 해저면 not below 고조위, G11 저조위 not
  below 고조위, G14 pile wall at or below the corrosion allowance reference.
- CORROSION_ALLOWANCE_MM = 1 is a PLACEHOLDER reference (not in the RAG
  documents); the card and G14 mark it as to be confirmed.
- Card: the 해상 inputs; the section draws 고조위 (solid), 저조위 (dashed),
  and labels the ground line 해저면 EL.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-26 11:11:31 +09:00
1 parent 26a5aff517
commit b6e7f36091
9 files changed
+132 -22

No files matched your search

+3 -1
View File
@@ -23,7 +23,7 @@ export const EDITABLE_FIELDS = [
] as const;
/** Inputs tracked for overrides and pending changes: the numeric cards plus 열별 본수 (an array, compared by value). */
export const TRACKED_KEYS = [...EDITABLE_FIELDS.map((f) => f.key), 'pileRows', 'groundPosition', 'groundWaterOn', 'groundWaterEl', 'floodLevelEl', 'scourDepthM', 'strataRows'] as const;
export const TRACKED_KEYS = [...EDITABLE_FIELDS.map((f) => f.key), 'pileRows', 'groundPosition', 'groundWaterOn', 'groundWaterEl', 'floodLevelEl', 'scourDepthM', 'highWaterEl', 'lowWaterEl', 'strataRows'] as const;
export type EditableKey = (typeof TRACKED_KEYS)[number];
@@ -49,6 +49,8 @@ export const FIELD_LABELS: Record<EditableKey, string> = {
groundWaterEl: '지하수위 EL',
floodLevelEl: '설계홍수위 DHWL',
scourDepthM: '세굴 깊이',
highWaterEl: '고조위 HWL',
lowWaterEl: '저조위 LWL',
strataRows: '지층 행',
};
+1 -1
View File
@@ -21,7 +21,7 @@ export const COPY_ITEMS: Record<CopyItem, ItemRule> = {
'coping-length': { label: '코핑 길이 L', keys: ['copingLengthMm'], defaultOn: false, pileItem: false },
'pile-length': { label: '말뚝 길이', keys: ['pileLengthMm'], defaultOn: false, pileItem: true },
'pile-rows': { label: '열별 본수', keys: ['pileRows'], defaultOn: false, pileItem: true },
'ground-position': { label: '지반 위치·지하수위', keys: ['groundPosition', 'groundWaterOn', 'groundWaterEl', 'floodLevelEl'], defaultOn: false, pileItem: false },
'ground-position': { label: '지반 위치·지하수위', keys: ['groundPosition', 'groundWaterOn', 'groundWaterEl', 'floodLevelEl', 'highWaterEl', 'lowWaterEl'], defaultOn: false, pileItem: false },
};
export const DEFAULT_COPY_ITEMS: CopyItem[] = (Object.keys(COPY_ITEMS) as CopyItem[]).filter((k) => COPY_ITEMS[k].defaultOn);
+48 -8
View File
@@ -13,6 +13,15 @@ export const SUPPORT_STRATUM = '연암';
/** 근입 = 이 값 × 말뚝 지름 (지반 모델 G-7, embed_d 1.0). */
export const PILE_EMBED_D = 1.0;
/** 해상 datum (승인 2026-10-26): mean sea level. */
export const SEA_DATUM = 'MSL';
/**
* 부식 여유 (승인 2026-10-26: 기준값으로 고정). PLACEHOLDER: the value is not in the RAG documents yet,
* so 1 mm is a reference to confirm against the design standard before use.
*/
export const CORROSION_ALLOWANCE_MM = 1;
/**
* 지반·지층 입력 검사 (승인 2026-10-26).
* G01: 층 하단 EL은 위 경계보다 낮아야 함. G02: 지하수위는 지반고와 가장 아래 층 사이에 있어야 함.
@@ -41,14 +50,10 @@ export function validateGround(input: PierInput, issues: Issue[]): void {
} else if (f < input.groundEl) {
issues.push({ code: 'G08', level: 'W', pier: input.name, message: `설계홍수위 ${f.toFixed(3)}이 지반고 ${input.groundEl.toFixed(3)}보다 낮습니다.` });
}
const scour = input.scourDepthM;
if (scour !== undefined) {
if (!(scour >= 0)) {
issues.push({ code: 'G09', level: 'W', pier: input.name, message: '세굴 깊이는 0 이상이어야 합니다.' });
} else if (input.groundEl - scour < input.footingBottomEl) {
issues.push({ code: 'G09', level: 'W', pier: input.name, message: `세굴선 EL ${(input.groundEl - scour).toFixed(3)}이 확대기초 하면 ${input.footingBottomEl.toFixed(3)}보다 낮습니다 (기초 노출).` });
}
}
validateScour(input, issues);
} else if (position === '해상') {
validateSea(input, issues);
validateScour(input, issues);
} else if (input.groundWaterOn) {
const w = input.groundWaterEl;
const lowest = rows.length ? rows[rows.length - 1].bottomEl : undefined;
@@ -130,3 +135,38 @@ export function validateStrataNValues(input: PierInput, issues: Issue[]): void {
}
});
}
/** G09: the 세굴 깊이 is not negative, and the scour line stays above the footing bottom (하상·해상). */
function validateScour(input: PierInput, issues: Issue[]): void {
const scour = input.scourDepthM;
if (scour === undefined) return;
if (!(scour >= 0)) {
issues.push({ code: 'G09', level: 'W', pier: input.name, message: '세굴 깊이는 0 이상이어야 합니다.' });
} else if (input.groundEl - scour < input.footingBottomEl) {
issues.push({ code: 'G09', level: 'W', pier: input.name, message: `세굴선 EL ${(input.groundEl - scour).toFixed(3)}이 확대기초 하면 ${input.footingBottomEl.toFixed(3)}보다 낮습니다 (기초 노출).` });
}
}
/**
* 해상 (승인 2026-10-26, MSL 기준): 고조위와 저조위 are required, the 해저면 (groundEl) lies below the 고조위, and
* 저조위 is below 고조위. G13 missing; G10 해저면이 고조위보다 낮지 않음; G11 저조위가 고조위보다 낮지 않음;
* G14 강관 두께가 부식 여유 기준 이하. 파랑과 선박 하중은 이번 범위에서 제외.
*/
function validateSea(input: PierInput, issues: Issue[]): void {
const hw = input.highWaterEl;
const lw = input.lowWaterEl;
if (hw === undefined || lw === undefined || !Number.isFinite(hw) || !Number.isFinite(lw)) {
issues.push({ code: 'G13', level: 'W', pier: input.name, message: `해상입니다. 고조위(HWL)와 저조위(LWL)를 ${SEA_DATUM} 기준으로 입력하세요.` });
} else {
if (hw <= input.groundEl) {
issues.push({ code: 'G10', level: 'W', pier: input.name, message: `고조위 ${hw.toFixed(3)}이 해저면 ${input.groundEl.toFixed(3)}보다 높아야 합니다 (수심 확인).` });
}
if (lw >= hw) {
issues.push({ code: 'G11', level: 'W', pier: input.name, message: `저조위 ${lw.toFixed(3)}이 고조위 ${hw.toFixed(3)}보다 낮아야 합니다.` });
}
}
const thickness = input.pileThicknessMm ?? 12;
if (thickness <= CORROSION_ALLOWANCE_MM) {
issues.push({ code: 'G14', level: 'W', pier: input.name, message: `말뚝 두께 ${thickness} mm가 부식 여유 기준 ${CORROSION_ALLOWANCE_MM} mm 이하입니다 (기준값 확인 필요).` });
}
}
+1 -1
View File
@@ -37,7 +37,7 @@ export const SHAPE_GROUPS: Record<MemberId, ShapeGroup[]> = {
{ title: '말뚝 종류', options: [d('강관'), x('PHC'), x('복합')] },
{ title: '경사말뚝', options: [d('없음'), x('있음')] },
],
ground: [{ title: '위치', options: [d('육상'), ok('하상'), x('해상')] }],
ground: [{ title: '위치', options: [d('육상'), ok('하상'), ok('해상')] }],
};
export const UNDEFINED_REASON = '규칙 미정 (Q6 확정 전 선택 불가)';
+3
View File
@@ -65,6 +65,9 @@ export interface PierInput {
floodLevelEl?: number;
/** 세굴 깊이 (m) below the 지반고, used for 하상 only. */
scourDepthM?: number;
/** 해상 (승인 2026-10-26): 고조위 HWL and 저조위 LWL (m, MSL datum). The groundEl is the 해저면 EL for 해상. */
highWaterEl?: number;
lowWaterEl?: number;
strataRows?: StrataRow[];
}