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/)
-   -   Phase change not working with reactingTwoPhaseEulerFoam (https://www.cfd-online.com/Forums/openfoam-solving/222694-phase-change-not-working-reactingtwophaseeulerfoam.html)

sjohn2 December 4, 2019 16:44

Phase change not working with reactingTwoPhaseEulerFoam
 
I am using the interfaceCompositionPhaseChangeTwoPhaseSystem, model to phase change from water to steam using the saturation pressure which is computed using Antoine equation. I checked that the coefficients A,B and C using a seperate code they seem to be accurate. Please have a look at my phaseProperties file:

PHP Code:

 /*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
dictionary;
    
location    "constant";
    
object      phaseProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

 
type  interfaceCompositionPhaseChangeTwoPhaseSystem

phases (gas liquid);

phaseChange on;

gas
{
    
type            multiComponentPhaseModel;
    
diameterModel   isothermal;
    
constantCoeffs
    
{
        
d               0.00045;
    }

    
isothermalCoeffs
    
{
        
d0               0.00045;
        
p0              1e5;
    }
    
Sc              0.7;

    
residualAlpha   1e-4;
}

liquid
{
    
type            multiComponentPhaseModel;
    
diameterModel   constant;
    
constantCoeffs
    
{
        
d               0.00045;
    }
    
Sc              0.7;

    
residualAlpha   1e-4;
}

blending
{
    default
    {
        
type            linear;
        
minFullyContinuousAlpha.gas 0.7;
        
minPartlyContinuousAlpha.gas 0.3;
        
minFullyContinuousAlpha.liquid 0.7;
        
minPartlyContinuousAlpha.liquid 0.3;
    }
 
     
heatTransfer
    
{
        
type            linear;
        
minFullyContinuousAlpha.gas 1;
        
minPartlyContinuousAlpha.gas 0;
        
minFullyContinuousAlpha.liquid 1;
        
minPartlyContinuousAlpha.liquid 0;
    }
 
        
massTransfer
    
{
        
$heatTransfer;
    }
}


surfaceTension


(
gas and liquid)
    {
        
type            constant;
        
sigma           0.07;
    }

    
);

aspectRatio
(
    (
gas in liquid)
    {
        
type            constant;
        
E0              1.0;
    }

    (
liquid in gas)
    {
        
type            constant;
        
E0              1.0;
    }
);


drag
(
    (
gas in liquid)
    {
        
type            SchillerNaumann;
        
residualRe      1e-3;
        
swarmCorrection
        
{
            
type        none;
        }
    }

    (
liquid in gas)
    {
        
type            SchillerNaumann;
        
residualRe      1e-3;
        
swarmCorrection
        
{
            
type        none;
        }
    }
);

virtualMass
(
    (
gas in liquid)
    {
        
type            constantCoefficient;
        
Cvm             0.5;
    }
    
        (
liquid in gas)
    {
        
type            constantCoefficient;
        
Cvm             0.5;
    }
);


interfaceComposition

(
gas in liquid)
    {
        
type saturated;
        
species (water);
        
Le 1.0;
        
saturationPressure
        
{
            
type Antoine;
            
A 23.640509179;
            
-4170.59482;
            
-28.285;
        }
    }    
);



heatTransfer.gas
(
    (
gas in liquid)
    {
        
type spherical;
        
residualAlpha 1e-3;
    }
);

heatTransfer.liquid
(
    (
gas in liquid)
    {
        
type RanzMarshall;
        
residualAlpha 1e-3;
    }
);

 
massTransfer.gas
(
    (
gas in liquid)
    {
        
type spherical;
        
Le 1.0;
    }

    (
liquid in gas)
    {
        
type Frossling;
        
Le 1.0;
    }
);

massTransfer.liquid
(
    (
gas in liquid)
    {
        
type Frossling;
        
Le 1.0;
    }

    (
liquid in gas)
    {
        
type spherical;
        
Le 1.0;
    }
);

phaseTransfer
();

lift
();

wallLubrication
();

turbulentDispersion
(
    (
gas in liquid)
    {
        
type                Burns;
        
sigma               0.7;
        
Ctd                 1.0;
        
residualAlpha       1e-3;
    }
);

// Minimum allowable pressure
pMin            10000;


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

Other important files are the

PHP Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
dictionary;
    
location    "constant";
    
object      thermophysicalProperties.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    
type            heRhoThermo;
    
mixture         multiComponentMixture;
    
transport       const;
    
thermo          hConst;
    
equationOfState perfectFluid;
    
specie          specie;
    
energy          sensibleInternalEnergy;
}

species
(
    
water
);
 

water
{
    
specie
    
{
        
molWeight       18.0153;
    }
    
equationOfState
    
{
        
R           461.9;
        
rho0        917.938;
    }
    
thermodynamics
    
{
        
Hf          0;
        
Cp          4195;
    }
    
transport
    
{
        
mu          0.1839239e-3;
        
Pr          2.289;
    }
}


 


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



PHP Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
dictionary;
    
location    "constant";
    
object      thermophysicalProperties.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    
type            heRhoThermo;
    
mixture         multiComponentMixture;
    
transport       const;
    
thermo          hConst;
    
equationOfState perfectGas;
    
specie          specie;
    
energy          sensibleInternalEnergy;
}

species
(
    
water
);
 

water
{
    
specie
    
{
        
molWeight       18.0153;
    }
    
    
equationOfState
    
{
        
R           461.9;
        
rho0        917.938;
    }
    
    
thermodynamics
    
{
        
Hf          0;
        
Cp          1901;
    }
    
transport
    
{
        
mu          1.2256e-5;
        
Pr          2.289;
    }
}

 

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


The simulation works fine and converges and I do see the pressures dropping below saturation values in the nozzle but there is no apparent mass transfer.


Does anyone have an idea what might be wrong?
How do I output an variable pSat tmp<volScalarField> that is used in the computations just to check if my saturation pressure is being computed properly?

sjohn2 December 5, 2019 16:13

1 Attachment(s)
Please see attached my pressure plot. The correct calculated saturation pressure value is 4.6e5 and the pressure values within my nozzle is easily below that. Not sure why the phase change is being triggered.

I have also checked the densities of individual densities and they are close to expected values.

sjohn2 December 6, 2019 15:20

Here are rest of the files for setup:


alpha.liquid

PHP Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
volScalarField;
    
location    "0";
    
object      alpha.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 1 ;

boundaryField
{
    
INLET
    
{
      
type          fixedValue;
      
value          uniform 1;
    }

    
OUTLET
    
{
     
type       zeroGradient;
     
    }

    
WALL
    
{
        
type       zeroGradient;
    }
}



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


alpha.gas

PHP Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
volScalarField;
    
location    "0";
    
object      alpha.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    
INLET
    
{
      
type          fixedValue;
      
value          uniform 0;
    }

    
OUTLET
    
{
       
type            zeroGradient;
     
    }

    
WALL
    
{
        
type            zeroGradient;
    }
}


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


mass fractions:

water.gas
PHP Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
volScalarField;
    
location    "0";
    
object      water.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 1e-8;

boundaryField
{
    
INLET
    
{
        
type            fixedValue;
        
value           $internalField;
    }
    
OUTLET
    
{
        
type            inletOutlet;
        
phi             phi.gas;
        
inletValue      $internalField;
        
value           $internalField;
    }
    
WALL
    
{
        
type            zeroGradient;
    }
}

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


water.liquid
PHP Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
volScalarField;
    
location    "0";
    
object      water.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 1e-8;

boundaryField
{
    
INLET
    
{
        
type            fixedValue;
        
value           $internalField;
    }
    
OUTLET
    
{
        
type            inletOutlet;
        
phi             phi.gas;
        
inletValue      $internalField;
        
value           $internalField;
    }
    
WALL
    
{
        
type            zeroGradient;
    }
}

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


sjohn2 December 6, 2019 18:26

1 Attachment(s)
All the setup files.

Attachment 73735

sjohn2 December 10, 2019 14:51

Results after 1st time step
 
4 Attachment(s)
Further look at the results just after one timestep:

Solving the species transport equation yields mass fraction for water.liquid and water.gas of 1 throughout the domain. So I did output the source terms Su and Sp which is attached below.

From these I can find the interface species fraction Yf, which is also attached.

From the values of Su and Sp, I still cannot figure out why the mass fractions of the species water in both the phases turn to 1 after 1 timestep :confused::confused:

Attachment 73808

Attachment 73809

Attachment 73810

Attachment 73811

sjohn2 December 16, 2019 16:25

Temperature drop near the inlet
 
1 Attachment(s)
I have narrowed down the problem, to the temperature in the gas phase dropping down near the inlet due to pressure drop. Please find attached figure.
Cannot figure why this is happening ??

:(:(:(


Attachment 73902

sjohn2 February 25, 2020 16:20

This problem has been resolved in the latest developmental version

Vitor Monteiro August 26, 2021 14:03

Quote:

Originally Posted by sjohn2 (Post 759556)
This problem has been resolved in the latest developmental version


Please, could you inform what version you were using (facing tha problem) and what version you are using now (with the problem solved)?

杨星辰 December 27, 2022 02:36

I'm also want to know this question.


All times are GMT -4. The time now is 16:57.