
Recent Posts
Recent Comments
 R.P. Churchill on A Simulationistâ€™s Framework for Business Analysis: Round Two
 LN on A Simulationistâ€™s Framework for Business Analysis: Round Two
 R.P. Churchill on Starting to Learn About the Java Memory Model
 R.P. Churchill on Multidimensional Arrays in Javascript
 Link on Multidimensional Arrays in Javascript
Categories
Meta
August 2020 M T W T F S S « Jun 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Tag Archives: sim_presentation_series
Prettying Up the 3D Graph Output
Here I’ve prettied the graph up so the lines change color every 100 degrees F, and I’ve added a legend. I suppose I could choose consecutive colors with a bit more contrast.
Graphing the Matrix Output
Here I continually run the heating routine for a piece with an initial temperature of 70 degrees in a furnace set to 2300 degrees. The temperature scale, expressed vertically, runs from 02500 degrees. The bottom of the piece, which sits … Continue reading
How Quickly Can the Matrix Be Solved On Different Machines?
Today I ran 2750 iterations of the matrix on some additional machines. My 64GB iPad 3 runs a 1 GHz, dualcore, 32bit, ARM CortexA9 and ran the test in 1.308 seconds on load and about 1.15 seconds on rerun. My … Continue reading
How Quickly Can the Matrix Be Solved?
The solution was finally made to run last week. Today the question is how fast the thing runs. My feel for the answer to this question has to do with the context in which I first asked it. From 1994 … Continue reading
Finally Solving the Matrix
Once we get all the parameters calculated and the matrix loaded, then we can finally solve the thing. Here’s how the code looks:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 
function loadMatrix(index,fceTemp) { var i; var j; var k; var tsa; var tfa; var ts3; var tf4; tfa = arrayTfce[index] + Tabs; tf4 = tfa * tfa * tfa * tfa; for (k = 0; k <= sizeNodes; k++) { ZSRCE[k] = 0.0; ZAUX[k] = 0.0; for (i = 0; i <= sizeBandWidth; i++) ZMATX[k][i] = 0.0; } k = 0; for (j = 0; j < nodesHigh; j++) for (i = 0; i < nodesWide; i++) { k++; //nodal energy ZMATX[k][1] += arrayRho[i][j] * arrayCp[i][j]; ZSRCE[k] += arrayRho[i][j] * arrayCp[i][j] * arrayT[i][j]; //conduction to right if (arrayKright[i][j] > 0.0) { ZMATX[k][1] += arrayKright[i][j]; ZMATX[k][2] = arrayKright[i][j]; ZMATX[k+1][1] += arrayKright[i][j]; } //conduction up if (arrayKup[i][j] > 0.0) { ZMATX[k][1] += arrayKup[i][j]; ZMATX[k][1+nodesWide] = arrayKup[i][j]; ZMATX[k+nodesWide][1] += arrayKup[i][j]; } //radiation if (arrayRad[i][j] > 0.0) { tsa = arrayT[i][j]; ts3 = tsa * tsa * tsa; ZMATX[k][1] += arrayRad[i][j] * ts3; ZSRCE[k] += arrayRad[i][j] * tf4; } } } //loadMatrix function oneCalc(index) { calcParams(index); for (var i=0; i<nodesWide; i++) { for (var j=0; j<nodesHigh; j++) { arrayT[i][j] = arrayTpieces[index][i][j] + Tabs; } } loadMatrix(index); calcMatrix(); k = 0; for (var j=0; j<nodesHigh; j++) { for (var i=0; i<nodesWide; i++) { k++; arrayTpieces[index][i][j] = ZSRCE[k]  Tabs; } } } //oneCalc var loopCount = 0; var s="Temperatures after "+loopCount+" time steps<br />"; for (var j=nodesHigh1; j>=0; j) { for (var i=0; i<=nodesWide1; i++) { s += arrayTpieces[0][i][j].toPrecision(7) + ", "; } s += "<br />"; } document.getElementById("stuff").innerHTML = s; function runOneTime() { if (loopCount == 0) { for (var i=0; i< pieceCount; i++) { for (var j=0; j<nodesWide; j++) { for (var k=0; k<nodesHigh; k++) { arrayTpieces[i][j][k] = 70.0; } } } } else { oneCalc(0); } var s="Temperatures after "+loopCount+" time steps<br />"; for (var j=nodesHigh1; j>=0; j) { for (var i=0; i<=nodesWide1; i++) { s += arrayTpieces[0][i][j].toPrecision(7) + ", "; } s += "<br />"; } document.getElementById("stuff").innerHTML = s; loopCount++; if (loopCount > 20) { loopCount = 0; } } var intervalID = setInterval(runOneTime, 1000); 
We start with a 7×7node workpiece where the interior nodes are two inches wide and two … Continue reading
Dimensions and Other Considerations Before We Solve the Matrix
Yesterday’s post showed how some of the constants and parameters are initialized or calculated. Today we’ll describe a few more. This exercise defines a crosssection of a steel billet that is 8 inches by 8 inches and divided into five … Continue reading
Static and Dynamic Coefficients in Matrix Thermal Solutions
Recalling yesterday’s initial heat balance equation for each node: it should be noted that the values of both the specific heat and the thermal conductivity of steel are themselves functions of temperature. That means that these values need to be … Continue reading
A Specific Example of Equations To Be Solved By Matrix
Dividing a crosssection of a steel billet into nodes, we can start by looking at the energy balance for each node: All this equation is saying is that the change in the quantity of energy in a given node per … Continue reading
Implementing the Efficient Matrix Solution for Special Classes of Engineering Problems
Yesterday I described how to set up a matrix for efficient solution, today I’ll describe how to actually execute the solution. I plan to go back and revisit the intermediate steps but I wanted to show how this series of … Continue reading
Posted in Software
Tagged efficiency, matrix solution techniques, sim_presentation_series, Software
Leave a comment
Efficient Matrix Solutions for Special Classes of Engineering Problems
There are a large class of analogous engineering problems that may be addressed with a particular mathematical solution. Fluid systems where volumes containing fluid are connected by fluid flows, mechanical systems where masses are connected by springs and dashpots (which … Continue reading