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

Phase change not working with reactingTwoPhaseEulerFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By sjohn2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 4, 2019, 16:44
Default Phase change not working with reactingTwoPhaseEulerFoam
  #1
Member
 
Stanley John
Join Date: Sep 2018
Posts: 79
Rep Power: 7
sjohn2 is on a distinguished road
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 is offline   Reply With Quote

Old   December 5, 2019, 16:13
Default
  #2
Member
 
Stanley John
Join Date: Sep 2018
Posts: 79
Rep Power: 7
sjohn2 is on a distinguished road
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.
Attached Images
File Type: png pressure.png (11.0 KB, 41 views)
sjohn2 is offline   Reply With Quote

Old   December 6, 2019, 15:20
Default
  #3
Member
 
Stanley John
Join Date: Sep 2018
Posts: 79
Rep Power: 7
sjohn2 is on a distinguished road
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;
    }
}

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

Last edited by sjohn2; December 10, 2019 at 14:24.
sjohn2 is offline   Reply With Quote

Old   December 6, 2019, 18:26
Default
  #4
Member
 
Stanley John
Join Date: Sep 2018
Posts: 79
Rep Power: 7
sjohn2 is on a distinguished road
All the setup files.

CD_NOZ_3D_rtpef_BNL_291_gon_vm_eq_p_bc_pin_prghtotal_phasechange_test_upload.tar.gz

Last edited by sjohn2; December 6, 2019 at 20:06.
sjohn2 is offline   Reply With Quote

Old   December 10, 2019, 14:51
Default Results after 1st time step
  #5
Member
 
Stanley John
Join Date: Sep 2018
Posts: 79
Rep Power: 7
sjohn2 is on a distinguished road
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

Sp_t1.jpg

Su_t1.jpg

water.gas.t1.png

water.liquid.t1.jpg
sjohn2 is offline   Reply With Quote

Old   December 16, 2019, 16:25
Default Temperature drop near the inlet
  #6
Member
 
Stanley John
Join Date: Sep 2018
Posts: 79
Rep Power: 7
sjohn2 is on a distinguished road
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 ??




Tgas.png
sjohn2 is offline   Reply With Quote

Old   February 25, 2020, 16:20
Default
  #7
Member
 
Stanley John
Join Date: Sep 2018
Posts: 79
Rep Power: 7
sjohn2 is on a distinguished road
This problem has been resolved in the latest developmental version
pete20r2 likes this.
sjohn2 is offline   Reply With Quote

Old   August 26, 2021, 14:03
Default
  #8
Member
 
Vitor Monteiro
Join Date: Nov 2020
Posts: 32
Rep Power: 5
Vitor Monteiro is on a distinguished road
Quote:
Originally Posted by sjohn2 View Post
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)?
Vitor Monteiro is offline   Reply With Quote

Old   December 27, 2022, 02:36
Default
  #9
New Member
 
周晓庆
Join Date: Nov 2022
Posts: 1
Rep Power: 0
杨星辰 is on a distinguished road
I'm also want to know this question.
杨星辰 is offline   Reply With Quote

Reply


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
Phase Change >> which solver ? >> met a problem I can't solve, please help me with it Kummi OpenFOAM Programming & Development 6 September 8, 2021 04:58
Direct numerical simulation of species transport equation with phase change Pmaroul Main CFD Forum 2 October 12, 2018 16:02
Pressure Outlet for phase change simulation dinesh FLUENT 0 November 21, 2013 23:50
phase change modeling Danial Q Main CFD Forum 0 April 5, 2012 01:14
thermal phase change question CFDflying CFX 1 February 18, 2004 04:10


All times are GMT -4. The time now is 20:51.