Tetrahedral and Triangular finite element in Kangaroo 2

Hi @DanielPiker ,
since I need to simulate an elastic material behavior on a mesh and I didn’t find the Tetrahedral and Triangular finite elements in Kangaroo 2 I’m wondering if is still possible to simulate it using the Poissons Ratio and Youngs Modulus in some way.
I suppose the two KG1 components aren’t working anymore in KG2. Are you thinking to implement them in KG2 in the near future?
In the specific, I would like to understand how the TriangularElement component work to try to simulate in some way the same behavior.
Thank you in advance

Hi @arch.a.graziano
Here’s a K2 version of the constant strain tetrahedron finite element:
CST_K2.gh (22.0 KB)
(I used @tom_svilansTetrino plugin to make the initial tetrahedral mesh)
The constant strain triangle is similar code - one less dimension just means one less component to loop through. I don’t think I did this one for K2 yet though.
It was a while ago I made this, I was meaning to optimise it a bit - I think the speed can be improved (it currently gets far from realtime for larger numbers of tetrahedra). It should also be possible to adapt it for anisotropic materials. It’s also possible to get the principal stress directions out from this.

What do you want to use it for?

1 Like

Thank you @DanielPiker for the immediate reply,
I need to simulate an elastic mesh surface and it’s deformations under some external pressures in some specific areas and I was thinking to use the ‘triangularelement’ component to achieve the Poisson’s effect (if the mesh face stretches in one direction must shorten in the other) that differently is hard to get if not changing the spring length during every iteration of the simulation.

I will try to check the behavior in KG1 using the old components and then if it works quite well I’ll try to implement a strategy to simulate it in KG2. Let me know if you will eventually code the ‘constant strain triangle’ for KG2 too.

Do you have a reference for the math/physics behind the Triangular finite elements component? I suppose is a matter of redistribution of spring length/forces.
Thx again.

The theory behind the tetrahedral finite element is actually from some direct conversation and correspondence with Prof. Chris Williams. I don’t think he’s ever actually published it anywhere. It is based on the theories described in the book ‘Theoretical Elasticity’ by Green and Zerna.
It’s not using 1d springs at all, but the covariant and contravariant components of the elastic tensor.

I think there’s another much simpler approximate approach possible though, that might be suitable for your application.
If we have a goal for a triangle that just preserves its area, without resisting changes to the edge lengths or aspect ratio, then the shrinking in the perpendicular direction would happen naturally, and it could be combined with simple edge springs to control how much.
I think a ‘triangle area’ preservation goal could be done as a small modification of the soap film triangle goal (which moves the points along the area gradient of the triangle, but always trying to reduce it to zero - it could be altered so it tries to keep the initial area).

Hi @DanielPiker, thx again.
the theory/math behind the tetrahedral sounds very complex and hard to achieve. Is that complex also for the ‘Triangular finite element’ too ?

Anyway, I tried the “triangle area” goal too (it was my first idea to achieve the Poisson effect, even if it’s not really the same but similar) but I got some very strange behavior … but now I realize that probably it has to be used together with the soap film triangle goal to get a proper result … so I will try asap.
Is there any related example file in your “Kangaroo-examples-master” folder?

The theory for the full triangular finite element is really just the same as for the tetrahedral one - so not any less complex, other than having one less parameter to loop through.

You say you tried the ‘triangle area’ goal - do you mean you already wrote one? There isn’t one included as standard, and I don’t recall posting a script for one yet.
Once it is written, it won’t be the soap film goal it needs to be combined with, but rather simple springs for the edges (because the area goal alone won’t resist shear at all).

Hi @DanielPiker,
sorry … I mean I added your “PolygonArea” goal (I wrongly call it ‘triangle area’) into my KG simulation definition but I was getting a weird effect … but I will try again if it can help to achieve a Poisson effect locally.