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

[cfMesh] How to get rid of the cell refinement at the farfield boundary

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 5, 2018, 12:52
Default How to get rid of the cell refinement at the farfield boundary
  #1
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 260
Rep Power: 22
klausb will become famous soon enough
Hi,

I want to create a 2D mesh with cfMesh for airfoils analysis. The mesh has the following requirements:

1: O-mesh
2: y+ = 5 boundary layer
3: 300 cells at the airfoil surface
4: About 50.000 cells in total
5: Gradually coarser mesh starting at the airfoil boundary layer, ending at the farfield domain boundary

The airfoil contour with a blunt trailing edge and the farfield boundary are defined in airfoil_farfield.stl and are called inside the file airfoil and farfield respectively.

So far I am able to create a boundary layer mesh around the airfoil (still with too many cells) but at the same time there's always mesh refinement at the farfield boundary where the mesh should be very coarse.

How can I avoid the refinement at the farfield boundary?

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                |
| \\      /  F ield         | OpenFOAM GUI Project: creativeFields           |
|  \\    /   O peration     | Version:  0.8.9.0                              |
|   \\  /    A nd           | Web: www.c-fields.com                          |
|    \\/     M anipulation  |                                                |
\*---------------------------------------------------------------------------*/

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

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

maxCellSize         5;

minCellSize         0.002;

surfaceFile        "airfoil_farfield.stl";

localRefinement
{
  "farfield.*"
{
cellSize 5;
}
}


boundaryLayers
{
    patchBoundaryLayers
    {
        "airfoil.*"
        {
        nLayers                 20;
        boundaryCellSize                0.002;
        maxFirstLayerThickness             0.01;
        thicknessRatio          1.2;
        }
    }
}

// ************************************************************************* //
attached a picture of the mesh
Attached Images
File Type: png o-mesh.png (68.6 KB, 55 views)
klausb is offline   Reply With Quote

Old   May 7, 2018, 03:46
Default
  #2
New Member
 
JD
Join Date: May 2017
Posts: 24
Rep Power: 9
dickcruz is on a distinguished road
What does it look like when you turn the BL settings off?
dickcruz is offline   Reply With Quote

Old   May 7, 2018, 14:31
Default it looks the same...
  #3
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 260
Rep Power: 22
klausb will become famous soon enough
the mesh looks the same just without a boundary layer mesh at the airfoil surface.

Any idea how to avoid the refinement at the farfield boundary and how to create a constantly coarser mesh towards the farfield boundary?
klausb is offline   Reply With Quote

Old   May 28, 2018, 07:04
Default
  #4
New Member
 
Dr. Peyman Davvalo Khongar
Join Date: Mar 2018
Location: Helsinki (Finland)
Posts: 16
Rep Power: 8
peyman.davvalo.khongar is on a distinguished road
Quote:
Originally Posted by klausb View Post
Hi,

I want to create a 2D mesh with cfMesh for airfoils analysis. The mesh has the following requirements:

1: O-mesh
2: y+ = 5 boundary layer
3: 300 cells at the airfoil surface
4: About 50.000 cells in total
5: Gradually coarser mesh starting at the airfoil boundary layer, ending at the farfield domain boundary

The airfoil contour with a blunt trailing edge and the farfield boundary are defined in airfoil_farfield.stl and are called inside the file airfoil and farfield respectively.

So far I am able to create a boundary layer mesh around the airfoil (still with too many cells) but at the same time there's always mesh refinement at the farfield boundary where the mesh should be very coarse.

How can I avoid the refinement at the farfield boundary?

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                |
| \\      /  F ield         | OpenFOAM GUI Project: creativeFields           |
|  \\    /   O peration     | Version:  0.8.9.0                              |
|   \\  /    A nd           | Web: www.c-fields.com                          |
|    \\/     M anipulation  |                                                |
\*---------------------------------------------------------------------------*/

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

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

maxCellSize         5;

minCellSize         0.002;

surfaceFile        "airfoil_farfield.stl";

localRefinement
{
  "farfield.*"
{
cellSize 5;
}
}


boundaryLayers
{
    patchBoundaryLayers
    {
        "airfoil.*"
        {
        nLayers                 20;
        boundaryCellSize                0.002;
        maxFirstLayerThickness             0.01;
        thicknessRatio          1.2;
        }
    }
}

// ************************************************************************* //
attached a picture of the mesh

Moi!

If I understand it correctly, you want to have boundary layers around your airfoil face but you dont want any refinement at farfield face. isn't it?

If this is the case, why do you use localRefinement for farfield face? if you dont want that face to be refined, dont use it in localRefinement. Then it should be like this:

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

maxCellSize         5;

minCellSize         0.002;

surfaceFile        "airfoil_farfield.stl";

localRefinement
{
}


boundaryLayers
{
    patchBoundaryLayers
    {
        "airfoil.*"
        {
        nLayers                 20;
        boundaryCellSize                0.002;
        maxFirstLayerThickness             0.01;
        thicknessRatio          1.2;
        }
    }
}

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

If this is not your problem, please explain more.

Moikka,

Peyman
peyman.davvalo.khongar 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 j0hnny CFX 13 October 1, 2019 13:55
[snappyHexMesh] Edge Refinement fracasce OpenFOAM Meshing & Mesh Conversion 3 December 2, 2017 13:30
[snappyHexMesh] sHM refinement away from surface nholt OpenFOAM Meshing & Mesh Conversion 1 June 14, 2016 14:36
Radiation interface hinca CFX 15 January 26, 2014 17:11
[snappyHexMesh] Adding layers goes wrong with SnappyHexMesh Elise OpenFOAM Meshing & Mesh Conversion 1 April 22, 2013 02:32


All times are GMT -4. The time now is 22:16.