Hi zidberg, and welcome back to the world of FreeCAD. You have not been posting for quite a while. Just for your information. FreeCAD FEM is evolving fast. Thus you should use the latest FreeCAD development version 0.17.x to work with FEM.zoidberg wrote:I come from salome/salome_meca (salome+code_aster) and want to test the FreeCAD FEM features.
I do not realy know what you meand with this? A face or shape does not have a name in FreeCAD. The document object the shape belongs to has a name. But this are geometry objects, and med is a mesh format. What you can export to med and what will be written into the med are groups of mesh faces or groups of mesh nodes or groups of mesh volumes. These groups have names and you can set this name and it will be exported into med. These groups could be used for boundary conditions. It is what some people do with FreeCAD and ElmerFEM.zoidberg wrote:I work with code_aster for now with med files and set the constraints in salome.
How can I get the face/shape names in FreeCAD. Are these also exported to med?
The netgen mesher as well as the GMSH mesher do make 3D and 2D elements in one mesh. But the netgen mesher does not support groups of mesh faces at the moment. They are needed to group the mesh faces for setting up the constraints.zoidberg wrote:does the netgen mesher in FreeCAD also generate 3D (for calculation) and 2D (for constraints) Elements?
bernd wrote:...What you can export to med and what will be written into the med are groups of mesh faces or groups of mesh nodes or groups of mesh volumes. These groups have names and you can set this name and it will be exported into med.... In FreeCAD FEM a geometry is modeled, all constraints are set on the geometry, and at very last the mesh is generated with the wished adjustments.
Code: Select all
subshapes =geompy.SubShapeAll( geom, geompy.ShapeType["FACE"])
for subshape in subshapes:
subShapeID = geompy.GetSubShapeID(geom, subshape)
group = mesh.GroupOnGeom(subshape)
groupname = group.GetName()
elementIDs = mesh.GetSubMeshElementsId(subShapeID)
Totally right !zoidberg wrote:As far as I understand:
Salome uses Smesh for meshing which has interfaces to netgen. FreeCAD also uses Smesh in the FEM modul (has nothing to do with the FreeCAD mesh module for modesling/rendering).
no not to all, only to the ones implemented in the python FEM mesh API. See https://github.com/FreeCAD/FreeCAD/blob ... MeshPy.xml for all supported calls. Creating mesh groups is only supported by FreeCAD FEM GMSH mesh object. This uses GMSH for meshing and imports the mesh by unv file. Med file import supports mesh groups too. But creating mesh groups directly or by the FreeCAD FEM netgen smesh mesh object is not yet supported unfortunately. This would involve C++ development. So far nobody attracted this ... But at least it has been on my ToDo for quit a long time already.zoidberg wrote:Do I have access to all smesh functions as in salome?
could you try to re import the med file? It does not import any mesh in FreeCAD but I do not know whats the problem is, FreeCAD or the file. What software does support med to. I'd like to try this med on a third party software before I start to search inside FreeCAD.zoidberg wrote:MED generated by salome:
https://www.dropbox.com/s/886duwv7xc92l ... 6.med?dl=0
Code: Select all
- Trace /home/hugo/Documents/dev/freecad/freecadbhb_dev/freecad/src/3rdParty/salomesmesh/src/SMESH/DriverMED_R_SMESHDS_Mesh.cpp  : The following exception was caught:
Not enough memory available