2D meshing

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

Post Reply
User avatar
oliveroxtoby
Posts: 629
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

2D meshing

Post by oliveroxtoby »

In version 1.11.1 there has been a change to the method of creating a 2D mesh in CfdOF.

At present, CfdOF doesn't support any native 2D meshers. Instead, the way to generate a 2D mesh is to generate a 3D mesh and then extrude a single layer of cells from one of its faces. Previously this was accomplished by specifying front and back faces as special "2D bounding plane" boundary conditions, with the extrusion operation being handled in the background by CfdOF. However, this approach did not extend well to the case of generating a 'wedge' mesh for an axisymmetric analysis.

The 2D mesh extrusion is now handled explicitly as an extrusion operation defined as a mesh refinement region (CfdOF | Mesh refinement | Extrusion). This allows for the creation of both planar 2D meshes and 2D wedge meshes, but also more general extrusions such as generating 3D sectors and extrusions that extend exising meshes with layers of cells at boundary patches.
Please provide all the information requested in this post before reporting problems with CfdOF.
thschrader
Veteran
Posts: 2580
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: 2D meshing

Post by thschrader »

2D-meshing now:
Create additional MeshRefinement-object in model-tree, open dialog,
select Extrusion, Extrusion type=2D planar, set thickness.
Select Face, add. Run mesher, selected face is extruded to a 2D-mesh,
2 more patch entries in createPatchDict.
Example-file:
naca2412.FCStd
(384.53 KiB) Downloaded 37 times
pic1.JPG
pic1.JPG (97.23 KiB) Viewed 2134 times


How to use these guys?
pic2.JPG
pic2.JPG (69.35 KiB) Viewed 2134 times

Done with
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.27428 (Git)
Build type: Release
Branch: master
Hash: 27460358508a2057e0ec57a418641435f12628dd
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: German/Germany (de_DE)
thschrader
Veteran
Posts: 2580
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: 2D meshing

Post by thschrader »

2D-wedge-mesh axisymmetric.
blue_origin_capsule.FCStd
(845.44 KiB) Downloaded 37 times
capsule_reentry.JPG
capsule_reentry.JPG (71.18 KiB) Viewed 1783 times
thschrader
Veteran
Posts: 2580
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: 2D meshing

Post by thschrader »

Just updated
cfdof-wb
hisa 1.6.1
cfmesh-cfdof (1.1.2) 1.12

2D planar meshing works with naca example from above
2D wedge meshing gives back error with capsule example from above, see log
2D patch normal/rotational meshing: not tested

Code: Select all

--> FOAM FATAL IO ERROR: 
keyword axisPt is undefined in dictionary "C:/GA-NT/Anwendungen/TS_513538/CFD/meshCase/system/extrudeMeshDict/sectorCoeffs"
file: C:/GA-NT/Anwendungen/TS_513538/CFD/meshCase/system/extrudeMeshDict/sectorCoeffs from line 28 to line 30.

    From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 799.

FOAM exiting
Done with bluecfd and
OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.27428 (Git)
Build type: Release
Branch: master
Hash: 27460358508a2057e0ec57a418641435f12628dd
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: German/Germany (de_DE)
User avatar
oliveroxtoby
Posts: 629
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: 2D meshing

Post by oliveroxtoby »

thschrader wrote: Sun Mar 20, 2022 10:00 am

Code: Select all

--> FOAM FATAL IO ERROR: 
keyword axisPt is undefined in dictionary "C:/GA-NT/Anwendungen/TS_513538/CFD/meshCase/system/extrudeMeshDict/sectorCoeffs"
file: C:/GA-NT/Anwendungen/TS_513538/CFD/meshCase/system/extrudeMeshDict/sectorCoeffs from line 28 to line 30.

    From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 799.

FOAM exiting
Sorry - this was caused by an OpenCFD vs Foundation divergence. Should be working now.
adrianinsaval
Veteran
Posts: 2672
Joined: Thu Apr 05, 2018 5:15 pm

Re: 2D meshing

Post by adrianinsaval »

to simulate a 2d case, what boundary conditions do I need to set for the faces parallel to the 2D plane?
User avatar
oliveroxtoby
Posts: 629
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: 2D meshing

Post by oliveroxtoby »

adrianinsaval wrote: Sat May 21, 2022 9:48 pm to simulate a 2d case, what boundary conditions do I need to set for the faces parallel to the 2D plane?
No boundary condition should be specified - these will be set automatically.
Post Reply