precice / calculix-adapter

preCICE-adapter for the CSM code CalculiX
GNU General Public License v3.0
52 stars 20 forks source link

Add more supported elements to CHT simulations #89

Closed boris-martin closed 2 years ago

boris-martin commented 2 years ago

As of now, CHT simulations (more generally, simulations needing element face centers instead of nodes) only work with tetrahedrons. (Probably only first order tetrahedrons but I haven't tested) Using different elements (Say brick hexaedrons elements) crashes with no explicit messages but a segfault.

This part is problematic:

https://github.com/precice/calculix-adapter/blob/4496e8f160ec121481653baf44ec032813409ac6/adapter/PreciceInterface.c#L466-L472

I'd like to try to improve that in the near future, but I'm not 100% sure of the best approach:

MatthiasFreimuth commented 2 years ago

Hi Boris, I actually already implemented some way of support for hexahedral elements, in my case I needed it for a DLOAD card, so to apply pressure values in CalculiX. I'm about to make a pull request with my changes soon and then we can use this as a starting point for further discussions about this topic.

boris-martin commented 2 years ago

Looking forward to it, thanks! It can probably wait for the actual PR, but how do you handle mixed meshes ? Do you detect for each element what kind it is? Do you only detect the element type of a single-type mesh? Or is that a configuration thing ?

MatthiasFreimuth commented 2 years ago

Actually I only use single-type meshes, so no mixed meshes. One can detect the element type directly from the CalculiX variable lakon. You can find it in the list of variables in the CalculiX documentation.