CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   two mixing compresible fluids solver (

ziemowitzima September 7, 2010 09:32

two mixing compresible fluids solver
I am interested in solver which is able to model mixing of two compressible fluids (lets say Helium and Air).
As far as I know there is no such solver among standard OF solvers.
I looked at twoMixingLiquidFoam which is for incompressible fluids.
So I decided to change this solver for compressible fluids as well, but I am not sure if method used there can be applied for compressible fluids as well.

I am not sure if the concentration equation method from incompressible solver can be used for compressible flows.

My idea is as follows:
1. solve compressible NS eq with PISO method (U,p)
2. solve energy eq (e)
3. solve concentration eq (c)
4. calculate density rho=c*rho1 + (1-c)*rho2
5. similar for viscosity, R (individual gas constant), Cp,...

Could anyone tell me please if such approach is correct ?

Many thanks,

danishdude September 7, 2010 14:52

Possible Solver for Mixing of 2 Compressible Fluids
Have you looked at compressibleInterFoam? From the description in the source code, this solver is design for the following:

Solver for 2 compressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach. The momentum and other fluid properties are of the "mixture" and a single momentum equation is solved. Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.

ziemowitzima September 7, 2010 15:17

I know this solver, I used to work with it.
But it is for immiscible flulids, and I need for mixing .
and It is isotermal

xiazhy January 22, 2011 07:11

Hi Michael

i am a fresher in OF..i want to simulate high speed jet with OF. the two phases are incompressible and immiscible. i intend to do this simulation using A VOF + LES modle . I want to know which solver i should use..\
Many thanks

ziemowitzima January 22, 2011 15:21

HI Zhenyan,
The Solver u need is:
"Solver for 2 incompressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach"

for the other standart solvers chceck OF userguide:


xiazhy January 23, 2011 00:30

Ziemowit,thanks a lot for your help! I read the part of interFoam on the web site you mentioned above. actually, my need to do LES+VOF+Non_newtonian to solve my question. do you have any advice about it. Any help would be much appreciated.


ziemowitzima January 25, 2011 11:54

Hi Zhenyan,
I have never worked with LES models or Non-newtonian fluids. But OF is written in very flexible way. You can use any written turbulent model (including LES) and Non-newtonian fluid. You have to just define proper dictionaries (files) and values. To see how it work just look trough different solvers and cases where LES or Non-n model was used. And then just based on this example.
I am sure that you can find a lot of informations searching the OF forum, and some hints in UserGuide.

Hope it helps,

Rophys May 15, 2012 06:17

Hi all,

I want to simulate a simple case: a flat plate with transverse jet, where air is my main flow and the jet is Hydrogen.

So, how can I deal with two different fluids in openFoam ? Which solver is better for this kind of problem ?

I look forward your help.



ziemowitzima May 15, 2012 10:32

It depends if u want to simulate immiscible or miscible, compressible or incompressible fluids ...
Just check "Standard solvers" chapter in the OF User Guide (look for Multiphase flow ).


Rophys May 15, 2012 10:46

Thanks, ziemowitzima.

Sorry, I didnīt fully explain my problem.
I would like to simulate a compressible flow and mixing, but is a good idea to start with more simple cases and conditions (incompressible and immiscible). Could you suggest me which solver is better (or reasonable) for this conditions ?

Many thanks.

ziemowitzima May 15, 2012 10:52

I would try:


manu305 October 10, 2014 16:02

Hi Ziemowitzima,

I would like to simulate Helium jet injection into air, this is exactly matching with the problem you mentioned in the starting of this thread. I have gone through many other threads similar to this but I got confused " which solver I have to take and modify further to match the need ?"

Buoyancy effects have to be considered along with the compressible nature of both the fluids (miscible).
I was searching for suitable solver directly, but I couldn't find any direct solver in openfoam as of now. Please tell me how you have solved this problem? finally which solver you have taken to implement the modifications required ?

Thanks in Advance...


samiam1000 February 20, 2015 12:40

Any news about this solver? Someone did it?

ziemowitzima February 20, 2015 12:45

Currently I am using reactingFOAM, with chemical reactions off and combustion off. Them it works as compressible solver with mixture of several gases. It is possible there to use different thermodynamical models.
Unfortunately results are not as good as I would like. FLUENT (theoretically uses the same approach), but gives better results...

samiam1000 February 20, 2015 12:49

Do you consider miscible or immiscible fluids?

ziemowitzima February 20, 2015 12:52

helium/argon ejected into air,

samiam1000 February 20, 2015 12:54

That would be exaclty what I want.

Two more questions before going deeper into the model:

1. is it easy to switch off the combustion and the chemical reactions?
2. do you have a parameter to measure the mixing beetween the 2 fluids?
3. would you mind sharing a simple running case you set?

You can also send it to

Thanks in advance,


ziemowitzima February 20, 2015 13:07

yes it is easy, you have to put:
instead of

what do you mean by the parameter to measure the mixing ?
See one of my publication, where such parameter is defined:

keep in mind that in this paper I do NOT use reactingFOAM.

but the Helium/air mixing process is govern by viscosity/diffusivity of the mixture (in OF).

I will share some simple example. But it will take me few days.


samiam1000 February 23, 2015 02:40

That would be great, thanks a lot.

Share your cases, when you can.

Have a good day,

ziemowitzima March 3, 2015 12:51

Give me your email, I will send you the working case with few words of explanations.
I would attached it here, but size of the file seems to be too large (1.4MB), and I could not attached it to my reply.


All times are GMT -4. The time now is 11:28.