Energy2D-JS is a JavaScript port of the Java Energy2D thermal simulation application
JavaScript Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
conversions
lib
src
stylesheets
index.html
model2d-demo.html
readme.textile

readme.textile

Energy2D-JS

Energy2D-JS is a JavaScript port of the Java application: Energy2D

This JavaScript port supports simulation of thermal conductivity and convection in a 100×100 cell simulation space.

A demo (currently the convective solver is not working).

If the browser supports JavaScript Typed Arrays Energy2D-JS will use use them for increased computational performance.

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/.

Benchmarks

Model steps/s measured over 100 model step iterations. 1

With model rendering off: 2

Browser Typed Arrays Regular Arrays
Chrome 14.0.788.0 canary 27.1 11.1
Chrome 10.0.648.127 19.5 12.7
Webkit Nightly v88532 14.3 7.2
FireFox nightly 7.0a1 (2011-06-09) 6.3 5.3
FireFox beta v5 6.5 5.4
Opera Next 11.50 beta na 12.1
Opera 11.1 na 9.8
FireFox 3.6.17 na 8.2
Safari 5.0.5 na 7.0

With all rendering on:

Browser Typed Arrays Regular Arrays
Chrome 14.0.788.0 canary 8.8 7.1
Chrome 10.0.648.127 7.6 8.1
Webkit Nightly v88532 6.7 4.8
FireFox nightly 7.0a1 (2011-06-09) 4.3 3.8
FireFox beta v5 4.2 3.7
Opera Next 11.50 beta na 4.7
Opera 11.1 na 4.7
FireFox 3.6.17 na 0.9
Safari 5.0.5 na 2.6

Using an earlier version of Energy2D-JS as a computational benchmark 3

Model steps per second results from running this benchmark

This benchmark was adapted by Mozilla developer Vladimir Vukicevic from an earlier version of Energy2D-JS to measure computational performance and runs 100 model iterations with no interaction with the browser’s dom. These results should not be directly compared with the results above because the model operation has changed since the this adaptation.

Testing on a MacBook Pro, 10.6.7, 2.66 GHz Intel Core i7:

Browser Typed Arrays Regular Arrays
Chrome 14.0.788.0 canary 175
Chrome 10.0.648.127 43
FireFox beta v5 40
FireFox nightly 7.0a1 (2011-06-09) 38
Webkit Nightly v88532 17
FireFox 3.6.17 36
Safari 5.0.5 8

Testing on Android devices:

Device Browser Regular Arrays
Motorala Xoom, Android 3.01 Opera Mobile: v11.00 2.4
Android Browser 2.1
FireFox: v4.00 for Android 1.7
Motorola Droid 2, Android 2.2 FireFox: v4.00 for Android 1.4
Android Browser 1.3
Original Motorola Droid FireFox: v4.00 for Android 0.6

I’m only reporting results for one of the WebKit-based browsers: Android Browser. The results for the other WebKit-based browsers (Dolphin and SkyFire) were similar.

Testing on iOS devices:

On an original iPad the model ran at about 1 step/s. On the iPad2 results are never reported.

References

1 Tested on a MacBook Pro, 10.6.7, 2.66 GHz Intel Core i7 on 2011 06 09.

2 The frame and model step rate counters are still being rendered to the browser’s dom.

3 See the FireFox performance issue on the Mozilla bug-tracker: really slow on earthmodel testcase/benchmark — the benchmark can be run directly here