-
Recent Posts
Recent Comments
- R.P. Churchill on TWSL Series 07: Discovery and Data Collection
- 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
Categories
Meta
October 2025 M T W T F S S 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
Category Archives: Tools and methods
Reproducing A Clever Animation Product, Part 4
Today I’m adding two new types of tweens, but once this is done the method for doing subsequent ones should be pretty clear. The first type is for hiding elements using the display property. This is useful for longer animations … Continue reading
Reproducing A Clever Animation Product, Part 3
Today I implemented a few more basic animation features and gained more insight into how the Greensock animation product probably works. The first thing I did was add the capability to pause and continue the animation. That was trivial. I … Continue reading
Reproducing A Clever Animation Product, Part 2
Today I did some experiments to try to figure out why the animations I’ve created seem to hitch and hiccup slightly from time to time. Again, this work is based on recreating the basic functionality of the Greensock animation product … Continue reading
Reproducing A Clever Animation Product, Part 1
I’ve been working on an introductory animation for my soon-to-be-released landing page (what, stumbling into a random WordPress post and a tiny resume link isn’t the pithiest possible introduction?), and I was looking around and playing with various ideas when … Continue reading
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 0-2500 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, dual-core, 32-bit, ARM Cortex-A9 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=nodesHigh-1; j>=0; j--) { for (var i=0; i<=nodesWide-1; 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=nodesHigh-1; j>=0; j--) { for (var i=0; i<=nodesWide-1; 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×7-node 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 cross-section of a steel billet that is 8 inches by 8 inches and divided into five … Continue reading