Solving Differential Equations in Mixed Reality
Anders Logg, Carl Lundholm, Magne Nordaas
Department of Mathematical Sciences, Chalmers University of Technology and University of Gothenburg
We develop an application for solving Poisson’s equation with the finite element method using Microsoft’s mixed reality glasses HoloLens. The idea with the HoloLens application is to set up and solve a Poisson problem in a real world room where the HoloLens user is located and then visualise the computed solution in the room. The application works by first letting the HoloLens create a surface mesh of the surroundings through a spatial scan. The surface mesh is then used to construct a geometry that defines the solution domain by a polyhedral representation of the room. A tetrahedral mesh is then generated from the geometry. See Figure 1. The user may provide problem data by placing sources in the room and setting boundary conditions on the walls, floor, and ceiling. The finite element method is then used to assemble the Poisson system before it is solved. Finally the computed solution may be visualised in the room. See Figure 2.
The development environment for HoloLens apps consists of the game engine Unity and the IDE Microsoft Visual Studio. Projects are initially started in Unity and then exported to Visual Studio where the coding takes place. The programming language used is C#. For the finite element assembly of the system we use the FEniCS form compiler (FFC) to compute the element stiffness matrix. Not only does this automatically take care of the steps in going from the variational formulation to the linear system, but it also makes it easier to generalise the application to other types of differential equations. Say, for example, that we would like to know how a dangerous substance spreads in a room after a leak has sprung. The heat equation could be used as a simplistic model for describing this situation, potentially making apps like this useful in building planning and safety engineering.
For further reading, see https://dl.acm.org/citation.cfm?doid=3139131.3141777