CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Mesh Utilities

cfMesh: boundary layers

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 13, 2016, 05:28
Default cfMesh: boundary layers
  #1
New Member
 
Join Date: Mar 2015
Posts: 7
Rep Power: 3
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, 05:00
Default
  #2
Senior Member
 
Franjo Juretic
Join Date: Aug 2011
Location: Velika Gorica, Croatia
Posts: 113
Rep Power: 9
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
www.cfmesh.com
Social media: LinkedIn, Twitter, YouTube, Google+, Facebook, Pinterest
franjo_j is offline   Reply With Quote

Old   May 26, 2016, 03:30
Default
  #3
New Member
 
Join Date: Mar 2015
Posts: 7
Rep Power: 3
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 07:33.
JensD is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
CFX13 Post Periodic interface EtaEta CFX 7 December 8, 2011 18: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
Boundary layers problem carlos ortiz FLUENT 0 September 20, 2004 20:55


All times are GMT -4. The time now is 03:43.