2D-meshing in cfd

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

thschrader
Posts: 1331
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

2D-meshing in cfd

Postby thschrader » Sun Jul 29, 2018 10:42 am

I tried to use 2D-meshing (gmsh) in cfd-wb.
Extract 2D-shape from body using facebinder-tool in arch-wb.
FEM-meshing works for 2D, but cfd gives back error
„For 2D meshing, two parallel 2D bounding planes must be present as boundary conditions in the CFD analysis object.“
Is there a special workflow?
system:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14098 (Git)
Build type: Release
Branch: master
Hash: 0c33d00bfdf8270e7e5b33d792bf0ad9bbbfc819
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
model.JPG
model.JPG (57.07 KiB) Viewed 489 times
2D_gmsh_cfd.JPG
2D_gmsh_cfd.JPG (88.19 KiB) Viewed 489 times
User avatar
oliveroxtoby
Posts: 216
Joined: Fri Dec 23, 2016 9:43 am

Re: 2D-meshing in cfd

Postby oliveroxtoby » Mon Jul 30, 2018 6:14 am

thschrader wrote:
Sun Jul 29, 2018 10:42 am
I tried to use 2D-meshing (gmsh) in cfd-wb.
Extract 2D-shape from body using facebinder-tool in arch-wb.
FEM-meshing works for 2D, but cfd gives back error
„For 2D meshing, two parallel 2D bounding planes must be present as boundary conditions in the CFD analysis object.“
Is there a special workflow?
Yes - create a 3D shape, then assign the CFD boundary 'constraint/2D bounding plane' to the front and back surfaces (which must be parallel and planar). Then mesh as normal.
thschrader
Posts: 1331
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: 2D-meshing in cfd

Postby thschrader » Mon Jul 30, 2018 4:14 pm

oliveroxtoby wrote:
Mon Jul 30, 2018 6:14 am
Yes - create a 3D shape, then assign the CFD boundary 'constraint/2D bounding plane' to the front and back surfaces (which must be parallel and planar). Then mesh as normal.
Thanks for the tip, it works.
2D is a nice option, saves a lot of computing time.
The solver storms through the calculation...
2D_run.JPG
2D_run.JPG (38.42 KiB) Viewed 446 times
julieng
Posts: 38
Joined: Sun Nov 25, 2018 8:57 pm

Re: 2D-meshing in cfd

Postby julieng » Sun Dec 16, 2018 10:43 am

Hello,

I add the bounding planes parrallel but I have always the error message telling that I am not using them.
Something to activate somewhere?

Image
[/img]


Best regards

Julien
julieng
Posts: 38
Joined: Sun Nov 25, 2018 8:57 pm

Re: 2D-meshing in cfd

Postby julieng » Sun Dec 16, 2018 12:43 pm

Image
Image
thschrader
Posts: 1331
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: 2D-meshing in cfd

Postby thschrader » Sun Dec 16, 2018 1:48 pm

julieng wrote:
Sun Dec 16, 2018 10:43 am
I add the bounding planes parrallel but I have always the error message telling that I am not using them.
Something to activate somewhere?
Put each 2D-bounding plane into a separate constraint-condition, see my file.
gmsh: works fine
cfmesh: meshing error at front-window
snappyhexmesh: gives allways a 3D-mesh (?) :o
VW_Beetle.FCStd
(109.23 KiB) Downloaded 7 times
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15399 (Git)
Build type: Release
Branch: master
Hash: 9683abfc36c3e9e94b9175428ec9491b869a6b97
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
2D_bounding_planes.JPG
2D_bounding_planes.JPG (39.98 KiB) Viewed 245 times
cfmesh.JPG
cfmesh.JPG (91.73 KiB) Viewed 245 times
julieng
Posts: 38
Joined: Sun Nov 25, 2018 8:57 pm

Re: 2D-meshing in cfd

Postby julieng » Sun Dec 16, 2018 5:27 pm

Thank you, it works with gmsh but no boundary layers are avalaible with gmsh. Only refinement on surfaces but I don't see any change in the mesh when I use or not these feature.

Now I want to try to calculate the lift and drag force acting on a surface ... Seems difficult, I start with your post on the topic "computing forces:how to setup proper simulation" https://forum.freecadweb.org/viewtopic.php?f=37&t=26923.

How can do to calculate the force acting on the surface of the circle?
Image

I don't know exactly how to start, maybe the paraview documentation or some tutorial?

Best regards

Julien
thschrader
Posts: 1331
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: 2D-meshing in cfd

Postby thschrader » Sun Dec 16, 2018 6:19 pm

julieng wrote:
Sun Dec 16, 2018 5:27 pm
I don't know exactly how to start, maybe the paraview documentation or some tutorial?
Have a look at this tutorial please.
https://www.youtube.com/watch?v=J944HOj_4b0
julieng
Posts: 38
Joined: Sun Nov 25, 2018 8:57 pm

Re: 2D-meshing in cfd

Postby julieng » Sun Dec 16, 2018 9:34 pm

Thank you very much for your help.

I see also some add-on workbench on the forum.

Image

Is these tools are usefull for the post processing ?

I install the workbench DesignPhysics, but I don't know how to put it visible on the FreeCAD windows.

Best regards

Julien
thschrader
Posts: 1331
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: 2D-meshing in cfd

Postby thschrader » Sun Dec 16, 2018 11:04 pm

julieng wrote:
Sun Dec 16, 2018 9:34 pm
Is these tools are usefull for the post processing ?
No, for openfoam results definitly not. Designsphysics is the Freecad-GUI for the dualsphysics-solver,
which uses a particle-method (point cloud). It is mainly used for free surface flow.
Advantage: writing the point cloud (the "mesh) goes superfast, even with millions of points.
Disadvantage: you need a really fast machine...
But it is interesting and cool stuff. Have a look at the tutorials
https://www.youtube.com/watch?v=uQ_vVYTRZZk
https://www.youtube.com/watch?v=B8mP9E75D08
http://design.sphysics.org/
http://www.dual.sphysics.org/