febiosoftware / FEBio

FEBio Suite Solver
https://febio.org/
MIT License
174 stars 65 forks source link

Datastructure for FEMesh #49

Closed Scriptkiddi closed 1 year ago

Scriptkiddi commented 2 years ago

Hey so I'm currently working on a FEBio Plugin which exchanges Mesh data with another simulation and I'm wondering if I understood the data structure correct. I drew my self this image to understand the relationship between the Mesh, Element and nodes. Mesh contains nodes and elements. n Nodes form an element. An element contains the integration points/material points, that store the actual simulation data values. So first question would be is that correct or did I miss something? and my second question is, if I'm trying to access/manipulate the data values in the FEBio simulation, should I access the material points directly or is there a better way? febio_mesh_objects

SteveMaas1978 commented 1 year ago

Sorry for the belated reply. For future reference, general questions like this are better posted on the febio developer's forum.

For what it is worth, in FEBio, a mesh is defined as nodes and domains. Each domain contains a list of elements. Integration point data is indeed stored on the elements and are predominantly used for storing material data. Regarding accessing and manipulating material point data, that really depends on what you are trying to do. The material point data is used for storing internal data and is not directly accessible from the outside. This is by design since processing material point data would be complicated by the fact that additional knowledge is required to understand the spatial distribution of the material points. (for instance, users would need to know the particular integration rule used, as well as the internal ordering of integration points). Therefore, all input and output are related to the mesh itself (i.e. nodes and elements), and where necessary, FEBio will project from nodes to integration points or back. I should also warn that the implementation of the integration point classes is likely to change in future versions of FEBio. Although the current implementation is very flexible, it is not the most efficient. In FEBio4 an effort was already made to somewhat improve the implementation, but future versions will likely make additional changes. Therefore, creating code that directly manipulates the integration point values might not port easily to future versions.