Alneos / vega

Finite element format converter
GNU General Public License v2.0
23 stars 9 forks source link

CellType of unspecified number of nodes. #16

Open ThomasAbballe opened 7 years ago

ThomasAbballe commented 7 years ago

Hi all !

I've recently worked on the conversion of Nastran Super Elements (code DMIG, but also CELAS2, CELAS4) to Systus. I think we are almost done, as most things should be working correctly. (I hope)

Anyway, during these developments, I ran into a small problem : there is no CellType with a non fixed number of nodes. Or, more precisely, there are (POLYL, POLYGON, etc) but Vega does not work properly with them. I found a small trick to be able to create the cells, but the mesh.find() is not working. Bottom line, the issue seems to be each type of cells are stocked in a huge array of nbcells*nbNodesByCells, which simply don't allow a type to have an unspecified number of nodes.

It's kinda annoying, because I had to create 17 Types "POLYn" of cells, in order to cover all ground of my Systus Super Elements. It's not a very beautiful code, and it's not, of course, scalable. I don't now if it's a priority development, but it sure could be useful to me !

For now, I completely deactivate (in 37b7c664f3daf7719a61c778914b988861c062bb) all these types as I think it's misleading to keep them in this "broken" state.

ldallolio commented 7 years ago

Hi Thomas, A very quick (and possibly misleading) answer : the idea is that those non fixed cells aren't really cells at all (as they aren't in Nastran in fact) : their place should be inside a MatrixElement object which uses a DOFMatrix to store both nodes and DOFs... So at writing time you could simply ask each MatrixElement for their nodes and write them all in Systus ? We use this way as a compromise : the huge, fixed size arrays are for compact memory allocation, while the MatrixElement should provide needed flexibility. Hope this helps,

ThomasAbballe commented 7 years ago

Thanks for your answer. It's basically what I understood from the source code, but confirmation is always helpful ;).

In Systus, those "non fixed" elements are real cells, with a material and so on. So, I need to create cells from Super Elements (i added a Model function to do that), and I need to assign them a CellType. It seems to me more simple and elegant that doing a lot of exceptions in the Systus Writer. As Systus only supports up to 20 nodes by cells, my problem was solved by creating 20 Types (well 17, I used existing types for cells with 1, 2 or 3 nodes). It's not elegant, but it worked.

So there is no need for an "unnumbered celltype"... yet. It sure would make some part of the code much more straightforward, but I think the cost would be to expensive for it. We'll see in the future, maybe ?