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

[mesh manipulation] Adaptive Mesh Refinement - maxCells

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 28, 2021, 07:51
Default Adaptive Mesh Refinement - maxCells
  #1
New Member
 
Join Date: Jul 2021
Location: United Kingdom
Posts: 5
Rep Power: 5
dylewiczk is on a distinguished road
Hi OpenFOAMers!

I recently implemented adaptive mesh refinement to my simulation using rhoCentralFoam solver.

However, I encounter problem with the maximum number of cells that the AMR generates. My 'base' mesh has ~ 1e6 cells. And I want to refine the field up to ~ 2e6 cells. However, during the simulation it went up to nearly 8e6 cells!

One of the messages prompted by OpenFOAM:
Selected 777925 cells for refinement out of 2269126.
Refined from 2269126 to 7714601 cells.


Here is my dynamicMeshDict:

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

dynamicFvMesh dynamicRefineFvMesh;

// How often to refine
refineInterval 1;

// Field to be refinement on
field MachGradMag;

// Refine field in between lower..upper
lowerRefineLevel 1e4;
upperRefineLevel 1e6;

// If value < unrefineLevel unrefine
unrefineLevel 1e8;

// Have slower than 2:1 refinement
nBufferLayers 3;

// Refine cells only up to maxRefinement levels
maxRefinement 5;

// Stop refinement if maxCells reached
maxCells 2278148; // twice the base mesh

// 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
(
(neg none)
(pos none)
(phi none)
);

// Write the refinement level as a volScalarField
dumpLevel true;

End of dynamicMeshDict

Could you guys help me out understand why OF is doing what it is doing? Is it something to do with buffer layers and maximum refinement?

Thanks!
dylewiczk is offline   Reply With Quote

Old   January 29, 2023, 09:15
Default
  #2
New Member
 
Volkan Atar
Join Date: Oct 2022
Posts: 23
Rep Power: 4
Volkanatar is on a distinguished road
Hello have you figured it out why it is like that? I am having exactly the same problem with a steady state solver.

Thanks
Volkanatar is offline   Reply With Quote

Reply

Tags
dynamicmeshdict, dynamicmeshfvmesh


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
[snappyHexMesh] snappyHexMesh sticking point natty_king OpenFOAM Meshing & Mesh Conversion 11 February 20, 2024 10:12
Data mapping with Adaptive Mesh Refinement kapten_zoom STAR-CCM+ 0 June 7, 2021 10:28
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 10:42
[snappyHexMesh] SnappyHexMesh for internal Flow vishwa OpenFOAM Meshing & Mesh Conversion 24 June 27, 2016 09:54
killed "snappyHexMesh" parkh32 OpenFOAM Pre-Processing 2 April 8, 2012 18:12


All times are GMT -4. The time now is 08:28.