CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   OpenFOAM - Validation of Results (http://www.cfd-online.com/Forums/openfoam-solving/67238-openfoam-validation-results.html)

Ahmed August 8, 2009 13:21

OpenFOAM - Validation of Results
 
4 Attachment(s)
Being unhappy/disappointed with the results obtained by OpenFOAM after my first tutorial ( http://www.cfd-online.com/Forums/ope...-tutorial.html ) I decided to search for validation cases.
Searching the internet provides a good number of examples, but, in most of these cases, the results of OpenFOAM are presented as images, and comparing the results with those obtained by commercial solvers.
'This actually is not the correct way of validating a programme. When doing CFD analysis, the design engineer is looking for numerical values not pictures.
I decided to open this thread looking for your help. I hope the so many users of openFOAM can share their results with new users like me.
As a starter, I have prepared a case for the well documented flow over a flat plate, since we have the well known solution of Blasius.
Here is the blockMesh Dictionary
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
(0 0 0)
(1 0 0)
(1 0.1 0)
(0 0.1 0)
(0 0 0.1)
(1 0 0.1)
(1 0.1 0.1)
(0 0.1 0.1)
);

blocks
(
hex (0 1 2 3 4 5 6 7) (100 50 1) simpleGrading (1 15 1)
);

edges
(
);

patches
(
patch inlet
(
(0 4 7 3)
)
patch outlet
(
(1 5 6 2)
)
wall fixedWall
(
(0 1 5 4)
)
patch top
(
(3 2 6 7)
)
empty frontAndBack
(
(0 1 2 3)
(4 5 6 7)
)
);

mergePatchPairs
(
);

// ************************************************** *********************** //


and the transport properties

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

nu nu [ 0 2 -1 0 0 0 0 ] 15.08e-06;


// ************************************************** *********************** //


here we have the controlDictionary

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

application icoFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 0.01;

deltaT 1e-06;

writeControl runTime;

writeInterval 0.00015;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;


// ************************************************** *********************** //


here we have the initial conditions

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://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 101325;

boundaryField
{
inlet
{
type fixedValue;
value uniform 101325;
}
outlet
{
type zeroGradient;
}
fixedWall
{
type zeroGradient;
}
top
{
type fixedValue;
value uniform 101325;
}
defaultFaces
{
type empty;
}
}


// ************************************************** *********************** //

and the U file


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://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 (100.0 0.0 0);

boundaryField
{
inlet
{
type fixedValue;
value uniform (100.0 0 0);
}
outlet
{
type zeroGradient;
}
fixedWall
{
type fixedValue;
value uniform (0 0 0);
}
top
{
type fixedValue;
value uniform (100.0 0 0);
}
defaultFaces
{
type empty;
}
}


// ************************************************** *********************** //


I also attach images of the mesh and the results.

I am looking for your comments and corrections, but most importantly, I hope the readers will add their own validation cases

alberto August 9, 2009 03:01

Quote:

Originally Posted by Ahmed (Post 225692)
Searching the internet provides a good number of examples, but, in most of these cases, the results of OpenFOAM are presented as images, and comparing the results with those obtained by commercial solvers.
'This actually is not the correct way of validating a programme. When doing CFD analysis, the design engineer is looking for numerical values not pictures.

You just did the same: posted pictures :D

Out of joke, the idea of posting validation cases is surely interesting.

henrik August 9, 2009 03:38

Dear Ahmed,

the Special Interest Group Turbomachinery is doing exactly what you describe.

http://openfoamwiki.net/index.php/Sig_Turbomachinery

They picked well-known validation cases

http://openfoamwiki.net/index.php/Si...ion_test_cases

ran the problem in different academic and commercial CFD groups compared the results with experimental data and presented the results at the workshop. The case setups and codes are available from sourceforge - So everybody can redo the exercise. Validation does not get better than this and it completely transparent - down to the last line of code.

Henrik

Ahmed August 9, 2009 11:00

Quote:

Originally Posted by alberto (Post 225720)
You just did the same: posted pictures :D

Out of joke, the idea of posting validation cases is surely interesting.

That is correct, I posted the code and pictures hoping that readers can repeat the analysis and share their results and comments with the rest of us (Check the above post by Henrik Rusche)
You see, the U magnitude reported by my solution is greater than what I specified as the free stream condition, is my set up giving reasonable answers or is it the programme itself that is accumulating too much rounding errors?
Good luck and waiting to see your comments soon

Ahmed August 9, 2009 11:03

Quote:

Originally Posted by henrik (Post 225723)
Dear Ahmed,

the Special Interest Group Turbomachinery is doing exactly what you describe.

http://openfoamwiki.net/index.php/Sig_Turbomachinery

They picked well-known validation cases

http://openfoamwiki.net/index.php/Si...ion_test_cases

ran the problem in different academic and commercial CFD groups compared the results with experimental data and presented the results at the workshop. The case setups and codes are available from sourceforge - So everybody can redo the exercise. Validation does to get better than this and it completely transparent - down to the last line of code.

Henrik

Henrik
Thanks for the information, I hope to see more validation cases on this forum
Good Luck

andersking August 10, 2009 09:11

Dear Ahmed,

I believe your solution is correct. You have imposed a uniform fixed velocity at the inlet, and a fixed velocity on the top wall. As the boundary layer develops, the fluid within it slows down, and therefore to maintain mass continuity the fluid in the freestream region must speed up, above the 100m/s you have specified.

If you were to increase the height of your domain, then this "error" would be decreased. (also, you will likely observe a velocity gradient between the top surface, and the bulk flow).

Regards,
Andrew

paulo August 10, 2009 09:28

Dear Ahmed and All,

You can find a nice validation case here:

http://openfoamwiki.net/index.php/Bl...Flow_Benchmark

Hope that helps. :)

Best Regards,

Paulo Rocha

alberto February 11, 2010 20:13

Quote:

Originally Posted by lbuckley (Post 245768)
And if anyone knows of a good site for some fundamental examples, I would greatly appreciate it.

For the basic solvers (compressible/incompressible) the examples in the tutorial folder are relatively easy, even if I am well aware of the time it takes to learn OF ;-)

You can find some additional information on the wiki, but unfortunately explained tutorial are not many.

Best,

niklas May 11, 2010 04:50

New case added, LES around a square cylinder from the QNet-Ercoftac database,
Underlying Flow Regime 2-02.
http://openfoamwiki.net/index.php/Be...coftac_ufr2-02

Martin Hegedus June 22, 2011 18:59

I've started a similar thread here. http://www.cfd-online.com/Forums/ope...nfoam-v-v.html

A question that came up for me on that thread is what should one expect for the convergence of residual for steady viscous runs for incompressible external aerodynamics. It seems that one should not necessarily expect the pressure equation to converge lower than 1e-6.

So my question here is, how far did the residual converge for flat plate example given at the beginning of this thread? It's been a while since this thread was active, but thought I would give it a try.


All times are GMT -4. The time now is 05:29.