Code Monkey home page Code Monkey logo

interactive_earth's Introduction

Interactive Earth

Interactive Earth is a teaching tool for demonstrating mantle convection and its dependence on Rayleigh number. It enables a mantle convection model to be run much more quickly than the codes typically used in research. It solves the same governing equations, but makes comprimises for accuracy for the sake of achieving speed. This speed enables the code to be very responsive to user input.

The simulations can be run in a browser without running any local code here.

More about the project can be found here.

An introduction to the underlying science can be found here.

Compiling on Ubuntu Linux

  • Install fftw3, SDL2, and GLEW using apt-get install libfftw3-dev libsdl2-dev libglew-dev
  • Rename Makefile.linux to makefile
  • Run make on the command line to compile the project
  • run the program by typing its path and name in the command line: ./interactive_earth

Compiling on a Mac

  • brew install the following dependencies: fftw3, SDL2, GLEW
  • rename Makefile.osx to makefile
  • run the command make in the command line
  • run the program by typing its path and name in the command line: ./interactive_earth

Compiling to Javascript

Interactive Earth may be run in the web browser by compiling it to Javascript using emscripten. This takes a bit more work, since you must compile SDL2 and fftw3 manually as well, but can be done. The finished product can be seen here.

User input

With the simulation running, the user can make the following changes:

  • put in positive temperature anomalies (add heat) by clicking
  • put in negative thermal anomalies (remove heat) by right-clicking
  • change the Rayleigh number (the vigor of convection) by scrolling
  • press space to pause the simulation. while it is paused one can click to add earthquakes.

Changing simulation behavior for advanced users

The behavior of the simulation can be modified by changing parameters within the upper part of the main.cpp file. The parameters that readily exposed for being modified include:

  • the resolution of the simulation (and thereby how quickly it runs)
  • whether or not to do a true polar wander (TPW) calculation
  • whether to included a chemical field
  • whether to render the simulation with flattened with an equatorial bulge

interactive_earth's People

Contributors

cgravill avatar ian-r-rose avatar jamesscottbrown avatar swanson-hysell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

interactive_earth's Issues

Test blob sizes

In convection mode we add blobs when the user clicks/touches. These blobs are currently scaled to be roughly the same size as plumes, depending on the rayleigh number. When on a bigger touch screen this may not be the best choice. We should user-test that.

Test color scales with users

There are a few color scales in the simulation. Right now they are mostly just for looking cool, but we should test them with some users.

  • Does it make sense to switch color scales between seismic mode and convection mode?
  • Does the seismic scale make the most sense for seismic mode?
  • Does the hot scale make the most sense for convection mode? What about magma?

Figure out dispersion

Currently it is possible for the user to add too much negative displacement in seismic mode, resulting in a net offset of the seismometer and the displacement field. I added some dispersion to the wave equation to deal with this problem, but no longer remember why. We should

  1. Figure out why I did that.
  2. Figure out if there is a better way to handle net offsets.

Add Buttons

In order to facilitate users without a keyboard, operating entirely using a touch screen we should add buttons to the user interface that do at least a useful subset of the operations, including

  • Switch from hot to cold
  • Switch to/from seismic mode
  • Reset the simulation

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.