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

[Other] Dynamic mesh refinement using gradient mode issues

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 24, 2025, 04:27
Exclamation Dynamic mesh refinement using gradient mode issues
  #1
New Member
 
Nahum
Join Date: Oct 2025
Posts: 1
Rep Power: 0
Eterson is on a distinguished road
Hello everyone,

I’m working on a VOF droplet simulation with `interFoam`/`interDyMFoam` and using `dynamicRefineFvMesh` to adapt the mesh around the interface. My goal is to obtain a **thin refined ring around the droplet interface** while keeping the interior of the droplet and the exterior gas **coarse (unrefined)**.

Here’s a simplified version of my `dynamicMeshDict` when using gradient mode:

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object dynamicMeshDict;
}

dynamicFvMesh dynamicRefineFvMesh;

dynamicRefineFvMeshCoeffs
{
field alpha.water;
mode gradient;

refineInterval 1;

lowerRefineLevel 1000; // refine if |grad(alpha)| > 1000
upperRefineLevel 90000;

nBufferLayers 1;
maxRefinement 2;
maxCells 3000000;

correctFluxes
(
(phi none)
(alpha.water none)
);

dumpLevel true;
}


The issue is:

* If I use very low thresholds (`lowerRefineLevel ~ 1e-12`), I get refinement — but only on the *gas-side offset* of the droplet contour, not symmetrically around the interface.
* If I set more realistic thresholds (e.g. `1000`, based on `magGrad(alpha.water)` values), then the log reports:
* Selected 0 cells for refinement out of X
* Selected 0 split points out of a possible 0 and no refinement happens at all.

but when I see the values on paraview of grad(alpha.water) it shows a field much bigger that 1000 , as you can see in the image. I even check the range of grad(alpha.water) with a fixed apropieate refinement and show the a similar range.


Do you guys know what I'm doing wrong? Any advice, or example configurations where gradient-based refinement successfully unrefines the interior, would be greatly appreciated.

Thank you very much,
Eterson is offline   Reply With Quote

Reply

Tags
dynamic mesh, dynamic mesh adaption, gradient, refinement

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] Finished Meshing with illegal Faces. Leonhard OpenFOAM Meshing & Mesh Conversion 0 April 21, 2025 10:48
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 10:42
[snappyHexMesh] Edge Refinement fracasce OpenFOAM Meshing & Mesh Conversion 3 December 2, 2017 14:30
[PyFoam] having problems with pyfoam Installation vitorspadetoventurin OpenFOAM Community Contributions 3 December 2, 2014 08:18
[snappyHexMesh] external flow with snappyHexMesh chelvistero OpenFOAM Meshing & Mesh Conversion 11 January 15, 2010 20:43


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