{"id":1575,"date":"2025-10-21T19:57:40","date_gmt":"2025-10-21T19:57:40","guid":{"rendered":"http:\/\/selectairsystemsinccom.local\/?page_id=1575"},"modified":"2025-10-23T17:01:58","modified_gmt":"2025-10-23T17:01:58","slug":"duct-calculation","status":"publish","type":"page","link":"https:\/\/selectairsystemsinc.com\/selectwp\/duct-calculation\/","title":{"rendered":"Duct Calculation"},"content":{"rendered":"\n<h2 style=\"\n  font-family: monospace;\n  color: #fff;\n  background-color: #f33;\n  padding: 12px 18px;\n  border-radius: 6px;\n  width: fit-content;\n  box-shadow: 0 3px 6px rgba(0,0,0,0.6);\n  font-size: 1.5rem;\n  font-weight: bold;\n  letter-spacing: 1px;\n\">\n  Duct Size Calculator\n<\/h2>\n\n<div id=\"ductCalc_container\" style=\"\n  max-width: 360px;\n  padding: 20px;\n  background-color: #2c2c2c;\n  border: 3px solid #000;\n  border-radius: 12px;\n  font-family: monospace;\n  color: #fff;\n  box-shadow: inset 0 0 10px #111;\n  font-size: 1.1rem;\n  font-weight: bold;\n\">\n\n  <!-- Input Fields -->\n  <div style=\"margin-bottom: 18px;\">\n    <label for=\"ductCalc_cfm\" style=\"display: block; margin-bottom: 8px;\">\n      CFM (Cubic Feet \/ Min):\n    <\/label>\n    <input id=\"ductCalc_cfm\" type=\"number\" placeholder=\"e.g., 500\" style=\"\n      width: 100%;\n      padding: 10px;\n      border: none;\n      border-radius: 4px;\n      background-color: #111;\n      color: #f33;\n      font-family: monospace;\n      font-size: 1.1rem;\n      box-shadow: inset 0 0 5px #000;\n    \" \/>\n  <\/div>\n\n  <div style=\"margin-bottom: 18px;\">\n    <label for=\"ductCalc_velocity\" style=\"display: block; margin-bottom: 8px;\">\n      Velocity (Feet \/ Min):\n    <\/label>\n    <input id=\"ductCalc_velocity\" type=\"number\" placeholder=\"e.g., 800\" style=\"\n      width: 100%;\n      padding: 10px;\n      border: none;\n      border-radius: 4px;\n      background-color: #111;\n      color: #f33;\n      font-family: monospace;\n      font-size: 1.1rem;\n      box-shadow: inset 0 0 5px #000;\n    \" \/>\n  <\/div>\n\n  <div style=\"margin-bottom: 20px;\">\n    <label for=\"ductCalc_width\" style=\"display: block; margin-bottom: 8px;\">\n      Width (inches):\n    <\/label>\n    <input id=\"ductCalc_width\" type=\"number\" placeholder=\"e.g., 12\" style=\"\n      width: 100%;\n      padding: 10px;\n      border: none;\n      border-radius: 4px;\n      background-color: #111;\n      color: #f33;\n      font-family: monospace;\n      font-size: 1.1rem;\n      box-shadow: inset 0 0 5px #000;\n    \" \/>\n  <\/div>\n\n  <!-- \"Calculate\" Button -->\n  <button id=\"ductCalc_calcBtn\" style=\"\n    width: 100%;\n    padding: 14px;\n    background-color: #444;\n    color: #fff;\n    font-weight: bold;\n    font-family: monospace;\n    font-size: 1.1rem;\n    border: 2px solid #f33;\n    border-radius: 6px;\n    cursor: pointer;\n    box-shadow: 0 2px #800, inset 0 -1px 3px rgba(0,0,0,0.4);\n    transition: background-color 0.2s ease;\n  \">\n    [ CALCULATE ]\n  <\/button>\n<\/div>\n\n<!-- Result Box -->\n<div id=\"ductCalc_answerBox\" style=\"\n  margin-top: 20px;\n  background-color: #f33;\n  color: #000;\n  font-family: monospace;\n  font-weight: bold;\n  font-size: 1.1rem;\n  padding: 15px;\n  border-radius: 8px;\n  border: 2px solid #333;\n  box-shadow: inset 0 0 10px #f88;\n  display: none;\n  max-width: 360px;\n  white-space: pre-line;\n\">\n  <p id=\"ductCalc_result\" style=\"margin: 0;\"><\/p>\n<\/div>\n\n<script>\ndocument.getElementById(\"ductCalc_calcBtn\").addEventListener(\"click\", function () {\n    const cfm = parseFloat(document.getElementById(\"ductCalc_cfm\").value);\n    const velocity = parseFloat(document.getElementById(\"ductCalc_velocity\").value);\n    const width = parseFloat(document.getElementById(\"ductCalc_width\").value);\n\n    if (!cfm || !velocity || !width || cfm <= 0 || velocity <= 0 || width <= 0) {\n        alert(\"Please enter positive numbers for all fields.\");\n        return;\n    }\n\n    const widthFeet = width \/ 12;\n    const heightFeet = cfm \/ (velocity * widthFeet);\n    const heightInches = Math.ceil(heightFeet * 12);\n    const rectAreaInches = width * heightInches;\n    const diameterInches = Math.ceil(2 * Math.sqrt(rectAreaInches \/ Math.PI));\n    const squareSideInches = Math.ceil(Math.sqrt(rectAreaInches));\n\n    document.getElementById(\"ductCalc_result\").innerText =\n        `Rectangular: ${width} x ${heightInches} in\\n` +\n        `Round Diameter: \u00d8 ${diameterInches} in\\n` +\n        `Square: ${squareSideInches} x ${squareSideInches} in`;\n\n    document.getElementById(\"ductCalc_answerBox\").style.display = \"block\";\n});\n<\/script>\n\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"439\" height=\"300\" src=\"https:\/\/selectairsystemsinc.com\/selectwp\/wp-content\/uploads\/2025\/10\/straight-duct-e1760645266311.png\" alt=\"\" class=\"wp-image-1519\"\/><\/figure>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Duct Size Calculator CFM (Cubic Feet \/ Min): Velocity (Feet \/ Min): Width (inches): [ CALCULATE ]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1575","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/pages\/1575","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/comments?post=1575"}],"version-history":[{"count":2,"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/pages\/1575\/revisions"}],"predecessor-version":[{"id":1608,"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/pages\/1575\/revisions\/1608"}],"wp:attachment":[{"href":"https:\/\/selectairsystemsinc.com\/selectwp\/wp-json\/wp\/v2\/media?parent=1575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}