CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Salome Viscous Layers

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ancolli

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 27, 2018, 19:00
Default Salome Viscous Layers
  #1
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12
ancolli is on a distinguished road
Anyone with experience. I am doing a simple example, 3D cylinder with a viscous layer (Total thickness: 1e-5 m, Number of layers: 10-20, Stretch factor: 1.2 (diameter of cylinder 0.03 m)). When I compute all is ok, but when I check the mesh with OpenFOAM, the mesh has plenty of mistakes and is not proper for simulation...even if I refine with triangles the surface.
Any Suggestion
fede32 likes this.
ancolli is offline   Reply With Quote

Old   March 2, 2018, 13:15
Default
  #2
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
Could you share the output of checkMesh?

PS: Guide: How to ask a question on the forums
HakikiCanakkaleli is offline   Reply With Quote

Old   March 2, 2018, 13:33
Default
  #3
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12
ancolli is on a distinguished road
I think is information useless but Sure! I am sharing the best mesh I could generate. However is not the the one I want, is not really refined near the wall (first layer 1e-6 m, then 5 layers, Stretch factor: 3.) I would like to add more layers but errors start to apear, like:

***Max cell openness
***Max aspect ratio
***Max skewness, etc etc.

In the present case It is just high number of severely non-orthogonal faces.

Thanks for ur time

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  dev                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : dev-883687dd2706
Exec   : checkMesh
Date   : Mar 02 2018
Time   : 14:18:09
Host   : "LAPTOP-5T43R11I"
PID    : 1879
I/O    : uncollated
Case   : /mnt/d/.....
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           942760
    faces:            5992815
    internal faces:   5765913
    cells:            2606524
    faces per cell:   4.51127
    boundary patches: 6
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     0
    prisms:        1329790
    wedges:        0
    pyramids:      2842
    tet wedges:    0
    tetrahedra:    1273892
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology
    wall_1        33948    20474    ok (non-closed singly connected)
    wall_2        159208   79923    ok (non-closed singly connected)
    wall_3          31568    16084    ok (non-closed singly connected)
    inlet               844      473      ok (non-closed singly connected)
    outlet_1            854      478      ok (non-closed singly connected)
    outlet_2            480      401      ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (-0.02 -0.02 0) (0.02 0.02 0.191)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (-1.27466e-15 1.59862e-17 2.95515e-16) OK.
    Max cell openness = 3.53122e-14 OK.
    Max aspect ratio = 525.268 OK.
    Minimum face area = 5.74974e-11. Maximum face area = 1.9187e-06.  Face area magnitudes OK.
    Min volume = 5.91976e-15. Max volume = 7.65275e-10.  Total volume = 0.000130565.  Cell volumes OK.
    Mesh non-orthogonality Max: 87.4235 average: 18.4473
   *Number of severely non-orthogonal (> 70 degrees) faces: 101936.
    Non-orthogonality check OK.
  <<Writing 101936 non-orthogonal faces to set nonOrthoFaces
    Face pyramids OK.
    Max skewness = 0.732127 OK.
    Coupled point location match (average 0) OK.

Mesh OK.


Quote:
Originally Posted by HakikiCanakkaleli View Post
Could you share the output of checkMesh?

PS: Guide: How to ask a question on the forums
ancolli is offline   Reply With Quote

Old   March 2, 2018, 13:52
Default
  #4
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
In contrast, providing checkMesh output is critical. Plus, you should explain your case thoroughly without the reader asking for it.

Anyways.

As can be seen from the output:

Quote:
Overall number of cells of each type:
hexahedra: 0
prisms: 1329790
wedges: 0
pyramids: 2842
tet wedges: 0
tetrahedra: 1273892
polyhedra: 0
Your grid contains tetrahedra and prisms (and a bit pyramids). With this tetrahedral topology, it is natural that checkMesh measures these quantities. It does not necessarily mean that your mesh is bad, but checkMesh's meshQuality metrics (and schemes) are mostly tuned for hexahedra.

I recommend you to use hexahedral mesh capabilities of OpenFOAM, or I speculate this, you can use OpenFOAM-extend for simulations using tetrahedral mesh.

Kind regards
HakikiCanakkaleli is offline   Reply With Quote

Old   March 2, 2018, 14:34
Default
  #5
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12
ancolli is on a distinguished road
Quote:
Originally Posted by HakikiCanakkaleli View Post
In contrast, providing checkMesh output is critical. Plus, you should explain your case thoroughly without the reader asking for it.

Anyways.

As you can see from the output:



Your grid contains tetrahedra and prisms (and a bit pyramids). With this tetrahedral topology, it is natural that checkMesh measures these quantities. It does not necessarily mean that your mesh is bad, but checkMesh's meshQuality metrics (and schemes) are mostly tuned for hexahedra.

I recommend you to use hexahedral mesh capabilities of OpenFOAM, or I speculate, you can use OpenFOAM-extend for simulations using tetrahedral mesh.

Kind regards

My intention was not the reader asking, just someone that have tried to refine (with salome) near the wall. Sorry if I did not stated in a proper way the problem.

Do u mean that if I get "Failed n mesh checks" i can still run my simulation with good results?

If i would have to mesh a cylinder, definitively I would do it with blockMesh, but my geometry is more complicated (I already tried with blockMesh and is not easy to get good results when trying join different blocks (boundary layer in the order of 1e-6 m).
What I did is starting to work in a cylinder in salome (if i can not do it in a cylinder, definitively I would never do it in my geometry).

Is OpenFOAM-extend better when using tetrahedral meshes? I have some things (BC, post-proc and solvers) programed by myself and i got problems of compatibility every few months with of-dev (or from of-3 to of-5). I do not want to imagine if I jump to OpenFOAM-extend. Any recommendation or forum?

Thanks a lot
ancolli is offline   Reply With Quote

Old   March 2, 2018, 15:44
Default
  #6
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
Quote:
Do u mean that if I get "Failed n mesh checks" i can still run my simulation with good results?
Yes, in principle, you can. Tetrahedra is commonly being used in industry. Though I speculate that OF schemes are not appropriate to compute on tetrahedra. Might someone else give some more-educated opinion, don't know.

Quote:
If i would have to mesh a cylinder, definitively I would do it with blockMesh, but my geometry is more complicated (I already tried with blockMesh and is not easy to get good results when trying join different blocks (boundary layer in the order of 1e-6 m).
What I did is starting to work in a cylinder in salome (if i can not do it in a cylinder, definitively I would never do it in my geometry).
IMHO, obtain STL surface mesh of your complicated geometry from SALOME (it provides good quality STLs as opposed to CAD software. e.g. SolidWorks etc.), then use snappyHexMesh to mesh it.

Quote:
Is OpenFOAM-extend better when using tetrahedral meshes? I have some things (BC, post-proc and solvers) programed by myself and i got problems of compatibility every few months with of-dev (or from of-3 to of-5). I do not want to imagine if I jump to OpenFOAM-extend. Any recommendation or forum?
It was a suggestion only. OF-extend, AFAIK, has schemes more suitable to tetrahedra-meshed sims (for FSI). You can check forum for further information.

Hope these help.
HakikiCanakkaleli is offline   Reply With Quote

Old   March 2, 2018, 17:08
Default
  #7
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12
ancolli is on a distinguished road
Quote:
Originally Posted by HakikiCanakkaleli View Post
Yes, in principle, you can. Tetrahedra is commonly being used in industry. Though I speculate that OF schemes are not appropriate to compute on tetrahedra. Might someone else give some more-educated opinion, don't know.



IMHO, obtain STL surface mesh of your complicated geometry from SALOME (it provides good quality STLs as opposed to CAD software. e.g. SolidWorks etc.), then use snappyHexMesh to mesh it.



It was a suggestion only. OF-extend, AFAIK, has schemes more suitable to tetrahedra-meshed sims (for FSI). You can check forum for further information.

Hope these help.
About snappyHexMesh, I am afraid of having problems as with blockMesh (refineWallLayer) in a complex geometry. Reading the following link (https://cfd.direct/openfoam/user-gui...26-1980005.4.7)

4 if the validation criteria can be satisfied, insert mesh layers;
5 the mesh is checked again; if the checks fail, layers are removed

And seen what people experienced with boundary layers and snappyHexMesh (https://www.cfd-online.com/Forums/op...pyhexmesh.html)

I think i am right...

Do u have any experience using snappyHexMesh for boundary layers in the order of 1e-6 m (y+ < 1)?

Finally, I do not see the restriction u said about tetrahedral mesh

"By default OpenFOAM defines a mesh of arbitrary polyhedral cells in 3-D, bounded by arbitrary polygonal faces, i.e. the cells can have an unlimited number of faces where, for each face, there is no limit on the number of edges nor any restriction on its alignment. A mesh with this general structure is known in OpenFOAM as a polyMesh." (https://cfd.direct/openfoam/user-gui...h-description/)
Am i missing something?

Last edited by ancolli; March 3, 2018 at 06:10.
ancolli is offline   Reply With Quote

Old   March 4, 2018, 07:51
Default
  #8
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
Quote:
Originally Posted by ancolli View Post
Do u have any experience using snappyHexMesh for boundary layers in the order of 1e-6 m (y+ < 1)?
No, I'm afraid.

Quote:
Originally Posted by ancolli View Post
Finally, I do not see the restriction u said about tetrahedral mesh
OpenFOAM mesh topology capabilities allow polyhedra. My suspicion is however whether schemes you will use on tetrahedra were derived and implemented with the consideration of tetrahedra? For example, you may very likely have issues if you use Gauss linear for gradient terms within such a domain (but you can use leastSquares to ensure second-order accuracy independent of the mesh topology).

As I said, I only speculated about this, and encourage you to be more cautious when you will use tetrahedra.

Hope you resolve this matter.

PS: It would be very nice of you if you would share your experience herein in the future.
HakikiCanakkaleli is offline   Reply With Quote

Old   March 16, 2021, 04:56
Default
  #9
New Member
 
Gerhard
Join Date: Mar 2017
Posts: 26
Rep Power: 9
Gerhard is on a distinguished road
Generally, hex-meshes are better than tet-meshes, but OpenFOAM and its schemes can deal with both.

It is a very simple utility and does not always provide good layers, but it is worth looking at. That is, the refineWallLayer utility of OpenFOAM. I have used it sometimes to get through the viscous sublayer, i.e. to get y+ ~ 1.

Say you want to add five layers to a wall called pipeWall, it would look something like:

Code:
refineWallLayer pipeWall 0.65 -overwrite
refineWallLayer pipeWall 0.60 -overwrite
refineWallLayer pipeWall 0.55 -overwrite
refineWallLayer pipeWall 0.50 -overwrite
refineWallLayer pipeWall 0.40 -overwrite
In a bash script you could do it more elegantly with something like

Code:
echo "Adding layers ..."
i=1
for j in 0.65 0.6 0.55 0.5 0.4
do
    echo "      - Adding layer $i"
    refineWallLayer pipeWall $j -overwrite >> log.refineWallLayer.pipeWall
    let i=i+1
done
Gerhard is offline   Reply With Quote

Reply


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
[snappyHexMesh] Help with Snappy: no layers growing GianF OpenFOAM Meshing & Mesh Conversion 2 September 23, 2020 09:26
Viscous Layers generating defaultFaces NoradFirst2 OpenFOAM Pre-Processing 4 June 21, 2018 06:49
[ICEM] Prism layers distorted near trailing edge of blade-Unstructured Mesh Rohith Giridhar ANSYS Meshing & Geometry 3 June 29, 2015 18:52
Viscous forces (interDyMFoam) differ between OF 2.0 and later versions maxof OpenFOAM Running, Solving & CFD 2 May 30, 2013 05:17
Layers and turbolence in Interfoam danvica OpenFOAM Running, Solving & CFD 0 April 30, 2012 04:11


All times are GMT -4. The time now is 17:06.