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

[cfMesh] boundary layers

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2016, 06:28
Default boundary layers
  #1
New Member
 
Join Date: Mar 2015
Posts: 12
Rep Power: 11
JensD is on a distinguished road
I started using cfMesh only recently, but based on the tutorials I'm already a big fan. Using the user guide I was able to mesh a few geometries and can control the sizing of the cells, however I'm stuck on the boundary layer addition.

The mesher seems to only split up the last cell at the boundary into the number of boundary layers I specified in the meshDict. This leaves me with a big jump in size between the last boundary layer and the next cell towards the center. I believe this will badly influence my simulations, is there any way to make the transition between the boundary layer and the rest of the grid smoother? Am I missing a keyword in the dictionary?

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                |
| \\      /  F ield         | cfMesh: A library for mesh generation          | 
|  \\    /   O peration     |                                                |
|   \\  /    A nd           | Author: Franjo Juretic                         | 
|    \\/     M anipulation  | E-mail: franjo.juretic@c-fields.com            |
\*---------------------------------------------------------------------------*/

FoamFile
{
    version   2.0;
    format    ascii;
    class     dictionary;
    location  "system";
    object    meshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

maxCellSize				0.0006;		// (MANDATORY) Maximum cell size in the mesh [m]
//boundaryCellSize			0.0003;		// (optional) size of the cells at the boundary [m]
//boundaryCellSizeRefinementThickness	0.0003;		// (optional) distance from the boundary at which boundary cell size shall be used

surfaceFile				"constant/triSurface/cylinder.stl";

boundaryLayers
{
    nLayers				3;		// (optional) global number of layers 

    thicknessRatio 			1.2;		// (optional) thickness ratio

    //maxFirstLayerThickness 		0.5;		// (optional) max thickness of the first layer [m]

    patchBoundaryLayers					// local settings for individual patches
    {
        wall
        {
            nLayers			20;
            thicknessRatio		1.1;
	    //maxFirstLayerThickness 	0.5; 		// [m]
            //allowDiscontinuity 	0;
        }
    }

    untangleLayers 			1;		// (optional) deactivate untangling of boundary layers - activated by default

    optimiseLayer 			1;		// (optional) activates smoothing of boundary layers - deactivated by default

    optimisationParameters
    {
        nSmoothNormals 			5;		// (optional) number of iterations in the procedure for reducing normal variation
        relThicknessTol 		0.1; 		// (optional) maximum allowed thickness variation of thickness between two neigbouring points, divided by the distance between the points
        featureSizeFactor 		0.4;		// (optional) ratio between the maximum layer thickness and the estimated feature size
        reCalculateNormals 		1; 		// (optional) activate 1 or deactivate 0 calculation of normal
        maxNumIterations 		5;		// (optional) maximum number of iterations of the whole procedure
    }
}

keepCellsIntersectingBoundary		1;		// (optional) keep template cells intersecting boundary (1) - use only internal cells (0) 

// ************************************************************************* //
JensD is offline   Reply With Quote

Old   May 25, 2016, 06:00
Default
  #2
Senior Member
 
Franjo Juretic
Join Date: Aug 2011
Location: Velika Gorica, Croatia
Posts: 124
Rep Power: 17
franjo_j is on a distinguished road
Send a message via Skype™ to franjo_j
Hi,

Your setup is Ok, and it should not cause problems if the gradient is not significant in the transition zone. My run the simuation and find out if it causes any problems.

Are you interested in doing an experiment regarding this? I can quickly re-organise the procedure that might improve this, but at the expense of longer meshing time. We can open a new branch in the repository and evaluate various options.
__________________
Principal Developer of cfMesh and CF-MESH+
www.cfmesh.com
Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram
franjo_j is offline   Reply With Quote

Old   May 26, 2016, 04:30
Default
  #3
New Member
 
Join Date: Mar 2015
Posts: 12
Rep Power: 11
JensD is on a distinguished road
Hi Franjo, thanks for your reply!

The temperature gradient is quite large (few 10 degrees over a cm approximately). When running the simulation, pressure starts to fluctuate and then explodes. I had no problems with this with other meshes.
EDIT: I've found that my turbulent kinetic energy starts increasing prior to pressure difficulties. I'm doing LES with the dynamic one equation eddy viscosity model as implemented in OF 2.2.x.

What kind of experiments are you refering to? Right now, I'm running simulations on a simple cylinder, using each time a different mesh obtained with different (automated) meshers.

I don't mind increasing the meshing time, as it is still very fast compared to manual meshing and its performance in terms of boundary layer addition is better than automated meshers like snappyHexMesh (which I used most of the time)

Last edited by JensD; May 26, 2016 at 08:33.
JensD is offline   Reply With Quote

Old   September 17, 2018, 12:44
Default
  #4
New Member
 
FredPieri
Join Date: Mar 2018
Posts: 16
Rep Power: 8
Fredvol is on a distinguished road
Quote:
Originally Posted by JensD View Post
I started using cfMesh only recently, but based on the tutorials I'm already a big fan. Using the user guide I was able to mesh a few geometries and can control the sizing of the cells, however I'm stuck on the boundary layer addition.

The mesher seems to only split up the last cell at the boundary into the number of boundary layers I specified in the meshDict. This leaves me with a big jump in size between the last boundary layer and the next cell towards the center. I believe this will badly influence my simulations, is there any way to make the transition between the boundary layer and the rest of the grid smoother? Am I missing a keyword in the dictionary?

Hello,
I'am experiencing the same problem you had.
i.e: a big gap in thichness between the last boudary cell the the next cell.
Did you solve it ? Do I also miss a dictionary keyword?


Thanks,
Fred
Fredvol is offline   Reply With Quote

Old   September 17, 2018, 12:48
Default
  #5
New Member
 
Join Date: Mar 2015
Posts: 12
Rep Power: 11
JensD is on a distinguished road
Hi Fred

I did not solve the issue, I switched from automated meshers to Pointwise. It takes a bit more time, but gives you much more control + can also be used to script the meshing procedure.

Sorry!
JensD is offline   Reply With Quote

Old   September 17, 2018, 12:49
Default
  #6
New Member
 
FredPieri
Join Date: Mar 2018
Posts: 16
Rep Power: 8
Fredvol is on a distinguished road
Quote:
Originally Posted by JensD View Post
Hi Fred

I did not solve the issue, I switched from automated meshers to Pointwise. It takes a bit more time, but gives you much more control + can also be used to script the meshing procedure.

Sorry!
Ok thanks for the prompt answer.
Fredvol is offline   Reply With Quote

Old   September 26, 2022, 06:59
Default
  #7
New Member
 
Marcelo Ruiz
Join Date: Feb 2021
Location: Italy
Posts: 17
Rep Power: 5
CFDavatar is on a distinguished road
I am facing the same issue,

Does anyone solved it?

Kind regards,

Marcelo
CFDavatar 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
Centrifugal fan-reverse flow in outlet lesds to a mass in flow field xiexing CFX 3 March 29, 2017 11:00
Multiphase flow - incorrect velocity on inlet Mike_Tom CFX 6 September 29, 2016 02:27
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 06:15
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55


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