If you're reading this, we've just migrated servers! If anything looks broken please email dion@thinkmoult.com :)

Open-data model for FEM

Comments

  • @Moult said:
    Please let me know your thoughts and how to improve this list.

    For the structural engineering part I would add the need to
    define an open-data model for representing the mesh and the analysis results (on the mesh) of finite-element models

    In the current context, we can potentially use openBIM tools to author ifc files with structural analysis objects but there is no "placeholder" for the mesh and the results of structural analyses, which are fundamental low-level information to further calculations for designing and verifying structural members. I think the approach must be more holistic regarding the structural analysis part with the possibility to freely manipulate this results, apply custom calculations, etc. Right now, we have, for example, the rebars in reinforced concrete structures but we do not have the forces or other fields that were used to calculate them.
    Code_Aster and Salome-Meca uses the med and rmed format that is based on the HDF5 standard (@aothms could this be useful for ifc-hdf5?) and there is a good open-source library meshio that can convert between various mesh formats, including formats related to commercial software, and can expose content also as npy objs or json with some basic scripting.
    Perhaps this could be a viable option, what other structural minds think on this? (ping @bernd @krande @brunopostle @Herman @Luis )

    In any case I believe soon we will have to deal with med and rmed files in Blender and FreeCAD as I am developing a small library to run Salome and Code_Aster on any python application, if there is a local installation of the software. At that point we should be able to finally perform structural workflows in BlenderBIM using the ifc2ca scripts and we will need to visualize the results.

  • @Jesusbill said:

    @Moult said:
    Please let me know your thoughts and how to improve this list.

    For the structural engineering part I would add the need to
    define an open-data model for representing the mesh and the analysis results (on the mesh) of finite-element models

    In the current context, we can potentially use openBIM tools to author ifc files with structural analysis objects but there is no "placeholder" for the mesh and the results of structural analyses, which are fundamental low-level information to further calculations for designing and verifying structural members. I think the approach must be more holistic regarding the structural analysis part with the possibility to freely manipulate this results, apply custom calculations, etc. Right now, we have, for example, the rebars in reinforced concrete structures but we do not have the forces or other fields that were used to calculate them.
    Code_Aster and Salome-Meca uses the med and rmed format that is based on the HDF5 standard (@aothms could this be useful for ifc-hdf5?) and there is a good open-source library meshio that can convert between various mesh formats, including formats related to commercial software, and can expose content also as npy objs or json with some basic scripting.
    Perhaps this could be a viable option, what other structural minds think on this? (ping @bernd @krande @brunopostle @Herman @Luis )

    In any case I believe soon we will have to deal with med and rmed files in Blender and FreeCAD as I am developing a small library to run Salome and Code_Aster on any python application, if there is a local installation of the software. At that point we should be able to finally perform structural workflows in BlenderBIM using the ifc2ca scripts and we will need to visualize the results.

    Hi, there.
    I agree about the need of being able to store the FE mesh and the analysis results inside IFC files. I think med could be an excellent option. It's a mature solution and, as far as I know, quite comprehensive (element types, field types, etc.).

    Jesusbill
  • edited January 2021

    FreeCAD FEM mesh code is based on SMESH like Salome. Med is the bas of SMESH. Thus FreeCAD should support Med out of the box. But to be honest I have not tested this for quite some time.

    There is not unit test for med writing and reading in FEM https://github.com/FreeCAD/FreeCAD/blob/6b3936c8b8859f8d45a1f3e9859ef7e7bde5b271/src/Mod/Fem/femtest/app/test_mesh.py#L431
    I should add one ...

    Just gave it a try. Reading and writing of med seams to works great in FreeCAD.

    JesusbillLuispaullee
  • Great to hear that @bernd !

  • @aothms could this be useful for ifc-hdf5?

    @Jesusbill it's useful in the sense that it shows that HDF5 is indeed for some scientific applications a good choice. How deep do you envision the integration? Would you consider the IFC-HDF5 + med more like a container or do you envision actual semantic connections between parts, kind of like extending the schema?

  • Is med able to save results like vtk it does?

  • edited January 2021

    @bernd said:
    Is med able to save results like vtk it does?

    If I remember well you can define as many fields as you want on the nodes or on the Gauss points. They can be scalar, vector or tensor fields.

    Jesusbill
  • @aothms I would say minimal integration and schema extension. Essentially it can be treated as a container of the "mesh" of a structural analysis model. The only requirement is that the mesh will contain the correct references to the structural analysis entities (members, connections, loads, etc.), each reference being a label of a group of finite-elements or nodes. This would mean an additional property to structural analysis entities or a hard-rule to define a compatible group label from the guid of the object

    aothmskrande
  • @Luis said:

    @bernd said:
    Is med able to save results like vtk it does?

    If I remember well you can define as many fields as you want on the nodes or on the Gauss points. They can be scalar, vector or tensor fields.

    For nodes there are two fields, one that contains the node values of each element and one that is the average field. There is also an "element" field, with a single value for each element.
    With meshio you can convert med <-> vtk
    these are the models that it can handle:
    Abaqus, ANSYS msh, AVS-UCD, CGNS, DOLFIN XML, Exodus, FLAC3D, H5M, Kratos/MDPA, Medit, MED/Salome, Nastran (bulk data), Neuroglancer precomputed format, Gmsh (format versions 2.2, 4.0, and 4.1), OBJ, OFF, PERMAS, PLY, STL, Tecplot .dat, TetGen .node/.ele, SVG (2D only, output only), SU2, UGRID, VTK, VTU, WKT (TIN), XDMF.

  • Do you have such a med with results? A small one.

  • yes you can take the rmed from here or the other examples

  • are they exported by code aster?

  • @bernd said:
    are they exported by code aster?

    This discussion should be moved to a new thread...

  • @bitacovir said:
    This discussion should be moved to a new thread...

    You asked and I did it. This is a now it's own thread. Let me know if the name or tags need changing.

  • @bernd said:
    are they exported by code aster?

    yes

  • Hi! I agree HDF5 looks very promising for FEM meshes. Among the interesting formats building on HDF5 I can think of MED (which is already mentioned and in use by Code Aster) and XDMF which is supported by vanilla Paraview (not necessary with a custom compiled Code Aster version). In XDMF you can store information such as stresses and strains and also displacement vectors. Meaning you can visualize your deformed structure with stresses and strains in Paraview (I guess it would not take much time to visualize that also in Blender using the blender api).

    With respect to interoperability across FEM formats I think what meshio is doing is also worth taking note. Using meshio you can convert nodes and elements across an extensive list of formats, taken from its github page:

    Abaqus, ANSYS msh, AVS-UCD, CGNS, DOLFIN XML, Exodus, FLAC3D, H5M, Kratos/MDPA, Medit, MED/Salome, Nastran (bulk data), Neuroglancer precomputed format, Gmsh (format versions 2.2, 4.0, and 4.1), OBJ, OFF, PERMAS, PLY, STL, Tecplot .dat, TetGen .node/.ele, SVG (2D only, output only), SU2, UGRID, VTK, VTU, WKT (TIN), XDMF.

    The only thing I really miss from meshio is the ability to convert element section information beyond just the element type (ie. height, width etc. for beam elements and shell thickness' for shells). But that is something I hope I (or others) will have time to contribute with (if not already begun)!

    LuisJesusbill
  • As said if a med is exported from FreeCAD this med can be imported back and it works without any problems. This works for 1D, 2D and 3D mesh elements.

    @Jesusbill said:
    yes you can take the rmed from here or the other examples

    Just gave this med a try to import in FreeCAD, https://github.com/IfcOpenShell/analysis-models/blob/master/models/structure_01/structure_01.med, but it does not import anything :-( No error, no other information what hat happened.

    Which software do you have to open and view a med file with? Would you try some med exported from FreeCAD? I could post some if you wish, but it is very, very simple to mesh and export a ordinary geometry in FreeCAD.

  • The .med file is the mesh. It is the .rmed that contains the results (displacements at the nodes in this case under the label "Bld_DISP")
    I use Salome/SMESH module to create and view meshes and /ParaVis module to visualize the results.
    Yes sure, send me a small one if you can. We should check what version of MED it is, 3.3 was the "old, stable" and now it is 4.0.

  • Thanks @krande XDMF looks promising ...

  • This seems line an appropriate thread to paste this from FreeCAD on fosstodon:
    "Given that #CAD #FEM/#FEA is in the current zeitgeist, an apt discussion is happening on the #FreeCAD FEM subforum regarding the direction(s) the workbench should take in it's future."
    https://forum.freecad.org/viewtopic.php?f=18&t=71154

    https://fosstodon.org/@FreeCAD

Sign In or Register to comment.