Code: Select all
Transfinite Line "*" = 5 Using Bump 1.;
Moderator: bernd
Code: Select all
Transfinite Line "*" = 5 Using Bump 1.;
Hi sodelo,sodelo wrote:Did not contact the devs but played a little bit with Freecad and gmsh instead.
I created a CompoundFilter and exported as a Brep.
freecad.png
With a very simple geo file I got this.
mesh.png
There is some potential there!
Place the Brep and geo file in the same directory. Open the geo file and click on Mesh/define/3D.
Only an idea?bernd wrote:I played a bit too. The problem is the line
it says GMSH to use 20 element on any edges. This works great on this modell, but not on most other where we have edges with totally different lengths. But without this line and with MaxCharacteristicLength I get errors ... We need to play more ...Code: Select all
Transfinite Line "*" = 5 Using Bump 1.;
Mhh could work, it is worth a try ...HoWil wrote:Only an idea?bernd wrote:I played a bit too. The problem is the lineit says GMSH to use 20 element on any edges. This works great on this modell, but not on most other where we have edges with totally different lengths. But without this line and with MaxCharacteristicLength I get errors ... We need to play more ...Code: Select all
Transfinite Line "*" = 5 Using Bump 1.;
What happens if you use fc mesh regions on each edge? Do you than still need this setting?
I tried but nothing was displayed in the WatchOut report so I fear I did not understand the process.BTW @ sodelo
If you use GMSH mesh in FreeCAD you can change some parameter in property widget and watch out for report vie the created geo file is printed there. If you open this file you will find the gmsh command to run the meshing. I have been using this and copied your lines to play. Still I get valid meshes if I use the Transfinite Line command but not without this command and the use of CharacteristicLength
I am still very unexperienced with GMSH. I had a look however at the 2d example. Meshing is very long and lead to a big mesh because of the triangles. The best route would be to create a layer in the geometry (volume subdivision) and to mesh it with a few elements in the thickness and to connect it to the rest using a bias (progressive increase of density). All of this can be done with GMSH. We "just" have to find a way to transfer this information.Hi sodelo,
Since you are far more into gmsh as I am, I want to ask if you also see/know a possibility to create a BoundaryLayer mesh in gmsh (see also https://forum.freecadweb.org/viewtopic. ... er#p155616)
I'm still very exited about what you posted BREP is native format of GMSH as it is of FreeCAD. Means we could use edgenumbering from FreeCAD to transfer adjustments to GMSH. MeshRegion works the same way but uses CharacteristicLength which is a node property.sodelo wrote:I tried but nothing was displayed in the WatchOut report so I fear I did not understand the process.BTW @ sodelo
If you use GMSH mesh in FreeCAD you can change some parameter in property widget and watch out for report vie the created geo file is printed there. If you open this file you will find the gmsh command to run the meshing. I have been using this and copied your lines to play. Still I get valid meshes if I use the Transfinite Line command but not without this command and the use of CharacteristicLength
Sorry guys if I did not mention the limitations you found out yourselves. I was very exited and wanted to share it. I think getting a working solution (with a full control on the mesh) might be difficult. We may have to figure out how the edges are translated from the Freecad internal through BREP to the GMSH internal to be able to relate each edge to its requested number of elements. Might be some work and I hope there is an easier path.
Code: Select all
Merge "test.brep";
// For the progressive distribution of element size on some edges. HoWill this is for you!
Bias=1.2;
Transfinite Line{1,2,7,9,15,20,21,24} = 3;
Transfinite Line{3,4,11,12,16,18,25,26} = 10;
// Progressive distribution. Some lines are not oriented in the same way. So the invers of Bias is used.
Transfinite Line{22,23} = 10 Using Progression 1/Bias;
Transfinite Line{27,28} = 10 Using Progression Bias;
Transfinite Line{13,14,17,19} = 10;
Transfinite Line{5,6,8,10} = 4;
Transfinite Surface "*";
Recombine Surface "*";
Transfinite Volume "*";
That would be cool. I would than have a look how this could be integrated in the FreeCAD GMSH mesh object.sodelo wrote:So what I can do is post an example of a geometry prepared with Freecad and write the GEO file with all the commands for a nicely controlled mesh definition.
This is possible. Workflow will be similar to the MeshRegion Object. But it will take some days to implement ...sodelo wrote:Hope you can automatically generate this kind of GEO file!