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

Dynamic mesh refinement failing in interFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 29, 2022, 18:17
Default Dynamic mesh refinement failing in interFoam
  #1
Member
 
Venkat Ganesh
Join Date: May 2020
Location: Cincinnati, Ohio
Posts: 49
Rep Power: 6
Venky_94 is on a distinguished road
I'm running a simple bubble growth case, which is running perfectly fine without the dynamic mesh refinement. I'm using a grid size of 0.02*0.02mm generated by blockMesh for the simulation.

I've adaptive time stepping turned on with a maxCo set at 0.5, while running with the dynamicMeshDict, I'm noticing that the deltaT starts dropping drastically after a point (upto 1e-53 or 1e-119) and the program crashes with floating point exception error. Also even while the program is running normally, the deltaT is much higher than a much finer grid (around 2 e-7).

I've run with a fine grid of 0.01*0.01mm generated by blockMesh without dynamic mesh and it's running perfectly fine, and the average deltaT is also higher (around 2e-6).

I'm sharing my dynamicMeshDict here. I'd really appreciate if someone could share their inputs. I see that a lot of them are facing the same issue with dynamic mesh refinement but there has been no resolution posted.

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

dynamicFvMesh   dynamicRefineFvMesh;

// How often to refine
refineInterval  5;

// Field to be refinement on
field           alpha.water;

// Refine field in between lower..upper
lowerRefineLevel 0.001;
upperRefineLevel 0.999;

// If value < unrefineLevel unrefine
unrefineLevel   0.001;

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

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

// Stop refinement if maxCells reached
maxCells        250000;

// 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 none)
    (nHatf none)
    (rhoPhi none)
    (alphaPhi0.water none)
    (ghf none)
);

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


// ************************************************************************* //
Venky_94 is offline   Reply With Quote

Old   July 17, 2022, 06:16
Default
  #2
Member
 
Al Csc
Join Date: Jul 2018
Posts: 31
Rep Power: 8
al.csc is on a distinguished road
Simple guess: are you running a 3D refinement in a 2D case?
al.csc is offline   Reply With Quote

Old   April 24, 2024, 08:12
Default
  #3
New Member
 
Haoyu Ding
Join Date: Mar 2023
Posts: 1
Rep Power: 0
HY DING is on a distinguished road
dynamicmeshDict can not be used in 2D cases.
HY DING 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
[snappyHexMesh] snappyHexMesh stuck when snap is turned on yukuns OpenFOAM Meshing & Mesh Conversion 3 February 2, 2021 14:05
[snappyHexMesh] Edge Refinement fracasce OpenFOAM Meshing & Mesh Conversion 3 December 2, 2017 14:30
Local mesh refinement definition in a DEFORMING dynamic mesh zone using Dynamic Mesh Emanuele88 FLUENT 0 February 9, 2016 12:39
How to know mesh size after dynamic refinement tayo OpenFOAM 16 May 22, 2013 14:39
[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 14:05.