{"id":725,"date":"2016-05-18T22:36:34","date_gmt":"2016-05-19T03:36:34","guid":{"rendered":"http:\/\/rpchurchill.com\/?p=725"},"modified":"2019-01-24T10:53:51","modified_gmt":"2019-01-24T15:53:51","slug":"dimensions-and-other-considerations-before-we-solve-the-matrix","status":"publish","type":"post","link":"https:\/\/rpchurchill.com\/wordpress\/posts\/2016\/05\/18\/dimensions-and-other-considerations-before-we-solve-the-matrix\/","title":{"rendered":"Dimensions and Other Considerations Before We Solve the Matrix"},"content":{"rendered":"<p>Yesterday&#8217;s post showed how some of the constants and parameters are initialized or calculated.  Today we&#8217;ll describe a few more.<\/p>\n<p>This exercise defines a cross-section of a steel billet that is 8 inches by 8 inches and divided into five nodes high and five nodes wide.  I found it convenient to assume the surface nodes were only half the height or width of the middle nodes, and to assume the center of surface nodes is on the outer edge or corner of the node, or in the middle of the node for central nodes.  This means that the centers are always equidistant both across and up.  The surface nodes also receive conducted heat and radiated heat at the same location.  Nodes on the corners have one quarter the cross-sectional area of the fully central nodes, and nodes on the surface but not on the corner have one half the area of the fully central nodes.<\/p>\n<pre class=\"toolbar-overlay:false wrap:true height-set:true lang:default decode:true \">\r\n    var timeStep = 40.0;  \/\/seconds\r\n    \r\n    var nodeWidth = 2.0;   \/\/inches\r\n    var nodeHeight = 2.0;  \/\/inches\r\n    \r\n    var pieceCount = 50;\r\n    \r\n    var arrayTpieces = new Array;\r\n    var arrayT = new Array;\r\n    for (var i=0; i< pieceCount; i++) {\r\n      arrayTpieces[i] = new Array;\r\n      for (var j=0; j<nodesWide; j++) {\r\n        arrayTpieces[i][j] = new Array;\r\n        arrayT[j] = new Array;\r\n        for (var k=0; k<nodesHigh; k++) {\r\n          arrayTpieces[i][j][k] = 70.0;\r\n          arrayT[j][k] = 0.0;\r\n        }\r\n      }\r\n    }\r\n    var arrayTfce = new Array;\r\n    for (var i=0; i< pieceCount; i++) {\r\n      arrayTfce[i] = 1800.0;\r\n    }      \r\n    \r\n    var arrayRho = new Array;\r\n    var arrayCp = new Array;\r\n    var arrayKup = new Array;\r\n    var arrayKright = new Array;\r\n    var arrayDup = new Array;\r\n    var arrayDright = new Array;\r\n    var arrayArea = new Array;\r\n    var arraySurfLength = new Array;\r\n    var arrayVF = new Array;\r\n    var arrayRad = new Array;\r\n    var tempLength = 0.0;\r\n    for (var i=0; i<nodesWide; i++) {\r\n      arrayRho[i] = new Array;\r\n      arrayCp[i] = new Array;\r\n      arrayKup[i] = new Array;\r\n      arrayKright[i] = new Array;\r\n      arrayDup[i] = new Array;\r\n      arrayDright[i] = new Array;\r\n      arrayArea[i] = new Array;\r\n      arraySurfLength[i] = new Array;\r\n      arrayVF[i] = new Array;\r\n      arrayRad[i] = new Array;\r\n      for (j=0; j<nodesHigh; j++) {\r\n        arrayRho[i][j] = 0.0;\r\n        arrayCp[i][j] = 0.0;\r\n        arrayKup[i][j] = 0.0;\r\n        arrayKright[i][j] = 0.0;\r\n        if (j < nodesHigh-1) {  \r\n          arrayDup[i][j] = nodeHeight;\r\n        } else {  \r\n          arrayDup[i][j] = 0.0;\r\n        }\r\n        if (i < nodesWide-1) {  \r\n          arrayDright[i][j] = nodeWidth;\r\n        } else {  \r\n          arrayDright[i][j] = 0.0;\r\n        }\r\n        arrayArea[i][j] = nodeHeight * nodeWidth;\r\n        if ((i == 0) || (i == nodesWide-1)) {\r\n          arrayArea[i][j] *= 0.5;\r\n        }\r\n        if ((j == 0) || (j == nodesHigh-1)) {\r\n          arrayArea[i][j] *= 0.5;\r\n        }\r\n        arraySurfLength[i][j] = 0.0;\r\n        arrayVF[i][j] = 0.0;\r\n        if (j == nodesHigh-1) {\r\n          if ((i == 0) || (i == nodesWide-1)) {\r\n            arraySurfLength[i][j] += nodeWidth * 0.5;\r\n          } else {\r\n            arraySurfLength[i][j] += nodeWidth;\r\n          }\r\n          arrayVF[i][j] = 1.0 * arraySurfLength[i][j];\r\n        }\r\n        tempLength = 0.0;\r\n        if ((i == 0) || (i == nodesWide-1)) {\r\n          if ((j == 0) || (j == nodesHigh-1)) {\r\n            arraySurfLength[i][j] += nodeHeight * 0.5;\r\n            tempLength = nodeHeight * 0.5;\r\n          } else {\r\n            arraySurfLength[i][j] += nodeHeight;\r\n            tempLength = nodeHeight;\r\n          }\r\n          if (j == 0) {arrayVF[i][j] += 0.26 * tempLength;}\r\n          else if (j == 1) {arrayVF[i][j] += 0.41 * tempLength;}\r\n          else if (j == 2) {arrayVF[i][j] += 0.55 * tempLength;}\r\n          else if (j == 3) {arrayVF[i][j] += 0.67 * tempLength;}\r\n          else if (j == 4) {arrayVF[i][j] += 0.78 * tempLength;}\r\n          else if (j == 5) {arrayVF[i][j] += 0.87 * tempLength;}\r\n          else if (j == 6) {arrayVF[i][j] += 0.95 * tempLength;}\r\n        }\r\n        if (arraySurfLength[i][j] > 0.0) {\r\n          arrayVF[i][j] \/= arraySurfLength[i][j];\r\n        }\r\n        arrayRad[i][j] = 0.0;        \r\n      } \r\n    }\r\n    \r\n    function calcParams(index) {  \/\/index says which piece\r\n      var i; var j; var wide; var high;\r\n      var a; var d; var k1; var k2;\r\n\r\n      wide = nodesWide;\r\n      high = nodesHigh;\r\n\r\n      for (i = 0; i < wide; i++) {\r\n        for (j = 0; j < high; j++) {\r\n          \/\/nodal energy\r\n          arrayRho[i][j] = coeffRho * arrayArea[i][j] \/ timeStep;\r\n          var t = arrayTpieces[index][i][j];\r\n          arrayCp[i][j] = findCpofT(t);\r\n\r\n          \/\/conduction up\r\n          \/\/if (arrayDup[i][j] > 0.0) {\r\n          if (j < high-1) {\r\n            a = nodeWidth;\r\n            if ((i == 0) || (i == wide-1)) {\r\n              a *= 0.5;\r\n            }\r\n            d = arrayDup[i][j];  \/\/nodeHeight\r\n            k1 = findKofT(arrayTarrayTpieces[index][i][j]);\r\n            k2 = findKofT(arrayTarrayTpieces[index][i][j+1]);\r\n            arrayKup[i][j] = (k1 + k2) * 0.5 * a \/ d;\r\n          } else {\r\n            arrayKup[i][j] = 0.0;\r\n          }\r\n\r\n          \/\/conduction to right\r\n          \/\/if (arrayDright[i][j] > 0.0) {\r\n          if (i < wide-1) {\r\n            a = nodeHeight;\r\n            if ((j == 0) || (j == high-1)) {\r\n              a *= 0.5;\r\n            }\r\n            d = arrayDright[i][j];  \/\/nodeWidth\r\n            k1 = findKofT(arrayTarrayTpieces[index][i][j]);\r\n            k2 = findKofT(arrayTarrayTpieces[index][i+1][j]);\r\n            arrayKright[i][j] = (k1 + k2) * 0.5 * a \/ d;\r\n          } else {\r\n            arrayKright[i][j] = 0.0;\r\n          }\r\n\r\n          \/\/radiation\r\n          var z = coeffRad * arrayVF[i][j] * arraySurfLength[i][j];\r\n          arrayRad[i][j] = z;\r\n          var z = k1 + k2;\r\n        }\r\n      }\r\n    }     \/\/calcParams\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday&#8217;s post showed how some of the constants and parameters are initialized or calculated. Today we&#8217;ll describe a few more. This exercise defines a cross-section of a steel billet that is 8 inches by 8 inches and divided into five &hellip; <a href=\"https:\/\/rpchurchill.com\/wordpress\/posts\/2016\/05\/18\/dimensions-and-other-considerations-before-we-solve-the-matrix\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[98,223,77],"_links":{"self":[{"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/posts\/725"}],"collection":[{"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/comments?post=725"}],"version-history":[{"count":5,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/posts\/725\/revisions"}],"predecessor-version":[{"id":750,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/posts\/725\/revisions\/750"}],"wp:attachment":[{"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/media?parent=725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/categories?post=725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rpchurchill.com\/wordpress\/wp-json\/wp\/v2\/tags?post=725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}