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

dynamicRefineFvMesh - Protect cells from refinement (boundary)

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   March 3, 2021, 18:04
Default dynamicRefineFvMesh - Protect cells from refinement (boundary)
  #1
Member
 
Jairo A. Gutiérrez S
Join Date: Nov 2014
Posts: 60
Rep Power: 11
jairoandres is on a distinguished road
Hello Forum

In my AMR case, I want to protect wall-cells from refinement. This basically because the y+ size is well defined there and because of other reasons (I have found issues in OpenFOAM 2012 and older versions when tracking a particle with a containing near-wall cell which is being refined / unrefined).

The protection of wall boundaries has to be done in dynamicRefineFvMesh.C, however, it has given me issues as mesh() is not defined there.

I can assign a SMALL value to the field used for refinement criteria in near-wall cells (already implemented in other thread), but dynamicRefineFvMesh does at least 1-buffer cell refinement, therefore, in many cases, the wall-cells get refined. I don't honestly want to remove the 1-buffer refinement as it would bring many issues. A possible solution would be extending this set value to neighbour cells, but it would hamper the solution accuracy in some regions, so protecting the cells seems a better solution.

I've tried something like this (among many other things) :

forAll(cells(), celli)
{
const cell& cFaces = cells()[celli];

// if (cFaces.nFaces() - cFaces.nInternalFaces() > 0)
if (cFaces.nFaces() - cFaces.nInternalFaces() > 0)
{
protectedCell_.set(celli);
}


}

but, of course, it does not work as nInternalFaces() is not defined for cells() (as nFaces is). I am running out of ideas. I would be very happy to receive feedback on this.

Naturally, using topoSet to selected all boundaryCells and then saving those to a protectedCells file does not work as the cell-protection decision is performed each refining step inside dynamicRefineFvMesh

Thank you for your support
jairoandres is offline   Reply With Quote

 


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 running killed! Mark JIN OpenFOAM Meshing & Mesh Conversion 7 June 14, 2022 01:37
[snappyHexMesh] snappyHexMesh stuck when snap is turned on yukuns OpenFOAM Meshing & Mesh Conversion 3 February 2, 2021 13:05
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 09:42
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 04:05


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