feat(core): rebar common rules (plan C1) and bearing-block bars (plan C2)
- C1: development length l_d = 0.6·d_b·fy/(λ√fck), splice 1.3·l_d, standard hooks (main 90°, tie 90°, stirrup 135° as written in the spec). fck 27 and fy 400/500 are marked as assumed values (I02). - C2: bearing-block bars, one block per bearing (배치 분리). Bars S1 and S2 at @125 with 8 bars per 1200 mm side (7 gaps = 875, ends 162.5), 2500 mm long, coping embedment from the block height (pad included, Q16 결정). - Tests: development and splice lengths; hook table limits; embedment 600 / 550 / 619.1 / 569.1; P1 has 80 bars each of S1 and S2 over 10 blocks. - Not yet: the ③ screen and the drawing check against the bearing-block drawing. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e297db1251
commit
daf78d0586
4 files changed
+189
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { buildPier } from '../src/core/geometry';
|
||||
import { barsAcross, bearingBlockRebar, blockBars, totals } from '../src/core/rebar/bearing-block';
|
||||
import { loadP1 } from './helpers';
|
||||
|
||||
describe('받침블럭 철근 (spec §6.3, plan C2)', () => {
|
||||
it('a 1200 block takes 8 bars at 125 mm: 7 gaps = 875, ends 162.5 each', () => {
|
||||
const a = barsAcross(1200);
|
||||
expect(a.count).toBe(8);
|
||||
expect(a.spacing).toBe(125);
|
||||
expect((a.count - 1) * a.spacing).toBe(875);
|
||||
expect(a.firstEnd).toBeCloseTo(162.5, 6);
|
||||
});
|
||||
|
||||
it('each bar is 1100 + 700 × 2 = 2500 mm long', () => {
|
||||
for (const bar of blockBars(150)) expect(bar.length).toBe(2500);
|
||||
});
|
||||
|
||||
it('coping embedment: S2 600 (front) / 550 (back), S1 619.1 (front) / 569.1 (back), as in the spec', () => {
|
||||
const front = blockBars(150);
|
||||
const back = blockBars(200);
|
||||
expect(front.find((b) => b.name === 'S2')!.embedment).toBeCloseTo(600, 6);
|
||||
expect(back.find((b) => b.name === 'S2')!.embedment).toBeCloseTo(550, 6);
|
||||
expect(front.find((b) => b.name === 'S1')!.embedment).toBeCloseTo(619.1, 6);
|
||||
expect(back.find((b) => b.name === 'S1')!.embedment).toBeCloseTo(569.1, 6);
|
||||
});
|
||||
|
||||
it('P1: 10 blocks, 80 bars each of S1 and S2 (spec table: 8 本 per block)', () => {
|
||||
const m = buildPier(loadP1());
|
||||
const rebar = bearingBlockRebar(m);
|
||||
expect(rebar).toHaveLength(10);
|
||||
expect(totals(rebar)).toEqual({ S1: 80, S2: 80 });
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,33 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { developmentLength, hookLength, MATERIAL_DEFAULTS, spliceLength } from '../src/core/rebar/common';
|
||||
|
||||
describe('③ 공통 규칙 (spec §6.2, plan C1)', () => {
|
||||
it('fck and fy defaults are assumed values (I02)', () => {
|
||||
expect(MATERIAL_DEFAULTS.fck).toBe(27);
|
||||
expect(MATERIAL_DEFAULTS.fy.H).toBe(400);
|
||||
expect(MATERIAL_DEFAULTS.fy.S).toBe(500);
|
||||
expect(MATERIAL_DEFAULTS.assumed).toBe(true);
|
||||
});
|
||||
|
||||
it('development length follows l_d = 0.6·d_b·fy/(λ·√fck)', () => {
|
||||
// H19, SD400, fck 27: 0.6 × 19 × 400 / √27
|
||||
expect(developmentLength(19, 400, 27)).toBeCloseTo((0.6 * 19 * 400) / Math.sqrt(27), 9);
|
||||
expect(developmentLength(19, 400, 27)).toBeCloseTo(877.6, 0);
|
||||
});
|
||||
|
||||
it('splice length is 1.3 × l_d', () => {
|
||||
expect(spliceLength(19, 400, 27)).toBeCloseTo(1.3 * developmentLength(19, 400, 27), 9);
|
||||
});
|
||||
|
||||
it('hook lengths: main bars D25 or less 15.5 d_b, D29–D35 16.5 d_b; ties D16 or less 8.5 d_b', () => {
|
||||
expect(hookLength('main90', 25)).toBeCloseTo(15.5 * 25, 9);
|
||||
expect(hookLength('main90', 29)).toBeCloseTo(16.5 * 29, 9);
|
||||
expect(hookLength('tie90', 16)).toBeCloseTo(8.5 * 16, 9);
|
||||
expect(() => hookLength('main90', 40)).toThrow('없는 지름');
|
||||
expect(() => hookLength('tie90', 19)).toThrow('없는 지름');
|
||||
});
|
||||
|
||||
it('135° stirrup hook as written in the spec: 2.5·d_b·(3π/4) + 6·d_b', () => {
|
||||
expect(hookLength('stirrup135', 16)).toBeCloseTo(2.5 * 16 * ((3 * Math.PI) / 4) + 6 * 16, 9);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user