|
Before we can do coupled simulations, it's good to learn how to run oomph-lib simulations in the framework of MercuryDPM.
The first step is to include oomph-lib into the MercuryDPM compilation; this is done via a cmake; just run cmake with one additional argument:
This will clone the oomph-lib repository into your MercuryDPM source directory, and it will compile the oomphlib source files when you type make.
Now you can include oomph-lib source files into your Driver codes. A good example of this is SolidBeamDemo.cpp:
This code includes the class SolidProblem, which is derived from the oomph-lib Problem class. This class is defined in the MercuryDPM kernel, and is specifically designed to solve problems with elastic bodies. As you can see, the driver code defines a class of type SolidProblem, with the element type RefineableQDPVDElement<3,2>, sets the properties of the elastic solid, then calls solveSteady to solve the linear algebra problem.
You can visualize the results by opening the resulting vtk files in paraview:
To do coupled simulations, see Surface coupling with oomph-lib.
We have implemented the following test cases:
A simple uncoupled simulation of a beam bending under gravity. A steady-state solver is used. the amount of bending is compared to an analytical solution.
A simple uncoupled simulation of a beam bending under gravity. This time, an unsteady solver is used.
The gravitational, elastic and kinetic energies are plotted to check energy conservation.
A simple code returning the values of the shape functions, jacobian, weights, etc. This is useful to understand what the different oomph-lib functions do.