Public Repository

Last pushed: 3 days ago
Short Description
Simflowny is an environment for scientific dynamical models which generates parallel code.
Full Description


Simflowny is a cloud-based open environment for scientific dynamical models, composed by a semantic Domain Specific Language and a friendly Integrated Development Environment, which automatically generates parallel code for simulation frameworks.

Currently supported scientific model paradigms are:

  • Partial Differential Equations, such as Navier-Stokes and Maxwell Equations, and the Brusselator. This family is conformed by two branches:
    • Balance Law PDE, the PDEs are written as an evolution system of first order in time and space, which allow us to use schemes based on Finite Volume Methods to deal with shocks and discontinuities. This model also allows parabolic terms like the ones appearing, for instance, in the Navier-Stokes Equations.
    • Generic PDE, allowing almost arbitrary forms of evolution equations, including derivatives of any order. The only restriction is that the system must be still first order in time. Typical examples of systems naturally in this form would be the Maxwell Equations.
  • Spatial Agent-Based Models, such as Ising and Collective Motion (flocking) models
  • Graph-based Models, such as the Voter model and the Elementary Cellular Automaton

For further information see

Simflowny is bundleized in two separate images:

App: contains the application and simulation frameworks ready to be used.
Datastore: contains the sample database provided by Simflowny, and is the place in which the code generated by the user is going to be stored.

This allows users to update the application without losing their information.

Note: On Linux all commands must be executed with sudo or from a root terminal.

Getting the app from scratch

  1. Obtain the datastore container from the Docker hub:
    docker pull iac3/simflowny:datastore
  2. Obtain the app container from the Docker hub:
    docker pull iac3/simflowny:app

Running the app for the first time

  1. Create the data volume container:
    docker create -v /generatedCode --name storage iac3/simflowny:datastore
  2. Launch Simflowny:
    docker run -i -t -p 9080:8181 --volumes-from storage iac3/simflowny:app
    This will launch the Simflowny container bound to the datastore container. Internally Simflowny runs on the 8181 port of the container and the above command maps this port to the port 9080 of the host. You may want to change such mapping if you are already using the port 9080 on your machine.

Once launched, the terminal will show messages while the application is loading. After a few seconds, the application is ready and Simflowny can be open in a browser. Notice that from this point you can no longer use this terminal to execute docker commands and you may need to open a new Docker terminal.

To open the app in a non Windows platform, open a web browser and go to:

On Windows, the IP for the app should be retrieved by using the command:
docker-machine ip

Then, use the following http address:

Stopping the app

  1. Find the container name with:
    docker ps
  2. Stop the container:
    docker stop <container_name>
  3. Only on Windows, if you do not intend to use Docker for other containers, you probably want to stop the virtual machine. To do so execute:
    docker-machine ls
    to find the name of the virtual machine linked to Docker, typically default, and then run:
    docker-machine stop <vmName>
  4. Then you may close the Docker terminal.

Running the app again

  1. List the Docker containers by:
    docker ps -a
  2. Locate the container corresponding to the IMAGE iac3/simflowny:app and notice its name.
  3. Start the app by using the following command:
    docker start <containerName>

Getting started with Simflowny

To start using Simflowny, visit and check the tutorials and user guides.

Running generated code

Following Simflowny tutorials and user guides, the user can generate simulation code. There are two options for compiling and running code from Docker:

  1. Compiling and running inside Docker.
    1.1 Find the running container name by typing docker ps in a terminal. A list of the active containers is shown.
    1.2 Run a terminal in the container executing
    docker exec -i -t <container_name> /bin/bash
    1.3 Once inside the container, the generated code is located in generatedCode folder, ordered by name, author and version. Browse to the proper folder and compile using the instructions from the user guide.
    1.4 When finished, you may exit the container and return to the docker console by executing
  2. Exporting the code to another machine. In this case, the user needs to install the simulation framework and its requirements. The instructions are described in

Copying data to the host

In case you want to transfer files (such as the code or the results of the simulation) from the container to the host system, please follow these steps:

  1. Decide where you want to keep the files in your host system. For instance in Windows you may decide to save them into:
    In Linux the path could be:

  2. In the Windows case you need to translate the path to Linux syntax by replacing c:\ by /c/ and changing all backslashes \ by slashes /. In our example the result would be:

  3. On the Docker terminal run the following comand
    docker cp <container_name>:/generatedCode /user/johndoe/simflowny
    where <container_name> is Simflowny container. Notice that this command will copy the files from /generatedCode in the container to the selected path in the host. Of course, one can transfer any other folder other than /generatedCode.


Installing Simflowny on Docker from image files

In case you want to test a non stable version, you may need to install the app from image files instead of installing it from the Docker hub. To do so run:

docker load < simflowny_app.tar
docker load < simflowny_datastore.tar

Docker performance on Windows

In case you experience performance problems, you may modify the settings of de Docker virtual machine:

  1. Stop the the Docker virtual machine by running:
    docker-machine ls
    and then
    docker-machine stop <VMName>
  2. Close the Docker terminal
  3. Open Oracle VM VirtualBox, select the machine corresponding to the name found before, go to system settings and modify the following:
    3.1. Increase base memory
    3.2. Go to processor tab and increase the use of processors
    3.3. In the acceleration tab select legacy paravirtualization interface
  4. Save the changes.
  5. Open the Docker terminal. This starts the virtual machine automatically.

Opening a shell in the running app

  1. Get the name of the container running the app
    docker ps
  2. Execute a shell in the running app
    docker exec -i -t <container_name> /bin/bash

Cleaning up

  1. To check if there are unused containers run:
    docker ps -a
  2. To remove non needed containers
    docker rm <containerName>
Docker Pull Command