issues with region meshing and jac < 0 (0.19dev master)
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: issues with region meshing and jac < 0 (0.19dev master)
I will try it.
Yes, gmsh-4.7.1
Greetings
user1234
Yes, gmsh-4.7.1
Greetings
user1234
Re: issues with region meshing and jac < 0 (0.19dev master)
So i tested directly in gmsh.
Here the output from the good 2nd order shaft.
Here the output from the bad 2nd order shaft. Same bad mesh like when i have done it in FreeCAD.
One stupid question: in the *.geo file are the lines like:What are the number in the brackets? In the documentation https://gmsh.info/doc/texinfo/gmsh.html i found nothing when i searched "Characteristic".
Thanks and Greetings
user1234
Here the output from the good 2nd order shaft.
Here the output from the bad 2nd order shaft. Same bad mesh like when i have done it in FreeCAD.
One stupid question: in the *.geo file are the lines like:
Code: Select all
// Face8
Characteristic Length { 7, 13 } = 0.8;
Thanks and Greetings
user1234
Re: issues with region meshing and jac < 0 (0.19dev master)
node numbers AFAIK
Re: issues with region meshing and jac < 0 (0.19dev master)
yes node numbes from the region with the length given for meshing. https://github.com/FreeCAD/FreeCAD/blob ... ls.py#L683
Re: issues with region meshing and jac < 0 (0.19dev master)
Hello!
So i spent some time into meshing and now i am a little bit wiser than before. Now i know some rules for meshing with gmsh.
- If you have more regions to mesh, you have also to mesh the regions on the neighbor faces, else it could be that the purpose mesh region will be ignored (mostly on torri).
- Torri (on a round part the fillets) should be defined at last, else they will be ignored.
- Meshing at first the rough meshes, then the fine meshes, else also some mesh region will be ignored.
- When defined boundaries edges, the whole surface will be defined the same. This is often too fine (RAM expensive).
Anyways gmsh ignores some regions, but much better than before. For example the long shaft part is too fine and feed RAM, even though it is defined rougher. But it works.
Greetings
user1234
So i spent some time into meshing and now i am a little bit wiser than before. Now i know some rules for meshing with gmsh.
- If you have more regions to mesh, you have also to mesh the regions on the neighbor faces, else it could be that the purpose mesh region will be ignored (mostly on torri).
- Torri (on a round part the fillets) should be defined at last, else they will be ignored.
- Meshing at first the rough meshes, then the fine meshes, else also some mesh region will be ignored.
- When defined boundaries edges, the whole surface will be defined the same. This is often too fine (RAM expensive).
Anyways gmsh ignores some regions, but much better than before. For example the long shaft part is too fine and feed RAM, even though it is defined rougher. But it works.
Greetings
user1234
Re: issues with region meshing and jac < 0 (0.19dev master)
Great!
What des the last picture mean. What can not be defined?
What des the last picture mean. What can not be defined?
Re: issues with region meshing and jac < 0 (0.19dev master)
works great here
Re: issues with region meshing and jac < 0 (0.19dev master)
Hello!
Thanks for looking for it!
On small parts with few surfaces, meshing regions works very good. But with parts with more faces (but also not big complicated parts), it does not work properly. If i want that the meshing works, i must always order the regions definitions in the tree. Else only one or two surfaces (out of four or five) will be meshed correctly (on ever part i tried) and get jacobian errors. Also when i try only get a valid mesh, i must define some regions, else i get jacobian errors because the elements big size differences.
For what i need to mesh regions? I often have long shafts with detailed ends. Mostly it is only for comparison with the calculations. But also i must be safe that all works. I am pretty sure, that you know what i mean as you are also a technician. And some nasty things on shafts are the transition from larger to smaller diameters.
For example:
Note, that is the half of the truth, because on the the FEM calculation is no Torque. But i think that is not possible in the way i needed. But FEM calculations is for me just for verification and analyze for possible unexpected results. Also note, that above is no real project. It is just a testcase for FreeCAD.
You did a great work in FreeCAD and thank you for that.
Sorry for bad english
Greetings
user1234
Thanks for looking for it!
On small parts with few surfaces, meshing regions works very good. But with parts with more faces (but also not big complicated parts), it does not work properly. If i want that the meshing works, i must always order the regions definitions in the tree. Else only one or two surfaces (out of four or five) will be meshed correctly (on ever part i tried) and get jacobian errors. Also when i try only get a valid mesh, i must define some regions, else i get jacobian errors because the elements big size differences.
For what i need to mesh regions? I often have long shafts with detailed ends. Mostly it is only for comparison with the calculations. But also i must be safe that all works. I am pretty sure, that you know what i mean as you are also a technician. And some nasty things on shafts are the transition from larger to smaller diameters.
For example:
This are the bearings of a shaft (greens circles). Because the force is vertical, i expect peaks on FEM calculations because the force are going till the tangent --> 90° when you looking into the shaft axis. So i wanted to only fine meshing the seams of the bearing, to get valid results (or better say, to get rid of the peaks, which are not real there). But when i did that, the whole surface is fine what is unnecessary. So i did that the other way. I defined the counter forces and fix the shaft only on points on the shaft. Now i get the expected results and also the real nasty peak, what i tried to get visual. I expected the peak, but when you calculate the shaft conventionally, you do not get the peak, see diagram above. Conventionally i get a maximum (first near, without running a running x --> on lenght of the shaft) of |39.78| N/(mm)^2 on bearing of the bigger side of the shaft.
Note, that is the half of the truth, because on the the FEM calculation is no Torque. But i think that is not possible in the way i needed. But FEM calculations is for me just for verification and analyze for possible unexpected results. Also note, that above is no real project. It is just a testcase for FreeCAD.
You did a great work in FreeCAD and thank you for that.
I did not understand from where you get the information how to fine MeshSize for breps. I digging the documentation in gmsh for hours and did not find that. Only when you built up a geometry IN gmsh and MeshSize. But not on brep imports and get nodes numbers for the imports.
Sorry for bad english
Greetings
user1234
Re: issues with region meshing and jac < 0 (0.19dev master)
This is still the case as of today, with yesterdays git build.bernd wrote: ↑Wed Dec 02, 2020 11:40 amyes, I have seen here and there problems with gmsh and this setting. Usually it should be deactivated by default, but is seams activated by default. Deactivate it with:
- Tools --> Edit Parameters
- Mod --> Fem --> General --> AnalysisGroupMeshing --> Double click on the word true --> a widget opens --> set it to false
- check Fem preferences
- restart FreeCAD to be sure the value is saved
Code: Select all
OS: Pop!_OS 22.04 LTS (pop:GNOME/pop)
Word size of FreeCAD: 64-bit
Version: 0.21.0.33127 (Git)
Build type: Unknown
Branch: master
Hash: a669e4423a32174eef1a65c65f718fb55ecf042f
Python 3.10.6, Qt 5.15.3, Coin 4.0.0, Vtk 7.1.1, OCC 7.5.1
Locale: English/United States (en_US)
Installed mods:
* fasteners 0.4.56
* kicadStepUpMod.backup1663010049.9382765
* Render 2023.2.3
* Help 1.0.3
* A2plus 0.4.60k
* fcgear 1.0.0
* lattice2 1.0.0
* kicadStepUpMod 10.18.8
Mine is set to 0, which shows up as None.
For the record, the tree in Parameter Editor to find the setting is now:
BaseApp > Preferences > Mod > Fem > General
For the record, this WRONG setting caused gmsh to repeatedly fail with cryptic messages. I wasted a lot of time with my models, trying to figure this out. Please, please change this default for the next build. This is a totally unnecessary gotcha, that doesn't need to exist!