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

Multiphase euler foam problem with velocity vector

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2022, 03:48
Post Multiphase euler foam problem with velocity vector
  #1
New Member
 
Akshay
Join Date: Jan 2020
Posts: 28
Rep Power: 6
enthusiast is on a distinguished road
hello!! I am using Open foam version 8, I am trying to simulate a two-phase (gas-liquid) separator with 3 inlets with baffle plates and two outlets for both phases.

The liquid velocity at the gas outlet keeps increasing gradually as the simulation time prolongs (my liquid velocity reaches abysmal values). Due to this my time step is increasing with it.

There should be no water at the gas outlet but somehow the solver is calculating unrealistic water velocity at the gas outlet.

I have shared the discretization schemes implemented and also my boundary conditions used for multiphaseEulerFoam. I have even shared the velocity vector slice in the geometry and the checkMesh.

Also I have specifies the phase properties and I am using mixtureKEpsilon turbulence model

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      alpha.oxygen;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 1;

boundaryField
{	
	inlet1
    {
        type            fixedValue;
        value           uniform 0.3238;
    }
	
	inlet2
    {
        type            fixedValue;
        value           uniform 0.3238;
    }
	
	inlet3
    {
        type            fixedValue;
        value           uniform 0.3238;
    }
	
	walls
    {
        type            zeroGradient;
    }
		
	baffle1
    {
        type            zeroGradient;
    }
	
	baffle2
    {
        type            zeroGradient;
    }
	
	baffle3
    {
        type            zeroGradient;
    }
	
    outlet1
    {
        type            inletOutlet;
        phi             phi.oxygen;
        inletValue      uniform 0;
        value           uniform 0;
    }
	
	outlet2
    {
        type            inletOutlet;
        phi             phi.oxygen;
        inletValue      uniform 1;
        value           uniform 1;
    }

}
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0;

boundaryField
{	
	inlet1
    {
        type            fixedValue;
        value           uniform 0.6762;
    }
	
	inlet2
    {
        type            fixedValue;
        value           uniform 0.6762;
    }
	
	inlet3
    {
        type            fixedValue;
        value           uniform 0.6762;
    }
	
	walls
    {
        type            zeroGradient;
    }

	baffle1
    {
        type            zeroGradient;
    }
	
	baffle2
    {
        type            zeroGradient;
    }
	
	baffle3
    {
        type            zeroGradient;
    }
	
    outlet1
    {
        type            inletOutlet;
        phi             phi.water;
        inletValue      uniform 1;
        value           uniform 1;
    }
	
	outlet2
    {
        type            inletOutlet;
        phi             phi.water;
        inletValue      uniform 0;
        value           uniform 0;
    }

}
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField       uniform 4e5;

boundaryField
{
    inlet1
    {
        type               calculated;
        value              $internalField;
    }
	
	inlet2
    {
        type               calculated;
        value              $internalField;
    }
	
	inlet3
    {
        type               calculated;
        value              $internalField;
    }
	
	walls
    {
        type               calculated;
        value              $internalField;
    }

	baffle1
    {
        type               calculated;
        value              $internalField;
    }
	
	baffle2
    {
        type               calculated;
        value              $internalField;
    }
	
	baffle3
    {
        type               calculated;
        value              $internalField;
    }
	
    outlet1
    {
        type               calculated;
        value              $internalField;
    }
	
	outlet2
    {
        type               calculated;
        value              $internalField;
    }

}
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField       uniform 4e5;

boundaryField
{
    inlet1
    {
        type               fixedFluxPressure;
        value              $internalField;
    }
	
	inlet2
    {
        type               fixedFluxPressure;
        value              $internalField;
    }
	
	inlet3
    {
        type               fixedFluxPressure;
        value              $internalField;
    }
	
	walls
    {
        type               fixedFluxPressure;
        value              $internalField;
    }

	baffle1
    {
        type               fixedFluxPressure;
        value              $internalField;
    }
	
	baffle2
    {
        type               fixedFluxPressure;
        value              $internalField;
    }
	
	baffle3
    {
        type               fixedFluxPressure;
        value              $internalField;
    }
	
    outlet1
    {
        type               prghPressure;
        p                  $internalField;
        value              $internalField;
    }
	
    outlet2
    {
        type               prghPressure;
        p                  $internalField;
        value              $internalField;
    }
}
Code:
FoamFile
{
    version     2.0;
    format      binary;
    class       volVectorField;
    object      U.oxygen;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (0 0 0);

boundaryField
{
    inlet1
    {
        type            fixedValue;
        value           uniform (0 0 1.4);
    }
	
	inlet2
    {
        type            fixedValue;
        value           uniform (0 0 1.4);
    }
	
	inlet3
    {
        type            fixedValue;
        value           uniform (0 0 -1.4);
    }
	
	walls
    {
        type               slip;
        
    }

	baffle1
    {
        type               slip;
        
    }
	
	baffle2
    {
        type               slip;
        
    }
	
	baffle3
    {
        type               slip;
        
    }
	
    outlet1
    {
        type               pressureInletOutletVelocity;
        phi                phi.oxygen;
        value              $internalField;
    }
	
    outlet2
    {
        type               pressureInletOutletVelocity;
        phi                phi.oxygen;
        value              $internalField;
    }
}
Code:
FoamFile
{
    version     2.0;
    format      binary;
    class       volVectorField;
    object      U.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (0 0 0);

boundaryField
{
    inlet1
    {
        type            fixedValue;
        value           uniform (0 0 2.92);
    }
	
	inlet2
    {
        type            fixedValue;
        value           uniform (0 0 2.92);
    }
	
	inlet3
    {
        type            fixedValue;
        value           uniform (0 0 -2.92);
    }
	
	walls
    {
        type               noSlip;
        
    }

	baffle1
    {
        type               noSlip;
        
    }
	
	baffle2
    {
        type               noSlip;
        
    }
	
	baffle3
    {
        type               noSlip;
        
    }
	
    outlet1
    {
        type               pressureInletOutletVelocity;
        phi                phi.water;
        value              $internalField;
    }
	
    outlet2
    {
        type               pressureInletOutletVelocity;
        phi                phi.water;
        value              $internalField;
    }
}
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         CrankNicolson 0; //Euler;
}

gradSchemes
{
    default			cellLimited Gauss linear 1;
	grad(U)			cellLimited Gauss linear 1;
	//default         Gauss linear;
}

divSchemes
{
    default                         			none;

    div(phi,alpha.oxygen)              			Gauss vanLeer;
    div(phi,alpha.water)            			Gauss vanLeer;
    div(phir,alpha.water,alpha.oxygen) 			Gauss vanLeer;
    div(phir,alpha.oxygen,alpha.water) 			Gauss vanLeer;

    "div\(alphaRhoPhi.*,U.*\)"      			Gauss linearUpwindV grad(U); //Gauss limitedLinearV 1;
    "div\(phi.*,U.*\)"              			Gauss linearUpwindV grad(U); //Gauss limitedLinearV 1;

    "div\(alphaRhoPhi.*,(h|e).*\)"  			Gauss linearUpwind default; //Gauss limitedLinear 1;
    "div\(alphaRhoPhi.*,K.*\)"      			Gauss linearUpwind default; //Gauss limitedLinear 1;
    "div\(alphaPhi.*,p\)"           			Gauss linearUpwind default; //Gauss limitedLinear 1;

    "div\(alphaRhoPhi.*,(k|epsilon|omega).*\)"  Gauss linearUpwind default; //Gauss limitedLinear 1;
    "div\(phim,(k|epsilon)m\)"      			Gauss linearUpwind default; //Gauss limitedLinear 1;

    "div\(\(\(\(alpha.*\*thermo:rho.*\)*nuEff.*\)\*dev2\(T\(grad\(U.*\)\)\)\)\)" Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear limited 1; //Gauss linear uncorrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         limited 1; //uncorrected;
}

wallDist
{
    method          meshWave;
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    "alpha.*"
    {
        nAlphaCorr      1;
        nAlphaSubCycles 2;
    }

    p_rgh
    {
        solver          GAMG;
        smoother        DIC;
        tolerance       1e-8;
        relTol          0.01;
		minIter         1;
    }

    p_rghFinal
    {
        $p_rgh;
        relTol          0;
    }

    "U.*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-5;
        relTol          0;
        minIter         1;
    }

    "e.*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        //tolerance       1e-7;
        relTol          2;
        minIter         0;
    }

    "(k|epsilon|Theta|omega).*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-7;
        relTol          0;
        minIter         5;
    }
	
	yPsi
    {
        solver          PCG;
        preconditioner  none;
        tolerance       1e-10;
        relTol          0;
    }
	
}

PIMPLE
{
    nOuterCorrectors 3;
    nCorrectors      1;
    nNonOrthogonalCorrectors 1;
	//faceMomentum        yes;
	//explicitTurbulentNormalStress true;

}

relaxationFactors
{
    equations
    {
        ".*"            1;
    }
}
Code:
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           192554
    faces:            529375
    internal faces:   499745
    cells:            168877
    faces per cell:   6.0939
    boundary patches: 9
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     150668
    prisms:        8752
    wedges:        0
    pyramids:      0
    tet wedges:    36
    tetrahedra:    2
    polyhedra:     9419
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            4   651
            5   462
            6   2307
            7   33
            8   58
            9   3476
           10   10
           11   9
           12   1989
           13   5
           15   403
           18   16

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
                   Patch    Faces   Points                  Surface topology
                 baffle1     2324     2368  ok (non-closed singly connected)
                 baffle2     2278     2326  ok (non-closed singly connected)
                 baffle3     2297     2349  ok (non-closed singly connected)
                  inlet1      108      134  ok (non-closed singly connected)
                  inlet2      109      134  ok (non-closed singly connected)
                  inlet3      101      116  ok (non-closed singly connected)
                 outlet1       66       77  ok (non-closed singly connected)
                 outlet2        6        8  ok (non-closed singly connected)
                   walls    22341    23345  ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (-0.133186 -0.299184 -0.369699) (2.436 0.299196 0.366711)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (-6.9755e-17 -1.089e-16 1.1863e-16) OK.
    Max cell openness = 3.188e-16 OK.
    Max aspect ratio = 6.84199 OK.
    Minimum face area = 5.66589e-07. Maximum face area = 0.000931798.  Face area magnitudes OK.
    Min volume = 1.86129e-08. Max volume = 2.73649e-05.  Total volume = 0.671561.  Cell volumes OK.
    Mesh non-orthogonality Max: 44.9987 average: 7.56959
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 2.86891 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      phaseProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

type    basicMultiphaseSystem;

phases (oxygen water);

oxygen
{
    type            purePhaseModel;
    diameterModel   constant;
    constantCoeffs
    {
        d               2e-3;
    }

    residualAlpha   1e-6;
}

water
{
    type            purePhaseModel;
    diameterModel   constant;
    constantCoeffs
    {
        d               1e-4;
    }

    residualAlpha   1e-6;
}

blending
{
	default
    {
        type            linear;
        minFullyContinuousAlpha.oxygen 0.7;
        minPartlyContinuousAlpha.oxygen 0.3;
        minFullyContinuousAlpha.water 0.7;
        minPartlyContinuousAlpha.water 0.3;
    }
	/*
	default
    {
        type            hyperbolic;
		transitionAlphaScale 0.6;
        minContinuousAlpha.oxygen 0.4;
        minContinuousAlpha.water 0.6;
    }
	
    default
    {
        type            none;
        continuousPhase water;
    }
	*/
}

surfaceTension
(
    (oxygen and water)
    {
        type            constant;
        sigma           0.0644;
    }
);

aspectRatio
(

    (oxygen in water)
    {
        type            constant;
        E0              1.0;
    }

    (water in oxygen)
    {
        type            constant;
        E0              1.0;
    }

);

drag
(	
	(oxygen in water)
    {
        type            SchillerNaumann;
        residualRe      1e-3;
        swarmCorrection
        {
            type        none;
        }
    }
	/*
    (oxygen in water)
    {
        type            IshiiZuber;
        residualRe      1e-3;
		
        swarmCorrection
        {
            type        none;
			//l 			1.75;
        }
		
    }
	*/
	
);

virtualMass
(

    (oxygen in water)
    {
        type            constantCoefficient;
        Cvm             0.5;
    }
	/*
	(water in oxygen)
    {
        type            constantCoefficient;
        Cvm             0.5;
    }
	*/
);

heatTransfer
(

    (oxygen in water)
    {
        type            RanzMarshall;
        residualAlpha   1e-4;
    }
	/*
	(water in oxygen)
    {
        type            RanzMarshall;
        residualAlpha   1e-4;
    }
	*/
);

phaseTransfer
();

lift
(
    (oxygen in water)
	
    {
        type constantCoefficient;
		Cl             0.5;
    }
	
);

wallLubrication
(
/*
    (oxygen in water)
    {
        type            Antal;
        Cw1             -0.01;
		Cw2				0.05;
    }
*/
);

turbulentDispersion
(
    (oxygen in water)
    {
        type                constantCoefficient;
        Ctd               	0.5;
    }
);

interfaceCompression
();

// Minimum allowable pressure
pMin            10000;
I have disabled solving for energy equations by making it not solve for energy equation in fvsolution since my case is isothermal.

If anybody could please guide me on what mistake I am making, it will be really helpful for me.

Thank you


1.PNG

2.PNG

Last edited by enthusiast; April 13, 2022 at 04:55. Reason: Filling in the missing information
enthusiast is offline   Reply With Quote

Old   January 20, 2023, 04:54
Default
  #2
New Member
 
Join Date: May 2018
Location: Vienna, Austria
Posts: 14
Rep Power: 8
evamaria is on a distinguished road
Hi,

Could you also share the phase fraction snapshots?

I suppose it might be a problem, how you specified the alpha.water and alpha.oxygen at the outlet.
If you are sure, that for one outlet only water is going out and for the other only oxygen, you could set the phase fractions in that way.
evamaria is offline   Reply With Quote

Reply

Tags
multi phase flow, numerical computation, time step decreasing


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
Import .csv - velocity profile - error eSKa CFX 9 April 3, 2021 14:38
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' muth OpenFOAM Running, Solving & CFD 3 August 27, 2018 05:18
[blockMesh] Errors during blockMesh meshing Madeleine P. Vincent OpenFOAM Meshing & Mesh Conversion 51 May 30, 2016 11:51
Problem with assigned inlet velocity profile as a boundary condition Ozgur_ FLUENT 5 August 25, 2015 05:58
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 09:19


All times are GMT -4. The time now is 14:33.