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

Running an airfoil case

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 2, 2012, 10:01
Default Running an airfoil case
  #1
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 14
batta31 is on a distinguished road
Hi to everyone,
I want to run a simulation over a 2D airfoil with the following hypothesis:
It's a 2D, steady-state, laminar, incompressible simulation so I've modified the simpleFoam solver, switching the turbulence to "off". I've also build a "C mesh" over the airfoil.

What I'm now troubling with are the boundary conditions: I thought that the most appropriate BCs would be:
- freestream BC for velocity (everywhere except on the foil, where I've put the no slip condition);
-freestreamPressure for the pressure;
openFoam doesn't like these condition, I think because there isn't a "reference value" for the pressure, but also USING a reference value for the pressure, the simulation "explode" and doesn't converge to any reasonable result.

This is my problem. Has anyone any suggestion?
Thanks in advance
Simone
batta31 is offline   Reply With Quote

Old   October 2, 2012, 10:43
Default
  #2
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19
colinB is on a distinguished road
Why don't you use fixed value and zero Gradient?
With these two you should be able to define your system
sufficiently for both velocity and pressure.

freestream doesn't make any sense since you know your velocity
in most parts of your domain

regards
colinB is offline   Reply With Quote

Old   October 2, 2012, 11:52
Default
  #3
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 14
batta31 is on a distinguished road
So you're suggesting:

-U fixedValue (equal to zero) over the airfoil for the no-slip condition;
-U fixedValue (different from zero and equal to my desired velocity) over the other patches;
-p zeroGradient on every patch except inside the domain where i can fix an arbitrary value?

Thanks again Colin
batta31 is offline   Reply With Quote

Old   October 3, 2012, 10:41
Default
  #4
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19
colinB is on a distinguished road
not exactly:

all values you know you should specify with fixed value.
That includes the velocity at the inlet and in the internal field

all values you don't know you assign with zero Gradient
that includes all pressure values (outlet foil inlet)
and velocity at the outlet.

The velocity on the foil depends on whether you want to take
into account friction or not
If so set it to zero if not use slip
colinB is offline   Reply With Quote

Old   October 3, 2012, 11:23
Default
  #5
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 14
batta31 is on a distinguished road
This is the error I get if I use zeroGradient for every pressure patch:

FOAM FATAL IO ERROR:
Unable to set reference cell for field p
Please supply either pRefCell or pRefPoint

Because of that I had thought to set a reference value in one patch. Is there another solution to fix this problem?
batta31 is offline   Reply With Quote

Old   October 5, 2012, 04:24
Default
  #6
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19
colinB is on a distinguished road
maybe this helps:

what is the internal field of your p file?
I set it to uniform 0
colinB is offline   Reply With Quote

Old   October 5, 2012, 07:12
Default
  #7
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 14
batta31 is on a distinguished road
Me too!
Here's the full list of my patches and relative BC for P:

internalField uniform 0;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0;
}

outlet
{
type zeroGradient;
}

top
{
type zeroGradient;
}

bottom
{
type zeroGradient;
}

foil
{
type zeroGradient;
}

front
{
type empty;
}

back
{
type empty;
}

}


if instead of inlet BC set as fixedValue I would set it as zeroGradient I'll obtain that error.
batta31 is offline   Reply With Quote

Old   October 5, 2012, 08:04
Default
  #8
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19
colinB is on a distinguished road
I found an old p file from my graduation thesis:
(at that time I used OF 1.7.1):

Code:
dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    wInlet
    {
        type            zeroGradient;
    }

    outlet
    {
        type            zeroGradient;   
    }

    foil
    {
        type            zeroGradient;
    }

    frontAndBack
    {
        type            empty;
    }
and this is how my fvSolution file looked like:

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

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

SIMPLE
{
    nNonOrthogonalCorrectors 4;
    pRefCell        0;
    pRefValue       0;
}

relaxationFactors
{
    default         0;
    p               0.3;
    U               0.7;
    nuTilda         0.7;
}
note that there is a reference cell defined, of which I wasn't aware
anymore.
This would make your fixedValue definition at the inlet for the pressure
obsolete, which I think is better, for you don't know,
what pressure values there actually are

Further I have to mention, that I didn't use a top and bottom patch
for my flow was inclined!

Finally I would suggest you to collect all patches with the same
properties in one patch (e.g. frontAndBack instead of separate patches
front, back -> simply collect the node numbers in the blockMeshDict in
one patch definition), this improves readability.
colinB is offline   Reply With Quote

Old   October 7, 2012, 12:27
Default
  #9
New Member
 
saeid oqaz
Join Date: Feb 2012
Posts: 19
Rep Power: 14
saeid.oqaz is on a distinguished road
hi Simone & colin
i working on same project but in 3D. i have 2 question.

what is the internal field of your U file? is the freestream velocity?

and colin you what solver use for this case? and in fvsolution dic GAMG relevant for P. i use CG.

can u attach fvSchemes file & B.C file for U?

Last edited by saeid.oqaz; October 7, 2012 at 12:57.
saeid.oqaz is offline   Reply With Quote

Old   October 8, 2012, 03:38
Default
  #10
Member
 
Simone
Join Date: Sep 2012
Posts: 95
Rep Power: 14
batta31 is on a distinguished road
@Colin:
I try to run your mesh with "zeroGradient" everywhere on "my" solver with this parameters for p:

solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.01;
}


It runs and doesn't create problems! So I can't still understand where the problem is.

@Saeid: For U i used fixedValue everywhere except on the outlet patch where i put zero gradient. For the solver I can tell you that, since my simulation is steady, I used simpleFoam solver.
batta31 is offline   Reply With Quote

Old   October 16, 2012, 04:37
Default
  #11
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19
colinB is on a distinguished road
Hi there,

Quote:
(...)
what is the internal field of your U file? is the freestream velocity?

(...)
usually the internal field is a vector specified with the key word internal field
see therefore the user manual as reference.

Quote:
(...)

and colin you what solver use for this case? and in fvsolution dic GAMG relevant for P. i use CG.

(...)
as Simone I used the simpleFoam solver, but my knowledge concerning the
solvers is limited and I used the GAMG according to a recommendation.

My settings for U you can read from my previous posts

and the fvSchemes looks as follows:

Code:
ddtSchemes
{
    default         steadyState;
}

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

divSchemes
{
    default         none;
    div(phi,U)      Gauss linearUpwind Gauss linear;
    div(phi,nuTilda) Gauss linearUpwind Gauss linear;
    div((nuEff*dev(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
    default         none;
    laplacian(nuEff,U) Gauss linear corrected;
    laplacian((1|A(U)),p) Gauss linear corrected;
    laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
    laplacian(1,p)  Gauss linear corrected;
}

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

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p               ;
}
NOTE: this is what I used for OF 1.7.1 eventually notation and settings
have changed
colinB 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
MRFSimpleFoam wind turbine case continuity error ysh1227 OpenFOAM Running, Solving & CFD 1 August 16, 2016 10:25
MRFSimpleFoam wind turbine case diverges ysh1227 OpenFOAM Running, Solving & CFD 2 May 7, 2015 11:13
Inviscid 2D Airfoil Case doug OpenFOAM Running, Solving & CFD 8 October 13, 2010 08:06
Airfoil boundary condition Frank Main CFD Forum 1 April 21, 2008 19:36
oscillating airfoil test case Akbar Main CFD Forum 1 July 22, 2005 12:49


All times are GMT -4. The time now is 00:20.