CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Controlling Mesh size in interDyMFoam (http://www.cfd-online.com/Forums/openfoam/112256-controlling-mesh-size-interdymfoam.html)

tayo January 24, 2013 14:22

Controlling Mesh size in interDyMFoam
 
Hello Foamers,

Just a quick one here. I need to know how to control the mesh size of the dynamic refinement. I have a coarse mesh for the domain.
1) How do I manipulate the numbers in the dynamicMeshDict file to have the desired refined mesh size? i.e. How do my get the refine mesh size relative to the coarse mesh size in the domain.
2) What does it have to do with cAlpha? I'm using the default setting of cAlpha = 1.
3) Can I have the LowerRefineLevel = 0.0 instead of the default 0.001 since gas phase is at alpha1 = 0.0?

Thank you.


Here is the default dynamicMeshDict that I'm using:

dynamicFvMesh dynamicRefineFvMesh;

dynamicRefineFvMeshCoeffs
{
// How often to refine
refineInterval 1;
// Field to be refinement on
field alpha1;
// Refine field inbetween lower..upper
lowerRefineLevel 0.001;
upperRefineLevel 0.999;
// If value < unrefineLevel unrefine
unrefineLevel 10;
// Have slower than 2:1 refinement
nBufferLayers 1;
// Refine cells only up to maxRefinement levels
maxRefinement 2;
// Stop refinement if maxCells reached
maxCells 200000;
// 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 Urel)
(phiAbs U)
(phiAbs_0 U_0)
(nHatf none)
(rho*phi none)
(ghf none)
);
// Write the refinement level as a volScalarField
dumpLevel true;
}

nimasam January 24, 2013 17:00

several unrelated issue

1- by
maxCels, maxRefinement and nBufferLayers;

2-increasing of cAlpha1 makes interface much more compress and it is not related to interface

3- nope, because then it would refine almost all gas side

tayo January 24, 2013 19:08

Thanks. I've been playing around with the numbers and I seem to get a good control of it now.

linch August 14, 2013 09:40

Hi guys,

two questions:

1) how several coexisting refinement zones with different refinement levels can be defined? I would like to have refinement level 1 i the whole disperse phase
Quote:

Originally Posted by dynamicMeshDict
field alpha1; lowerRefineLevel 0.001; upperRefineLevel 2; maxRefinement 1;

and refinement level 3 at the interface simultaneously:
Quote:

Originally Posted by dynamicMeshDict
field alpha1; lowerRefineLevel 0.001; upperRefineLevel 0.999; maxRefinement 3;

2) What nBufferLayers exactly does? What does it mean:
Quote:

Originally Posted by dynamicMeshDict
// Have slower than 2:1 refinement

I tried out and changed it from 1 to 10, but nothing happened and no additional cells were refined.

Best regards,
Ilya

yangzie2014 December 15, 2014 03:24

hello, i can reply your second question. the "nBufferLayers" is the number of the transition layer between the refine and coarse mesh. in most of cases, we chose 1 for the number.


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