|
[Sponsors] |
[blockMesh] Extend blockMesh with smoothing capability |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 24, 2015, 16:20 |
|
#21 |
Senior Member
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20 |
Hello,
really promising tool. I recently started playing around with it. I am just wondering how the block stuctures are created? The tutorial consists of several blocks with a quite complex blocking. Are there tools out to create this? Edit: After first tests I have some issues: extBlockMesh crashes: Code:
Analyse features - Number of feature points: 14 - Number of edge points: 1203 - Number of boundary points: 31357 - Number of interior points: 312543 Smoother initialized in 21.05 s Smooth the mesh | Iteration | Mean qual | Min qual | Time |Smooth type|Nb pts move| Nb relax |Nb unsnaped| |-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------| | 0 | 0.6903 | 0.3521 | 0.00 | mean | 0 | 0 | 0 | #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib64/libc.so.6" #3 Foam::SmootherCell::tetCellQuality(int) const at ??:? #4 Foam::SmootherCell::computeQuality() at ??:? #5 Foam::MeshSmoother::analyseMeshQuality(Foam::HashSet<int, Foam::Hash<int> > const&) at ??:? #6 Foam::MeshSmoother::iterativeNodeRelaxation(Foam::HashSet<int, Foam::Hash<int> >&, Foam::List<double> const&) at ??:? #7 Foam::MeshSmoother::GETMeSmoothing() at ??:? #8 Foam::MeshSmoother::runIteration() at ??:? #9 Foam::MeshSmoother::update() at ??:? #10 ? at ??:? #11 __libc_start_main in "/lib64/libc.so.6" #12 ? at ??:? |
|
January 25, 2016, 02:52 |
|
#22 |
New Member
Nathanaël Geng
Join Date: May 2012
Posts: 18
Rep Power: 13 |
Hello Bastil,
Sorry for the delay with my answer. If it's not confidential, could you share the BlockMeshDict please? Thanks in advance! Nathanaël. |
|
August 25, 2016, 05:04 |
|
#23 |
Member
Petr Furmanek
Join Date: Jan 2012
Location: Faenza, Italy
Posts: 66
Rep Power: 14 |
Very nice tool indeed! Just btw. has anyone tried to compile it under OpenFOAM 3 of 4? So far I haven't been successful - gettin the error
ake/linux64GccDPInt32Opt/Point/Features/SmootherSurface.o Make/linux64GccDPInt32Opt/BoundaryLayer/SmootherBoundaryLayer.o -L/opt/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt32Opt/lib \ -lblockMesh -lmeshTools -ledgeMesh -lfiniteVolume -ldynamicMesh -o /home/furmanek/OpenFOAM/furmanek-3.0.x/platforms/linux64GccDPInt32Opt/lib/libMeshSmoother.so g++: error: Make/linux64GccDPInt32Opt/MeshSmoother.o: No such file or directory g++: error: Make/linux64GccDPInt32Opt/SmootherBoundary.o: No such file or directory g++: error: Make/linux64GccDPInt32Opt/SmootherControl.o: No such file or directory ... |
|
August 25, 2016, 05:20 |
|
#24 |
Senior Member
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 17 |
I compiled it using OpenFoam-dev, 9 months ago. Therefore, I think it should work with OF-3 at least. You can try it.
https://github.com/HIKassem/extBlockMesh |
|
August 25, 2016, 06:01 |
|
#25 |
Member
Petr Furmanek
Join Date: Jan 2012
Location: Faenza, Italy
Posts: 66
Rep Power: 14 |
Perfect - this one works. Thanks a lot!
|
|
February 13, 2017, 14:38 |
|
#26 |
Senior Member
Timofey Mukha
Join Date: Mar 2012
Location: Stockholm, Sweden
Posts: 118
Rep Power: 14 |
Seems like a great tool!
For me wmake would not run under OF 3.0.1 until I renamed all .cpp files to .C, then compilcation went without problems. I guess it is best to stick with the OF defaults. I'm trying to run the hexMeshSmoother on a case, but can't quite get past the first iteration.. Are there any general guidelines for the parameters? Best, Timofey |
|
February 13, 2017, 14:39 |
|
#27 | |
Senior Member
Timofey Mukha
Join Date: Mar 2012
Location: Stockholm, Sweden
Posts: 118
Rep Power: 14 |
Quote:
|
||
February 24, 2017, 10:48 |
|
#28 |
New Member
Scotland
Join Date: Dec 2014
Posts: 2
Rep Power: 0 |
Hi guys,
First extBlockMesh seems to be a great tool. I'm trying to mesh a geometry similar with a sphere (with an indentation in the front), with a cube in the middle and more six blocks. My initial geometry is a cube inside other, with the second one with curved edges, and then I use the extBlockMesh to intersect the .stl with my final geometry. If I use the same number of cells in all the directions, it gives me a good result (in the picture mesh1 it has 20 cells in each direction for all the blocks). However I want to have the same length size for the radial direction, or even smaller ones close to the wall. When I try to use simpleGrading for that, it doesn't make any difference, no matter the value I put for the radial direction, in the end I always end up with the same mesh. So I tried to increase the number of cells in the radial direction to see if I could get smaller cells close to the boundary. Instead of that the cube in the middle got smaller but the size of the cells next to the walls is exactly the same (see picture mesh2). After several tests I concluded that the simpleGrading in the blockMeshDict, doesn't help me, because no matter what value I use, for the same number of cells I end up with the same mesh. Do you know if there's something that I can play with in the smotherDict to help me to have cells with the same length in the radial direction? or even with a grade that allows me to have more refined meshes close to the wall? Thanks in advance! |
|
January 10, 2018, 18:19 |
MeshSmoother in parallel
|
#29 |
Senior Member
Robert Castilla
Join Date: Apr 2009
Location: Spain
Posts: 109
Rep Power: 17 |
Dear all,
This is the tool I was looking for. I need it with a dynamic mesh that is becoming very distorted with the laplacian velocity motion solver. My main problem now is that the MeshSmoother library is not prepared for parallel computation. I am not an expert in OpenFoam programming, so I don't feel really skilled to implement that. Would it be difficult? With best regards Robert |
|
February 28, 2019, 08:25 |
|
#30 |
Member
Henrik Johansson
Join Date: Oct 2017
Location: Gothenburg
Posts: 38
Rep Power: 8 |
Hi,
Great addition to the blockMesh. Good work! I have now successfully compiled it with OpenFOAM 5.0. The tutorial case runs great. But running my mesh I get the following error: Code:
Initialize smoother algorithm smoothControls: - Max iterations : 500 - Tranformation parameter : 0.9 - Mean improvement tolerance : 0.01 - Max ineffective iteration : 1 - Mean relaxation table : 4(1 0.25 0.125 0) - Min relaxation table : 3(0.25 0.125 0) - Snap relaxation table : 6(1 0.5 0.25 0.1 0.05 0) snapControls: - Feature angle : 152 - Min edges for features : 0 - Min feature edge length : 1e-20 - Boundary specifications : Analyse features #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigSegv::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::SmootherBoundary::analyseBoundaryFace(int, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >&, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >&) at ??:? #4 Foam::SmootherBoundary::analyseFeatures(Foam::List<Foam::HashSet<int, Foam::Hash<int> > >&, std::set<std::set<int, std::less<int>, std::allocator<int> >, std::less<std::set<int, std::less<int>, std::allocator<int> > >, std::allocator<std::set<int, std::less<int>, std::allocator<int> > > >&) at ??:? #5 Foam::SmootherBoundary::SmootherBoundary(Foam::dictionary&, Foam::polyMesh*) at ??:? #6 Foam::MeshSmoother::MeshSmoother(Foam::polyMesh*, Foam::dictionary*, Foam::blockMesh*) at ??:? #7 ? at ??:? #8 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #9 ? at ??:? Segmentation fault (core dumped) Code:
iter = p2s.find(f[ptPoly[ptI]]); Code:
ptI = 0 ptPoly = 3(15990096 15990097 15990098) ptPoly[pti] = 15990096 f = 4(3320 3325 3355 3350) Anyone have any idea to solve this problem?
__________________
/ Henrik Johansson Last edited by HenrikJohansson; March 4, 2019 at 07:50. |
|
March 22, 2019, 08:18 |
|
#31 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 20 |
I was quite fond of this meshSmoother. Just a quick note for those trying to compile it under versions 1706 -->1812. It won't work because a constructor in fvMesh was defeatured. You hence need to change the fvMesh class which I wouldn't recommend unless you know what you are doing. It should however be possible to compile with openfoam 5 and 6. You might need to change edgeMesh to surfMesh and the headerOk to typeHeaderOk<....
|
|
September 17, 2019, 02:55 |
|
#32 |
New Member
Youjiang Wang
Join Date: Apr 2015
Location: Hamburg
Posts: 22
Rep Power: 11 |
Update : solved (by adapting some function names).
Has anyone tried to make this work for the current OpenFoam version. I found the ability in extBlockMesh very useful. But when I compile it with OpenFoam-v1906, I encountered many errors. To install old version OpenFoam on my computer (openSUSE 15.1) seems also not so easy. Thanks Last edited by wyj216; September 17, 2019 at 11:43. |
|
September 17, 2019, 03:56 |
|
#33 |
New Member
Nathanaël Geng
Join Date: May 2012
Posts: 18
Rep Power: 13 |
Could you please post your compilation output.
|
|
September 17, 2019, 11:43 |
|
#34 |
New Member
Youjiang Wang
Join Date: Apr 2015
Location: Hamburg
Posts: 22
Rep Power: 11 |
Thank you for your concern. One experienced colleage has helped me to make it work. Some function names must be updated, but I really do not know the details.
However, I attached the first complilation output after I changed edgeMesh to surfMesh, and also rename *.cpp to *.C (this is necessary on my computer to make wmake work). Hope it helps anyone. Screenshot_20190917_174547.jpg |
|
September 17, 2019, 12:18 |
|
#35 |
New Member
Youjiang Wang
Join Date: Apr 2015
Location: Hamburg
Posts: 22
Rep Power: 11 |
Hi, Nathanaël, I am just try to test it for my case. My case is a 2D foil, the output is quite similar to the errors already encountered by others. As below:
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Initialize smoother algorithm smoothControls: - Max iterations : 500 - Tranformation parameter : 0.666 - Mean improvement tolerance : 0.0001 - Max ineffective iteration : 5 - Mean relaxation table : 4(1 0.25 0.125 0) - Min relaxation table : 3(0.25 0.125 0) - Snap relaxation table : 6(1 0.5 0.25 0.1 0.05 0) snapControls: - Feature angle : 91 - Min edges for features : 0 - Min feature edge length : 1e-20 - Boundary specifications : Analyse features - Number of feature points: 10 - Number of edge points: 1642 - Number of boundary points: 90254 - Number of interior points: 0 Smoother initialized in 54.49 s Smooth the mesh | Iteration | Mean qual | Min qual | Time |Smooth type|Nb pts move| Nb relax |Nb unsnaped| |-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------| | 0 | 0.1238 | 0.0001 | 0.00 | mean | 0 | 0 | 0 | #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in /lib64/libc.so.6 #3 Foam::SmootherCell::tetCellQuality(int) const at ??:? #4 Foam::SmootherCell::computeQuality() at ??:? #5 Foam::MeshSmoother::analyseMeshQuality(Foam::HashSet<int, Foam::Hash<int> > const&) at ??:? #6 Foam::MeshSmoother::iterativeNodeRelaxation(Foam::HashSet<int, Foam::Hash<int> >&, Foam::List<double> const&) at ??:? #7 Foam::MeshSmoother::GETMeSmoothing() at ??:? #8 Foam::MeshSmoother::runIteration() at ??:? #9 Foam::MeshSmoother::update() at ??:? #10 ? at ??:? #11 __libc_start_main in /lib64/libc.so.6 #12 ? at /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/x86_64/start.S:122 Floating point exception (core dumped) blockMeshDict.txt smootherDict.txt Last edited by wyj216; September 18, 2019 at 02:54. |
|
September 18, 2019, 08:10 |
|
#36 |
New Member
Nathanaël Geng
Join Date: May 2012
Posts: 18
Rep Power: 13 |
Your setup work well with the latest version which is not shared today. If you give me some mail by pm or so I can send you the polymesh as a tar.gz file (4mo).
|
|
October 2, 2020, 15:29 |
|
#37 |
New Member
anonymous
Join Date: Sep 2017
Posts: 3
Rep Power: 8 |
Is this still in active development?
BlockMesh/OpenFOAM is really lacking in mesh smoothing functionalities and this tool would greatly resolve the situation. I know this is an old thread but I can not compile under OF v2006. Does anyone have a tip or know of any other software (for OpenFOAM) with these capabilities? |
|
October 6, 2020, 14:18 |
|
#38 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,686
Rep Power: 40 |
Quote:
I've placed a merge request: https://github.com/HIKassem/extBlockMesh/pull/1 But on the assumption that it may not receive any attention, I'll also leave up my github fork for a while. https://github.com/olesenm/extBlockM...e/openfoam-com |
||
October 18, 2020, 17:04 |
Awesome
|
#39 | |
New Member
anonymous
Join Date: Sep 2017
Posts: 3
Rep Power: 8 |
Quote:
That sounds great. I will try it out and report how it is working out. Thank you very much for your efforts! |
||
January 14, 2021, 21:00 |
|
#40 |
Senior Member
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 6 |
I tried to compile all three version (Etudes-NG, HIKassem and olesenm) on OpenFoam v8 running in Docker, none of which succeded. olesenm's version gives the least errors, which are the following:
Code:
extBlockMesh.C: In function 'int main(int, char**)': extBlockMesh.C:154:9: error: 'xferCopy' was not declared in this scope xferCopy<pointField>(blocks.points()), ^~~~~~~~ extBlockMesh.C:154:9: note: suggested alternative: 'ferror' xferCopy<pointField>(blocks.points()), ^~~~~~~~ ferror extBlockMesh.C:154:28: error: expected primary-expression before '>' token xferCopy<pointField>(blocks.points()), ^ In file included from extBlockMesh.C:190:0: mergePatchPairs.H:122:35: error: 'VISIBLE' is not a member of 'Foam::intersection' intersection::VISIBLE ^~~~~~~ |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ANSYS Meshing] Smoothing options | siw | ANSYS Meshing & Geometry | 3 | August 13, 2019 07:40 |
[snappyHexMesh] Cylindrical blockmesh to Improve snappyHexMesh Results | nicholas.jones | OpenFOAM Meshing & Mesh Conversion | 3 | May 16, 2019 09:52 |
[blockMesh] set of xyz data in blockMesh | psk | OpenFOAM Meshing & Mesh Conversion | 12 | August 27, 2013 08:37 |
[mesh manipulation] Smoothing a mesh from blockMesh | vatavuk | OpenFOAM Meshing & Mesh Conversion | 3 | December 24, 2012 13:18 |
Hexa smoothing (ICEM CFD 10.0) | CFDworker | CFX | 3 | November 2, 2005 10:23 |