|
[Sponsors] |
February 15, 2013, 08:23 |
Poiseuille flow: strange behaviour
|
#1 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19 |
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; } } // ************************************************************************* // Why this happens? Could this cell be `dangerous' for the whole solution? Any idea? Thanks a lot, Samuele |
|
February 15, 2013, 11:39 |
|
#2 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
This is completely wrong.
What solver are you using? Do you by any chance have a pRef defined in system/fvSolution? |
|
February 15, 2013, 11:45 |
|
#3 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19 |
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); } // ************************************************************************* // |
|
February 15, 2013, 11:53 |
|
#4 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
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? |
|
February 15, 2013, 12:02 |
|
#5 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19 |
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); } // ************************************************************************* // The picture shows the solution after 100 iterations, but the same happens for the converged solution (I'll post it soon). Ideas? |
|
February 15, 2013, 12:05 |
|
#6 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
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.
|
|
February 17, 2013, 04:31 |
|
#7 |
Senior Member
|
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 |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |