CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Multiphase flow and Phase change due to heat transferevaporation (https://www.cfd-online.com/Forums/openfoam-solving/57788-multiphase-flow-phase-change-due-heat-transferevaporation.html)

haghajani March 6, 2009 06: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 09: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 12: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?

Best,
Hamed

mkraposhin March 9, 2009 03: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 04:06

Dear Matvej, Thanks again for
 
Dear Matvej,
Thanks again for your kind reply,
I would be thankful if you send me the links.
Email: hamed.aghajani@gmail.com
h.aghajani@kingston.ac.uk

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.

TA!
Hamed

mkraposhin March 9, 2009 04:37

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

http://library.caltech.edu/

mkraposhin March 9, 2009 04: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 05: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.

Best,
Hamed
hamed.aghajani@gmail.com
H.Aghajani@kingston.ac.uk

haghajani March 9, 2009 06:34

I have received them, thanks
 
I have received them,
thanks

mkraposhin March 9, 2009 06:48

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

please, check your mail now http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

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 07: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,
Yours,
Hamed

mkraposhin March 10, 2009 11: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,
where
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 07: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 ))

Where,
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.
....
develop-able!

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?

Best,
Hamed

mkraposhin March 11, 2009 14: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 14: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

or

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 06: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,
Hamed

mkraposhin March 13, 2009 07: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 07:30

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

mkraposhin March 16, 2009 10:47

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

http://www.os-cfd.narod.ru/small_fil...PimpleFoam.tgz

and solver equations by link

http://www.os-cfd.narod.ru/small_files/cav-English.odt

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

haghajani March 20, 2009 10: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?

mkraposhin March 22, 2009 13:30

build instructions
 
first of all,
type in wclean to cleanup previous buid

haghajani March 23, 2009 05:18

Dear Matvej,
Thanks again for replying
following errors issued;:confused:
lnInclude/basicThermo.H:In member function 'virtual Foam::volScalarFields& Foam::basicThermo:: p()':
lnInclude/basicThermo.H:126: error: invalid initialization of reference of type 'Foam::volScalarFields&' from expression of type 'const Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>'
lnInclude/basicThermo.H:In member function 'virtual Foam::volScalarFields& Foam::basicThermo::h()':
lnInclude/basicThermo.H:141: error: invalid initialization of reference of type 'Foam::volScalarFields&' from expression of type 'const Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>'
lnInclude/basicThermo.H:In member function 'virtual Foam::volScalarFields& Foam::basicThermo::e()':
lnInclude/basicThermo.H:186: error: invalid initialization of reference of type 'Foam::volScalarFields&' from expression of type 'const Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>'

mkraposhin March 23, 2009 06:32

1) What OpenFOAM version are you using? I'm using v. 1.4.1
2) What operating system? (OpenSuSE 10.3)
3) What g++ version? (4.2.1)

haghajani March 23, 2009 07:19

OpenFoam 1.5
OS: OpenSUSE 11
gcc version 4.3.1

haghajani March 25, 2009 05:48

Dear Matvej,
Have you got any idea, what the problem could be?
thanks,
Hamed

mkraposhin March 25, 2009 06:24

hi, haghajani,

I'm sorry for late reply

i'll try installing OF 1.5 this week, then i'll try to compile solver for this version and report to you 29.03

mkraposhin March 29, 2009 11:02

cavitatingPimpleFoam for OpenFOAM 1.5
 
Hi All!
Here is a link for source code of caviatingPimpleFoam solver for OpenFOAM 1.5

http://www.os-cfd.narod.ru/small_fil...leFoam_1.5.tgz

haghajani April 3, 2009 14:11

Dear Matvej,
Many thanks for updating the forum with you code;

Today I came to your code; after wclean & wmake, again I faced this error;
g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/hamed/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -IcompressibilityModels/compressibilityModel -IgammaModels/gammaModel -IbaroThermo -I/home/hamed/OpenFOAM/OpenFOAM-1.5/src/transportModels -IaltCompressibleTurbModels/lnInclude -IlnInclude -I. -I/home/hamed/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/hamed/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC Make/linux64GccDPOpt/cavitatingPimpleFoam.o Make/linux64GccDPOpt/compressibilityModel.o Make/linux64GccDPOpt/newCompressibilityModel.o Make/linux64GccDPOpt/linear.o Make/linux64GccDPOpt/Wallis.o Make/linux64GccDPOpt/Chung.o Make/linux64GccDPOpt/gammaModel.o Make/linux64GccDPOpt/newGammaModel.o Make/linux64GccDPOpt/constant.o Make/linux64GccDPOpt/defaultGM.o Make/linux64GccDPOpt/SinghalMerkle.o Make/linux64GccDPOpt/Kunz.o Make/linux64GccDPOpt/Merkle.o Make/linux64GccDPOpt/baroThermo.o -L/home/hamed/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt \
-lfiniteVolume -L/home/hamed/OpenFOAM/hamed-1.5/lib/linux64GccDPOpt -lcompressibleAltTurbulenceModels -lOpenFOAM -liberty -ldl -lm -o /home/hamed/OpenFOAM/hamed-1.5/applications/bin/linux64GccDPOpt/cavitatingPimpleFoam
/usr/bin/ld: cannot find -lcompressibleAltTurbulenceModels
collect2: ld returned 1 exit status
make: *** [/home/hamed/OpenFOAM/hamed-1.5/applications/bin/linux64GccDPOpt/cavitatingPimpleFoam] Error 1

unfortunately, I couldn't find out the source;

Thanks,
Hamed

haghajani April 3, 2009 14:26

interPhaseChangeFoam tutorial
 
1 Attachment(s)
Dear all,
If your are going to work with interPhaseChangeFoam and you are looking for a tutorial, I have update the well-known dambreak case, and you can use of it to start;

Good Luck,
Hamed

mkraposhin April 5, 2009 03:16

Go to directory altCompressibleTurbModels, type wclean and then wmake

haghajani April 7, 2009 09:25

Dear Matvej,
sorry to interrupt you too much,
but I wonder I can not make the solver;

following error has been raised;
....
Make/linux64GccDPOpt/mutStandardRoughWallFunctionFvPatchScalarField.o: In function `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::Geometric Field<double, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const':
mutStandardRoughWallFunctionFvPatchScalarField.C:( .text._ZNK4Foam14objectRegistry12lookupObjectINS_1 4GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEEE ERKT_RKNS_4wordE[Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::Geometric Field<double, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const]+0x170): undefined reference to `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::typeName'
mutStandardRoughWallFunctionFvPatchScalarField.C:( .text._ZNK4Foam14objectRegistry12lookupObjectINS_1 4GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEEE ERKT_RKNS_4wordE[Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::Geometric Field<double, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const]+0x2c4): undefined reference to `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::typeName'
collect2: ld returned 1 exit status
make: *** [OpenFOAM.out] Error 1

best,
Hamed

mkraposhin April 7, 2009 15:11

Can you post here all steps you are doing?

because i don't have mutStandardWallFunctions

Your information could be very useful, because some of my students experienced some problems with my solver, but i'm - not ^)

mkraposhin April 7, 2009 15:16

actually, you should go to dir altCompressibleTurbModels and type 'wclean', then 'wmake libso'

then, you must go up and type
'wclean; wmake'

haghajani April 8, 2009 06:18

Dear Matvej,
Thanks again,

it has been compiled.

best,
Hamed

mahaputra April 13, 2009 08:56

Dear mkraposhin

thanks for your new solver

do you hava a simple case for cavitatingPimpleFoam?

or could you please show us how to build a new file so called constant/thermodynamicPr ? based on :


Info<< "Reading thermodynamicProperties\n" << endl;

IOdictionary thermodynamicProperties
(
IOobject
(
"thermodynamicProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);

dimensionedScalar psil(thermodynamicProperties.lookup("psil"));

dimensionedScalar rholSat(thermodynamicProperties.lookup("rholSat")) ;

dimensionedScalar psiv(thermodynamicProperties.lookup("psiv"));

dimensionedScalar pSat(thermodynamicProperties.lookup("pSat"));

dimensionedScalar rhovSat("rhovSat", psiv*pSat);

dimensionedScalar rhol0("rhol0", rholSat - pSat*psil);

Info << "rhol0 - " << rhol0 << endl;

dimensionedScalar rhoMin(thermodynamicProperties.lookup("rhoMin"));




many thanks

mkraposhin April 15, 2009 10:48

You can use thermodynamicProperties file from rasCavitatingFoam (or cavitatingFoam) solver tutorial

mahaputra April 15, 2009 13:45

Dear Matvej

thanks for the information

anyway , what about the keyword gammaModel ? since it is undefined in dictionary of thermodynamicProperties ?

how should i modifiy the gammaModel?

mkraposhin April 16, 2009 10:56

Cavitation solver
 
Dear friends!

I found some errors in the code of my solver. I'll fix them till 19.04.2009. Then, i'll put links to test cases and updated code on this thread.

haghajani May 5, 2009 10:53

Dear Matvej,
Have you updated the code/Test cases?

Please update the tread with your comments

Best regards,
Hamed

haghajani May 7, 2009 06:52

Dear All,

How can I trace the vaporized liquid (changed phase from 1->0) in to air.
I am trying to study the effect of flash evaporation in high pressure liquid Hydrogen release. I used interPhaseChangeFoam for a simple case and the results seems reasonable. Now I want also see the vapor of hydrogen inside surrounding air.

Best regards,
Hamed Aghajani
hamed.aghajani@gmail.com
h.aghajani@kingston.ac.uk


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