92 lines
2.4 KiB
TypeScript
92 lines
2.4 KiB
TypeScript
/**
|
||
* Coeficientes aerodinâmicos — NBR 6123:2023, sec. 6.1
|
||
*
|
||
* Esta é a versão "oficial" que consome as Tabelas 6-12 com
|
||
* interpolação bilinear. Substitui `nbr-coefficients.ts` (versão
|
||
* provisória com valores hardcoded).
|
||
*
|
||
* Exposto por módulo:
|
||
* - getWallCpeOfficial → Tabela 6 (paredes de planta retangular)
|
||
* - getRoofCpeOfficial → Tabela 7 (telhados duas águas)
|
||
* - getShedRoofCpe → Tabela 8 (telhado uma água)
|
||
* - getValleyRoofCpe → Tabela 9 (calha central)
|
||
* - getMultiSpanCpe → Tabela 10 (múltiplos simétricos)
|
||
* - getAsymmetricMultiSpan → Tabela 11
|
||
* - getMultiSpanVertical → Tabela 12
|
||
*/
|
||
|
||
import { getWallCpeNBR6123 } from './nbr-tables/table-6';
|
||
import { getRoofCpeNBR6123 } from './nbr-tables/table-7';
|
||
import { getShedRoofCpeNBR6123, type WindAngleT8 } from './nbr-tables/table-8';
|
||
import { getValleyRoofCpeNBR6123 } from './nbr-tables/table-9';
|
||
import { getMultiSpanSymmetricCpeNBR6123 } from './nbr-tables/table-10';
|
||
|
||
export interface WallCoefficients {
|
||
A: number;
|
||
B: number;
|
||
C: number;
|
||
D: number;
|
||
}
|
||
|
||
export interface RoofCoefficients {
|
||
E: number;
|
||
F: number;
|
||
G: number;
|
||
H: number;
|
||
I: number;
|
||
J: number;
|
||
}
|
||
|
||
/**
|
||
* Coeficientes de pressão externa para paredes.
|
||
* Mantém compatibilidade com a interface anterior { A, B, C, D }.
|
||
*
|
||
* Mapeamento das zonas da Tabela 6:
|
||
* - α=0°: A=A1B1, B=A2B2, C=C, D=D
|
||
* - α=90°: A=A, B=B, C=C1D1, D=C2D2
|
||
*/
|
||
export function getWallCpeOfficial(
|
||
a: number,
|
||
b: number,
|
||
h: number,
|
||
windAngle: 0 | 90 = 0,
|
||
): WallCoefficients {
|
||
const all = getWallCpeNBR6123(a, b, h);
|
||
if (windAngle === 0) {
|
||
return {
|
||
A: all.alpha0.A1B1,
|
||
B: all.alpha0.A2B2,
|
||
C: all.alpha0.C,
|
||
D: all.alpha0.D,
|
||
};
|
||
}
|
||
return {
|
||
A: all.alpha90.A,
|
||
B: all.alpha90.B,
|
||
C: all.alpha90.C1D1,
|
||
D: all.alpha90.C2D2,
|
||
};
|
||
}
|
||
|
||
export function getRoofCpeOfficial(
|
||
_a: number,
|
||
b: number,
|
||
h: number,
|
||
theta: number,
|
||
windAngle: 0 | 90 = 0,
|
||
): RoofCoefficients {
|
||
return getRoofCpeNBR6123(h, b, theta, windAngle);
|
||
}
|
||
|
||
export function getShedRoofCpe(theta: number, windAngle: WindAngleT8 = 0) {
|
||
return getShedRoofCpeNBR6123(theta, windAngle);
|
||
}
|
||
|
||
export function getValleyRoofCpe(a: number, b: number, h: number, hLine: number) {
|
||
return getValleyRoofCpeNBR6123(a, b, h, hLine);
|
||
}
|
||
|
||
export function getMultiSpanCpe(theta: number) {
|
||
return getMultiSpanSymmetricCpeNBR6123(theta);
|
||
}
|