🚀 Auto-deploy: BrainWind atualizado em 14/07/2026 11:50:17

This commit is contained in:
2026-07-14 11:50:17 +00:00
parent 7fcf964254
commit 5899c5c6ad
14 changed files with 4172 additions and 1835 deletions
+57 -15
View File
@@ -15,6 +15,8 @@ import { getCpeCylinderProfile } from '../nbr-tables/table-13';
import { calculateSign, type SignInput } from '../nbr-tables/table-23';
import { evaluateComfort } from '../comfort';
import { classifyBridge, type BridgeClassificationInput } from '../modules/bridge';
import { calculateTower } from '../modules/tower';
import { calculatePiperack, type PiperackInput } from '../modules/piperack';
function calcWind(
v0: number, s1: number, s3: number,
@@ -70,7 +72,7 @@ function galpaoScenario(
const wallCpe = getWallCpeOfficial(length, width, height, windAngle);
const roofCpe = getRoofCpeOfficial(length, width, height, roofPitch, windAngle);
const drag = getDragCoefficient(width, length, height, 'low');
const fric = calculateFriction({ roughness: 'smooth', length, height, width, roofPitch, q });
const fric = calculateFriction({ roughness: 'smooth', length, height, width, roofPitch, q, windAngle });
const pressures: Record<string, number> = {};
for (const [zone, cpe] of Object.entries({ ...wallCpe, ...roofCpe })) {
if (typeof cpe === 'number') pressures[zone] = Number((q * (cpe - cpi)).toFixed(3));
@@ -358,11 +360,13 @@ export function generateAllScenarios(): AuditScenario[] {
{ width: 15, length: 25, height: 8, roofPitch: 12, wallCpe: { A: -0.8, B: -0.5, C: 0.7, D: -0.4 }, roofCpe: { E: -0.8, F: -0.4, G: 0.2, H: -0.3, I: -0.5, J: 0 }, windAngle: 0 as const, cpi: 0 },
'Sec. 6.1',
));
const cylWind = calcWind(v0, 1.0, 1.0, cat, 20, 20); // cil h=20, max(d,h)=20, z=20
scenarios.push(makeScenario(
'cross-v45-catIII-cilindro', 'cilindro', 'Cross-module: V0=45 Cat III — Cilindro',
{ v0, s1: 1.0, s3: 1.0, cat, d: 5, h: 20 },
{ vk, q },
{ vk, q },
{ vk: cylWind.vk, q: cylWind.q },
{ vk: cylWind.vk, q: cylWind.q },
{ q: { min: 0.8, max: 2.0 } },
'cylinder',
{ diameter: 5, height: 20, cpi: -0.8, cpeProfile: [{ angle: 0, cpe: 1.0 }, { angle: 90, cpe: -1.2 }] },
@@ -447,29 +451,67 @@ export function generateAllScenarios(): AuditScenario[] {
// 10. TOWERS VARREDURA
const towerParams = [
{ section: 'square', phi: 0.2, alphaWind: 0 },
{ section: 'square', phi: 0.4, alphaWind: 45 },
{ section: 'triangular', phi: 0.3, alphaWind: 0 },
{ section: 'square', phi: 0.5, alphaWind: 30 },
{ section: 'triangular', phi: 0.25, alphaWind: 0 },
{ section: 'square', phi: 0.6, alphaWind: 90 },
{ section: 'triangular', phi: 0.35, alphaWind: 45 },
{ section: 'square', phi: 0.45, alphaWind: 0 },
{ section: 'square' as const, phi: 0.2, alphaWind: 0 as const },
{ section: 'square' as const, phi: 0.4, alphaWind: 45 as const },
{ section: 'triangular' as const, phi: 0.3, alphaWind: 0 as const },
{ section: 'square' as const, phi: 0.5, alphaWind: 45 as const },
{ section: 'triangular' as const, phi: 0.25, alphaWind: 0 as const },
{ section: 'square' as const, phi: 0.6, alphaWind: 90 as const },
{ section: 'triangular' as const, phi: 0.35, alphaWind: 45 as const },
{ section: 'square' as const, phi: 0.45, alphaWind: 0 as const },
];
let ti = 0;
for (const tp of towerParams) {
const q = 0.981;
const aFace = 5 * 30; // baseWidth = 5, height = 30
const tr = calculateTower({
section: tp.section,
barType: 'flat',
phi: tp.phi,
aFace,
alphaWind: tp.alphaWind,
q,
});
scenarios.push(makeScenario(
`tower-varredura-${ti++}`, 'tower', `Torre ${tp.section} phi=${tp.phi} α=${tp.alphaWind}°`,
{ ...tp, q: 0.981 },
{ ...tp, q },
{ phi: tp.phi },
{ ca: 1.8 },
{ phi: { min: 0.05, max: 1.0 }, ca: { min: 0.6, max: 3.6 } },
{ ca: tr.caEff, forceKN: tr.forceKN },
{ phi: { min: 0.05, max: 1.0 }, ca: { min: 0.6, max: 3.6 }, forceKN: { min: 1, max: 1000 } },
'tower',
{ section: tp.section, baseWidth: 5, height: 30, panels: 6, phi: tp.phi, alphaWind: tp.alphaWind, forceKN: 25.0 },
{ section: tp.section, baseWidth: 5, height: 30, panels: 6, phi: tp.phi, alphaWind: tp.alphaWind, forceKN: tr.forceKN },
'Sec. 8.5',
));
}
// 11. PIPERACK VARREDURA
const piperackParams: Array<{ name: string; input: Omit<PiperackInput, 'q'> }> = [
{ name: 'Pipe-1', input: { width: 10, height: 4, elevation: 6, spacing: 5, numFrames: 3, phiStruct: 0.15, pipes: [{ id: 'p1', diameter: 1.0, elevationOffset: 4 }] } },
{ name: 'Pipe-2', input: { width: 12, height: 5, elevation: 8, spacing: 6, numFrames: 4, phiStruct: 0.20, pipes: [{ id: 'p1', diameter: 0.5, elevationOffset: 5 }, { id: 'p2', diameter: 0.5, elevationOffset: 5 }] } },
{ name: 'Pipe-3', input: { width: 8, height: 3, elevation: 5, spacing: 4, numFrames: 2, phiStruct: 0.10, pipes: [] } },
{ name: 'Pipe-4', input: { width: 15, height: 6, elevation: 10, spacing: 6, numFrames: 5, phiStruct: 0.30, pipes: [{ id: 'p1', diameter: 1.5, elevationOffset: 6 }] } },
{ name: 'Pipe-5', input: { width: 20, height: 8, elevation: 12, spacing: 8, numFrames: 3, phiStruct: 0.25, pipes: [{ id: 'p1', diameter: 2.0, elevationOffset: 8 }, { id: 'p2', diameter: 1.0, elevationOffset: 6 }] } },
{ name: 'Pipe-6', input: { width: 10, height: 5, elevation: 7, spacing: 3, numFrames: 6, phiStruct: 0.40, pipes: [{ id: 'p1', diameter: 0.8, elevationOffset: 5 }] } },
{ name: 'Pipe-7', input: { width: 6, height: 4, elevation: 4, spacing: 4, numFrames: 2, phiStruct: 0.50, pipes: [{ id: 'p1', diameter: 1.0, elevationOffset: 4 }] } },
{ name: 'Pipe-8', input: { width: 25, height: 10, elevation: 15, spacing: 10, numFrames: 4, phiStruct: 0.20, pipes: [{ id: 'p1', diameter: 3.0, elevationOffset: 10 }] } },
];
let pi_idx = 0;
for (const pp of piperackParams) {
const q = 0.981;
const input: PiperackInput = { ...pp.input, q };
const tr = calculatePiperack(input);
scenarios.push(makeScenario(
`piperack-varredura-${pi_idx++}`, 'piperack', `Piperack ${pp.name}: w=${input.width} h=${input.height} n=${input.numFrames}`,
{ ...input },
{ phiTotal: tr.phiTotal, effectiveElevation: tr.effectiveElevation },
{ caFrontal: tr.caFrontal, eta: tr.eta, globalForce: tr.globalForce },
{ phiTotal: { min: 0.1, max: 1.0 }, caFrontal: { min: 1.6, max: 3.0 }, eta: { min: 0.3, max: 1.0 }, globalForce: { min: 1, max: 5000 } },
'warehouse', // Usamos warehouse como fallback visual ou você pode ter um piperack
{ width: input.width, height: input.height, length: input.spacing * input.numFrames }, // Props mínimas
'Sec. 8.4', // Estruturas reticuladas
));
}
return scenarios;
}