Code Monkey home page Code Monkey logo

visualchemeng-js's People

Contributors

adm78 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

visualchemeng-js's Issues

Rename ParticleFeed to avoid confusion with physical feeds to unit operations

Currently the fact that we have physical feeds (say, the real feed to a distillation column with component concentrations and a temperature) and graphical feeds (i.e. somewhere where we generate particle entities which become part of an ensemble to give a graphical effect). It would be better it we called them something different entirely. Say, change the graphical version of the feed to ParticleSource , GraphicalFeed or GraphicalParticleSource.

This also highlights a potential need to split up the graphical and physical components with the vce library. However, some apps (namely the molecular dynamics app) blur the line between these two things. Needs a bit more though.

EDMD module: small canvas size causes simulation to freeze up

Small windows sizes lead to small canvas sizes. Only the first column of particles is initialized and the run button does not start the simulation. Subsequent restarts add more particle onto of the existing ones.

Console error: md.js L57: TypeError: particles[i] is undefined

p5 canvases do not scale when entering fullscreen mode

Example:
image

On small displays, the ffect is not too bad, but is an issue on larger ones. We have too options here:
1.) Simply restart the simulation (in most cases we can just call setup).
2.) Regenerate the canvas, translate particles and update display the size any imported images. This has the benefit of maintaining the current state of the simulations (but is obviously a bit more work).

EDMD module: Canvas does not scale with window

p5 canvas does not scale with the window. Event listener could be take directly from kmc.js. If so, it should be put in a vce_utils.js and loaded by both.

A decision has to be made about what to do with particle that no longer lie in the sim box. Simple solution is just to delete them from the particle array and rebuilt the event queue. Alternatively, they could be translated into a new position in the box.

App should have an 'Information' mode

Information mode should explain the physics behind the system being simulated, plus how it is solved from a numerical perspective.

It's not quite clear what's the best way to delivery this information, so we should probably create a testing branch for it.

EDMD module: simulation becomes unstable when particles overlap

Some particle initialisation states and user particle inception events lead to particle overlap. The simulation subsequently becomes unstable, manifesting in particles leaving/entering the simulation box.

This is likely the result of the creation of events with event.t < t, causing time to flow in the wrong direction...

This can be quite easily fixed by checking for overlaps at the point of initialisation/particle inceptions. Offending particles could then be randomly moved until a position without overlap is found, before the simulation is resumed (unpaused).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.