-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
169 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { SecPipe } from "./pipe"; | ||
import { SecPropertyType } from "../constant"; | ||
|
||
const P = new SecPipe(); | ||
P.d = 0.508; | ||
P.t = 0.009; | ||
|
||
test("SecPipe.setDimensions", () => { | ||
const secPipe = new SecPipe(); | ||
secPipe.setDimensions(P.d, P.t); | ||
expect(secPipe.d).toBe(P.d); | ||
expect(secPipe.t).toBe(P.t); | ||
expect(secPipe.name).toBe("P-508x9"); | ||
}); | ||
|
||
test("PipeのA", () => { | ||
const A = 1.41088926072718e-2; | ||
const NUM_DIGITS = 15; | ||
expect(SecPipe.area(P.d, P.t)).toBeCloseTo(A, NUM_DIGITS); | ||
expect(P.property(SecPropertyType.Area)).toBeCloseTo(A, NUM_DIGITS); | ||
}); | ||
|
||
test("PipeのZ", () => { | ||
const Z = 1.72946416752188e-3; | ||
const NUM_DIGITS = 16; | ||
expect(SecPipe.elasticModulusY(P.d, P.t)).toBeCloseTo(Z, NUM_DIGITS); | ||
expect(P.property(SecPropertyType.ElasticModulusY)).toBeCloseTo( | ||
Z, | ||
NUM_DIGITS | ||
); | ||
expect(P.property(SecPropertyType.ElasticModulusZ)).toBeCloseTo( | ||
Z, | ||
NUM_DIGITS | ||
); | ||
}); | ||
|
||
test("Pipeの単位質量", () => { | ||
const M = 1.10754806967083e2; | ||
const NUM_DIGITS = 10; | ||
expect(P.property(SecPropertyType.MassPerMetre)).toBeCloseTo(M, NUM_DIGITS); | ||
}); | ||
|
||
test("Pipeのi", () => { | ||
const IY = 1.76451834787854e-1; | ||
const NUM_DIGITS = 14; | ||
expect(P.property(SecPropertyType.RadiusOfGyrationY)).toBeCloseTo( | ||
IY, | ||
NUM_DIGITS | ||
); | ||
expect(P.property(SecPropertyType.RadiusOfGyrationZ)).toBeCloseTo( | ||
IY, | ||
NUM_DIGITS | ||
); | ||
}); | ||
|
||
test("PipeのI", () => { | ||
const IY = 4.39283898550558e-4; | ||
const NUM_DIGITS = 17; | ||
expect(SecPipe.secondMomentOfAreaY(P.d, P.t)).toBeCloseTo(IY, NUM_DIGITS); | ||
expect(P.property(SecPropertyType.SecondMomentOfAreaY)).toBeCloseTo( | ||
IY, | ||
NUM_DIGITS | ||
); | ||
expect(P.property(SecPropertyType.SecondMomentOfAreaZ)).toBeCloseTo( | ||
IY, | ||
NUM_DIGITS | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
import { SecSteel } from "./steel"; | ||
import { Unit } from "../unit"; | ||
/** | ||
* 円形鋼管 | ||
*/ | ||
export class SecPipe extends SecSteel { | ||
/** 形状名 */ | ||
name: string = ""; | ||
/** 直径 D */ | ||
d: number = 0.0; | ||
/** 板厚 t */ | ||
t: number = 0.0; | ||
|
||
/** | ||
* 寸法により初期化し、nameも設定する | ||
* @param d 直径 D | ||
* @param t 板厚 t | ||
*/ | ||
setDimensions(d: number, t: number) { | ||
this.d = d; | ||
this.t = t; | ||
const scale: number = Unit.output(1.0, "mm"); | ||
d *= scale; | ||
t *= scale; | ||
this.name = `P-${d}x${t}`; | ||
} | ||
|
||
/** | ||
* 断面積 | ||
* @returns 断面積 | ||
*/ | ||
area() { | ||
return SecPipe.area(this.d, this.t); | ||
} | ||
/** | ||
* Y軸まわりの断面係数 | ||
* @returns Y軸まわりの断面係数 | ||
*/ | ||
elasticModulusY(): number { | ||
return SecPipe.elasticModulusY(this.d, this.t); | ||
} | ||
|
||
/** | ||
* Z軸まわりの断面係数 | ||
* @returns Z軸まわりの断面係数 | ||
*/ | ||
elasticModulusZ(): number { | ||
return SecPipe.elasticModulusY(this.d, this.t); | ||
} | ||
|
||
/** | ||
* Y軸まわりの断面二次モーメント | ||
* @returns Y軸まわりの断面二次モーメント | ||
*/ | ||
secondMomentOfAreaY(): number { | ||
return SecPipe.secondMomentOfAreaY(this.d, this.t); | ||
} | ||
|
||
/** | ||
* Z軸まわりの断面二次モーメント | ||
* @returns Z軸まわりの断面二次モーメント | ||
*/ | ||
secondMomentOfAreaZ(): number { | ||
return SecPipe.secondMomentOfAreaY(this.d, this.t); | ||
} | ||
|
||
/** | ||
* 円形鋼管の断面積 | ||
* 根拠:建築構造ポケットブック第6版 p.35 | ||
* @param d 直径 D | ||
* @param t 板厚 t | ||
* @returns 断面積 A | ||
*/ | ||
static area(d: number, t: number): number { | ||
return (Math.PI / 4.0) * (d ** 2 - (d - 2 * t) ** 2); | ||
} | ||
|
||
/** | ||
* 円形鋼管の断面係数(Y軸まわり) | ||
* (根拠:建築構造ポケットブック第6版 p.35) | ||
* @param d 直径 D | ||
* @param t 板厚 t | ||
* @returns 断面係数(Y軸まわり) ZY | ||
*/ | ||
static elasticModulusY(d: number, t: number): number { | ||
return (Math.PI / 32.0) * ((d ** 4 - (d - 2 * t) ** 4) / d); | ||
} | ||
|
||
/** | ||
* 円形鋼管の断面二次モーメント(Y軸まわり) | ||
* (根拠:建築構造ポケットブック第6版 p.35) | ||
* @param d 直径 D | ||
* @param t 板厚 t | ||
* @returns 断面二次モーメント(Y軸まわり)IY | ||
*/ | ||
static secondMomentOfAreaY(d: number, t: number): number { | ||
return (Math.PI / 64.0) * (d ** 4 - (d - 2 * t) ** 4); | ||
} | ||
} |