CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Multiphase flow and Phase change due to heat transferevaporation (

haghajani March 6, 2009 07:58

Dear all, Why there is no s
Dear all,

Why there is no solver in Multi-phase flow solver series, capable of handling phase change due to evaporation?
I want to simulate high pressures release of Liquid Hydrogen, which evaporates shortly (flash evaporation/its boiling Temperature is 22K), after releasing in to atmosphere and am investigating if the multiphase solvers can be helpful;
I am thinking to "interfoam" based solver capable of handling with two phase flow + evaporation.

Would you please let me know, where/How I should modify, if the idea feasible?

Any other suggestion, I will be thankful;
Hamed Aghajani
hamed (dot) aghajani (at) gmail (dot) com

mkraposhin March 6, 2009 10:57

If your simulation is incompre
If your simulation is incompressible, then, i think, you must try interPhaseChangeFoam. This solvers includes base model for phase change mechanism

haghajani March 6, 2009 13:07

Dear Matvej, Thank you for yo
Dear Matvej,
Thank you for your reply,

do you have experience with interPhaseChangeFoam? Could you please let me know How I should start with?

Any, Tutorial? and any comments on, where i should change to introduce evaporation?


mkraposhin March 9, 2009 04:32

interPhaseChangeFoam uses VOF
interPhaseChangeFoam uses VOF method with surface capture, like in interFoam.

and phase kinetic is done by using fraction (void or liquid) transport.

f.e., for volume void fraction we can write

ddt(gamma) + div(U * gamma) = Production - Annihilation

Production and Annihilation terms are often based on local pressure, normalised by infinity parameters and uses empirical constants.

for example such model (based on cavitation number)

Production_{Vapor} = Evaporation = Max((PSat - P)/{rho * UInf^2/2} * C1,0)
Annihilation_{Vapor} = Condensation = Max((P - PSat)/{rho * UInf^2/2} * C2,0)

where P, PSat - local pressure, saturation pressure, rho - local density, UInf - inf. velocity, C1,C2 - empirical constants

If you are intersted, i can gave links to literature (articles and dissertation) in pdf

haghajani March 9, 2009 05:06

Dear Matvej, Thanks again for
Dear Matvej,
Thanks again for your kind reply,
I would be thankful if you send me the links.

After your comment, I found a tutorial on "Solve Cavitating flow around a 2D hydrofoil using a user modified version of interPhaseChangeFoam", after reading, it may arise some questions to me which I'll share with you, later.


mkraposhin March 9, 2009 05:37

i've sended materials to you b
i've sended materials to you by e-mail, they are from site

mkraposhin March 9, 2009 05:45

I'm working on quasi-steady-st
I'm working on quasi-steady-state homogeneous model of cavitation.

i think, for your case you need energy conservation equation and equation of state?

haghajani March 9, 2009 06:24

Dear Matvej, Thanks for sendi
Dear Matvej,
Thanks for sending the links, but I didn't received anything on my emails!

Regarding my case, High pressure release of liquid Hydrogen, yeah!, I need to include the equations you mentioned.

In a realistic simulation of the release of a cryogen (liquid Hydrogen),the initiating event could be a pipeline rupture or the catastrophic failure of a storage tank, the pressure relief from system to atmospheric pressure results in spontaneous vaporization of a certain fraction of the liquid (flash vaporization). Depending on leak location and thermodynamic state of the cryogen (7bar,20 K), a two-phase jet is being created, leading to the formation of aerosols which vaporize in the air without touching the ground. The liquid gas eventually reaching the ground accumulates and forms a pool which expands, depending on spilled volume and release rate, radially away from the releasing point.


haghajani March 9, 2009 07:34

I have received them, thanks
I have received them,

mkraposhin March 9, 2009 07:48

Oh! Sorry, i've done mistake,
Oh! Sorry, i've done mistake, when typing your e-mail address

please, check your mail now

well, your task is complex, both in geometry and mathematics.

In this case you can obtain trans-sonic velocities, thus you must use different pressure equation, am i wrong? Vapour material is compressible and you to account changes in density...

I think, your algo should be something between cavitatingFoam, rasInterFoam, interPhaseChangeFoam and rhoPimpleFoam.

i'm working on problem, near to your (evaporation of liquid with temperature near Tsat due to sudden pressure loss, Ma number for vapour could be more then 0.5)

haghajani March 9, 2009 08:52

Dear Matvey, I have received
Dear Matvey,
I have received the Thesis and the paper; :-)

Actually the physics is complicated. I started working with openFoam, 5 month ago, first i tried combustion solvers, reactingFoam, to model the formation of Gas Hydrogen combustible cloud due to dispersion.while after evaporation, we have a combustible Hydrogen cloud!

After it, I tried dieselFoam, why I supposed can capture aerosols/droplets of liquid Hydrogen by applying breakup models on it. no remarkable success in this approach! Diesel foam injects the liquid, and I couldn't apply any breakup model on continuous liquid jet/core!, this solver has evaporation model, as well.

Then I came to the point to examine Multiphase solvers! I have no idea what shall I do? I just run the tutorial of compressibleLes/interFoam, twoliquidMixingFoam and twoPhaseEuelerFoam before opening this Thread.

My idea was to a multi-step development compressibleLesinterFoam, it is my first manipulation in source code of openFoam,by adding energy equation into it see what happens!!!
Anyway, The solver should be compressible, as you mentioned, and consider the energy eq., as well.

would you please let me know, why a cavitation model should be included?

Do you have any suggestion, on which of your mentioned solvers, I should base solver development

Thanks a lot for your time,

mkraposhin March 10, 2009 12:47

hi, hamed! i think about Op
hi, hamed!

i think about OpenFOAM solvers in a such way:

1) First, i need to understand, what goes in reality, how it looks and what physics lies behind process

2) then, i need to obtain equations for main variables, which describes state of system

3) last, i can solve equations with solvers (OpenFOAM functionality)

regarding our task:
1) If you are interested in simple phase change, which will be indicated only by density variations due to changes in main variables, then you can use homogeneous approach - transport equation for void (or liquid) fraction, energy conservation equation, momentum conservation equation and mass conservation

2) If you need turbulence, then you need to insert turbulence model

3) If you need to account for effects of surface, dividing two phases, then you need surface capturing approach

4) If we need to account for such advanced effects as interphase friction, evaporation, bubble coagulation / break-up, then we need something more complex

cavitation mechanism is similar to evaporation, it is based mainly on local negative pressure values. for example, for my tasks, options 1) + 2) are enough.

So, if you know all about equations and algorithms, that stays behind solvers you mentioned, then you can decide which of them are needed and which of them - not.

I can tell you more about my approach:

1) single momentum equation:
ddt(rho U) + div(rho U U) - div (rho Reff) = -grad(p)
2) single mass equation:
ddt(rho) + div(rho U)

3) transport equation for gamma (mass vapor fraction)

ddt(rho gamma) + div (rho U gamma) - laplacian(DgammaEff, gamma) = Prod_gamma - Annih_gamma

4) barotropic relation for density in liquid and vapour:
rho = psi * p + (1 - gamma) * rhol0,
psi - compressibility (d rho)/(d p), or 1/(c^2)
rhol0 = rho_liq_Sat - psi*pSat

5) linear equation for psi:
psi = psiv*gamma + (1 - gamma)*psil

6) 2-eq RAS turbulence model

haghajani March 11, 2009 08:56

Hi Matvey, Thanks for your su
Hi Matvey,
Thanks for your supportive comments,
To see the physics as simple as possible, the mean flow could be modelled using the three-dimensional transient, fully compressible conservation equation for mixture mass, mixture momentum, mixture enthalpy and hydrogen mass fraction.

Mixture mass (continuity equation):
∂ρ/∂t+(∂ρu_i)/(∂x_i )=0

Mixture Momentum:
(∂ρu_i)/∂t+(∂ρu_j.u_i)/(∂x_j )=-∂P/(∂x_i )+ρg_i+∂/(∂x_j )((μ+μ_t)((∂u_i)/(∂x_j )+(∂u_j)/(∂x_i )))

Hydrogen mass fraction (liquid plus vapour):
(∂ρq_l)/∂t+(∂ρu_j q_l)/(∂x_j)=∂/(∂x_j)((ρd+μ_t/〖Sc〗_t)(∂q_l)/(∂x_j))

Mixture enthalpy:
∂ρH/∂t+(∂ρu_j H)/(∂x_j )=∂P/(∂x_j )(μ_t/〖Pr〗_t ∂H/(∂x_j ))+∂P/∂t+∂/(∂x_j )(λ ∂T/(∂x_j )+ρdH_i (∂q_i)/(∂x_j ))

1/ρ=(q_1V/ρ_1V)+(q_1L/ρ_1L)+(q_2/ρ_2), 1=q_1+q_2, q_1=q_1V+q_1L

Turbulence could be modelled using the k-ε model, in which buoyancy effects were included.

Have you added new equations to a solver? I tried to follow guideline available for icoFoam, to add energy eq to interFoam, no success yet!

could you please share your experience?


mkraposhin March 11, 2009 15:13

Hi, Hamed! After reading yo
Hi, Hamed!

After reading your equations, i think, that it's better to use interPhaseChangeFoam model with energy equation, which may be easily implemented in OpenFOAM:

phiv = phi / fvc::interpolate(rho)

ht = h + magSqr(U) / 2.0

fvm::ddt(ht) + fvm::div(phiv, ht) - fvm::laplacian(D_t, h) = S_h......

But i can't understand (sorry) - how many liquids do you want to use?

1) liquid Hydrogen
2) vaporized Hydrogen
3) Air
4) = Air + H_l + H_v

N liquids - N equations of state?

i can"t understand last equation
1/ρ=(q_1V/ρ_1V)+(q_1L/ρ_1L)+(q_2/ρ_2), 1=q_1+q_2, q_1=q_1V+q_1

mahaputra March 11, 2009 15:24

Hei Matvej Kraposhin , thanks
Hei Matvej Kraposhin , thanks for the invitation

hi Hamed, im working on the phase change as well, but on the opposite change (vapour to liquid)

i just want to ask in here, if is there somebody who has some experience and can give a simple example on how to put thermophysical properties to ex: compressibleLesFoam solver


how to put additional phase properties to the coodles solver?

why in the compressibleLesFoam, it uses LES model from the incompressible flow??

haghajani March 13, 2009 07:30

Dear Matvey, Thanks for you c
Dear Matvey,
Thanks for you comments,

I am trying to run a case by interPhaseChangeFoam according to the tutorial I found!
Do you have a case, which works OK with solver?

I updated the transportproperties file but i got problems in system/fvSolution.

Thanks again,

mkraposhin March 13, 2009 08:24

Hi, Hamed I'm trying to fin
Hi, Hamed

I'm trying to finish solver, which i described on this thread - rhoPimpleFoam + phase change, when i'll done it, i'll post link to download files.

case for interPhaseChangeFoam?
no, i don"t have a case

haghajani March 13, 2009 08:30

Thank you, I'll keep trying t
Thank you,
I'll keep trying to build one!

mkraposhin March 16, 2009 11:47

cavitating solver is done
dear friends, you can find solver sources for OF 1.4.1 by link

and solver equations by link

the model is one-phase turbulent flow of compressible fluid with cavitation, accounted with transport equation

haghajani March 20, 2009 11:45

Thanks for posting CavitatingPimpleFoam
after coping to applications/solvers/multiphase/..., and running "wmake" to compile it; got the following message;

Making dependancy list for source cavitatingPimpleFoam.C
make: *** No rule to make target `/home/.../src/OpenFOAM/lnInclude/cpuTime.H, needed by `baroThermo/baroThermo.dep'. stop.

would you please let me know, what the source of error is?

All times are GMT -4. The time now is 02:12.