beginner in adaptive mesh refinement
Hi to everyone!
I am Aki, a beginner in OpenFOAM. I am intrested in adaptive mesh refinement and I managed to find "dynamicMeshDict" dictionary, but I am not sure how it works... Would you tell me a condition of the refinement? The mesh is refined automatically when the velocity (or the Courant number) exceeds a given value? And, I am not sure coefficients in the dictionary... constant/dynamicMeshDict  dynamicFvMesh dynamicRefineFvMesh; dynamicRefineFvMeshCoeffs { refineInterval 1; field alpha1; lowerRefineLevel 0.001; upperRefineLevel 0.999; unrefineLevel 10; nBufferLayers 1; maxRefinement 2; maxCells 200000; correctFluxes ( ( phi U ) ); dumpLevel true; }  I have performed some tutorials, so I guess "maxRefinement" means the max refinement number. But I cound only understand it. I can not understand what "refineInterval" and "maxCells" mean. And what are "lowerRefineLevel" and "upperRefineLevel"...? I would be grateful if you could provide me the meanings of them. Thanks in advance! Aki 
As far as I understand:
refineInterval  specifies how often (every n:th timestep) the grid should be refined. maxCells  limits the number of cells, should never be greater than the given number, an approximate number. lowerRefineLevel  grid gets refined if "alpha1" is lower than this value. upperRefineLevel  grid gets refined if "alpha1" is bigger than this value. 
Dear KrisT
Thank you very much for your help! I have performed some tutorials by changing them. May I ask one more question??? What is "correctFluxes" ? These values are corrected each time step? Aki 
Quote:

Hello,
I looked into the code and find following: nBufferLayer: Number of layers between different refinement levels I understand it in that way: nBufferLayer 1 means: a cell, which was refined once, can only be a neighbour of a cell which is not refined or refined twice. But this cell canīt be a neighbour of a cell which is refined three times. In a tutorial I found the definitoin for maxRefinement: maxRefinement means the number of refinements that are allowed for one cell. But does everybody know what "unrefineLevel" mean? Thanks a lot 
has nobody an idea what it could mean?
I would be really happy to get some help 
Vortex Refinement
Dear Foamers,
I have another question concerning the settings in the dynamicMeshDictfile. I would like to refine a tip vortex dynamically, so with the pimpleDyMFoamsolver. As entry 'field' in dynamicMeshDict I would like to use something like Lambda2. How can I tell the solver to calc this field? 
Finally, I programmed a new solver based on pimpleDyMFoam. There, I calculated the nedded scalar field (like Lambda2). In constant/dynamicMeshDict I specify the variables that prescribe the refinement and so it works :)

Quote:
Is this new solver working with dynamicRefineFvMesh in 2D ? 
Hi Francis,
what do you mean with 'dynamicRefineFvMesh'? I didn't try but I think it should work in 2D  why not? Regards, Peter 
The dynamic refinement is cutting cells 2x2x2  in all directions, so you would create mesh cells in directions you are not solving for. Which would be not such a problem, but you are creating also nonorthogonality and you will have parasitic fluxes in the direction you are not solving for and your solution is loosing precision at least.

Thanks! That's correct. So it works, but not in the desired way.

All times are GMT 4. The time now is 13:40. 