CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Tank Mixing Simulations (

insane_alien July 21, 2011 14:02

Tank Mixing Simulations

I'm working on a project that involves simulating the mixing of chemicals in tanks. We are looking to optimise our stirring times and want to use CFD to estimate impacts of various stirring configurations.

I have used openFoam in the past for a university project and want to use it to simulate the mixing vessels.

I'm not that experienced with openFoam (little more than playing about really) and I'm not sure how to put a rotating stirrer into the simulation. I think you need to use the interDymFoam solver?

Also, (just to make things complicated) the two liquids being mixed are miscible and we want to model that as in interMixingFoam, is there a solver that can have both the rotating mesh AND 2 miscible liquids with air? Will I need to learn how to create a solver?

Any help or tutorials you could point me towards would be much appreciated.

kwardle July 21, 2011 15:56

Do you need rotating mesh or can you get by with moving reference frame? Either way, there is not a standard solver which has mesh motion (or MRF) along with interMixingFoam. That said, it is not too tricky to make your own solver. I would start with interMixingFoam as the base and by taking a look at interFoam vs interDyMFoam (or interFoam vs MRFinterFoam for MRF) and see what things you need to add.
As for actually modifying and compiling the new solver the following link from the wiki gives an example of how-to start since this is your first try.

mturcios777 July 21, 2011 18:01

I'm with kwardle; so long as the stirrer is rigid you should be able to specify a tangential velocity along the interior boundary of the vessel and keep the velocity on the stirrer as zero.

Specifying a tangential velocity is not something OF can do right out of the gate, you'll need swak4Foam (I'm just singing its praises today!)

insane_alien July 22, 2011 11:58

ho would the moving reference frame cope with baffles and offset/angled stirring?

either way looks like i better start brushing up on my programming.

mturcios777 July 22, 2011 12:37

Not knowing what this stirrer looks like, from your description I take it that it is not a single solid element, in which case you do need some kind of sliding interface. Maybe look at this presentation:

kwardle July 22, 2011 14:17

OK. You're right, MRF may not fly for that sort of case if you have strong interaction between stirrer and baffles. As for programming, it is not as bad as you might think. That is one advantage of openfoam--solvers use 'high level' constructs so it is relatively easy to combine methods. Starting with interMixingFoam, you likely will only have to add in a handful of lines of code to get it to work with the dynamic mesh stuff. Like I said, take a look at the comparable solvers (interFoam --> interDyMFoam) and see what changes need to be made.

BTW, in case you aren't familiar with the lay of the land, the post by Marco refers to functionality (GGI) which is in the -dev branch from the openfoam-extend project and not part of the releases.

All times are GMT -4. The time now is 14:04.