|
[Sponsors] |
interFoam two-phase pipe flow air phase behaviour |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 15, 2016, 07:01 |
interFoam two-phase pipe flow air phase behaviour
|
#1 |
New Member
Join Date: Jan 2016
Posts: 10
Rep Power: 10 |
Dear OpenFOAM community,
first of all thanks for the great knowledge base that is available here and often helped me with my problems. Unfortunately, currently I am facing a problem I am not able to resolve myself and I also couldn't find any information here. I am working with OF version 2.4.0 and I am simulating two-phase pipe flow in a rectangular inclined duct using the interFoam solver. I am especially focussing on the air phase behaviour and currently comparing the results to experimental results as you can see in the picture attached. The geometry has a length of 15 m, a height of 0.26 m and a depth of 0.3 m. The water level is 0.0585 m. First problem I am facing is, that I get a completely different behaviour of the air phase using a structured or unstructured grid (see picture). I was wondering if this can be plausible and might be a result of parasitic currents at the air-water interface that travel further upwards in the pipe geometry when unstructured meshes are used? There are strong eddy structures developing when I use unstructured meshes. Just to show that the meshes I am using are ok, I attached the checkMesh log files. For the structured meshes I can only see small eddies close to the inlet. In the middle of the pipe, the velocity profile looks more or less acceptable when I use the k-epsilon or k-omega SST turbulence model (just tried the two of them out of the range of RANS models). LES and laminar simulations lead to negative velocities in the headspace of the pipe (see attached velocity profile in the middle of the pipe at x = 7.5 m). One explanation I can think of is that by defining k, epsilon or omega in an initial guess, I imply that the velocities have to be positive and therefore get positive velocity profiles. Do you think this is a possible explanation? Next point is, that when using the k-epsilon turbulence model, the water velocity at the inlet is 0.4 m/s which is the desired speed. However, the pipe geometry is inclined and the velocity should be around 0.41 m/s in the middle of the pipe but instead it decreases to a very small value directly after the inlet and then jumps to approx. 0.3 m/s (see attached plot). Using wall functions decreases the velocity even more. Probably there is some mistake in the definition of my boundary conditions, but I cannot think about a possible way to fix the problem. Here are the boundary conditions I am using: alpha.water Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object alpha.water; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { inlet_air { type inletOutlet; inletValue uniform 0; value uniform 0; } inlet_water { type inletOutlet; inletValue uniform 1; value uniform 1; } outlet { type zeroGradient; } walls { type zeroGradient; } top { type zeroGradient; } bottom { type zeroGradient; } } // ************************************************************************* // p_rgh Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet_air { type totalPressure; p0 uniform 0; U U; phi phi; rho rho; psi none; gamma 1; value uniform 0; } inlet_water { type zeroGradient; } outlet { type fixedValue; value uniform 0; } walls { type zeroGradient; } top { type zeroGradient; } bottom { type zeroGradient; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ 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 { inlet_air { type zeroGradient; } inlet_water { type flowRateInletVelocity; volumetricFlowRate 0.0072; //Volumetric flow rate [m3/s] value uniform (0 0 0); //placeholder } outlet { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } walls { type fixedValue; value uniform (0 0 0); } top { type fixedValue; value uniform (0 0 0); } bottom { type fixedValue; value uniform (0 0 0); } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.5 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet_water { type fixedValue; value uniform 0.000630375; } inlet_air { type fixedValue; value uniform 0.00005310375; } outlet { type zeroGradient; } top { type zeroGradient; } bottom { type zeroGradient; } walls { type zeroGradient; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.5 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object epsilon; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -3 0 0 0 0]; internalField uniform 0; boundaryField { inlet_air { type fixedValue; value uniform 0.000002664739181029707; } inlet_water { type fixedValue; value uniform 0.00022312493289785518; } outlet { type zeroGradient; } bottom { type zeroGradient; } walls { type zeroGradient; } top { type zeroGradient; } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { div(rhoPhi,U) Gauss linearUpwindV cellLimited Gauss linear 1; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; div(phi,k) Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p_rgh; pcorr; alpha.water; } Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { "alpha.water.*" { nAlphaCorr 2; nAlphaSubCycles 2; cAlpha 1; MULESCorr yes; nLimiterIter 3; solver smoothSolver; smoother symGaussSeidel; tolerance 1e-8; relTol 0; } pcorr { solver PCG; preconditioner DIC; tolerance 1e-5; relTol 0; }; p_rgh { solver PCG; preconditioner DIC; tolerance 1e-07; relTol 0.05; }; p_rghFinal { $p_rgh; tolerance 1e-07; relTol 0; } "(U|k|epsilon).*" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-06; relTol 0; minIter 1; } } PIMPLE { momentumPredictor no; nCorrectors 3; nOuterCorrectors 3; nNonOrthogonalCorrectors 2; nAlphaCorr 3; nAlphaSubCycles 4; cAlpha 1; } relaxationFactors { fields { } equations { ".*" 1; } } cache { grad(U); } // ************************************************************************* // Thank you very much in advance! Katharina checkMesh_unstruc.txt plot_over_line_x-axis.png checkMesh_struc.txt velo-profile-struc-unstruc.jpg velo-profiles-turbulence.jpg Last edited by katete; June 15, 2016 at 07:13. Reason: forgot fvSchemes and fvSolution |
|
August 24, 2016, 09:47 |
|
#2 |
New Member
Join Date: Jan 2016
Posts: 10
Rep Power: 10 |
Dear Community,
here is a short update about my work: I modified the boundary conditions and started working with nutkRoughWallFunction in order to describe surface roughness. I was able to resolve the problem with the velocity drop in x-direction and am now having an increase of the velocity over the length of the pipe. However, the velocity profile of the air phase still does not look like the measured data. Because I do not see any instabilities arising from the boundaries, I am wondering where the relatively high air phase velocities come from. I am currently looking a little more into the schemes because this is the last possible source of error I could think of. Should you have any recommendations of which schemes might be best for this case of stratified pipe flow, I am happy to hear them. For those interested: The main modifications I made concerning the boundary conditions was changing zeroGradient-bcs in the p_rgh file to fixedFluxPressure. At the inlet_air, I changed the bc to pressureInletOutletVelocity. I further increased the mesh resolution in x-direction and made a refinement in the area of the interface. My current fvSchemes looks like this: Code:
ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { div(rhoPhi,U) Gauss upwind; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div((muEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p_rgh; pcorr; alpha.water; } Code:
solvers { "alpha.water.*" { nAlphaCorr 2; nAlphaSubCycles 1; cAlpha 1; MULESCorr yes; nLimiterIter 3; solver smoothSolver; smoother symGaussSeidel; tolerance 1e-8; relTol 0; } pcorr { solver PCG; preconditioner { preconditioner GAMG; tolerance 1e-5; relTol 0; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; nFinestSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } tolerance 1e-5; relTol 0; maxIter 50; } p_rgh { solver GAMG; tolerance 5e-9; relTol 0.01; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; maxIter 50; }; p_rghFinal { $p_rgh; relTol 0; } "(U|k|epsilon).*" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-06; relTol 0; minIter 1; } } PIMPLE { momentumPredictor no; nOuterCorrectors 1; nCorrectors 3; nNonOrthogonalCorrectors 0; } relaxationFactors { equations { ".*" 1; } } Kind regards Katharina pipe_flow.zip bentz.jpg velo_glyph.jpg |
|
September 25, 2018, 05:21 |
|
#3 |
New Member
katia
Join Date: Sep 2018
Posts: 3
Rep Power: 8 |
Excuse me,have you solved this question,and i have the same question recently,coule you please share this case with me?
|
|
July 24, 2020, 16:58 |
two-phase flow problem
|
#4 |
New Member
Valdirene da Rosa Rocho
Join Date: Jul 2020
Posts: 9
Rep Power: 6 |
Folks
I am working with a two-phase flow problem, similar to what the colleague describes. However, my case is two-dimensional, channel length 5, and height for water 0.2 and air 3.8. However, I have the case laminar and Re = 1. I'm in trouble, I don't know if in the boundary conditions or in the solver, my flow speed is dying. Someone to help ??? Thank you! |
|
July 24, 2020, 17:02 |
|
#5 |
Member
Arnout
Join Date: Nov 2010
Posts: 46
Rep Power: 16 |
What does “the flow speed is dying” means? The mixture velocity should stay constant since you calculate incompressible.
|
|
July 25, 2020, 17:14 |
two-phase flow problem
|
#6 |
New Member
Valdirene da Rosa Rocho
Join Date: Jul 2020
Posts: 9
Rep Power: 6 |
Good afternoon
I mean that the flow velocity is getting zero. What can make this happen. I am using the following boundary conditions: U boundaryField { entradaInferior //fluido água { type fixedValue; value uniform (1 0 0); } entradaSuperior { type fixedValue; value uniform (0 0 0); //Perfil Uniforme de Velocidade em x } saidaInferior { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } saidaSuperior { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } fundo { type noSlip; } topo { type pressureInletOutletVelocity; value uniform (0 0 0); } defaultFaces { type empty; } } P: dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { entradaInferior { type fixedFluxPressure; value uniform 0; } entradaSuperior { type fixedFluxPressure; value uniform 0; } saidaInferior { type fixedFluxPressure; value uniform 0; } saidaSuperior { type fixedFluxPressure; value uniform 0; } fundo { type fixedFluxPressure; value uniform 0; } topo { type totalPressure; p0 uniform 0; } defaultFaces { type empty; } } alpha.water dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { entradaInferior { type fixedValue; value uniform 1; } entradaSuperior { type fixedValue; value uniform 0; } saidaInferior { type inletOutlet; inletValue uniform 0; value uniform 0; } saidaSuperior { type inletOutlet; inletValue uniform 0; value uniform 0; } fundo { type noSlip; //type zeroGradient; //value uniform 0; } topo { type inletOutlet; inletValue uniform 0; value uniform 0; } defaultFaces { type empty; } } |
|
September 24, 2020, 14:56 |
InterFOAM
|
#7 |
New Member
Valdirene da Rosa Rocho
Join Date: Jul 2020
Posts: 9
Rep Power: 6 |
Good afternoon people
I am simulating a two-phase flow (water and air) in openFOAM version 7. I need to apply a disturbance to the boundary conditions of the entrance (inlet). I want to assess the fluid's instability. I posted a photo of what I have so far. I was unable to use the boundary conditions of the type type Groovy From what I have understood .... disturbances are put through this type of condition, I followed guidelines that should install swak4Foam, even so I am not getting it. Can someone help me ... I don't know how to deal with C ++ programming, I would like to use what is ready in the program. |
|
February 1, 2021, 07:22 |
Interfoam- two phase - water & air
|
#8 | |
New Member
Join Date: Oct 2019
Posts: 13
Rep Power: 7 |
Hii valdirene.rocho,
Did you solve the two-phase flow (water & air). I want to give air speed also along with water speed. How to give it. Thanks in advance. Quote:
|
||
February 3, 2021, 02:43 |
|
#9 |
Member
Arnout
Join Date: Nov 2010
Posts: 46
Rep Power: 16 |
Hi, can you explain more? If you only have one inlet, you can add the mixture velocity and the alpha. Need some length to seperate, not the best option. There is also an option to split the inlet boundary condition which requires some text file editing: https://youtu.be/K-nAF3qAPTc
Maybe easier to split the single inlet into two in your geometry and specify velocities separate, alpha=0 for gas and alpha=1 for liquid. |
|
February 3, 2021, 03:03 |
Interfoam- two phase - water & air
|
#10 | |
New Member
Join Date: Oct 2019
Posts: 13
Rep Power: 7 |
Quote:
I am doing multiphase (air & water) for ships. Ship part below water has velocity of ship. Above part should be air. Now in this, i have only one inlet given in blockMesh and i use alpha.water & setFields for VOF. I use "U" file for giving velocity of water(ship), But, i also want to give air speed for the large windage area. I don't know how to give both speeds- air & water for interFoam solver. Also, is the interFoam solver correct for this kind of problem?? My final aim is to calculate total resistance of ship due to air & water both. |
||
February 3, 2021, 03:44 |
|
#11 | |
Member
Arnout
Join Date: Nov 2010
Posts: 46
Rep Power: 16 |
Quote:
Ok, than I should split up the inlet in a sea current inlet and a wind inlet. That can be done in the geometry by specifying two inlets (which can be touching). This is a “clicking” solution. Another option is to watch the YouTube movie and create a split on the water surface. That one I like more since it’s easy to add a logarithmic wind profile in the same step. See Wikipedia for details. Interfoam is an good option since you want to simulate a free surface. |
||
February 3, 2021, 04:14 |
Interfoam- two phase - water & air
|
#12 | |
New Member
Join Date: Oct 2019
Posts: 13
Rep Power: 7 |
Quote:
Thank you Arnout. I'll try second option & get back to you. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Three Phase flow into a reservoir... | akjha | Main CFD Forum | 0 | December 15, 2014 08:01 |
Air flow on a pipe | gulbenkian | FLUENT | 1 | June 8, 2010 08:31 |
interFoam more Axi-symmetric two phase flow ? | Ingenierias2003 | OpenFOAM | 4 | May 10, 2010 15:39 |
Laminar field as initial state for turbulent two phase pipe flow | kjetil | OpenFOAM Running, Solving & CFD | 3 | July 21, 2009 10:15 |
Tangential Air Flow in a circular pipe | Scott Turner | Main CFD Forum | 3 | January 31, 2005 15:59 |