Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <script>
  function calculatefunction(){
    //Width = base. Set width to variable B:
  var B = document.getElementById("width").value; 
    //Set height to variable H:
  var H = document.getElementById("height").value;
    //Set thickness to variable T:
  var T = document.getElementById("thick").value;
    //Length = span. Set length to variable L:
  var L = document.getElementById("length").value;
    //Concentrared load = P. Set load to variable P:
  var CL = document.getElementById("load").value;
    //Set span to variable S
  var S = document.getElementById("span").value;
    
    //Find positive space (b*h^3)/12
  var Ipos = ((B) * (H*H*H)) / 12;
    //Find negative space, two negative spaces. ((Width - 1 thickness) * (h-2t)^3)/12
  var Ineg = ((B - T) * ((H - (2 * T)) * (H - (2 * T)) * (H - (2 * T)))) / 12;
    //Find Itotal:
  var Itotal = Ipos - Ineg;
    //Formula for Delta: ((P)(S^3))/(48(E)(I))
    //The average Modulus of Elasticity for basswood is 1,460,000 Lbf/in^2. I am simply substituting for E.
  var Delta = (CL * (S*S*S))/(48 * 1460000 * Itotal);
    //Output Delta as Deflection:
  var Deflection = document.getElementById("deflectionid");
   Deflection.value = Delta;
    //Out put Itotal as Inertia in in^4
  var inertiaAnswer = document.getElementById("inertiaAnswer");
   inertiaAnswer.value = Itotal;
    //Calculate density:
      //Density = mass/volume
      //Max density of basswood = 37 Lb/ft^3
      //37 Lb/ft^3 * 1ft^3/(12in)^3 = 0.02141 Lb/in^3
      //Density * volume = mass
  var volume = (Itotal * L);
  var mass = volume * .02141;
  var MoB = document.getElementById("MoB");
   MoB.value = mass;
  
  }
  </script>
</head>
<body>
  <h3> Basic Beam Calculator</h3>
  </br>
  <img src="https://4.bp.blogspot.com/-znTGRfr0jno/VsjVEDr-6zI/AAAAAAAACcc/qMJ9_xifSIs/s1600/I%2Bbeam%2Bdrawing.png" alt="Width, height, thickness" style="float:right;width:300px;height:200px;">
 This is a calculator for a basswood I-beam.
  </br>
This calculator has two fixed variables, the density and elasticity.
  </br>
The maxium density of basswood is 37 Lbs per cubic Ft
  </br>
The elasticity of basswood is 1,460,000 Lbf per square inch.
  </br>
  </br>
  <input type="number" placeholder="Width" name="width" id="width" /> (in)
  </br>
  <input type="number" placeholder="Height" name="height" id="height" /> (in)
  </br>
  <input type="number" placeholder="Length" name="length" id="length" /> (in)
  </br>
  <input type="number" placeholder="Span of Beam" name="span" id="span" /> (in)
  </br>
  
  <input type="number" placeholder="Thickness of Wood" name="thick" id="thick" /> (in)
  </br>
  </br>
<img src="https://1.bp.blogspot.com/-gxNlAg1rrTI/VsjENjl2fRI/AAAAAAAACb8/ABifkzIH5jg/s1600/I%2Bbeam%2Blength%2Bvs%2Bspan.png" alt="Length vs Span" style="float:right;width:300px;height:200px;">
  <input type="number" placeholder="Concentrated Load" name="load" id="load" /> (Lbs)
  </br>
  </br>
  <input type="submit" name="calculatebutton" id="calculatebutton" onclick="calculatefunction()" value="Calculate" />
  </br>
  </br> 
   <input type="number" placeHolder="Moment of Inertia" name="inertiaAnswer" id="inertiaAnswer" /> (in^4)
  </br>
  </br>
  <input type="number" name="Deflection" placeholder="Deflection" id= "deflectionid" readonly="true" /> (in)
  </br>
  </br>
  <input type= "number" name="MoB" placeholder="Mass of Beam" id= "MoB" readonly="true" /> (lbs)
  </body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
woowoo997pro
0viewers