Skip to main content

LUP Student Papers

LUND UNIVERSITY LIBRARIES

GPU Usage for Parallel Functions and Contacts in Modelica

Roxling, Vilhelm LU and Goteman, Axel (2015) In LU-CS-EX 2015-41 EDA920 20151
Department of Computer Science
Abstract
This thesis investigates two ways of incorporating GPUs in Modelica. The first
by automatically generating GPU code for Modelica functions, and the second
by using GPU accelerated external code for a contact handling package.
Automatic parallelization of functions is desired, as it can potentially accelerate
large simulations significantly. Special patterns of nested for-loops
in Modelica code are recognized and translated into CUDA kernel functions.
Inline integration allows a broader spectrum of models to take advantage of
the parallelization, by reducing CPU-GPU transfers. The prototype has been
tested and achieved a speed-up factor of up to five compared to the CPU.
The contact handling package is capable of handling both... (More)
This thesis investigates two ways of incorporating GPUs in Modelica. The first
by automatically generating GPU code for Modelica functions, and the second
by using GPU accelerated external code for a contact handling package.
Automatic parallelization of functions is desired, as it can potentially accelerate
large simulations significantly. Special patterns of nested for-loops
in Modelica code are recognized and translated into CUDA kernel functions.
Inline integration allows a broader spectrum of models to take advantage of
the parallelization, by reducing CPU-GPU transfers. The prototype has been
tested and achieved a speed-up factor of up to five compared to the CPU.
The contact handling package is capable of handling both complex contact
behavior between arbitrarily shaped bodies and large DEM-like simulations,
something which Modelica is currently lacking. Attempts to accelerate the
package with GPUs were made, with partial success for the broad phase. The
package uses Morton encoding for the broad phase, and the narrow phase is
based on CSG intersection with BSP trees. Contact response is calculated
using a volume dependent method, taking friction, damping and multiple contact
points into account. The capability of the package was demonstrated by
the fact that both complex contact behavior such as the inversion of the Tippe
Top toy and tens of thousands of colliding spheres could be simulated. (Less)
Popular Abstract
One of the key components in our modern society is the ability to simulate. By
simulations, the industry can design new cars, phones, aircrafts etc., without having to
go through prototype after prototype, allowing us the cheap and high-tech products most
of us rely on in our day-to-day life. However, good as simulations are today there are still
severe limitations on what can be simulated. Two of the largest limiting factors are how
hard simulations are to design and how long they take to run. The first of these problems
are tackled by the Modelica programming language, which is designed for easy set-up of
simulations. We have attacked both these problems by using GPUs to speed-up Modelica
simulations more than 5 times, and... (More)
One of the key components in our modern society is the ability to simulate. By
simulations, the industry can design new cars, phones, aircrafts etc., without having to
go through prototype after prototype, allowing us the cheap and high-tech products most
of us rely on in our day-to-day life. However, good as simulations are today there are still
severe limitations on what can be simulated. Two of the largest limiting factors are how
hard simulations are to design and how long they take to run. The first of these problems
are tackled by the Modelica programming language, which is designed for easy set-up of
simulations. We have attacked both these problems by using GPUs to speed-up Modelica
simulations more than 5 times, and extending the capability of Modelica to handle
collisions between objects. (Less)
Please use this url to cite or link to this publication:
author
Roxling, Vilhelm LU and Goteman, Axel
supervisor
organization
course
EDA920 20151
year
type
H3 - Professional qualifications (4 Years - )
subject
keywords
Arbitrary Shapes, Collision Response, Auto-generation, Collision Detection, Modelica, GPU
publication/series
LU-CS-EX 2015-41
report number
LU-CS-EX 2015-41
ISSN
1650-2884
language
English
id
7869349
date added to LUP
2015-09-18 10:09:08
date last changed
2015-09-18 10:09:08
@misc{7869349,
  abstract     = {{This thesis investigates two ways of incorporating GPUs in Modelica. The first
by automatically generating GPU code for Modelica functions, and the second
by using GPU accelerated external code for a contact handling package.
Automatic parallelization of functions is desired, as it can potentially accelerate
large simulations significantly. Special patterns of nested for-loops
in Modelica code are recognized and translated into CUDA kernel functions.
Inline integration allows a broader spectrum of models to take advantage of
the parallelization, by reducing CPU-GPU transfers. The prototype has been
tested and achieved a speed-up factor of up to five compared to the CPU.
The contact handling package is capable of handling both complex contact
behavior between arbitrarily shaped bodies and large DEM-like simulations,
something which Modelica is currently lacking. Attempts to accelerate the
package with GPUs were made, with partial success for the broad phase. The
package uses Morton encoding for the broad phase, and the narrow phase is
based on CSG intersection with BSP trees. Contact response is calculated
using a volume dependent method, taking friction, damping and multiple contact
points into account. The capability of the package was demonstrated by
the fact that both complex contact behavior such as the inversion of the Tippe
Top toy and tens of thousands of colliding spheres could be simulated.}},
  author       = {{Roxling, Vilhelm and Goteman, Axel}},
  issn         = {{1650-2884}},
  language     = {{eng}},
  note         = {{Student Paper}},
  series       = {{LU-CS-EX 2015-41}},
  title        = {{GPU Usage for Parallel Functions and Contacts in Modelica}},
  year         = {{2015}},
}