Калькулятор сечения воздуховода
Расчёт площади сечения и диаметра воздуховода по расходу и скорости воздуха. Формула: F = L / (3600 × v). Подбор стандартного диаметра.
function calc9(){
const L=parseFloat(document.getElementById('L9').value);
const v=parseFloat(document.getElementById('type9').value);
const shape=document.getElementById('shape9').value;
const F=L/(3600*v);
let t='<table class="fcalc-result-table"><tr><th>Параметр</th><th>Значение</th></tr>';
t+='<tr><td>Расход воздуха</td><td>'+L+' м³/ч</td></tr>';
t+='<tr><td>Скорость</td><td>'+v+' м/с</td></tr>';
t+='<tr><td>Требуемая площадь сечения</td><td>'+(F*10000).toFixed(1)+' см² ('+F.toFixed(4)+' м²)</td></tr>';
if(shape==='round'){
const D=Math.sqrt(4*F/Math.PI)*1000;
const D_std=[100,125,160,200,250,315,400,500,630,800,1000,1250,1600].find(d=>d>=D)||1600;
const v_fact=L/(3600*Math.PI*Math.pow(D_std/1000,2)/4);
t+='<tr><td>Расчётный диаметр</td><td>'+D.toFixed(0)+' мм</td></tr>';
t+='<tr><td style="font-weight:700;color:#0a4d8c">Стандартный диаметр</td><td style="font-weight:700;color:#0a4d8c;font-size:1.2em">DN'+D_std+'</td></tr>';
t+='<tr><td>Фактическая скорость</td><td>'+v_fact.toFixed(2)+' м/с</td></tr>';
}else{
const ratio=parseInt(document.getElementById('ratio9').value);
const a=Math.sqrt(F*ratio)*1000;
const b=a/ratio;
const a_std=[100,150,200,250,300,400,500,600,800,1000,1250,1600].find(x=>x>=a)||1600;
const b_std=[100,150,200,250,300,400,500,600,800,1000].find(x=>x>=b)||1000;
const F_std=a_std*b_std/1e6;
const v_fact=L/(3600*F_std);
t+='<tr><td>Расчётные размеры</td><td>'+a.toFixed(0)+' × '+b.toFixed(0)+' мм</td></tr>';
t+='<tr><td style="font-weight:700;color:#0a4d8c">Стандартное сечение</td><td style="font-weight:700;color:#0a4d8c;font-size:1.2em">'+a_std+' × '+b_std+' мм</td></tr>';
t+='<tr><td>Фактическая скорость</td><td>'+v_fact.toFixed(2)+' м/с</td></tr>';
t+='<tr><td>Эквивалентный диаметр</td><td>'+(2*a_std*b_std/(a_std+b_std)).toFixed(0)+' мм</td></tr>';
}
t+='</table>';
document.getElementById('table9').innerHTML=t;
document.getElementById('result9').style.display='block';
}
document.getElementById('shape9').addEventListener('change',function(){
document.getElementById('ratio-field9').style.display=this.value==='rect'?'flex':'none';
});