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

[mesh manipulation] Wall functions and boundary layer

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 7, 2023, 10:23
Default Wall functions and boundary layer
  #1
Senior Member
 
Nico
Join Date: Jan 2022
Location: Germany
Posts: 122
Rep Power: 6
Hr_kules is on a distinguished road
I have the, maybe, most basic question:

If i want to use wall functions for an buoyantSimpleFoam simulation, do i have to use wallfunction and prism layers, or do i just have the first cell at a distance that corresponds to a desired y+ value?

In my current simulation the results vary greatly with the expected outcome and the first cell height seems to influence the results more that i initally expected.

Apart from that during simulation if have the functionobject yPlus running, that basically always returns different values than the y+ I initally used to determine the first cell height?

Right now i am confused and sad.

Can anybody help?
Hr_kules is offline   Reply With Quote

Old   February 8, 2023, 08:05
Default
  #2
Senior Member
 
Nico
Join Date: Jan 2022
Location: Germany
Posts: 122
Rep Power: 6
Hr_kules is on a distinguished road
Maybe to clarify my problem a bit:

i have a pipe with 14m length and 1m diameter. It is generated from GMSH. The boundary layer is added with snappyHexMesh. For the first layer height i used the boundary layer calculator from this website: https://www.cfd-online.com/Tools/yplus.php
with following entries:
freestream velocity: 0.01305 [m/s]
Density: 998.2 [kg/m3]
Dynamic viscosity; 0.001002 [kg/ms]
Boundary layer length: 14 [m]
Desired y+ value: 35


The desired y+ value stems from the k-epsilon model i am using and ultimate goal is to compare simulation results from the dittus boelter equation for the nusselt number (Nu = 0.023*Re^0.8*Pr^0.4)


For the snappyHexMesh layer generation i run following parameters:
Code:
addLayersControls
{

    layers
    {      
        wallEntrance
        {
            nSurfaceLayers 3;
            mergeFaces false;
        }
        wallDeveloped
        {
            nSurfaceLayers 3;
            mergeFaces false;
        }        
    }

    relativeSizes             false;
    expansionRatio            1.1;
    firstLayerThickness       4.7e-2;
    minThickness              0.0001;
}
This should, or at least i thought, result in an y+ during the simulation of at least 30, however the los file of my simulation returns:
Code:
yPlus yPlus1 write:
    writing object yPlus
    patch wallEntrance y+ : min = 0.28638, max = 3.60023, average = 2.12067
    patch wallDeveloped y+ : min = 0.286411, max = 3.58798, average = 2.15099
For the first Iteration.


The log for snappyHexMesh returns following, which isn't better:
Code:
patch         faces    layers   overall thickness
                                [m]       [%]
-----         -----    ------   ---       ---
wallEntrance  16388    0.299    0.00292   2.96    
wallDeveloped 97078    0.328    0.0031    3.14



The results are also pretty bad. Anybody got an idea, how to resolve this?
Hr_kules is offline   Reply With Quote

Old   February 8, 2023, 09:57
Default
  #3
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
It says only 0.299 layers (however that works ) were added and the stated overall thickness is way below the prescribed one for the firstlayer. Thus, the y+ value seems to be correct or at least consistent with that. It appears snappy has a hard time putting these layers in. What does the final mesh look like?
AtoHM is offline   Reply With Quote

Old   February 8, 2023, 10:12
Default
  #4
Senior Member
 
Nico
Join Date: Jan 2022
Location: Germany
Posts: 122
Rep Power: 6
Hr_kules is on a distinguished road
Hey,


i found out that relaxing the mesh constraints is benefitial to the generation of layers and ran snappyHexMesh again with following parameters after bumping up the fluid velocity:
Code:
addLayersControls
{

    layers
    {      
        wallEntrance
        {
            nSurfaceLayers 2;
            mergeFaces false;
        }
        wallDeveloped
        {
            nSurfaceLayers 2;
            mergeFaces false;
        }        
    }

    relativeSizes             false;
    expansionRatio            1.1;
    firstLayerThickness       3.2e-2;
    minThickness              0.0001;
}
I have added images of the final mesh
And snappyHexMesh now displays following after generation:
Code:
patch         faces    layers   overall thickness
                                [m]       [%]
-----         -----    ------   ---       ---
wallEntrance  16388    2        0.0672    100     
wallDeveloped 97078    2        0.0672    100     

Layer mesh : cells:2065996  faces:4304480  points:436739
Cells per refinement level:
    0    2065996
Writing mesh to time constant
Wrote mesh in = 12.19 s.
Layers added in = 12.19 s.
Checking final mesh ...
Checking faces in error :
    non-orthogonality > 85  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-30      : 0
    faces with concavity > 75  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 0
    faces on cells with determinant < 0.001                : 0
Finished meshing without any errors
Finished meshing in = 14.75 s.
End

Finalising parallel run

I tried to run the case and the yPlus functionobject now displays at least somethon on the range of 30 (about 33-35).
However the desired temperature difference isn't still achieved.
Attached Images
File Type: jpg Bildschirmfoto vom 2023-02-08 16-01-03.jpg (140.6 KB, 27 views)
File Type: jpg Bildschirmfoto vom 2023-02-08 16-01-49.jpg (127.3 KB, 22 views)
Hr_kules 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
Table bounds warnings at: END OF TIME STEP CFXer CFX 4 July 16, 2020 23:44
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 07:30
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 06:20
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00


All times are GMT -4. The time now is 15:30.