Adaptive refinement on multiphases
I'm trying to integrate the adaptive mesh refinement on the multiphaseInterFoam or the other way round.
I started from interDyMFoam and integrated the multiphaseMixture package to be able to set more than one phase, but somehow the refinement doesn't work properly. Some mesh grids seem not to be updated so the solver ends with a "mesh does not correspond to level 0" blablabla. This is a message sent by the GAMG solver and I'm trying to find out why the mesh isn't getting always correctly updated.
Maybe some of you has some experience with this problem and tried before to integrate one into the other.
PS: I also tried other solvers and then you don't get that exit message, but it doesn't work as well, because the values in a cell become absolutely nonsense (alphaAir > 1.5, etc.).
I'm working in a sloshing problem that involves 3 different fluids, so I need to integrate
interDyMFoam and multiphaseInterFoam ; my need is different by yours because I need to rigidly move all tank containing 3 (or more) fluid.
I know that I'm late of 4 years, but I hope that you solved your problem and you can give me some suggestion about integration.
Thank you very much
unfortunately, I didn't use OpenFOAM since my diploma thesis four years ago and can hardly remember what I did in the end.
I know, that I never solved the problem with the adaptive refinement. I think, I finally did all of my simulation just based on the multiPhaseInterFoam solver, which I extended to
So I cannot really help you.
Hi Alex, hi Piero,
just set cacheAgglomeration off in the GAMG-solver. Then it should work.
I hope that you still visit this topic. Could you please help me with this problem. I want to use mesh refinement with multiphaseInterFoam. I started adding dynamicMeshDict to the constant folder, and from my understanding I need to include the dynamicFvMesh.H to multphaseInterFoam solver code and compile a new solver in this way. Please correct me.
the easiest way ist to take a look at interDyMFoam and interFoam and just do the same changes in multiphaseInterFoam. It's really easy.
what Andreas is mentioning,... you just have to add the dynamicFvMesh lib to the solver and derive the mesh creation out of that library. Thats all ;)
Of course do not forget to recalculate the fluxes due to mesh motion.
at the moment I try to use an adaptive mesh at the phase boundray. In my case I use the interDyMFoam solver (OpenFoam 2.3.1). At the beginning I can see a refinement, but after some simulation seconds the refinement disappears and at the end of my simulation it appears again.
Is this also a problem of not updated cells?
Now I changed the cachAgglomeration to false. But I have also seen tutorials where this is true and it works. Do it depends on the solver? Or did I do an other mistake?
Maybe I did a mistake in the dynamicMeshDict - here are my parameters...
// How often to refine
// Field to be refinement on
// Refine field inbetween lower..upper
// If value < unrefineLevel unrefine
// Have slower than 2:1 refinement
// Refine cells only up to maxRefinement levels
// Stop refinement if maxCells reached
// 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.
// Write the refinement level as a volScalarField
If anyone might help me, I would be very grateful.
Thank you so much and best regards,
What Do you think is the keyword unrefineLevel stand for ;)
It has nothing to do with the solver settings in fvSolutions.
Okay so I have to set it to a smaller number.
Thank you :)
yes. Just read it like: if alpha < unrefineLevel --> unrefine. So at least alpha is between [0-1] and therefore you should set it to a value inbetween, depending when you will unrefine the refined cells again.
Notice, that the interface is 0.5. You also (if you want to make a other refinement) can use my lib: http://www.cfd-online.com/Forums/ope...o-regions.html
thank you for this explanation. I set the unrefinelevel to 0.005 and it seems to work.
Can I ask you two other questions?
Why they use an unrefinementlevel of 10 in the tutorial damebreakWithObstacle?
My geometry contains a big cylinder and an straight inlet. The refinement at the inlet is consistent, but at the cylinder there are just some cells refined. Could it be, that the mesh is to rude? The cells are really big.
Your lib look very interesting. I will try to test it :)
Thank you for your help!
Question 1: I don't know. Maybe this unrefine function is called at the beginning, then we refine and apply this to the topo of the mesh. If its like that, you delete every refinement each timestep and refine again after that functoin due to the new alpha field. But then the question would be, why is it not working in your case. To be sure and answer correctly, I should check the lib again, but I am not in the mud to do this (: -- sorry. Just do it yourself and you should get the point.
Question 2: The lib can only split hexaeders. If you have a cylinder (maybe created with snappyHexMesh) then the crazy cells at the surface can not be refined with the algorithm we are using here.
up to now the refinment of alpha.water works well. But today I got a new task - I have to refine alpha.water AND the velocity gradient (all cell over 1.3 m/s have to be refined).
Has anyone experience in refining two fields? How can I implement this in the dynamicMeshDict?
I would be very gratefule for your help!
Thank you so much and best regards,
I did this and the lib is available here: http://www.cfd-online.com/Forums/ope...o-regions.html
Instead of using twice alpha, you could use the magnitude of the velocity (scalar). The gradient of a velocity field will return a matrix. I think that is not what you want (:
thank you so much!!!!! It looks amazing, that's what I am searching for.
This might be a stupid question, but I am not so familar with including new libarys into OpenFoam. How do I do this? I downloaded the zip file from bitbucket and now?
It would be fantastic if you might help me again.
If the lib is compiled simply copy it into your $FOAM_USER_LIBBIN directory
usually the place is something like this
If it is not yet compiled simply type wmake in the directory with the source code.
Once this is done you need to add it to your case.
for example in your controlDict
Please use wmake libso instead of wmake
|All times are GMT -4. The time now is 08:52.|