Kalkulator – mobil

Proračun prečnika priključka
#app{ font-family: Arial; background:#f3f4f6; padding-bottom:120px; } /* HEADER */ .header{ padding:15px; background:#fff; font-weight:bold; font-size:16px; border-bottom:1px solid #ddd; } /* CARD */ .card{ background:#fff; margin:10px; padding:15px; border-radius:10px; box-shadow:0 2px 6px rgba(0,0,0,0.05); } /* INPUT */ #app select,#app input{ width:100%; padding:12px; margin-top:8px; border-radius:8px; border:1px solid #ccc; font-size:16px; } /* BUTTON */ #app button{ width:100%; padding:12px; margin-top:10px; background:#2563eb; color:white; border:none; border-radius:8px; font-size:16px; } /* LIST */ .item{ display:flex; justify-content:space-between; padding:10px 0; border-bottom:1px solid #eee; font-size:14px; } .delete{ color:red; cursor:pointer; } /* RESULT */ .result{ position:fixed; bottom:0; left:0; right:0; background:white; padding:15px; border-top:1px solid #ddd; box-shadow:0 -2px 6px rgba(0,0,0,0.1); font-size:14px; }
Proračun priključka
∑ J.O.= 0
Q= 0
d= 0 mm
ID min= 0 mm
v= 0 m/s
const vrednosti = { "Bide":1.0,"Kada":1.0,"PP hidrant":100, "Pisoar":0.50,"Sudo mašina":0.50, "Sudopera":1.0,"Tuš":1.0, "Trokadero":0.50,"Umivaonik":0.50, "Veš mašina":0.50,"WC ispirač pod pritiskom":1.0, "WC sa vodokotlićem":0.25 }; const DN_lista = [16,20,25,32,40,50,63,75,90,110,125,150,200]; let stavke = []; // dropdown let select = document.getElementById("element"); select.innerHTML = '--Izaberi--'; Object.keys(vrednosti).sort().forEach(el=>{ let opt = document.createElement("option"); opt.textContent = el; select.appendChild(opt); }); function dodaj(){ let el = document.getElementById("element").value; let kom = parseFloat(document.getElementById("kom").value); if(!el || kom{ html += `
${s.element} (${s.kom})
${(s.jo*s.kom).toFixed(2)} 🗑
`; }); document.getElementById("lista").innerHTML = html; } function racunaj(){ let suma = 0; stavke.forEach(s=>{ suma += s.jo*s.kom; }); document.getElementById("zbir").innerText = suma.toFixed(2); let Q = 0.25*Math.sqrt(suma); document.getElementById("protok").innerText = Q.toFixed(2)+" l/s"; let v = parseFloat(document.getElementById("brzina").value); if(vval>=d_mm) || DN_lista.at(-1); document.getElementById("dn").innerText = dn; let A = Math.PI*Math.pow(dn/1000,2)/4; let vreal = Q_m3/A; document.getElementById("vreal").innerText = vreal.toFixed(2); }