CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

how to use meshrefinement

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By nero235

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 13, 2014, 03:43
Default how to use meshrefinement
  #1
Member
 
Yu CAO
Join Date: May 2013
Posts: 76
Rep Power: 12
cctv is on a distinguished road
Hi:
In meshrefinementdict there are
dynamicRefineFvMeshCoeffs
{
refineInterval 1;
field alpha1;
lowerRefineLevel 0.001;
upperRefineLevel 0.999;
unrefineLevel 10;
nBufferLayers 1;
maxRefinement 2;
maxCells 200000;
correctFluxes
(
(
phi
U
)
);
dumpLevel true;
}

I am not sure if a cell would slit when the value lower than the lowerRefineLevel or larger than it.
In addition, I am wondering what the exat use of unrefineLevel. Does it means cells would unrefine when the value is larger or smaller than unrefineLevel?
Thank you for your help
Yu
cctv is offline   Reply With Quote

Old   January 9, 2015, 07:48
Default
  #2
Member
 
Sebastian W.
Join Date: Nov 2012
Location: Saxony, Germany
Posts: 43
Rep Power: 13
nero235 is on a distinguished road
Send a message via ICQ to nero235
Quote:
Originally Posted by cctv View Post
Hi:
In meshrefinementdict there are
dynamicRefineFvMeshCoeffs
{
refineInterval 1;
field alpha1;
lowerRefineLevel 0.001;
upperRefineLevel 0.999;
unrefineLevel 10;
nBufferLayers 1;
maxRefinement 2;
maxCells 200000;
correctFluxes
(
(
phi
U
)
);
dumpLevel true;
}

I am not sure if a cell would slit when the value lower than the lowerRefineLevel or larger than it.
In addition, I am wondering what the exat use of unrefineLevel. Does it means cells would unrefine when the value is larger or smaller than unrefineLevel?
Thank you for your help
Yu

The cell will be refined if the current value is in between the lower and upper bound. If the value is smaller than the unrefine value, the cells will be unrefined. When I looked in the constant/dynamicMeshDict of the interDyMFoam tutorial cases, these values where commented like this:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh   dynamicRefineFvMesh;

dynamicRefineFvMeshCoeffs
{
    // How often to refine
    refineInterval  1;
    // Field to be refinement on
    field           alpha1;
    // Refine field inbetween lower..upper
    lowerRefineLevel 0.001;
    upperRefineLevel 0.999;
    // If value < unrefineLevel unrefine
    unrefineLevel   10;
    // Have slower than 2:1 refinement
    nBufferLayers   1;
    // Refine cells only up to maxRefinement levels
    maxRefinement   2;
    // Stop refinement if maxCells reached
    maxCells        200000;
    // Flux field and corresponding velocity field. Fluxes on changed
    // faces get recalculated by interpolating the velocity. Use 'none'
    // on surfaceScalarFields that do not need to be reinterpolated.
    correctFluxes
    (
        (phi Urel)
        (phiAbs U)
        (phiAbs_0 U_0)
        (nHatf none)
        (rho*phi none)
        (ghf none)
    );
    // Write the refinement level as a volScalarField
    dumpLevel       true;
}


// ************************************************************************* //
Regards, Sebastian
emjay and PicklER like this.
nero235 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
Implementation of adaptive Meshrefinement for 2D for rhoCentralFoam Henning86 OpenFOAM Running, Solving & CFD 0 September 13, 2013 07:33


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