BoundaryLayer setup for Gmsh 2D and 3D meshing, please help to test
Posted: Fri Jun 16, 2017 8:38 am
## introduction to boundary layer
precise control of the thickness of the first cell normal to wall, is crucial for turbulence models like k-epsilon, k-omega. This function is required by CFD workbench, but could be useful for other CAE domains. The velocity gradient near wall is so high that near wall mesh need to be very fine to catch flow condition in turbulence boundary layer.
https://en.wikipedia.org/wiki/Boundary_layer
==============================
## solution with Gmsh
I have been thinking about this since last year, just recent I have done some test outside of FreeCAD, as kind of feasibility study. geo can not been uploaded, but it is on my website
see my webpage http://www.iesensor.com/blog/2017/06/16 ... d-meshing/
The boundary layer is hard to see, meshing bisect may illustrate it better. but it do work some single body.
Now I am turning into coding, a new class "FemMeshBoundaryLayer" is added, holding setup information.
this function is built on his work of FemMeshRegion, Thanks for bernd.
Gmsh boundary meshing is not robust like commercial tool like Ansys workbench, so it may fail for complex geometry. but anyway, you can substitute the coarse mesh generated by FEM/CFD workbench with some better one after the initial evaluation in GUI.
Also mentioned, OpenFOAM CFD workbench use cfmesh and snappyHexMesh of OpenFOAM for boundarlyer refinement.
https://github.com/jaheyns/CfdFoam/blob ... rtTools.py
==================================
## basic implementation is done
https://github.com/qingfengxia/FreeCAD.git
* [new branch] boundarylayer -> boundarylayer
https://github.com/qingfengxia/FreeCAD/ ... ndarylayer
only one boundary setting bbject/Field can be applied, but multiple boundary faces can be selected.
2D meshing can get a result and shown up in taskpanel.
Although solid mechanics does not need a boundary layer, but it should not hurt. I can get result, but not sure it is realistic
3D is also possible, but boundary layer can only been viewed in wireframe view mode
3D data file is too big to upload to this forum.
set up boundary mesh parameters could be trick, so try my 2D case first for testing the ends of boundary layer is not good, I am not sure if fan angle could help
-----------------------
## bugs to resolve (solved 2017-07-31)
issue 1: FemMeshBoundaryLayer, properties can not been changed in taskpanel: 2 of then can be updated now, only one left: thickness
> solved, my stupid error after copy and paste
issue 2: in reference box, selected geometry element will not show up until next element is clicked
> user must click "Add reference" button, then click goemetry, it is not bug but I miss out the user manual
issue 3: 3D result can not been shown, error 'FEM: Result node numbers are not equal to FEM Mesh NodeCount.'
> solved, 3D result can be shown properly in result task panel, as the figure attached.
For mesh algorithm, only a few 2DAlgorithms are usable with 3D boundary layer generation, DelQuad/Frontal are tested to be usable!
Only half of faces for 2D meshing can be shown in FreeCAD , but the mesh and result show properly in paraview.
issue 4: Also solve the bug: after femobject renaming, FemMaterialFluid command failed for name mismatching
> fixed
precise control of the thickness of the first cell normal to wall, is crucial for turbulence models like k-epsilon, k-omega. This function is required by CFD workbench, but could be useful for other CAE domains. The velocity gradient near wall is so high that near wall mesh need to be very fine to catch flow condition in turbulence boundary layer.
https://en.wikipedia.org/wiki/Boundary_layer
==============================
## solution with Gmsh
I have been thinking about this since last year, just recent I have done some test outside of FreeCAD, as kind of feasibility study. geo can not been uploaded, but it is on my website
see my webpage http://www.iesensor.com/blog/2017/06/16 ... d-meshing/
The boundary layer is hard to see, meshing bisect may illustrate it better. but it do work some single body.
Now I am turning into coding, a new class "FemMeshBoundaryLayer" is added, holding setup information.
this function is built on his work of FemMeshRegion, Thanks for bernd.
Gmsh boundary meshing is not robust like commercial tool like Ansys workbench, so it may fail for complex geometry. but anyway, you can substitute the coarse mesh generated by FEM/CFD workbench with some better one after the initial evaluation in GUI.
Also mentioned, OpenFOAM CFD workbench use cfmesh and snappyHexMesh of OpenFOAM for boundarlyer refinement.
https://github.com/jaheyns/CfdFoam/blob ... rtTools.py
==================================
## basic implementation is done
https://github.com/qingfengxia/FreeCAD.git
* [new branch] boundarylayer -> boundarylayer
https://github.com/qingfengxia/FreeCAD/ ... ndarylayer
only one boundary setting bbject/Field can be applied, but multiple boundary faces can be selected.
2D meshing can get a result and shown up in taskpanel.
Although solid mechanics does not need a boundary layer, but it should not hurt. I can get result, but not sure it is realistic
3D is also possible, but boundary layer can only been viewed in wireframe view mode
3D data file is too big to upload to this forum.
set up boundary mesh parameters could be trick, so try my 2D case first for testing the ends of boundary layer is not good, I am not sure if fan angle could help
-----------------------
## bugs to resolve (solved 2017-07-31)
issue 1: FemMeshBoundaryLayer, properties can not been changed in taskpanel: 2 of then can be updated now, only one left: thickness
> solved, my stupid error after copy and paste
issue 2: in reference box, selected geometry element will not show up until next element is clicked
> user must click "Add reference" button, then click goemetry, it is not bug but I miss out the user manual
issue 3: 3D result can not been shown, error 'FEM: Result node numbers are not equal to FEM Mesh NodeCount.'
> solved, 3D result can be shown properly in result task panel, as the figure attached.
For mesh algorithm, only a few 2DAlgorithms are usable with 3D boundary layer generation, DelQuad/Frontal are tested to be usable!
Only half of faces for 2D meshing can be shown in FreeCAD , but the mesh and result show properly in paraview.
issue 4: Also solve the bug: after femobject renaming, FemMaterialFluid command failed for name mismatching
> fixed