Rewriting twoPhaseEulerFoam in conservative form
Hello,
I started to work on an improved version of a twofluid solver with the goal of dealing with gasparticle flows with the traditional kinetic theory closures for the particle phase and, eventually, in future, more advanced techniques. At first I thought to work on a twophase code, because there still are a few questions to be addressed before adding complexity to the problem. So the steps I plan to follow are:
Currently I have a rough implementation with a fictitious equation of state (I'm assuming the granular temperature to be constant), without the fix that causes the velocity peak at the interface. P.S. Of course the code will be released, as soon as it works :D 
Track this work
Hi Alberto,
This work sounds very attracting. How is it going on? I was flooded by the code. twoPhaseEulerFoam is not easy to be adapted to new turbulence lib structure, especially for a roockie as me. I look forward to your advance and wish all the best. Thanks. Roro 
It is interesting!
I did some work to create a RANS multiphase turbulence library in the style of the single phase turbulence libraries. They generalised reasonably well, at least it makes writing new models easier. It would be interesting to compare how we've both done it. 
Hi Laurence and Roro :)
@Laurence: how is it going with your work? :) This work is going on, a bit slowly due to other obligations, but it's not stuck. I can give a short status update, even if there still are some open questions. Please, keep in mind I'm interested in a code to compute gasparticle flows, so some of the developments cannot be directly generalized to a gasliquid system. In particular, I dropped the pressure equation based on total continuity, and I implemented two pressure equations, one for the fluid and the other for the particle phase. Proper interpolation practises removed the peak at the interface (it's really all already in OpenFOAM, in some of the solvers) The algorithm to enforce the particle packing limit is what gave me more troubles, and there still are some open question on this point to improve the stability of the solver, given the level of stiffness introduced by the equation of state. Best, 
Very slowly...
I've got a multifluid solver alongside DQMoM solving a coupled PBE implemented now (multiple dispersed phase momentum equations so that each node is transported with a different velocity) , and it seems to work ok. There are very slight differences between the DQMoM and the QMoM solution, but I suppose that is to be expected, and they should vanish with sufficient refinement. I'm still having problems when solving the countercurrent contactor (due to the phase inversion). I can get a solution which looks reasonable, but I have a lot of validation to do and it's not very stable. There was a big problem with some of the breakup models (at least, with the way I'd implemented them!), so I hope to have that cleared up soon. 
The difference between QMOM and DQMOM is, I would say, OK. Btw, an improved flavour of multivariate QMOM will come out soon :D
About twoPhaseEulerFoam stability, how does it crash? Alpha going above 1 or drag not converging? Best, Alberto 
It's when the coupling between the CFD and the PBE is activated. The CFD obviously does not like having too big/small diameters being returned to the drag force. I can get around it by imposing cut offs but it's rather arbitrary.

Probably a more implicit treatment of the drag would help. The semiimplicit treatment is known to work in some situation, but in general the partial elimination algorithm (PEA) or a coupled solution of the momentum equations is required for stability purposes.
The PEA is relatively easy to put into OF, the coupled solution requires much more work, since no coupled solver is available in OpenFOAM at the moment. MFIX uses PEA for nphases, and it is very robust though. Best, 
Thanks for the tip, I'll look into it.
It looks like Fluent uses a coupled solver, I should have noticed this before. :o 
Quote:
It is surely an effective solution, but probably also one of the reasons why FLUENT multifluid simulations are not exactly fast, at least compared to what MFIX can do. It is surely possible to use the partial elimination with twophases, and you can derive an incomplete version of the PEA for n phases (See MFIX  www.mfix.org documentation and Mathiesen's work (Prof. Hjertager group). I did something similar in MFIX to couple QMOM for kinetic equations to the fluid solver, and there I've 8 velocities (quadrature abscissas) per each particle phase :D). Drop me an email if you want to talk about it. I have some notes and references on the topic. Best, Alberto 
I've just written the PEA for a twofluid case, it seems to give much better results, I'll post a derivation and comparison up soon after I've checked it over.

Yes, if you have small bubbles, with strong coupling, the difference is very clear :cool:

Alberto & Laurence
I am very interested to know about the progress in this area. As you migth know, my group has had success in using the multiphase PEA algorithmn in both bubble column and fluidised bed applications also using the DQMOM. We have our own fortran code but would be interested in using OF for thes problems. regards Bjorn 
Quote:
you have been one of my teachers at a summer school in Udine in 2006, when I was doing my PhD in Torino. I really appreciated the insights in the multiphase numerics you gave. They were of great help for my work. :) My focus is on gasparticle flows, and what I did up to now is to modify twoPhaseEulerFoam so that:
About QMOM, a colleague of mine in Dr Fox group, who will graduate next week has been working on a new flavour of QMOM for multivariate distributions (Conditional QMOM  CQMOM) applied to nanoprecipitation. She coupled it with a singlephase solver in OpenFOAM. At the moment, the implementation is not done "the OpenFOAM way", but the code is functional. Some extra updates. QMOM has also been extended to deal with kinetic equation (Boltzmannlike, to be clear), with the goal of directly approximating the kinetic equation to describe polydisperse flows and overcome the limitations of multifluid models. In this method QMOMlike techniques are used to solve for the dispersed phase velocity, without making restrictive assumptions to derive closures for the phase viscosity as in KTGF. This development is not done in OpenFOAM yet, since the main initial goal was to develop the approach without too many complications. However we have a functional code based on MFIX, and the procedure is colocated by nature, so porting it should not be too painful (we are thinking about it, since now the base multiphase code seems to be quite robust). Best, 
Dear Bjorn,
I see you are at Stavanger. I lived there and in Bergen until I was 7. I can't remember much apart from the snow though. :) Yes, I've read the work of Stefano Bove in particular and enjoyed reading Neils Deen's work. I've been working on multiphase DQMoM for gasliquid/liquidliquid applications, where each quadrature node has its own velocity and hence a separate momentum equation is solved for. I also want to increase the number of internal coordinates in the population balance to simulate mass transfer in a real application. I've extended bubbleFoam to solve for N dispersed phases and coded multiphase PEA (hope it's correct  it does give equivalent results to the semiImplicit method with better residuals when the drag force is large). I also have some multiphase turbulence models and some surface forces implemented in a runtime selectable framework. I have problems with solution stability when solving a momentum equation for each quadrature node. The residuals are very oscillatory and some cases diverge completely when coalescence and breakup in the population balances are on. I am not sure how to proceed from here: I may look at using a coupled approach. Any suggestions would be appreciated. Alberto: Regarding the cut off for solving the momentum equations. We had convergence problems when imposing arbitrary cutoffs for reactive flows using DQMoM, and found it better to filter/smooth the source terms towards zero. I'm not sure if it would be relevant (some limited discretisation schemes probably do a similar thing?) but the paper is here. 
Dear Laurence,
We also had some problems in solving the PBM using DQMOM in Fluent. You migth look at the PhD thesis of Jesper Madsen where he explains what he did: http://hugin.aue.auc.dk/publ.php?id=2007 Regards Bjorn 
Hello,
So you found an operator splitting was necessary? I used that for the reacting flow 'version' of DQMoM, where the chemical time scales are much smaller than that of the flow, we needed to have an operator splitting. Interesting, this should be quick to try. Did you use RADAU5 or CVODE for the time integration? Regards, 
Quote:
About my problem with the cuttoff, I do not have instabilities related to it, but a certain sensitivity to the cutoff value. In other words the "small" value used as cutoff value cannot be too small (it is typically between 10^4 and 10^6). In some cases 10^6, which is what I would like to use, is too small and gives some trouble at interfaces (wrinkles), while 10^4 works fine, but it might be too high in some case, depending on the application. Thank you for your reference. I'll take a look and let you know :) 
Hello there.
I've been working with multiphase simulations for a while now. One of the new goals of the taskforce I work with is the evaluate OpenFOAM as a possible substitute ofr other simualtions packages. Would one og guys mind telling me how does the code used in the tutorial example "DamBreak4phase" ensures that the sum of all components fractions will be equal to 1??? After reading your discussion I thought one of you could help me. Thanks a lot 
Quote:
You can find the implementation of this into multiphaseInterFoam in the solveAlphas method in multiphaseMixture.C. Best, 
All times are GMT 4. The time now is 07:02. 