|
[Sponsors] | |||||
[Other] Dynamic mesh refinement using gradient mode issues |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
New Member
Nahum
Join Date: Oct 2025
Posts: 1
Rep Power: 0 ![]() |
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, |
|
|
|
|
|
![]() |
| Tags |
| dynamic mesh, dynamic mesh adaption, gradient, refinement |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
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 |