## 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
BoundaryLayer setup for Gmsh 2D and 3D meshing, please help to test
Moderator: bernd
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
-
- Posts: 222
- Joined: Tue Sep 22, 2015 1:47 pm
- Location: Oxford UK/Shenzhen China
- Contact:
BoundaryLayer setup for Gmsh 2D and 3D meshing, please help to test
Last edited by qingfeng.xia on Mon Jul 31, 2017 9:57 pm, edited 8 times in total.
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
Re: BoundaryLayer setup for Gmsh 2D and 3D meshing
could someone explain in simple words what a boundary layer is?
- kkremitzki
- Veteran
- Posts: 2417
- Joined: Thu Mar 03, 2016 9:52 pm
- Location: Illinois
Re: BoundaryLayer setup for Gmsh 2D and 3D meshing
A boundary layer is a region between a fluid and a boundary surface where "intermediate" effects rule. For example, if you have a puddle, there is not a discontinuous transition from "all water" to "all air". There is a very small intermediate boundary layer where all the evaporation is occurring, and there's a gradient across this layer from "all water" to "all air".
-
- Posts: 222
- Joined: Tue Sep 22, 2015 1:47 pm
- Location: Oxford UK/Shenzhen China
- Contact:
Re: BoundaryLayer setup for Gmsh 2D and 3D meshing
CSIR team are working on cfmesh, which I guess deals with same thing, viscous layer.
I have found the gmsh boundary layer can not shown up in FreeCAD even in wireframe mode for cylinder wall. boundary layer can only be viewed by cross section clip in paraview.
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
-
- Posts: 222
- Joined: Tue Sep 22, 2015 1:47 pm
- Location: Oxford UK/Shenzhen China
- Contact:
Re: BoundaryLayer setup for Gmsh 2D and 3D meshing, please help to test
I am working on this issue now, just finish rebase on 2017-07-31 master.
issues are solved, and PR are sent to upstream master
issues are solved, and PR are sent to upstream master
Last edited by qingfeng.xia on Mon Jul 31, 2017 10:14 pm, edited 1 time in total.
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
-
- Posts: 222
- Joined: Tue Sep 22, 2015 1:47 pm
- Location: Oxford UK/Shenzhen China
- Contact:
Re: BoundaryLayer setup for Gmsh 2D and 3D meshing
How to use this feature:
usage is quite similar with FemMeshRegion, once Gmsh object is created, FemmeshBoundaryLayer object can be added into gmsh object.
boundary layer are attached to the selected Edge (for 2D mesh) or faces for 3D mesh, 3 parameters can be setup to control boundary layers generation.
thickness (normal to the boundary edge/face) for the first layer on the boundary, it must be minimum thickness,
ratio of second layer thickness / first layer thickness, 1.3 - 2 for turbulence boundary layers
how many layers, usually a smooth transition of cell size from boundary to far field is preferred
3D test case for cantilever, based on example comes with FreeCAD Femworkbench
usage is quite similar with FemMeshRegion, once Gmsh object is created, FemmeshBoundaryLayer object can be added into gmsh object.
boundary layer are attached to the selected Edge (for 2D mesh) or faces for 3D mesh, 3 parameters can be setup to control boundary layers generation.
thickness (normal to the boundary edge/face) for the first layer on the boundary, it must be minimum thickness,
ratio of second layer thickness / first layer thickness, 1.3 - 2 for turbulence boundary layers
how many layers, usually a smooth transition of cell size from boundary to far field is preferred
3D test case for cantilever, based on example comes with FreeCAD Femworkbench
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
Re: BoundaryLayer setup for Gmsh 2D and 3D meshing, please help to test
Can we close issue #3111?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs