Hi Piotr,
Thanks so much for your interest.
I think the project could be divided into three stages. I think completion of one or more stages would be successful.
The first stage would be to get a working application running the conductivity and convective solvers and working with a subsetof the existing Energy2D model persistence format. I do not think it is important at this stage to get an authoring UI implemented.
One very important part to me that starts with the first stage is also developing automated unit tests for both model code and tests specifically for the thermodynamic performance.
These don't exist in Energy2D now (at least they didn't the last time I looked).
We are just starting to develop some physical chemistry tests for the Molecular Dynamics simulation we are developing.
See: http://lab.dev.concord.org/
Repo: https://github.com/concord-consortium/lab
and: https://github.com/concord-consortium/lab/blob/master/test/lab/molecules/molecules-test.js
Richard Klancer's been working on a branch integrating physical units and I expect more of these kind of test to showup there before it gets integrated back into the master branch:
https://github.com/concord-consortium/lab/compare/master...physical-units
One of the elements which I have included in the Lab project is the integration of being able to express Math in our html. Thispage on the Lennard-Jones Potential is just a draft but it shows the kind of features I'd like to see in the technical documentation:
http://lab.dev.concord.org/examples/lennard-jones-potential/lennard-jones-potential.html
The Lab project also shows some patterns of development I want to follow. It uses nodejs (based on Chromes V8 engine) for running tests of the code. I think the model as written in JavaScript should be able to be completely tested without ever running it in a browser. Testing in node runs VERY fast.
Check out the readme to see how the project is structured: http://lab.dev.concord.org/readme.html
So with a conductive and convective solver working and tested in JavaScript then the next steo would be developing an implementation in WebGL. I want some tests for the basic JavaScript model before doing the WebGL so we have ways of convincing ourselves the model is still working correctly.
There is some existing code we could look at -- I think WebGL is very well suited to performing these kinds of calculationsquickly -- but compared to writing, testing, and debugging in JavaScript -- writing and testing WebGL code is muchless agile.
The next stage would be to determine how to add an implementation of the photonic solver. This would first involve some research on needs and possible approaches to implementation.
There are some serious limitations of the current photonic solver in Energy2D that make it unable to model some simple solar energy simulations that I'd very much like to model.
For example I'd like to be able to model a simple flat plate solar hot air collector consisting of the following simple elements: a transparent material (glass, plastic), air plenums (vary the width of the gap), absorber (copper, aluminum, steel plate painted black), possibly another plenum/gap, insulation, environmental temperature, temperature of air flowing in.
Energy2d can do many parts of this ... but it doesn't model light as a spectral distribution and how it interacts with materials -- this would mean modeling reflection, transmission, absorption, and then re-emittance from materials.
So this stage starts with some more scenario development like I did above and then some research to see if this will be practical. If it turns out not to be practical then we can implement the existing Energyed solver.
This stage would mean the integration of additional elements of the existing Energy2D initial model state system.
I'd still like to have a version written and tested running in plain JavaScript but I would not be surprised if the WebGLimplementation was the only practical way to get the performance necessary to make it a fun tool for actually exploringsimulations.
The third stage -- if we get there would be to add an authoring interface to make it easier for people to create their own models on the web.
>2) I suppose that there are plenty of possibilities to simulate
>convection, conduction and radiation. Can you provide me some papers
>(if available) about solvers used in Energy2D / Energy2D-JS? Or should
>I just read the source code (self-explaining I hope :))?
I wrote Energy2D-JS just from reading the source for Energy2D -- I did end up reading many papers. I'll try and pull together some that I found useful in a later email.
I think the project could be divided into three stages. I think completion of one or more stages would be successful.
Hi,
thank you for your reply!
Firstly, I would like to present the initial plan of work. I divided it into stages, according to your suggestion.
1. Energy2D to JavaScript stage:
1.1 Implementation of the conductivity and convective solvers in plain JavaScript, basedon Energy2D code.
1.1 Unit tests of the model.
1.2 Tests of the thermodynamic performance.
1.3 Subset of the existing Energy2D model persistence format implementation [todo: define it more precisely].
2. WebGL optimization stage:
2.1 WebGL implementation of conductivity and convective solvers.
2.2 Testing WebGL model against plain JS model.
2.3 Testing performance of WebGL model.
3. Photonic solver stage: [* optional - probably will be done]
3.1 Research on possible approaches and needs connected with photonic solver.
3.2 Decision whether to choose existing Enery2D photonic solver or another one.
3.3 Implementation of the chosen solver in plain JavaScript.
3.4 Implementation of the chosen solver in WebGL.
3.5 Tests, performance comparison.
4. Authoring interface stage: [** optional - probably there will not be enough time to complete this stage]
4.1 Research on possible approaches and needs.
4.2 Implementation of the authoring interface.
Secondly, a bunch of questions:
I. What do you think about this plan, is it complete? I marked points 3 and 4 as optional, according to that:
I think the project could be divided into three stages. I think completion of one or more stages would be successful.
The first stage is necessary, the second seems to be quite challenging (so it is difficult to predict time needed for it).
At 8:07 AM +0400 8/16/11, Evgeny Demidov wrote:What license are you releasing your fluid-dynamics scripts under?
Would you be willing to release your work under an existing open-source license?
MIT: http://www.opensource.org/licenses/mit-license.php
Simplified BSD: http://www.opensource.org/licenses/BSD-2-Clause
I'd prefer "public domain" (and don't like to add license text to every file). Shall I write it explicitly in my pages?
But of cause I can add any free license (you like) to this simple script. (And... I only "stand on giants shoulders" :)
I would like to create a high quality, fully-tested application, rather than worrying about new features, before previous are tested. However, I am almost sure that three months are enough even for stage 3 (photonic solver).
II. "persistence format implementation" - I understand it, as a possibility of creating objects such as thermal sources, insulators, etc. Am I right? Just double-checking. What is desired scope of this implementation?
III. Tests - the example you provided seems to be self-explaining. Of course, I will provide such tests. However, it looks liketesting just "API" of the model, not physics itself. Should I prepare also tests for physics? For example, some easyexamples with predictable results?
--
I think we definitely need enough of this working to be able to create initial model state in JSON format for testing the thermodynamic performance of the model.
I would be good to be able to save the state of the model after running it -- but this would be a large amount of data. If we are actually doing this online AND it is important to be able to save the state of a model for a user we need to look atthe following possible optimizations:- binary compression of state of property arrays- transfer the data using abilities in the latest browsers to transfer binary Blobs with ajax rather than text
I expect the performance of the WebGL implementation to be MUCH faster than the plain JavaScript version. So it would be good to characterize this not just in increased performance but also in how much larger could the model be -- how might this increase in size benefit students/researchers.
The other effect of a large performance improvement is the ability to increase the time resolution of the simulation. I have a similar question here. How does this possibility benefit students/researchers.
I'm hoping that with your OpenGL experience and Evgeny Demidov existing examples including a Fluid Dynamics solver: http://www.ibiblio.org/e-notes/webgl/gpu/contents.htm it won't be too hard.
Hi,
another question: what is desired, final form of the Energy2D-JS? Now it's a simple page, but it's a prototype. Are you planing to integrate this project with the Lab (https://github.com/concord-consortium/lab)
or rather create independent website?
Posting it here or sending directly to me is fine. I use stephen....@deanbrook.org for email lists (to get around annoyinggoogle group limitations) but sban...@concord.org is my main work email.
Of course sending to either of these addresses will get right to me.
>Would you like to specify further details of the project or ask me any question?
Probably after seeing your proposal draft!
Posting it here or sending directly to me is fine. I use stephen....@deanbrook.org for email lists (to get around annoyinggoogle group limitations) but sban...@concord.org is my main work email.
--Best regards,Piotr Janik
----
post message :cc-dev...@googlegroups.com
unsubscribe: cc-developer...@googlegroups.com
more options: http://groups.google.com/group/cc-developers?hl=en
Hi,the time is counting down. :) Last minutes when I can edit my proposal. Don't you have any urgent comments? :)
Piotr,
I think your proposal is fine.
I think there is an interesting aspect to the work we haven't discussed -- but it's not critical that it be in the proposal.
We can implement computational physics very efficiently using features built-into WebGL -- but when doing computational physicswe have expectations that people doing graphics and visualizations don't necessarily have.
For example we will probably be using Floating Point Textures to hold various intermediate arrays of properties as part of the fluid dynamics modeling. Of course we won't be actually using them as OpenGL Textures -- instead we'll be re-purposingthem for our purposes.
The problem comes because in computational physics we also expect to be able to inspect and/or persist these arrays of properties. This may be difficult to do in WebGL.
This could be a case where our work will provide a very good example for extending the WebGL specification.