Energy2D-JS is a JavaScript port of the Java application: Energy2D This JavaScript port supports simulation of thermal conductivity and convection in a 100x100 cell simulation space. If the browser supports JavaScript Typed Arrays Energy2D-JS will use use them for increased computational performance.
The code for Energy2D-JS is available on github.
-
1. Energy2D-JS Demo
This example starts with a fixed 50 degree C hot-spot in the middle of a 100x100 grid, (10,000 cells) model simulation space, the temperature of the outside edge is fixed at 0 degrees C. This page also compares the speed of two different rendering strategies: 1) an HTML5 Canvas; 2) modifying CSS styles on an array of 10,000 separate divs.
Examples
Getting a browser that supports JavaScript Typed Arrays
JavaScript Typed Arrays are available in browsers that are WebGL-enabled. On some browsers using JavaScript Typed Arrays will speed up the modeling part of the simulation by a factor of two. Get more information about whether your browser supports WebGL here: http://get.webgl.org/.