CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

interPhaseChangeFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 4, 2012, 16:07
Default interPhaseChangeFoam
  #1
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 17
calim_cfd is on a distinguished road
hello every1!

any1 familiar with this solver? interPhaseChangeFoam

i was wondering whether cavitation takes place on both phases ? (perhaps this question is not applicable at all, sry but im not that familiar with the cavitation phenonemon )

*C file states:
Code:
*******************************
Description
    Solver for 2 incompressible, isothermal immiscible fluids with phase-change
    (e.g. cavitation).  Uses 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.

    The set of phase-change models provided are designed to simulate cavitation
    but other mechanisms of phase-change are supported within this solver
    framework.

    Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
**********************************
the description above leads to misinterpretation i guess...

say we have water and oil.. which fits the description of 2 immiscible fluids..

in this case, what would VOF be tracking? the interface water-vapor or water-oil?

when postprocessing the respective tutorial, /home/userx/OpenFOAM/userx-2.1.0/run/multiphase/interPhaseChangeFoam , i only get to c the alpha parameter regarding phases

transport dict states:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

phaseChange on;

phaseChangeTwoPhaseMixture SchnerrSauer;

pSat             pSat       [1 -1 -2 0 0]    2300;   // saturation pressure

sigma           sigma [1 0 -2 0 0 0 0] 0.07;

phase1
{
    transportModel Newtonian;
    nu              nu [0 2 -1 0 0 0 0] 9e-07;
    rho             rho [1 -3 0 0 0 0 0] 1000;
}

phase2
{
    transportModel Newtonian;
    nu              nu [0 2 -1 0 0 0 0] 4.273e-04;
    rho             rho [1 -3 0 0 0 0 0] 0.02308;
}

KunzCoeffs
{
    UInf            UInf   [0 1 -1 0 0 0 0]     20.0;
    tInf            tInf   [0 0 1 0 0 0 0]      0.005; // L = 0.1 m
    Cc              Cc     [0 0 0 0 0 0 0]      1000;
    Cv              Cv     [0 0 0 0 0 0 0]      1000;
}

MerkleCoeffs
{
    UInf            UInf   [0 1 -1 0 0 0 0]     20.0;
    tInf            tInf   [0 0 1 0 0 0 0]      0.005;  // L = 0.1 m
    Cc              Cc     [0 0 0 0 0 0 0]      80;
    Cv              Cv     [0 0 0 0 0 0 0]      1e-03;
}

SchnerrSauerCoeffs
{
    n               n      [0 -3 0 0 0 0 0]     1.6e+13;
    dNuc            dNuc   [0 1 0 0 0 0 0]      2.0e-06;
    Cc              Cc     [0 0 0 0 0 0 0]      1;
    Cv              Cv     [0 0 0 0 0 0 0]      1;
}


// ************************************************************************* //

so can any1 give me some insights? this case is rather complex and slow to carry out many tests..

from what i could glean it seems that what the solver takes for immiscible 2 fluids is the water and its counterpart which appears with cavitation and henceforward the solver uses VOF to track the interface between water and its vapor.... is that right? at least this is what the interpretation of results tells me!.. if so i guess the description of the solver should change a little .. idk.. maybe it's just me

thanks a lot!
__________________
Best Regards
/calim

"Elune will grant us the strength"

Last edited by calim_cfd; March 4, 2012 at 17:27.
calim_cfd is offline   Reply With Quote

Old   March 5, 2012, 02:45
Default
  #2
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 17
kathrin_kissling is on a distinguished road
Calim,

the solver only captures two phases. Therefore you would have to severly extend the solver to capture three or even four phases (oil, water, water- vapor and "oil-vapor").
So at the moment one phase plus its vapor-phase is captured.

Best
Kathrin
kathrin_kissling is offline   Reply With Quote

Old   March 5, 2012, 02:50
Default
  #3
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Quote:
Originally Posted by calim_cfd View Post
from what i could glean it seems that what the solver takes for immiscible 2 fluids is the water and its counterpart which appears with cavitation and henceforward the solver uses VOF to track the interface between water and its vapor.... is that right? at least this is what the interpretation of results tells me!.. if so i guess the description of the solver should change a little .. idk.. maybe it's just me
InterPhaseChangeFoam only tracks two phases, so your conclusion is right. One phase is liquid, and the other is the vapor.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   June 6, 2012, 09:50
Default kinetic energy turbulence:
  #4
Member
 
vahid
Join Date: Feb 2012
Location: Mashhad-Iran
Posts: 80
Rep Power: 13
vahid.najafi is an unknown quantity at this point
please help me…
I want to add the kinetic energy Turbulence(k) in model <<sauer>> in solver <<interPhaseChangeFoam>>.
when I Type wmake in terminal.
I seen this message :

phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C:79: error: ‘k_’ was not declared in this scope
make: *** [Make/linux64GccDPOpt/SchnerrSauer.o] Error 1

Although I added the following line in the<<options>>:

-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \

Then with enter the <<k_>>in model <<sauer>>as following :


// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //

Foam::tmp<Foam::volScalarField>
Foam: PhaseChangeTwoPhaseMixtures::SchnerrSauer::rRb
(
const volScalarField& limitedAlpha1
) const
{
return pow
(
((*4*constant::mathematical: pi*n_)/3)*k_
*limitedAlpha1/(1.0 + alphaNuc() - limitedAlpha1),
1.0/3.0
);
}



vahid.najafi is offline   Reply With Quote

Old   April 8, 2013, 08:19
Default
  #5
abe
Member
 
ABE
Join Date: Jul 2012
Posts: 46
Rep Power: 13
abe is on a distinguished road
I want to use OF to simulate cavitation. I can get relatively good results with older versions (i.e. 1.5). But by using new versions (2.1 or 2.2), results are not good (I can say awful).
has anybody got good cavitating results with OF2.1 or 2.2?
Any idea or comment is highly appreciated, and thank you in advance.

ABE
abe is offline   Reply With Quote

Old   April 15, 2013, 06:34
Default
  #6
Member
 
David Hora
Join Date: Mar 2009
Location: Zürich, Switzerland
Posts: 63
Rep Power: 17
david is on a distinguished road
Same problem here. I created a bug report:

http://www.openfoam.org/mantisbt/view.php?id=817

Best regards
David
david is offline   Reply With Quote

Old   April 15, 2013, 06:55
Default
  #7
abe
Member
 
ABE
Join Date: Jul 2012
Posts: 46
Rep Power: 13
abe is on a distinguished road
Quote:
Originally Posted by david View Post
Same problem here. I created a bug report:

http://www.openfoam.org/mantisbt/view.php?id=817

Best regards
David

Thanks for reply, and creating the bug report.
ABE
abe is offline   Reply With Quote

Old   April 15, 2013, 08:32
Default
  #8
New Member
 
Stefano Gaggero
Join Date: Mar 2013
Posts: 23
Rep Power: 13
Mashiro5 is on a distinguished road
Thank you david,

I have the same problem and I posted a new thread a week ago.

http://www.cfd-online.com/Forums/ope...m-2-2-0-a.html

My results (a simple cavitating 2D wing profile) are awful with OF 2.2.x.
Instead, with OF 2.1.1 they correlate well with available experiments.

Stefano
Mashiro5 is offline   Reply With Quote

Old   April 15, 2013, 09:24
Default
  #9
abe
Member
 
ABE
Join Date: Jul 2012
Posts: 46
Rep Power: 13
abe is on a distinguished road
I saw your post. Your results with OF2.1.1, generally speaking, seems to be good. However, I have used OF2.1.x and results were not so accurate.
Moreover, I have encountered another issue. Right after restarting the simulation in OF22x, if the amount of vapor be considerable, the pressure field will be disrupted.

ABE
abe is offline   Reply With Quote

Old   April 16, 2013, 09:30
Default
  #10
Senior Member
 
Sandy Lee
Join Date: Mar 2009
Posts: 213
Rep Power: 18
sandy is on a distinguished road
Hi , who know what is the meanings of "cAlpha"? And how to give its numbers ?
sandy is offline   Reply With Quote

Old   April 16, 2013, 09:54
Default
  #11
abe
Member
 
ABE
Join Date: Jul 2012
Posts: 46
Rep Power: 13
abe is on a distinguished road
Hi Sandy,

You can find the description of cAlpha here:
http://www.geocities.jp/penguinitis2...interFoam.html

cAlpha is a constant representing the degree of compression used to calculate the relative flux, as long as I know.
In my cases, I set it equal to zero because I did not consider relative velocity and compressibility of phases interface.

ABE
abe is offline   Reply With Quote

Old   April 19, 2013, 00:56
Default
  #12
Senior Member
 
Sandy Lee
Join Date: Mar 2009
Posts: 213
Rep Power: 18
sandy is on a distinguished road
Quote:
Originally Posted by abe View Post
......

Right after restarting the simulation in OF22x, if the amount of vapor be considerable, the pressure field will be disrupted.

ABE
Hi abc, what is your meanings? I always restart a simulation of cavitation based on the fields of no cavitation. What's wrong with it, you think?
sandy is offline   Reply With Quote

Old   April 19, 2013, 01:02
Default
  #13
Senior Member
 
Sandy Lee
Join Date: Mar 2009
Posts: 213
Rep Power: 18
sandy is on a distinguished road
Quote:
Originally Posted by david View Post
Same problem here. I created a bug report:

http://www.openfoam.org/mantisbt/view.php?id=817

Best regards
David
Hi David, you mean you could get correct results in OF 1.6.x? Could you get correct pressure values in the sagnition point with cavitation model ?
sandy is offline   Reply With Quote

Old   April 22, 2013, 05:50
Default
  #14
abe
Member
 
ABE
Join Date: Jul 2012
Posts: 46
Rep Power: 13
abe is on a distinguished road
Hi Sandy,

I meant that in the case that you stop the simulation, and then want to continue it, the pressure filed will be completely corrupted in the first iterations of new run. In the small amount of vapor, you may not get in trouble by this issue but when the amount of vapor is considerable, getting convergence would be very difficult.

ABE
abe is offline   Reply With Quote

Old   April 22, 2013, 22:49
Default
  #15
Senior Member
 
Sandy Lee
Join Date: Mar 2009
Posts: 213
Rep Power: 18
sandy is on a distinguished road
Quote:
Originally Posted by abe View Post
Hi Sandy,

I meant that in the case that you stop the simulation, and then want to continue it, the pressure filed will be completely corrupted in the first iterations of new run. In the small amount of vapor, you may not get in trouble by this issue but when the amount of vapor is considerable, getting convergence would be very difficult.

ABE
However , as I known , there is no this problem in FLUENT . What is the difference between two software , you think ?
sandy is offline   Reply With Quote

Old   April 23, 2013, 01:04
Default cAlpha1
  #16
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
Quote:
Originally Posted by sandy View Post
Hi , who know what is the meanings of "cAlpha"? And how to give its numbers ?
cAlpha is usually assigned between 1-4 and almost 1 is suitable
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   April 23, 2013, 03:14
Default
  #17
abe
Member
 
ABE
Join Date: Jul 2012
Posts: 46
Rep Power: 13
abe is on a distinguished road
From the type of error, it could be anything. I do not have any specific idea now, but I am curious about the differences between values which are stored for next iterations and values which are written out.
When you restart the simulation, I think all of the fluxes, and face values are recalculated based on the cell center values which you had written out, which for sure is different from the continuous simulation.
abe is offline   Reply With Quote

Old   April 23, 2013, 03:38
Default
  #18
Member
 
David Hora
Join Date: Mar 2009
Location: Zürich, Switzerland
Posts: 63
Rep Power: 17
david is on a distinguished road
The reason for the bad results is a bug. An interim solution is presented in the bug report. The results seem to agree with version 2.0 but are still a bit different from 1.6.

If you have problems directly after the restart, it could help to remove correctPhi from the solver:

pimpleControl pimple(mesh);

// #include "../interFoam/correctPhi.H"
#include "CourantNo.H"
#include "setInitialDeltaT.H"

Best regards
David

Last edited by david; April 24, 2013 at 04:03.
david is offline   Reply With Quote

Old   April 24, 2013, 05:40
Default
  #19
abe
Member
 
ABE
Join Date: Jul 2012
Posts: 46
Rep Power: 13
abe is on a distinguished road
True, I have checked, and I should say that by adding the interim correction (http://www.openfoam.org/mantisbt/view.php?id=817), the problems will be solved (in my case, flow behind a 2d flat plate).
Now the shape of the cavity and pressure fields are more accurate, and besides, the restart issue that I mentioned before has been solved.
I just have added a small modification. In my case, in some time steps the MULES solver was not able to bound the alpha value between zero and one (although this values were used as the inputs of the solver) which could lead to divergence. So, I added the following limiter right after the MULES solver as interim solution:
alpha1 = min(max(alpha1, scalar(0.0)),scalar(1.0));


About emitting the correctPhi, thanks David I will try that.
abe is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
interPhaseChangeFoam with nOuterCorrectors != 1 akidess OpenFOAM Bugs 25 March 6, 2016 09:54
Bug about MULES::implicitSolve for interPhaseChangeFoam in OF-1.6 chiven OpenFOAM Bugs 18 April 18, 2013 22:56
about fvSolution settings for interPhaseChangeFoam chueh OpenFOAM 4 June 6, 2012 09:49
Source terms for alpha1 Equation for temeprature based interPhaseChangeFoam ovie OpenFOAM 1 February 8, 2010 20:15
gammaEqn.H in the interPhaseChangeFoam solver isabel OpenFOAM 2 July 7, 2009 13:41


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