CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] How to identify faces not extruded after addLayers' snappyHexMesh step?

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By AtoHM
  • 2 Post By Yann
  • 1 Post By Raphael_Santos
  • 1 Post By AtoHM

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 7, 2021, 19:55
Question How to identify faces not extruded after addLayers' snappyHexMesh step?
  #1
New Member
 
Raphael Santos
Join Date: Oct 2013
Posts: 20
Rep Power: 13
Raphael_Santos is on a distinguished road
Hello everyone,

I have been working with snappyHexMesh for some time. In the addLayers' step, I sometimes get that 1 or 2 faces are not extruded. I've been looking for a methodology to identify which faces were not extruded to be able to solve my problem, but I was not successful .

Can you help me with this? Does anyone know how to check which faces were extruded and which were not extruded during the addLayers' step?

At the moment, what I do is time-consuming, as it consists of running the simulation and calculating the y+ and verifying the regions wich y+ is inconsistent.

Thank you,
Raphael
Raphael_Santos is offline   Reply With Quote

Old   July 8, 2021, 02:20
Default
  #2
Senior Member
 
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13
AtoHM is on a distinguished road
There are ways.
When you run snappyHexMesh, the log-file contains this information. There should be a part with the extruded layer thickness and coverage in %.
Also you can always check visually. (I think) depending on the OF-release you use, you can make snappy put out a scalar nSurfaceLayers to better visualize the coverage, like showed here https://www.openfoam.com/documentati...h-displacement
Raphael_Santos likes this.
AtoHM is offline   Reply With Quote

Old   July 8, 2021, 04:36
Default
  #3
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hi Raphael,

There are a set of writeFlags you can add at the end of your snappyHexMeshDict :

Code:
writeFlags
(
    scalarLevels    // write volScalarField with cellLevel for postprocessing
    layerSets       // write cellSets, faceSets of faces in layer
    layerFields     // write volScalarField for layer coverage
);
You can then visualize these fields in paraView, including the "nSurfaceLayers" AtoHM was talking about. (which is really useful to investigate the layer coverage on your geometries!)

AFAIK, these writeFlags have been around for a long time so it should work with pretty much any OpenFOAM version.


Cheers,
Yann
Raphael_Santos and AtoHM like this.
Yann is offline   Reply With Quote

Old   July 14, 2021, 15:30
Default
  #4
New Member
 
Raphael Santos
Join Date: Oct 2013
Posts: 20
Rep Power: 13
Raphael_Santos is on a distinguished road
Yann and AtoHM, thank you very much.

I just performed the tests and it worked well.

The flags are really helpful and it is what I was looking for, to visualize. But, the site you sent, AtoHM, shows a different method to addLayers, using the mesh shrinking that is useful for what I am doing.

Cheers,
Raphael
Yann likes this.
Raphael_Santos is offline   Reply With Quote

Old   September 20, 2021, 06:40
Default
  #5
Senior Member
 
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13
AtoHM is on a distinguished road
Hi Yann, I was finally able to test it again myself. I mentioned "depending on the OF-release you use", because I never got it to work myself. Maybe you can help me to get it going.


I tried with the quite recent esi v2012 version and it seems these writeFlags are just ignored for me. I can see that during the snappy run, these files are present in the decomposed folders processor0, processor1, ... But once the mesh is reconstructed, they are gone. I use checkMesh with the -writeAllFields option to get the mesh quality output.
At the start I suspected that a certain debug level is needed to get the output, but this doesn't change anything, despite dumping me alot of unneeded data.
I would be happy for any advice how to get the cellLevels and layer info written out. Thanks!
AtoHM is offline   Reply With Quote

Old   September 20, 2021, 09:50
Default
  #6
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hi AtoHM,

Well, if the fields are written in the processors folders, then it means the writeFlags are working.

It seems your issue is related to the reconstruction step. What utility do you use? reconstructPar or reconstructParMesh?

I may have missed something, since I never reconstruct my cases. I either read the decomposed case or just convert it to another (lighter) format for post-processing.

Yann
Yann is offline   Reply With Quote

Old   September 20, 2021, 11:02
Default
  #7
Senior Member
 
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13
AtoHM is on a distinguished road
Hi Yann,


Thanks, thats a good hint regarding the reconstruction method, I am using reconstructParMesh. I will try to isolate if this is causing the issue.
AtoHM is offline   Reply With Quote

Old   September 20, 2021, 12:41
Default
  #8
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
OK, this is probably why you have this issue: reconstructParMesh only reconstructs the mesh but writeFlags write data as fields in time step directories.
You have to use reconstructPar if you want these fields to be reconstructed too.

Let me know if it works!
Yann
Yann is offline   Reply With Quote

Old   September 21, 2021, 06:00
Default
  #9
Senior Member
 
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13
AtoHM is on a distinguished road
Spot on, Yann. Thanks alot.
Running reconstructPar additionally to reconstructParMesh writes these fields to the time folder and I can visualize in Paraview. Works like a charm now!
Yann likes this.
AtoHM is offline   Reply With Quote

Reply

Tags
addlayers, faces not extruded, snappyhexmesh


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Gmsh] gmshToFoam generates patches with 0 faces and 0 points Simurgh OpenFOAM Meshing & Mesh Conversion 4 August 25, 2023 08:58
[snappyHexMesh] Layers not growing at all zonda OpenFOAM Meshing & Mesh Conversion 12 June 6, 2020 12:28
snappyhexmesh remove blockmesh geometry philipp1 OpenFOAM Running, Solving & CFD 2 December 12, 2014 11:58
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 03:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07


All times are GMT -4. The time now is 13:40.