|
[Sponsors] |
[blockMesh] Extend blockMesh with smoothing capability |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 3, 2014, 11:58 |
Extend blockMesh with smoothing capability
|
#1 |
New Member
Nathanaël Geng
Join Date: May 2012
Posts: 18
Rep Power: 14 |
Hello,
For some time I have been working on writing an add-on in blockMesh in order to smooth the mesh. After compilation of the code located at Github link you simply need to add the following in your blockMeshDict: Code:
smoother { elemTransformParameter 0.666; maxGETMeIter 1000; improvementTolerance 1e-4; qMeanRelaxationTable (1 0.25 0.125 0); qMinRelaxationTable (0.1 0.05 0.01 0); maxIneffectiveIteration 5; features { featureAngle 30; minEdgeForFeature 10; } }; I encourage people to suggests improvements and make own versions. Nathanaël Last edited by nathanael; April 4, 2014 at 10:39. |
|
April 6, 2014, 04:48 |
|
#2 |
New Member
Nathanaël Geng
Join Date: May 2012
Posts: 18
Rep Power: 14 |
I updated the installation instructions :
Code:
# If needed source your Open FOAM bashrc source OpenFOAM/OpenFOAM-2.2.x/etc/bashrc # Download the extBlockMesh source and move inside downloaded directory git clone https://github.com/Etudes-NG/extBlockMesh cd extBlockMesh # Copy patch in OpenFOAM source and patch it cp OF-extBlockMesh-2.x.x.patch $WM_PROJECT_DIR cd $WM_PROJECT_DIR patch -p1 < OF-extBlockMesh-2.x.x.patch # Go back in the directory where you download the extBlockMesh source cd extBlockMesh # Run the installation script ./Allwmake.sh # Run extBlockMesh in place of blockMesh Last edited by nathanael; April 10, 2014 at 12:51. Reason: Correct installation instructions |
|
July 27, 2014, 10:05 |
|
#3 |
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 19 |
Hi nathanael,
Thank you for sharing the useful tool and pointing out the GETMe smoothing approach. I'm learning this method from your code and I have one question. According to the paper(http://cames.ippt.gov.pl/pdf/CAMES_20_1_4.pdf), the new mesh node positions are calculated using the formula (9). I think the weighting coefficients are calculated differently in your code. Could you look at the attached file and answer my question? Best regards, Fumiya
__________________
[Personal]
|
|
August 3, 2014, 13:26 |
|
#4 |
New Member
Nathanaël Geng
Join Date: May 2012
Posts: 18
Rep Power: 14 |
Hi Fumiya
From the same document on page 59 I read: <Here denotes the index set of the neighbor elements of , i.e., elements, which share at least one node with > I understand all red cells in your picture. There is one error in this part of the code, I correct it for the next release, but unfortunately my hard drive crash and I lost all the git history for this project... So I cannot give you the exact location. (Missing divides by the number of cells somewhere). The next release is ready for public release in a few weeks. This release gives a lot of improving in term of speed and some extra stuff... I would not say that blockMeshDict become easy to make but at least less to do with complex edges Best regards, Nathanaël. |
|
August 3, 2014, 13:52 |
|
#5 |
New Member
Nathanaël Geng
Join Date: May 2012
Posts: 18
Rep Power: 14 |
Oups I was to fast... Yes you are true: I need to compute the weight for the cell and not the point. I will correct that.
|
|
August 4, 2014, 05:29 |
|
#6 |
New Member
Nathanaël Geng
Join Date: May 2012
Posts: 18
Rep Power: 14 |
Hello Fumiya,
Here is a comparison between the two algo, colored using skew quality from paraview (lower is better): For me this is better with old code (avg quality = 0.8904 vs 0.8896, min quality = 0.7429 vs 0.7201). And a bit faster with old code, no need to store or compute the list of neighboring cells. What is your opinion? Have you done some test on your side? Best regards, Nathanaël. Last edited by nathanael; August 7, 2014 at 04:28. |
|
August 7, 2014, 05:27 |
Thank you
|
#7 |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28 |
Hi,
I installed and tested extBlockMesh. Attached you see a simple mesh of a pipe, nothing fancy. I played around with block and vertex arrangement to create a nice mesh. However, without modifying individual cells, you always reach some limit in terms of mesh beauty. Attached are some pics and the output of checkMesh. Great tool. |
|
August 7, 2014, 05:51 |
Smoothing operation
|
#8 |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28 |
What I understand up to this point, is this is an enhanced version of blockMesh.
Is there a possibility to call the smoothing seperately? In some cases I do some mesh-magic after blockMesh has finished, e.g. combine mesh regions, partial refinement. So, I am wondering if it is possible to do the smoothing after this stuff I just descibed. |
|
August 18, 2014, 11:47 |
|
#9 |
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 19 |
Hi nathanael,
Thank you for your test! I'm considering using your code for mesh morphing operations. The displacements of the points on the boundaries are prescribed and the new positions of the interior points are calculated using GETMe algorithm. Do you think this is a reasonable approach? Best regards, Fumiya
__________________
[Personal]
|
|
August 19, 2014, 08:01 |
extBlockMesh release v0.2
|
#10 |
New Member
Nathanaël Geng
Join Date: May 2012
Posts: 18
Rep Power: 14 |
Hi all,
I'm pleased to announce the new release for extBlockMesh! Major's change:
Best regards, Nathanaël. Last edited by nathanael; August 30, 2014 at 13:14. |
|
August 30, 2014, 13:13 |
|
#11 |
New Member
Nathanaël Geng
Join Date: May 2012
Posts: 18
Rep Power: 14 |
Just to show some of the possibilities with a complex block topology:
|
|
February 10, 2015, 20:14 |
|
#12 |
Member
Join Date: Nov 2009
Posts: 65
Rep Power: 17 |
Dear all
First of all, great thanks to Nathanael for this useful tool. I tested the tutorial attached with the latest git ver. of extBlcokMesh, but in difficulty for my own simple test case of the 2-D O-mesh of NACA4 wing section attached. It seemed to be OK after blockMesh command (checked by checkMesh command and Paraview), the mesh has only 20000 cells. After that I ran extBlockMesh command but no response returns even after 1 night. What's wrong with my mesh (blockMeshDict or smootherDict). Any comments and suggestions are highly appreciated. Best regards, waku2005 |
|
February 12, 2015, 04:23 |
|
#13 |
New Member
Nathanaël Geng
Join Date: May 2012
Posts: 18
Rep Power: 14 |
Hello Waku2005,
The problem is located in your blockMeshDict, just comment the boundary blade. I don't understand the reason... After your mesh is smoothed, just change the name of defaultFaces to blade in the file constant/polyMesh/boundary. Note: your mesh is very stiff for the smoother, I recommand to reduce the transformParameter to 0.02 or less. Best regards, Nathanaël. |
|
February 12, 2015, 05:20 |
|
#14 | |
Member
Join Date: Nov 2009
Posts: 65
Rep Power: 17 |
Quote:
Thanks to your suggestion! It works well after I changed the boundary name and reduced the transformParameter to 0.02. I also found that the convertToMeters parameter in the blockMeshDict affects the smoothing iteration, i.e., without two changes suggested in your reply, smoothing iteration had successfully continued after I changed the convertToMeters of 1.0 to 0.1 with no change in smootherDict. I don't know why it works even only the mesh scale was changed. Best regards, waku2005 |
||
February 17, 2015, 03:08 |
Gridpro topology to blockMeshDict
|
#15 |
New Member
PA
Join Date: Mar 2009
Posts: 25
Rep Power: 17 |
Hi,
This looks like a promising tool. I know of the gridpro2Foam mesh converter but does anyone know if a utility exists that can convert a GridPro topology (*.fra files) to a blockMeshDict file?
__________________
Regards, Per |
|
April 20, 2015, 11:19 |
|
#16 |
Senior Member
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 18 |
Update: problem solved!
I am trying to use extBlockMesh but I getting the following errors; when I tried to compile it using OpenFoam 2.2.x, I got an error SmootherBoundary.h:32:30: fatal error: extendedEdgeMesh.H: No such file or directory #include "extendedEdgeMesh.H" Then I tried OpenFoam 2.3.x, I managed to compile it without errors and run the tutorial as well. But, when I checked the points and faces files, I found very strange characters like binary files and I could not view the mesh in paraview. the beginning of points file Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format binary; class vectorField; location "constant/polyMesh"; object points; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 61776 (l/��a@���Pم*��YJH�;f@W�&� <f@��n$��� 'A,f@i�'�La@[���0��A���Hf@1Y�^L[a@p�l��V���V�Vf@K8^L\�Za@�9�'�w@�$@�cf@�����Ka@P��ٻ�@}ҫpf@nx�0a@� �� v$@��Q��,f@�!p\a@P� F��*@� ,�P���f@��7�.L`@7�՞G$�'�����f@�S��R`@u�e�������}��f@Wʼ3�U`@™����NL-2d�f@����U`@tØ���?e�L�p�f@4,?��Q`@�����@�3����f@��!��K`@64�$@K;�B�f@`7�H`@��|6�^,@E%�[D�f@���X�_@�^,��Y/ldg@�o ��g@�8�]@^�:�wV@More��î�g@J-I�|�]@��%d�@�����g@��2ab�]@��Cn$@V����g@z<�A�^@Q$Pօ*@�$���g@�6���ea@�@LJ�*������f@�IL�o�a@X��h�$�Nܙ���f@FQ[C��a@�, :W��Uڲ��f@:�ʆ��a@�k����8�lܕf Last edited by hk318i; April 22, 2015 at 10:10. Reason: problem solved |
|
July 23, 2015, 14:07 |
Someone knows what is wrong?
|
#17 |
New Member
Lorenzo Bartolucci
Join Date: Oct 2012
Location: Rome - University of Tor Vergata
Posts: 5
Rep Power: 14 |
Hi all,
I have just started to use extBlockMesh and I was trying to build a simpleMesh but it seems that I have done some mistakes at some point. Someone knows what is happened? Thanks in advance, Lorenzo |
|
August 20, 2015, 17:28 |
|
#18 | |
New Member
Amanda Mattos Charin
Join Date: Mar 2013
Posts: 6
Rep Power: 13 |
Quote:
|
||
August 20, 2015, 17:31 |
|
#19 |
Senior Member
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 18 |
I tried it before, it works with OpenFOAM-2.3
|
|
August 22, 2015, 13:16 |
|
#20 |
New Member
Amanda Mattos Charin
Join Date: Mar 2013
Posts: 6
Rep Power: 13 |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ANSYS Meshing] Smoothing options | siw | ANSYS Meshing & Geometry | 3 | August 13, 2019 08:40 |
[snappyHexMesh] Cylindrical blockmesh to Improve snappyHexMesh Results | nicholas.jones | OpenFOAM Meshing & Mesh Conversion | 3 | May 16, 2019 10:52 |
[blockMesh] set of xyz data in blockMesh | psk | OpenFOAM Meshing & Mesh Conversion | 12 | August 27, 2013 09:37 |
[mesh manipulation] Smoothing a mesh from blockMesh | vatavuk | OpenFOAM Meshing & Mesh Conversion | 3 | December 24, 2012 14:18 |
Hexa smoothing (ICEM CFD 10.0) | CFDworker | CFX | 3 | November 2, 2005 11:23 |