I am working as a mechanical engineer in real life and have been working on my own finite element tool. It is alright if you do not know what exactly that is, but it is basically a tool which can be used to compute displacements, stresses and much more for any shape.
As a funny side project, I took my own finite element solver and wrote a minecraft plugin wrapper around it.
As of now, the plugin can do the following:
- Take any minecraft shape which is physically plausible and contains supported elements (read more about that further below)
- Tell the code which blocks are constrained (are not allowed to move in any direction)
- My solver will tell you the displacements, stresses (planned for next update) and much more coming soon.
Installing
For the plugin to work, you will need the plugin and the finite element solver. You can download the jar above. As for now, the executable is only shipped for windows (sorry linux/mac lads).
Place
both (
FEM.exe and
FEMC.jar) inside your plugins folder.
Usage
1. Volume creation
The first thing to do, is defining the volume which should be evaluated. My code registers users and gives them the apropriate tools, after they have entered the following command:
It will give you a stick, which can be used to span a volume and some seeds which will be important later.
With the stick, similarly to world edit, you can select to blocks which will span your volume. Your volume will be created and highlighted using:
It will create the volume and assign the given name to it.
2. Boundary conditions
Next up, is telling the plugin which elements to constrain. It is not possible to do any computation without constraints. To be exact, it will constraint nodes. Nodes spans the block you know. A block is made out of 8 nodes. Two blocks, which are connected share 4 nodes.
By holding the seeds and
left-clicking you can constrain the 8 nodes which make up the block you click on.
right-clicking removes the constraints from the 8 nodes.
3. Loading
B
eside the constraints, a model has to be loaded to end up being displaced. In real life, basically any object is loaded by gravity for example. Ofcourse there are sources of loads but for now, the only force applied to the model is gravity. Other load types like nodal forces into any direction will be implemented in one of the next releases.
4. Computing
Next up, the body has to be sent to the FEM code. For this, you can simply call
It will start the computation. For smaller models, this will only take a few milliseconds. The larger the model, the longer it takes. Note that this method is also used in scientific computing. This is not just some simulation.
It is some actual scientific computation and takes time.
4. Results
To display the results once they are available, you can displace your model.
The scale command will apply the computed displacements and multiply them by a factor. Normally buildings made out of stone receive very little displacements in the real world. For example a house made out of stone will surely not displace by multiple meters. So it does usually make sense to scale the displacements.
5. Examples
Bridge with 3 pillars:
Constraints: pillars constrained at bottom (not visible for 3rd pillar) Displacements: factor=300
Loading: multiple gold blocks (each weighing around 12 tons)
Bridge with 3 pillars and one side enforced; similar constraints like above.