
function doCalc(){var diameter=document.frm_H_Rotor.txt_diameter.value;var turbine=document.frm_H_Rotor.dd_turbine.value;var windspeed=document.frm_H_Rotor.dd_windspeed.value;var type=2;var power=0;var area=0;var pwrdensity=0;var year=0;var month=0;if(isNaN(diameter)||diameter<=0){alert("PF coloque um valor válido para o diâmetro da turbina");document.frm_H_Rotor.txt_diameter.focus();return false;}
if(type==1){area=height*diameter;}else if(type==2){area=Math.pow((diameter/2),2)*Math.PI;}else if(type==3){area=0.65*height*diameter;}
area=Math.round(area*100)/100;pwrdensity=(1.225*Math.pow(windspeed,3))/2;year=pwrdensity*8.760*area*turbine;year=Math.round(year*100)/100;month=year/12;month=Math.round(month*100)/100;power=(pwrdensity*area*turbine)/1000;power=Math.round(power*1000)/1000;document.frm_H_Rotor.txt_area.value=area;document.frm_H_Rotor.txt_power.value=power;document.frm_H_Rotor.txt_year.value=year;document.frm_H_Rotor.txt_month.value=month;}
