Vertical Cylindrical Tank Calculator

<script language="JavaScript"> </script> <script language = JavaScript> var ct=0; var sw=0; var sw4=0; var swd=1; var stp=0; var stpt=1; var diam=0; var rad=0; var len=0; var cylhgt=0; var wid=0; var spcs=new Array("", " ", "   ", "       ", "               ","                               ") var spcspg2=new Array( "           ", "              ", "           ","              ") var brk="
" var prg="

" var print2=""; var prnttext=new Array(); var spcr="   = = =   "; var labl =new Array("Inches", "Feet", "Meters", "cm"); var labl2=new Array("US gallons", "US gallons", "Liters", "Liters"); var labl3=new Array("Water Pounds", " Water Pounds", "Water Kilograms", "Water Kilograms"); var labl4 =new Array("Square Inches", "Square Feet", "Square Meters", "Square cm"); var labl5 =new Array("Water (lbs)", "Water (lbs)", "Water (kg)", " Water (kg)"); var ans1="";var ans2="";var ans3="";var ans4="";var ans5="";var ans6="";var ans7=""; var spc=" "; var spc2=" "; var spc3=" = = = " var sp6=" "; var cylhgt=123; var cyltop=0; var cylbot=0; var circarea=0; var sidearea=0; var voltotal= 0; var volbot=0; var voltop=0; var areabottom=0; var areatotal=0; var sigfig=5; var conv=0; var cnv2=new Array(8.34540445202, 8.34540445202, 1, 1); var num = new Array(0,1,2,3,4,5,6,7,8,9,10,11,12); </script> <script language = JavaScript> function erase(){ document.boxes.s1a.value=""; document.boxes.s2a.value=""; document.boxes.s3a.value=""; document.boxes.s4a.value=""; document.boxes.s5a.value=""; document.boxes.s6a.value=""; document.boxes.s7a.value=""; document.boxes.s8a.value=""; document.boxes.s9a.value=""; document.boxes.s10a.value=""; } </script> <script language = JavaScript> function calc(boxes) {ct=1; stp=1 if(sw==0){document.boxes.s4a.value="Cubic Inches";document.boxes.s4b.value="Gallons"; conv=0.00432900433}; if(sw==1){document.boxes.s4a.value="Cubic Feet";document.boxes.s4b.value="Gallons"; conv=7.48051948}; if(sw==2){document.boxes.s4a.value="Cubic Meters"; document.boxes.s4b.value="Liters";conv=1000}; if(sw==3){document.boxes.s4a.value="Cubic Centimeters"; document.boxes.s4b.value="Liters";conv=.001}; cylhgt=document.boxes.s1b.value; cylbot=eval(document.boxes.s2b.value); diam=eval(document.boxes.s3b.value); rad=diam/2; document.boxes.s4d.value=labl5[sw]; cyltop=cylhgt-cylbot; circarea=Math.PI*rad*rad; voltotal=circarea*cylhgt; volbot=(voltotal)*(cylbot/cylhgt); voltop=(voltotal)*(cyltop/cylhgt); num[1]=volbot;num[4]=voltop; num[7]=voltotal; num[2]=num[1]*conv; pcfull=100*(num[1]/num[7]);num[3]=pcfull; pcempty=100-num[3];num[6]=pcempty; num[5]=num[4]*conv; num[8]=num[2]+num[5]; num[9]=circarea; num[10]=2*Math.PI*rad*cylbot; num[11]=num[9]+num[10]; num[12]=num[2]*cnv2[sw]; num[13]=num[7]*cnv2[sw]*conv; ct=1; sigfig=eval((document.box.b9.value)-1); if (sigfig>-1){ while(ct<14){ num[ct]=num[ct].toExponential(sigfig); if (num[ct]>.001 && num[ct]<1000){num[ct]=num[ct]*1}; ct=ct+1} } sw4=sw; document.boxes.s5a.value=" "+ num[1]; document.boxes.s5b.value=" "+ num[2]; document.boxes.s5c.value=" "+ num[3] document.boxes.s6a.value=" "+ num[4] document.boxes.s6b.value=" "+ num[5]; document.boxes.s6c.value=" "+ num[6] document.boxes.s7a.value=" "+ num[7]; document.boxes.s7b.value=" "+ num[8]; document.boxes.s8a.value=" "+num[9]; document.boxes.s8b.value=labl4[sw4]; document.boxes.s9a.value=" "+num[10]; document.boxes.s9b.value=labl4[sw4]; document.boxes.s10a.value=" "+num[11]; document.boxes.s10b.value=labl4[sw4]; document.boxes.s5d.value=" "+num[12]; document.boxes.s6d.value=" *******"; document.boxes.s7d.value=num[13]; document.boxin.box1.value=swd; document.boxin.box2.value=circarea; document.boxin.box3.value=cylhgt; document.boxin.box4.value=conv; // document.boxin.box5.value=stp; document.boxin.box6.value=wid; } </script> <script language="javascript"> function dipcalc() { if(stp !=0){ swd=document.boxin.box1.value; circarea=document.boxin.box2.value; cylhgt=document.boxin.box3.value; conv=document.boxin.box4.value; // stp=document.boxin.box5.value; wid=document.boxin.box6.value; diam=document.boxes.s3b.value; rad=diam/2; rng=cylhgt; newtext=''; newtext='Tank Depth'+' Volume'+"\r" stpt=0;ct=0; voltotal=circarea*cylhgt; while (ct<=(1.005*rng)) {volliq=circarea*stpt; volair=voltotal-volliq; volliq=volliq*conv volliq=volliq.toExponential(sigfig) volliq=volliq*1; if(stpt==0){spc=spc, spc=sp6} if(stpt==0){volliq=0}; spc2=sp6; numin=volliq; ans1=numin; ans2=ans1+""; ans3=""+ans2; if (ans3.indexOf(".")==-1){ans3+="."} ans4=ans3.substr(0,ans3.indexOf("."));ans5=ans4-0 ans6=ans3.substr(ans3.indexOf(".")) while (ans6.length<3){ans6+="0"} if (ans5>=1000) { ans7=ans4.length ans4=parseInt(""+(ans5/1000))+","+ans4.substring(ans7-3,ans7)} numout = ans4 + ans6; volliq=numout; newtext=newtext+spc+stpt.toFixed(2)+labl[sw]+spc+volliq+labl2[sw]+"\n"; prnttext[stpt]=stpt.toFixed(2)+spcs[2]+labl[sw]+spcr+volliq+spcs[1]+labl2[sw]; ct=ct+stp; stpt=stpt+stp; } } else alert("Please click an increment"); } </script> <script language="JavaScript"> function pagetwo(){ if(stp !=0){ ct=0; stp=stp*1000; stp=Math.round(stp); stp=stp/1000; rng=cylhgt; document.open() document.write(brk);document.write(brk) document.write(spcs[4]);document.write("Software Systems"); document.write(brk) document.write(spcs[4]);document.write("Vertical Cylinder Tank Calculator"); document.write(brk) document.write(spcs[4]);document.write("verttank.php");document.write(brk);document.write(brk); document.write(brk) document.write(spcs[4]);document.write("Tank Height ="+ spcs[3] + cylhgt + labl[sw]); document.write(brk) document.write(spcs[4]);document.write("Tank Diameter ="+spcs[2]+ diam + labl[sw]);document.write(brk); document.write(brk);document.write(brk) // document.write(spcs[3]+"When Tank" + spcs[1] + spcs[1] + spcs[3] +" Then Tank");document.write(brk) // document.write(spcs[3]+"Depth Equals " + spcs[3]+ "Volume Equals");document.write(brk) document.write(spcs[3]+"When Tank" + spcs[1] + spcs[1] + spcs[4] +" Then Tank");document.write(brk) document.write(spcs[3]+"Depth Equals " + spcs[4]+ "Volume Equals");document.write(brk) while(ct<=rng){ document.write(spcs[3]); document.write(prnttext[ct]); document.write(brk); ct=ct+stp; } document.write(brk);document.write(brk); document.close(); } } </script>

>>
>>
>>
or or or





Significant Figures >>>
Buy A Calculator On Amazon
var ct=0;
var sw=0;
var sw4=0;
var swd=1;
var stp=0;
var stpt=1;
var diam=0;
var rad=0;
var len=0;
var cylhgt=0;
var wid=0;
var spcs=new Array("",