feature request: Viewing and editing OpenFOAM blockMeshDict in FreeCAD?
Moderator: oliveroxtoby
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: feature request: Viewing and editing OpenFOAM blockMeshDict in FreeCAD?
cool
BTW: does blockMeshDict really have not file extension at all?
BTW: does blockMeshDict really have not file extension at all?
Re: feature request: Viewing and editing OpenFOAM blockMeshDict in FreeCAD?
don't know if it's handy but i found this: https://openfoamwiki.net/index.php/BlockMesh
-
- Veteran
- Posts: 3156
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: feature request: Viewing and editing OpenFOAM blockMeshDict in FreeCAD?
My 2 cent...
After running blockmesh with bluecfd-core console:
Load mesh (blockmesh.pvsm) in paraview (use „file/load state“).
I tried to export a FC-usable fem mesh from paraview. The only what
I get in the end is the surface mesh display in fem-pipeline. The imported „mesh“
was scaled down by a factor of 1000.
@bernd:
In openfoam, there is a command (ideasUnvToFoam) for transforming
a unv-mesh to openfoam polymesh, but not reverse. (or have I something overlooked...)
BlockMeshDict line 17, convertToMeters:
this is a scaling factor. The x/y/z coordinates of the vertices are given in meters.
In reality, the body is only 30 cm long.
BlockmeshDict: vertices which have y=0 coordinate are not necessary to
construct the flow-domain. They are helping points inside the volume for mesh-refinement.
BlockMeshdict lines 85 ff: commands for mesh-refinement.
It should be easier to reconstruct a mesh from the point-file in polymesh folder.
For description of polymesh please see openfoam user guide page 139.
http://foam.sourceforge.net/docs/Guides ... ide-A4.pdf
Very useful tutorial how to use the blockMesh dict:
https://www.youtube.com/watch?v=Ds0eK1wXMks
I ran the pitzdaily-test case in cfd-wb using cf-mesh. Instead of snappyhexmesh,
cfmesh uses no background mesh (the blockmesh).
The zip contains the paraview/Freecad files and the openfoam polymeshes
after running blockmesh/cfmesh.
After running blockmesh with bluecfd-core console:
Load mesh (blockmesh.pvsm) in paraview (use „file/load state“).
I tried to export a FC-usable fem mesh from paraview. The only what
I get in the end is the surface mesh display in fem-pipeline. The imported „mesh“
was scaled down by a factor of 1000.
@bernd:
In openfoam, there is a command (ideasUnvToFoam) for transforming
a unv-mesh to openfoam polymesh, but not reverse. (or have I something overlooked...)
BlockMeshDict line 17, convertToMeters:
this is a scaling factor. The x/y/z coordinates of the vertices are given in meters.
In reality, the body is only 30 cm long.
BlockmeshDict: vertices which have y=0 coordinate are not necessary to
construct the flow-domain. They are helping points inside the volume for mesh-refinement.
BlockMeshdict lines 85 ff: commands for mesh-refinement.
It should be easier to reconstruct a mesh from the point-file in polymesh folder.
For description of polymesh please see openfoam user guide page 139.
http://foam.sourceforge.net/docs/Guides ... ide-A4.pdf
Very useful tutorial how to use the blockMesh dict:
https://www.youtube.com/watch?v=Ds0eK1wXMks
I ran the pitzdaily-test case in cfd-wb using cf-mesh. Instead of snappyhexmesh,
cfmesh uses no background mesh (the blockmesh).
The zip contains the paraview/Freecad files and the openfoam polymeshes
after running blockmesh/cfmesh.
Re: feature request: Viewing and editing OpenFOAM blockMeshDict in FreeCAD?
If look for FreeCAD, we are already mentioned thereJee-Bee wrote: ↑Thu Aug 23, 2018 12:11 pm don't know if it's handy but i found this: https://openfoamwiki.net/index.php/BlockMesh
Re: feature request: Viewing and editing OpenFOAM blockMeshDict in FreeCAD?
The whole point of this idea is to be able to debug the controlMeshDict file without generating the mesh.thschrader wrote: ↑Thu Aug 23, 2018 2:46 pm My 2 cent...
After running blockmesh with bluecfd-core console:
Load mesh (blockmesh.pvsm) in paraview (use „file/load state“).
I tried to export a FC-usable fem mesh from paraview. The only what
I get in the end is the surface mesh display in fem-pipeline. The imported „mesh“
was scaled down by a factor of 1000.
-
- Veteran
- Posts: 3156
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: feature request: Viewing and editing OpenFOAM blockMeshDict in FreeCAD?
Can you post a controlMeshdict?
In my tutorials (I use bluecfd-core 2017-2) is not one...
Isnt the information in blockMeshDict enough to reconstruct a mesh?
The cfd-wb in FC writes the case-files automatically. When having
complex geometries, this saves a lot of work. Try to write a blockMeshdict
by hand for a H-beam with holes...
Re: feature request: Viewing and editing OpenFOAM blockMeshDict in FreeCAD?
Every example must have a blockMeshDict file, unless external programs like Gmsh has been used for mesh generation. The file should be found in the case folder under system folder. Here in this GitGub Gist I have provided the latest version of the script, plus a sample blockMeshDict file (worse case scenario), plus other information.thschrader wrote: ↑Thu Aug 23, 2018 3:36 pm Can you post a controlMeshdict?
In my tutorials (I use bluecfd-core 2017-2) is not one...
Ideally yes, except writing a huge file representing a complicated geometry is very intuitive and many people, including me, have problems. There not many tools available to debug the file.thschrader wrote: ↑Thu Aug 23, 2018 3:36 pm Isnt the information in blockMeshDict enough to reconstruct a mesh?
Would you please elaborate on this?thschrader wrote: ↑Thu Aug 23, 2018 3:36 pm The cfd-wb in FC writes the case-files automatically. When having
complex geometries, this saves a lot of work. Try to write a blockMeshdict
by hand for a H-beam with holes...
- oliveroxtoby
- Posts: 837
- Joined: Fri Dec 23, 2016 9:43 am
- Location: South Africa
Re: feature request: Viewing and editing OpenFOAM blockMeshDict in FreeCAD?
Just to give my perspective. OpenFOAM also includes snappyHexMesh, which is a cut-cell cartesian mesher that is better suited to complex or dirty geometries. cfMesh is an alternative, and CfdOF supports both snappy and cfMesh's cut-cell cartesian mesher. Our focus is more towards hands-off, more automated tools.
That said, blockMesh certainly has its place, and it's possible to create incredibly beautiful and high quality structured meshes with it, and with a lot of work one can go to surprisingly complex geometries. For that, one can't really do without a tool like the one being discussed here. These structured meshes have the potential to yield a more accurate solution due to better quality cells and more gradual gradations between cell sizes. The investment in time is usually only worth it if one is doing a lot of analyses on the same mesh (rather than using the brute-force approach of increasing the refinement level of a less labour-intensive mesher), but it certainly has its uses.
That said, blockMesh certainly has its place, and it's possible to create incredibly beautiful and high quality structured meshes with it, and with a lot of work one can go to surprisingly complex geometries. For that, one can't really do without a tool like the one being discussed here. These structured meshes have the potential to yield a more accurate solution due to better quality cells and more gradual gradations between cell sizes. The investment in time is usually only worth it if one is doing a lot of analyses on the same mesh (rather than using the brute-force approach of increasing the refinement level of a less labour-intensive mesher), but it certainly has its uses.
Please provide all the information requested in this post before reporting problems with CfdOF.
Re: feature request: Viewing and editing OpenFOAM blockMeshDict in FreeCAD?
Guys, is there any chance we can move this thread to the CFD CfdOF forum? They are already working on an penFOAM-FreeCAD integration!