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/)
-   -   interPhaseChangeFoam (https://www.cfd-online.com/Forums/openfoam-solving/98157-interphasechangefoam.html)

calim_cfd March 4, 2012 16:07

interPhaseChangeFoam
 
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
http://img252.imageshack.us/img252/5328/caviex.jpg
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 :o

thanks a lot!

kathrin_kissling March 5, 2012 02:45

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

akidess March 5, 2012 02:50

Quote:

Originally Posted by calim_cfd (Post 347597)
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 :o

InterPhaseChangeFoam only tracks two phases, so your conclusion is right. One phase is liquid, and the other is the vapor.

vahid.najafi June 6, 2012 09:50

kinetic energy turbulence:
 
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
);
}




abe April 8, 2013 08:19

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

david April 15, 2013 06:34

Same problem here. I created a bug report:

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

Best regards
David

abe April 15, 2013 06:55

Quote:

Originally Posted by david (Post 420622)
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

Mashiro5 April 15, 2013 08:32

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

abe April 15, 2013 09:24

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

sandy April 16, 2013 09:30

Hi , who know what is the meanings of "cAlpha"? And how to give its numbers ?

abe April 16, 2013 09:54

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

sandy April 19, 2013 00:56

Quote:

Originally Posted by abe (Post 420659)
......

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 April 19, 2013 01:02

Quote:

Originally Posted by david (Post 420622)
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 ?

abe April 22, 2013 05:50

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

sandy April 22, 2013 22:49

Quote:

Originally Posted by abe (Post 422263)
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 ?

nimasam April 23, 2013 01:04

cAlpha1
 
Quote:

Originally Posted by sandy (Post 420928)
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

abe April 23, 2013 03:14

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.

david April 23, 2013 03:38

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

abe April 24, 2013 05:40

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.


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