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

SimpleFoam Converge too fast?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 21, 2013, 16:09
Question SimpleFoam Converge too fast?
  #1
New Member
 
Gabriel Boucher
Join Date: Jul 2013
Posts: 23
Rep Power: 12
Alfalfa is on a distinguished road
Hi, I am running a simulation of a rearwing (3 elements) in free flow at 20m/s using SimpleFoam. The goal of this is to compare with the values of Star-CCM+. I successfully managed to get a converging solution with simpleFoam and the k-epsilon turbulence model, but the values for lift are way off the ones I get from Star-CCM+ (340N in OpenFOAM and 500 in Star-CCM+). Also, I get convergence (tolerence 1e-5) with only 127 iterations, which seems to be fairly low. I will put my cases files here if someone want to take a look. I am fairly new to OpenFoam and if someone would tell me if my case is set up correctly, it would help me.


0/U
Code:
internalField   uniform (20 0 0);

boundaryField
{
    inlet
    {
        type            fixedValue;
        value         uniform (20 0 0);
    }

    outlet
    {
        type            zeroGradient;
    }

    wall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    wing_patch0
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

}
0/p
Code:
boundaryField
{
    inlet
    {
        type            zeroGradient;
    }

    outlet
    {
        type            fixedValue;
    value        uniform 0;
    }

    wall
    {
        type            zeroGradient;
    }
    wing_patch0
    {
        type            zeroGradient;
    }

}
0/k
Code:
boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform 0.375;
    }
    outlet
    {
        type            zeroGradient;
    }
    wall
    {
        type            kqRWallFunction;
        value           uniform 0.375;
    }
    wing_patch0
    {
        type            kqRWallFunction;
        value           uniform 0.375;
    }

}
0/epsilon
Code:
boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform 0.14;
    }
    outlet
    {
        type            zeroGradient;
    }
    wall
    {
        type            epsilonWallFunction;
        value           uniform 0.14;
    }
    wing_patch0
    {
        type            epsilonWallFunction;
        value           uniform 0.14;
    }

}
forces
Code:
functions
{
forces2
{
type forces;
functionObjectLibs ("libforces.so");
outputControl timeStep;
outputInterval 1;
patches (wing_patch0);
pName p;
UName U;
rhoName rhoInf;
rhoInf 1; // Reference density, fluid
CofR ( 0 0 0 );
}
forces
{
type forceCoeffs;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;

patches ( wing_patch0 );
pName p;
UName U;
rhoName rhoInf;
log true;
rhoInf 1;
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0 0 1);
magUInf 5;
lRef 0.6;
Aref 0.54;
}
}
schemes
Code:
ddtSchemes
{
    default         steadyState;
}

gradSchemes
{
    default         Gauss linear;
    grad(p)         Gauss linear;
    grad(U)         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,U)      bounded Gauss upwind;
    div(phi,k)      bounded Gauss upwind;
    div(phi,epsilon) bounded Gauss upwind;
    div(phi,R)      bounded Gauss upwind;
    div(R)          Gauss linear;
    div(phi,nuTilda) bounded Gauss upwind;
    div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         none;
    laplacian(nuEff,U) Gauss linear corrected;
    laplacian((1|A(U)),p) Gauss linear corrected;
    laplacian(DkEff,k) Gauss linear corrected;
    laplacian(DepsilonEff,epsilon) Gauss linear corrected;
    laplacian(DREff,R) Gauss linear corrected;
    laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
    interpolate(U)  linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p               ;
}
solution
Code:
solvers
{
    p
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-05;
        relTol          0.001;
    }

    U
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-05;
        relTol          0.1;
    }

    k
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-05;
        relTol          0.1;
    }

    epsilon
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-05;
        relTol          0.1;
    }

    R
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-05;
        relTol          0.1;
    }

    nuTilda
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-05;
        relTol          0.1;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;

    residualControl
    {
        p               1e-2;
        U               1e-3;
        "(k|epsilon|omega)" 1e-3;
    }
}

relaxationFactors
{
    fields
    {
        p               0.3;
    }
    equations
    {
        U               0.5;
        k               0.5;
        epsilon         0.5;
        R               0.5;
        nuTilda         0.5;
    }
}
post-processing forces
Code:
# Time    forces(pressure, viscous) moment(pressure, viscous)
125    ((141.343 -340.987 0.392246),(3.10142 0.809334 -0.00135019)) ((-212.161 -87.7299 85.3783),(0.506275 -1.93118 -0.553894))
126    ((141.337 -341.417 0.393058),(3.10202 0.808603 -0.00137183)) ((-212.43 -87.7248 85.5695),(0.505819 -1.9315 -0.553189))
127    ((141.332 -341.844 0.393627),(3.10264 0.807873 -0.0013929)) ((-212.698 -87.7208 85.7586),(0.505364 -1.93184 -0.552492))
My meshing is fine (according to checkMesh). The only thing is that I am not able (yet) to include boundary layers without ruining the mesh, so maybe that is what is causing the innacuracy between Star and OpenFOAM.

Thank you
Alfalfa is offline   Reply With Quote

Old   December 23, 2013, 04:31
Default
  #2
Senior Member
 
fumiya's Avatar
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 18
fumiya is on a distinguished road
Hi,

I think the result will change if you add the boundary layer mesh as you wrote.

1. What is the value of y+?
If you use the standard k-epsilon model, the y+ should be greater than about 30.
2. Is the density value rhoInf=1 is the same as that used in Star-CCM+?

Best regards,
Fumiya
fumiya is offline   Reply With Quote

Old   December 23, 2013, 05:18
Default
  #3
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
You can only compare both methods if you use the same mesh. It does not make much sense to compare the output of both tools if you also change the mesh. Also, you say the results are way of with the ones from Star-CCM. But which, if any, of them is correct?
Bernhard is offline   Reply With Quote

Old   December 23, 2013, 13:36
Default
  #4
New Member
 
Gabriel Boucher
Join Date: Jul 2013
Posts: 23
Rep Power: 12
Alfalfa is on a distinguished road
Hi, thank you for the answer. I guess you are right, it doesn't make much sense comparing both with different meshes. Other than that, I use all the same values for density and everything.

My y-plus for openFOAM is min: 18.1881 max: 210.765 average: 92.1105 but I don't have boundary layers.

Now I plan to try both meshes in both tools and compare the results. We might have access to a wind tunnel so we can confirm our results later. For now, I just want to get more familiar with OpenFOAM.

But now I have a problem with boundary layers with sHM. When I run my case without them, it runs ok and the solution converge to realistic values. But when I have boundary layers, the solution (laminar first) oscillates like crazy and blow up. When I look at the solution on Paraview, I can see that there is clearly something wrong since the is a really small high pressure zone (surrealistically high) near the trailing edge of the second element. I have around 1000 highly skewed (max: 9) faces in the mesh when I add layers, and I haven't find a way to get rid of them yet. I looked in Paraview to see where they are because I thought that maybe it was the problem, but they are upstream and nowhere near the wing, so I don't think they are the problem.

I understand that I should use the same mesh for both software, but the thing is, if I cannot reproduce the same results independently of the other software (whichever gives the right values), is one of them better than the other? If both of them are good, I should be able to get close to the actual value of lift and drag with both software regardless of the path taken to get there.

Thank you
Alfalfa 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
interFoam vs. simpleFoam channel flow comparison DanM OpenFOAM Running, Solving & CFD 12 January 31, 2020 15:26
simpleFoam crash fast! izna OpenFOAM Running, Solving & CFD 28 February 3, 2017 13:24
Laminar simpleFoam and inviscid simpleFoam herenger OpenFOAM Running, Solving & CFD 7 July 11, 2013 06:27
Trying to run a benchmark case with simpleFoam spsb OpenFOAM 3 February 24, 2012 09:07
converge condition for simpleFoam EmadTandis OpenFOAM Running, Solving & CFD 8 December 17, 2011 11:23


All times are GMT -4. The time now is 14:08.