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

Poiseuille flow: strange behaviour

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2013, 08:23
Default Poiseuille flow: strange behaviour
  #1
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 18
samiam1000 is on a distinguished road
Dear all,

I am trying to simulate a Poiseuille-flow. It is a very simple problem, but I notice a strange behaviour. Everything seems to be ok. Actually, if you analyze the attached picture, you can see that Uz presents a strange `red cell' (i.e. a value pretty high) in the cell between the upper wall and the inlet. As far as the BC are concerned, here are the files for P and U:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 0;

boundaryField
{
    wall
    {
        type            zeroGradient;
        
    }

    xwall													// facce perpendicolari a x
    {
        type			empty;
    }

    inlet1
    {
        type            zeroGradient;
    }
    
    outlet
    {
        type            fixedValue;
        value			uniform 0;
    }

}

// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.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
{
    wall
    {
        type            	fixedValue;
        value			uniform (0 0 0);
    }

    inlet1

    {
	type			groovyBC;
	value			uniform (0 1 0);
	variables		"Vm=0.5;xp=pos().x;zp=pos().z;hx=max(xp);hz=max(zp);a=-8*Vm/(hz*hz);b=2*Vm;R=hz/2;";
	fractionExpression	"1"; 
	valueExpression		"vector (0, a*((zp-R)*(zp-R))+b, 0)";
        
    }

    outlet
    {
    type		zeroGradient;
    }

    xwall													// facce perpendicolari a x
    {
        type			empty;
    }
}



// ************************************************************************* //
Also, I am running simpleFoam.

Why this happens? Could this cell be `dangerous' for the whole solution?

Any idea?

Thanks a lot,
Samuele
Attached Images
File Type: jpg clip.jpg (97.2 KB, 22 views)
samiam1000 is offline   Reply With Quote

Old   February 15, 2013, 11:39
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
This is completely wrong.

What solver are you using?

Do you by any chance have a pRef defined in system/fvSolution?
Bernhard is offline   Reply With Quote

Old   February 15, 2013, 11:45
Default
  #3
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 18
samiam1000 is on a distinguished road
I know that it is completely wrong.

I am using simpleFoam and I do not have pRefCell defined in the fvSolution file.

fvSolution:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
        solver           GAMG;
        tolerance        1e-5;
        relTol           0.1;
        smoother         GaussSeidel;
        nPreSweeps       0;
        nPostSweeps      2;
        cacheAgglomeration on;
        agglomerator     faceAreaPair;
        nCellsInCoarsestLevel 10;
        mergeLevels      1;
    }

    U
    {
        solver           smoothSolver;
        smoother         GaussSeidel;
        tolerance        1e-5;
        relTol           0.1;
        nSweeps          1;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;

	residualControl
    {
        p           1e-5;
        U           1e-5;
    }
}

potentialFlow
{
    nNonOrthogonalCorrectors 10;
}

relaxationFactors
{
    fields
    {
        p               0.3;
    }
    equations
    {
        U               0.7;

    }
}

cache
{
    grad(U);
}

// ************************************************************************* //
samiam1000 is offline   Reply With Quote

Old   February 15, 2013, 11:53
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
You are looking at a unconverged solution. You now look at the second iteration. Note that deltaT does not mean time in the simple*Foam solvers. Set deltaT to 1, endTime to 1000 (thus 1000 iterations), and look at the last saved step to see what has changed. Check out the simpleFoam source code to see what is going on (loop-wise).

Did your log-file end with a statement "Solution has converged", or something like that?
Bernhard is offline   Reply With Quote

Old   February 15, 2013, 12:02
Default
  #5
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 18
samiam1000 is on a distinguished road
That was not a converged solution (but the same happens for the converged one) and my DeltaT is already set to 1. You see Time 2000 and `snapshot' 2 because I save the solution each 1000 steps.

Also, adding a pRef in the fvSolution

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
        solver           GAMG;
        tolerance        1e-5;
        relTol           0.1;
        smoother         GaussSeidel;
        nPreSweeps       0;
        nPostSweeps      2;
        cacheAgglomeration on;
        agglomerator     faceAreaPair;
        nCellsInCoarsestLevel 10;
        mergeLevels      1;
    }

    U
    {
        solver           smoothSolver;
        smoother         GaussSeidel;
        tolerance        1e-5;
        relTol           0.1;
        nSweeps          1;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;

	pRefCell 	14436;
	pRefValue	0;

	residualControl
    {
        p           1e-5;
        U           1e-5;
    }
}

potentialFlow
{
    nNonOrthogonalCorrectors 10;
}

relaxationFactors
{
    fields
    {
        p               0.3;
    }
    equations
    {
        U               0.7;

    }
}

cache
{
    grad(U);
}

// ************************************************************************* //
I get the same behaviour (see the picture attached).

The picture shows the solution after 100 iterations, but the same happens for the converged solution (I'll post it soon).

Ideas?
Attached Images
File Type: jpg clip.jpg (92.1 KB, 12 views)
samiam1000 is offline   Reply With Quote

Old   February 15, 2013, 12:05
Default
  #6
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
You definitely don't need the pRefCell (it will also not be used hopefully). Can you show a snippet of your logfile? I think a lot can be gained in your fvSolutions.
Bernhard is offline   Reply With Quote

Old   February 17, 2013, 04:31
Default
  #7
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 182
Blog Entries: 1
Rep Power: 16
Ahmed Khattab is on a distinguished road
dear samuele,

could you please attach your entire case, i faced same problems before but i simulated this case in tube and used icoFoam. i think the problem doesn't relate to refP but to boundary conditions. you may try make outlet BCs as inletOutlet.

thanks and good luck
Ahmed Khattab is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Review: Reversed flow CRT FLUENT 1 May 7, 2018 06:36
Urgent Help !!!Strange reverse flow in naca0012 problem parvez2683 FLUENT 5 May 20, 2013 10:25
strange behaviour of the one-equation SGS model cfdmarkus OpenFOAM Running, Solving & CFD 18 August 14, 2009 06:33
Poiseuille flow (flow in a pipe) in SOLA-VOF. Parabolic distribution of velocities. Anton Main CFD Forum 9 April 29, 2009 11:31
Can 'shock waves' occur in viscous fluid flows? diaw Main CFD Forum 104 February 16, 2006 06:44


All times are GMT -4. The time now is 19:35.