/* global React */
/* ===========================================================
VOLTLAB · QUADROS & DIAGRAMAS
Dimensionamento de quadros de partida WEG
(Partida Direta + Estrela-Triângulo)
=========================================================== */
const { useState, useMemo } = React;
/* ===========================================================
DADOS WEG — extraídos do "Guia de Seleção de Partidas"
=========================================================== */
// Motores WEG W22 IR3 Premium — 60 Hz (Página 32)
const MOTOR_CURRENTS = {
"220": {
"1": 2.90, "1.5": 4.30, "2": 5.69, "3": 8.25, "4": 11.4, "5": 14.1,
"6": 16.5, "7.5": 20.4, "10": 26.0, "12.5": 32.2, "15": 38.4,
},
"380": {
"1": 1.68, "1.5": 2.49, "2": 3.29, "3": 4.78, "4": 6.60, "5": 8.16,
"6": 9.55, "7.5": 11.8, "10": 15.1, "12.5": 18.6, "15": 22.2,
},
};
// Tabela Partida Direta (3 componentes) — Página 4
// Faixa motor (A) → Disjuntor / Fusível / Contator / Relé Térmico
const TABELA_PARTIDA_DIRETA = [
{ min: 1.2, max: 1.6, q1: "MPW18i-3-D016", fus: "FDW-4S", k1: "CWB9-11-30", ft1: "RW27-2D3-D018" },
{ min: 1.2, max: 1.8, q1: "MPW18i-3-D025", fus: "FDW-6S", k1: "CWB9-11-30", ft1: "RW27-2D3-D018" },
{ min: 1.8, max: 2.5, q1: "MPW18i-3-D025", fus: "FDW-6S", k1: "CWB9-11-30", ft1: "RW27-2D3-D028" },
{ min: 1.8, max: 2.8, q1: "MPW18i-3-U004", fus: "FDW-10S", k1: "CWB9-11-30", ft1: "RW27-2D3-D028" },
{ min: 2.8, max: 4.0, q1: "MPW18i-3-U004", fus: "FDW-10S", k1: "CWB9-11-30", ft1: "RW27-2D3-U004" },
{ min: 4.0, max: 6.3, q1: "MPW18i-3-D063", fus: "FDW-10S", k1: "CWB9-11-30", ft1: "RW27-2D3-D063" },
{ min: 5.6, max: 8.0, q1: "MPW18i-3-U010", fus: "FDW-20S", k1: "CWB9-11-30", ft1: "RW27-2D3-U008" },
{ min: 7.0, max: 9.0, q1: "MPW18i-3-U010", fus: "FDW-20S", k1: "CWB9-11-30", ft1: "RW27-2D3-U010" },
{ min: 7.0, max: 10.0, q1: "MPW18i-3-U010", fus: "FDW-25S", k1: "CWB12-11-30", ft1: "RW27-2D3-U010" },
{ min: 8.0, max: 12.0, q1: "MPW18i-3-U016", fus: "FDW-25S", k1: "CWB12-11-30", ft1: "RW27-2D3-D125" },
{ min: 10.0, max: 15.0, q1: "MPW18i-3-U016", fus: "FDW-35S", k1: "CWB18-11-30", ft1: "RW27-2D3-U015" },
{ min: 11.0, max: 16.0, q1: "MPW18i-3-U016", fus: "FDW-35S", k1: "CWB18-11-30", ft1: "RW27-2D3-U017" },
{ min: 11.0, max: 17.0, q1: "MPW18i-3-U018", fus: "FDW-35S", k1: "CWB18-11-30", ft1: "RW27-2D3-U017" },
{ min: 15.0, max: 18.0, q1: "MPW18i-3-U018", fus: "FDW-50S", k1: "CWB18-11-30", ft1: "RW27-2D3-U023" },
{ min: 15.0, max: 20.0, q1: "MPW40i-3-U020", fus: "FDW-50S", k1: "CWB25-11-30", ft1: "RW27-2D3-U023" },
{ min: 15.0, max: 23.0, q1: "MPW40i-3-U025", fus: "FDW-50S", k1: "CWB25-11-30", ft1: "RW27-2D3-U023" },
{ min: 22.0, max: 25.0, q1: "MPW40i-3-U025", fus: "FDW-50S", k1: "CWB25-11-30", ft1: "RW27-2D3-U032" },
{ min: 22.0, max: 32.0, q1: "MPW40i-3-U032", fus: "FDW-50S", k1: "CWB32-11-30", ft1: "RW27-2D3-U032" },
{ min: 32.0, max: 38.0, q1: "MPW40i-3-U040", fus: "FDW-63S", k1: "CWB38-11-30", ft1: "RW27-2D3-U040" },
{ min: 25.0, max: 40.0, q1: "MPW80i-3-U040", fus: "FDW-63S", k1: "CWB40-11-30", ft1: "RW67-5D3-U040" },
];
// Tabela Partida Estrela-Triângulo (5 componentes) — Página 18
// faixa = I_motor / √3
const TABELA_ESTRELA_TRIANGULO = [
{ min: 6.9, max: 10.9, q1: "MPW40i-3-U016", fus: "FDW-16S", k12: "CWB9-11-30", k3: "CWB9-11-30", ft1: "RW27-2D3-D063" },
{ min: 9.7, max: 13.8, q1: "MPW40i-3-U016", fus: "FDW-20S", k12: "CWB9-11-30", k3: "CWB9-11-30", ft1: "RW27-2D3-U008" },
{ min: 12.1, max: 15.6, q1: "MPW40i-3-U016", fus: "FDW-20S", k12: "CWB9-11-30", k3: "CWB9-11-30", ft1: "RW27-2D3-U010" },
{ min: 12.1, max: 17.3, q1: "MPW40i-3-U020", fus: "FDW-25S", k12: "CWB12-11-30", k3: "CWB9-11-30", ft1: "RW27-2D3-U010" },
{ min: 13.9, max: 20.8, q1: "MPW40i-3-U025", fus: "FDW-35S", k12: "CWB12-11-30", k3: "CWB9-11-30", ft1: "RW27-2D3-D125" },
{ min: 17.3, max: 26.0, q1: "MPW40i-3-U032", fus: "FDW-35S", k12: "CWB18-11-30", k3: "CWB9-11-30", ft1: "RW27-2D3-U015" },
{ min: 19.1, max: 27.0, q1: "MPW40i-3-U032", fus: "FDW-35S", k12: "CWB18-11-30", k3: "CWB9-11-30", ft1: "RW27-2D3-U017" },
{ min: 19.1, max: 29.4, q1: "MPW40i-3-U032", fus: "FDW-50S", k12: "CWB18-11-30", k3: "CWB12-11-30", ft1: "RW27-2D3-U017" },
];
const POTENCIAS_DISPONIVEIS = ["1","1.5","2","3","4","5","6","7.5","10","12.5","15"];
function lookupPartidaDireta(In) {
return TABELA_PARTIDA_DIRETA.find(r => In >= r.min && In <= r.max) || null;
}
function lookupEstrelaTriangulo(In) {
const i = In / Math.sqrt(3);
return TABELA_ESTRELA_TRIANGULO.find(r => i >= r.min && i <= r.max) || null;
}
function dimensionarPartida(potencia, tensao, metodo) {
const In = MOTOR_CURRENTS[tensao]?.[potencia];
if (!In) return null;
if (metodo === "direta") {
const sel = lookupPartidaDireta(In);
if (!sel) return { In, error: "Sem componente compatível para " + In + " A" };
return {
In,
metodo: "Partida Direta",
faixa: `${sel.min} … ${sel.max} A`,
components: [
{ tag: "Q1", type: "Disjuntor-Motor", code: sel.q1, desc: "Proteção magnética + sobrecarga" },
{ tag: "F1", type: "Fusível gL/gG", code: sel.fus, desc: "Proteção contra curto-circuito" },
{ tag: "K1", type: "Contator", code: sel.k1, desc: "Manobra e comando" },
{ tag: "FT1", type: "Relé Térmico", code: sel.ft1, desc: "Proteção térmica do motor" },
],
};
} else {
const sel = lookupEstrelaTriangulo(In);
if (!sel) return { In, error: "Motor abaixo do mínimo recomendado para estrela-triângulo (≥ 5 cv 220V / 10 cv 380V)" };
return {
In,
metodo: "Partida Estrela-Triângulo",
faixa: `${sel.min} … ${sel.max} A (I/√3)`,
components: [
{ tag: "Q1", type: "Disjuntor-Motor", code: sel.q1, desc: "Proteção magnética" },
{ tag: "F1", type: "Fusível gL/gG", code: sel.fus, desc: "Proteção contra curto-circuito" },
{ tag: "K1", type: "Contator linha", code: sel.k12, desc: "Contator principal" },
{ tag: "K2", type: "Contator Δ", code: sel.k12, desc: "Contator triângulo" },
{ tag: "K3", type: "Contator ✱", code: sel.k3, desc: "Contator estrela" },
{ tag: "FT1", type: "Relé Térmico", code: sel.ft1, desc: "Proteção térmica" },
],
};
}
}
/* ===========================================================
ÍCONES (lucide-style)
=========================================================== */
const QIcon = ({ name, size = 16 }) => {
const p = { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" };
const paths = {
plus: <>
Adicione um motor à área de desenho e clique sobre ele para configurar potência, tensão e método de partida.
Clique em Adicionar motor acima para começar o dimensionamento de quadros.