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

icoReactingMultiphaseInterFoam to simulate condensation of steam in a 2D Domain

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   Yesterday, 09:00
Question icoReactingMultiphaseInterFoam to simulate condensation of steam in a 2D Domain
  #1
New Member
 
Akshay Mani
Join Date: Oct 2022
Posts: 2
Rep Power: 0
akshaymani94 is on a distinguished road
Hi Everybody,
I am fairly new to OpenFOAM. I am currently facing a challenge in simulating steam condensation inside a 2D domain. In this problem, the steam enters the domain through the inlet and comes in contact with the walls at a lower temperature, leading to the condensation of steam to water and then leaving through the outlet.
I used interCondensatingEvaporatingFoam initially but as I wanted to use externalWallHeatFluxTemperature boundary condition for the walls I had to switch to icoReactingMultiphaseInterFoam.
The simulation is running fine but I don't get any condensation in my domain. I am sharing all the necessary files below, please tell me where I am going wrong.

air,gas file
PHP Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2306                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
volScalarField;
    
object      air.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    
wall.3
    
{
        
type            zeroGradient;
    }

    
Inlet
    
{
       
type            fixedValue;
       
//inletValue      $internalField;
       //value           $internalField;
       //inletValue        uniform 1;
       
value            uniform 0.2;
    }
    
    
outlet
    
{
        
type            inletOutlet;
        
inletValue      uniform 0.2;
        
value           uniform 0.2;
    }

    
frontAndBackPlanes
    
{
        
type            empty;
    }
}


// ************************************************************************* // 
vapour.gas file
PHP Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2306                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
volScalarField;
    
object      vapour.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 1;

boundaryField
{
    
wall.3
    
{
        
type            zeroGradient;
      
// type        fixedGradient;
      // gradient        uniform -0.01;
    
}

    
Inlet
    
{
       
type            fixedValue;
       
//inletValue      $internalField;
       //value           $internalField;
       //inletValue        uniform 1;
       
value            uniform 0.8;
    }
    
    
outlet    
    
{
        
type            inletOutlet;
        
//inletValue      $internalField;
        //value           $internalField;
       
inletValue        uniform 0.8;
       
value            uniform 0.8;
    }

    
frontAndBackPlanes
    
{
        
type            empty;
    }
}


// ************************************************************************* // 
alpha.gas file
PHP Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2306                                  |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    
arch        "LSB;label=32;scalar=64";
    class       
volScalarField;
    
location    "0";
    
object      alpha.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 1;

boundaryField
{
    
outlet
    
{
        
type            inletOutlet;
        
inletValue      uniform 1;
        
value           uniform 1;
    }
    
Inlet
    
{
        
type            fixedValue;
        
value           uniform 1;
    }
    
wall.3
    
{
        
type            zeroGradient;
      
//  type            fixedGradient;
       // gradient        uniform -0.01;
    
}
    
frontAndBackPlanes
    
{
        
type            empty;
    }
}


// ************************************************************************* // 
alpha.liquid file
PHP Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2306                                  |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    
arch        "LSB;label=32;scalar=64";
    class       
volScalarField;
    
location    "0";
    
object      alpha.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    
outlet
    
{
        
type            inletOutlet;
        
inletValue      $internalField;
        
value           $internalField;
    }
    
Inlet
    
{
        
type            inletOutlet;
        
inletValue      $internalField;
        
value           $internalField;
    }
    
wall.3
    
{
        
type            zeroGradient;
        
//type            fixedValue;
        //value           uniform 1;
    
}
    
frontAndBackPlanes
    
{
        
type            empty;
    }
}


// ************************************************************************* // 
U file
PHP Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2306                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
volVectorField;
    
object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{

    
wall.3
    
{
        
type        fixedValue;
        
value       uniform (0 0 0);
    }

    
Inlet
    
//{
      //  type                flowRateInletVelocity;
      //  massFlowRate        0.2511;
      //  extrapolateProfile  yes;
      //  rho                 rho;
      //  rhoInlet            0.9;
      //  value               uniform (1 0 0);
    //}
    
{
        
type            fixedValue;
        
value           uniform (-0.005 0);
    }


    
outlet
    
{
        
type            zeroGradient;
    }


    
frontAndBackPlanes
    
{
        
type            empty;
    }
}


// ************************************************************************* // 
p_rgh file
PHP Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2306                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
volScalarField;
    
object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions          --2 0 0 0 0 ];

internalField       uniform 1e5;

boundaryField
{
    
wall.3
    
{
        
type            zeroGradient;
    }

    
Inlet
    
//{
      //  type            prghTotalPressure;
        //p0              uniform 1e5; // Total pressure
       // rho             rho;            // Density field
       // psi             none;           // Optional for compressibility
       // gamma           1;              // Optional (compressible flows)
    //}
    
{
        
type            fixedValue;
        
value           uniform 1e5;
    }

    
outlet
    
{
        
type            fixedValue;
        
value           uniform 1e5;
    } 
    
    
//outlet
    //{
        //type         fixedValue;
        //value        uniform 160000; 
    //}

    
frontAndBackPlanes
    
{
        
type            empty;
    }
}


// ************************************************************************* // 
T file
PHP Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2306                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
volScalarField;
    
object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions          [0 0 0 1 0 0 0];

internalField       uniform 373;

boundaryField
{


    
wall.3
    
{
       
type            externalWallHeatFluxTemperature;

       
mode            coefficient;

       
Ta              constant 278.0;
       
h               constant 10.0;
       
thicknessLayers (3.76);
       
kappaLayers     (16.2);

       
kappaMethod     fluidThermo;

       
value           $internalField;
    }
    
//{
      //  type            fixedValue;
      //  value           uniform 278;
    //}

    
Inlet
    
{
        
type            fixedValue;
        
value           uniform 373;
    }

    
outlet
    
{
        
type            zeroGradient;
    }
    
    
frontAndBackPlanes
    
{
        
type            empty;
    }
}


// ************************************************************************* // 
phaseProperties file
PHP Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2306                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
dictionary;

    
object      phaseProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

type    massTransferMultiphaseSystem;

phases  (gas liquid);

liquid
{
    
type            pureMovingPhaseModel;
}

gas
{
    
type            multiComponentMovingPhaseModel;
}

surfaceTension
(
    (
gas and liquid)
    {
        
type            constant;
        
sigma           0.0589;
    }
);


massTransferModel
(
    (
liquid to gas)
    {
       
type                kineticGasEvaporation;
       
species             vapour.gas;
       
C                   -0.1;    //C is the model constant. If C  > 0 the model acts as evaporation, if C <  0 is condensing.
       
isoAlpha            0.2;
       
Tactivate           373;
    }
);




// ************************************************************************* // 
thermophysicalProperties.gas
PHP Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2306                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
dictionary;
    
object      thermophysicalProperties.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    
type            heRhoThermo;
    
mixture         multiComponentMixture;
    
transport       const;
    
thermo          hConst;
    
equationOfState incompressiblePerfectGas;
    
specie          specie;
    
energy          sensibleEnthalpy;
}

species
(
    
air
    vapour
);

inertSpecie air;

vapour
{
    
specie
    
{
        
nMoles      1;
        
molWeight   18.9;
    }
    
equationOfState
    
{
        
pRef         1e5;
    }
    
thermodynamics
    
{
        
Hf          0;
        
Cp          2030;
    }
    
transport
    
{
        
mu          0.9e-05;
        
Pr          0.7;
    }
}

air
{
    
specie
    
{
        
nMoles      1;
        
molWeight   28.9;
    }
    
equationOfState
    
{
        
pRef         1e5;
    }
    
thermodynamics
    
{
        
Hf          0;
        
Cp          900;
    }
    
transport
    
{
        
mu          0.9e-05;
        
Pr          0.7;
    }
}


// ************************************************************************* // 
thermophysicalProperties.liquid
PHP Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2306                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    
version     2.0;
    
format      ascii;
    class       
dictionary;
    
object      thermophysicalProperties.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    
type            heRhoThermo;
    
mixture         pureMixture;
    
transport       const;
    
thermo          hConst;
    
equationOfState rhoConst;
    
specie          specie;
    
energy          sensibleEnthalpy;
}

mixture
{
    
specie
    
{
        
nMoles          1;
        
molWeight       18.9;
    }
    
equationOfState
    
{
        
rho             958.4;
    }
    
thermodynamics
    
{
        
Cp              4216;
       
// Hf              -2.45e6;
       
Hf              2.45e6;
    }
    
transport
    
{
        
Pr              6.62;
        
mu              959e-6;
    }
}


// ************************************************************************* // 
The residuals after 10seconds is shown below:

PHP Code:
Courant Number mean0.314005 max1.3449
Interface Courant Number mean0 max0
Maximum ddtAlpha 
0
Maximum DiffNum 
0
deltaT 
0.01
Time 
9.99

DILUPBiCGStab
:  Solving for alpha.gasInitial residual 0.124396, Final residual 7.45994e-10No Iterations 3
MULES
Solving for alpha.gas
DILUPBiCGStab
:  Solving for alpha.liquidInitial residual 0, Final residual 0No Iterations 0
MULES
Solving for alpha.liquid
Phase
-sum volume fractionminmax 1 1 1
alpha
.gas volume fraction 1  Min(alpha) = 1  Max(alpha) = 1
alpha
.liquid volume fraction 0  Min(alpha) = 0  Max(alpha) = 0
PIMPLE
iteration 1
DILUPBiCGStab
:  Solving for Xvapour.gasInitial residual 0.000276349, Final residual 2.90958e-09No Iterations 1
MULES
Solving for Xvapour.gas
air
.gas mass fraction =   Min(Y) = 6.10116e-12  Max(Y) = 0.2
vapour
.gas mass fraction =   Min(Y) = 0.8  Max(Y) = 1
DILUPBiCGStab
:  Solving for TInitial residual 3.56367e-06, Final residual 3.05754e-08No Iterations 4
min
/max(T) = 291.949373
DICPCG
:  Solving for p_rghInitial residual 0.00193553, Final residual 3.01285e-05No Iterations 4
time step continuity errors 
sum local 2.48054e-07, global = -5.05432e-08cumulative = -1.01757e-05
DICPCG
:  Solving for p_rghInitial residual 0.000383792, Final residual 8.50993e-10No Iterations 59
time step continuity errors 
sum local 3.31346e-08, global = 1.01364e-10cumulative = -1.01756e-05
ExecutionTime 
13.39 s  ClockTime 14 s

Courant Number mean
0.314028 max1.3449
Interface Courant Number mean0 max0
Maximum ddtAlpha 
0
Maximum DiffNum 
0
deltaT 
0.01
Time 
10

DILUPBiCGStab
:  Solving for alpha.gasInitial residual 0.119132, Final residual 3.2368e-10No Iterations 3
MULES
Solving for alpha.gas
DILUPBiCGStab
:  Solving for alpha.liquidInitial residual 0, Final residual 0No Iterations 0
MULES
Solving for alpha.liquid
Phase
-sum volume fractionminmax 1 1 1
alpha
.gas volume fraction 1  Min(alpha) = 1  Max(alpha) = 1
alpha
.liquid volume fraction 0  Min(alpha) = 0  Max(alpha) = 0
PIMPLE
iteration 1
DILUPBiCGStab
:  Solving for Xvapour.gasInitial residual 0.000277555, Final residual 2.80145e-09No Iterations 1
MULES
Solving for Xvapour.gas
air
.gas mass fraction =   Min(Y) = 6.22458e-12  Max(Y) = 0.2
vapour
.gas mass fraction =   Min(Y) = 0.8  Max(Y) = 1
DILUPBiCGStab
:  Solving for TInitial residual 3.43375e-06, Final residual 3.42081e-08No Iterations 4
min
/max(T) = 291.949373
DICPCG
:  Solving for p_rghInitial residual 0.00184065, Final residual 3.45061e-05No Iterations 2
time step continuity errors 
sum local 2.82363e-07, global = 7.56102e-08cumulative = -1.01e-05
DICPCG
:  Solving for p_rghInitial residual 0.000266362, Final residual 6.71181e-10No Iterations 57
time step continuity errors 
sum local 3.14438e-08, global = -1.02927e-10cumulative = -1.01001e-05
ExecutionTime 
13.41 s  ClockTime 14 s

End 

Thanks in Advance.
akshaymani94 is offline   Reply With Quote

Reply

Tags
condensation flow, openfoam


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
Consultation for CFX/FLUENT simulation of steam condensation inside a pipe selvam2487 CFX 2 December 6, 2018 17:43
bad results of steam jet condensation into subcooled water Yamaha CFX 2 June 8, 2018 01:40
Out File does not show Imbalance in % Mmaragann CFX 5 January 20, 2017 11:20
Domain Imbalance HMR CFX 5 October 10, 2016 06:57
CFX domain comparison Kiat110616 CFX 4 April 3, 2011 23:43


All times are GMT -4. The time now is 03:50.