Interfoam failed to solve for alpha (air-water flow in 3D pipe)
Guys,
I am getting so confused. I used to simulate 2D air-water two phase flow using interFoam as the solver, but recently I just switched to 3D simulation. Unfortunately I just came up with no results for alpha (volume phase fraction). I used blockMesh to create my geometry as below: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 0.01; vertices ( (0 0 0) //0 (0.3535 0.3535 0) //1 (-0.3535 0.3535 0) //2 (-0.3535 -0.3535 0) //3 (0.3535 -0.3535 0) //4 (0.3535 0.3535 30) //5 (-0.3535 0.3535 30) //6 (-0.3535 -0.3535 30) //7 (0.3535 -0.3535 30) //8 (0 0 30) //9 ); blocks ( hex (1 2 3 4 5 6 7 8) (10 10 150) simpleGrading (1 1 1) ); edges ( arc 1 2 (0 0.5 0) arc 2 3 (-0.5 0 0) arc 3 4 (0 -0.5 0) arc 4 1 (0.5 0 0) arc 5 6 (0 0.5 30) arc 6 7 (-0.5 0 30) arc 7 8 (0 -0.5 30) arc 8 5 (0.5 0 30) ); boundary ( inlet { type patch; faces ( (1 2 3 4) ); } outlet { type patch; faces ( (5 6 7 8) ); } fixedWalls { type wall; faces ( (5 6 2 1) (6 7 3 2) (7 8 4 3) (8 5 1 4) ); } ); mergePatchPairs ( ); // ************************************************** *********************** // I was actually wondering if I did not set the proper inlet condition for alpha! /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / 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 { type inletOutlet; inletValue uniform 0.5; value uniform 0.5; } outlet { type zeroGradient; } fixedWalls { type zeroGradient; } } // ************************************************** *********************** // But just take a look at the result of alpha for example @ t=0.1s: /*--------------------------------*- 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 volScalarField; location "0.1"; object alpha.water; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type inletOutlet; inletValue uniform 0.5; value uniform 0; } outlet { type zeroGradient; } fixedWalls { type zeroGradient; } } // ************************************************** *********************** // I appreciate if anyone could please make any comments on that. |
Hi Milad,
what did you set the inlet boundary condition for velocity? please give detailed information for a more accurate solution. Furthermore, its better to use [CODE] tag for writing dictionaries in your thread, anyway it has a better representation. Regards, Arsalan. |
1 Attachment(s)
Quote:
Thank you so much for your response. I used fixedVelocity for inlet U. Attached hereby, please find my case file. Best, Milad |
Hi Milad
Check your U boundary condition in your 0 time directory. The length of your pipe is along the z-direction. Your U boundary condition on the inlet is (1 0 0). Changing it to (0 0 1) should sort out your problem. I tested it out and it works with just that change. Regards, Brian |
Hi Milad,
As Brian said, you should modify velocity boundary condition at inlet along the Z direction and normal to the patch (like (0,0,1)),this will solve the problem. Regards, Arsalan. |
Dear fiends Brian and Arsalan,
I really appreciate your helps. You are right and that worked. Thank you! |
All times are GMT -4. The time now is 02:19. |