🚀 Auto-deploy: BrainWind atualizado em 27/07/2026 18:39:28

This commit is contained in:
2026-07-27 18:39:28 +00:00
parent 71ce942faa
commit 812a180bd8
8 changed files with 535 additions and 286 deletions
+16 -6
View File
@@ -20,6 +20,8 @@ export interface ShelterInput {
theta: number;
/** Percentual de fechamento da parede de fundo (0 a 100) */
backClosure: number;
/** Faixa de fechamento da parede de fundo [base%, topo%] (0 a 100) */
backRange?: [number, number];
/** Percentual de fechamento da parede lateral esquerda (0 a 100) */
leftClosure: number;
/** Percentual de fechamento da parede lateral direita (0 a 100) */
@@ -76,6 +78,7 @@ export function calculateShelterWind(input: ShelterInput, q: number): ShelterRes
height,
theta,
backClosure,
backRange,
leftClosure,
rightClosure,
openingPos,
@@ -115,19 +118,26 @@ export function calculateShelterWind(input: ShelterInput, q: number): ShelterRes
let reliefPercentage = 0;
let effectiveCpi = baseCpi;
if (bClose > 0.1 && bClose < 0.98) {
if (backRange && bClose > 0.05 && bClose < 0.99) {
const topGapPct = Math.max(0, Math.min(100, 100 - backRange[1])) / 100;
// O alívio de arrancamento da cobertura depende diretamente da abertura no topo (fresta superior)
reliefPercentage = Math.round(35 * Math.min(1, topGapPct * 2.5));
effectiveCpi = baseCpi * (1 - reliefPercentage / 100);
} else if (bClose > 0.05 && bClose < 0.99) {
const openRatio = 1 - bClose; // fração aberta da parede de fundo
if (openingPos === 'top') {
// Fresta superior permite o escape de sobrepressão debaixo do telhado
// Reduz o Cpi positivo em até 30%, gerando alívio de arrancamento na cobertura
reliefPercentage = Math.round(25 * (1 - bClose));
// Reduz o Cpi positivo de forma proporcional ao tamanho da fresta no topo
reliefPercentage = Math.round(35 * openRatio);
effectiveCpi = baseCpi * (1 - reliefPercentage / 100);
} else if (openingPos === 'bottom') {
// Abertura inferior: o ar flui embaixo, mantendo pressão sob o telhado e aumentando momento na base
// Abertura inferior: o ar flui embaixo, mantendo pressão sob o telhado
reliefPercentage = 0;
effectiveCpi = baseCpi * 1.05;
} else {
reliefPercentage = 5;
effectiveCpi = baseCpi * 0.95;
// Distribuída: alívio proporcional à permeabilidade aberta
reliefPercentage = Math.round(18 * openRatio);
effectiveCpi = baseCpi * (1 - reliefPercentage / 100);
}
}