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

Interfoam failed to solve for alpha (air-water flow in 3D pipe)

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By arsalan.dryi
  • 1 Post By Dipsomaniac
  • 1 Post By arsalan.dryi
  • 1 Post By mizzou

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 28, 2016, 04:11
Default Interfoam failed to solve for alpha (air-water flow in 3D pipe)
  #1
Member
 
Milad
Join Date: Jul 2015
Location: USA
Posts: 45
Rep Power: 10
mizzou is on a distinguished road
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.
mizzou is offline   Reply With Quote

Old   October 28, 2016, 04:46
Default
  #2
Member
 
Arsalan
Join Date: Jul 2014
Posts: 74
Rep Power: 11
arsalan.dryi is on a distinguished road
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.
mizzou likes this.
arsalan.dryi is offline   Reply With Quote

Old   October 28, 2016, 11:08
Default
  #3
Member
 
Milad
Join Date: Jul 2015
Location: USA
Posts: 45
Rep Power: 10
mizzou is on a distinguished road
Quote:
Originally Posted by arsalan.dryi View Post
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.
Dear Arsalan

Thank you so much for your response. I used fixedVelocity for inlet U. Attached hereby, please find my case file.

Best,
Milad
Attached Files
File Type: gz pipeflow.tar.gz (3.8 KB, 35 views)
mizzou is offline   Reply With Quote

Old   October 29, 2016, 04:20
Default
  #4
Member
 
Brian Willis
Join Date: Mar 2011
Location: Cape Town, South Africa
Posts: 58
Rep Power: 15
Dipsomaniac is on a distinguished road
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
mizzou likes this.

Last edited by Dipsomaniac; October 29, 2016 at 05:11. Reason: spelling
Dipsomaniac is offline   Reply With Quote

Old   October 29, 2016, 07:13
Default
  #5
Member
 
Arsalan
Join Date: Jul 2014
Posts: 74
Rep Power: 11
arsalan.dryi is on a distinguished road
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.
mizzou likes this.
arsalan.dryi is offline   Reply With Quote

Old   October 29, 2016, 07:41
Default
  #6
Member
 
Milad
Join Date: Jul 2015
Location: USA
Posts: 45
Rep Power: 10
mizzou is on a distinguished road
Dear fiends Brian and Arsalan,

I really appreciate your helps. You are right and that worked.

Thank you!
Dipsomaniac likes this.
mizzou 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
Issues on the simulation of high-speed compressible flow within turbomachinery dowlee OpenFOAM Running, Solving & CFD 11 August 6, 2021 06:40
flow from water pipe leak to sand domain tangfl ANSYS 1 May 13, 2013 04:15
3D-Simulation of Water Flow From Nozzle into Air Navin Sampath FLOW-3D 2 February 26, 2009 10:46
uptodate water distribution network fredius,magige,tanzanian,(e.a) Main CFD Forum 0 January 27, 2002 07:10
fluid flow fundas ram Main CFD Forum 5 June 17, 2000 21:31


All times are GMT -4. The time now is 21:26.