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

Wing external flow (tutorial)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 24, 2016, 12:19
Default Wing external flow (tutorial)
  #1
New Member
 
Paul
Join Date: Dec 2016
Posts: 2
Rep Power: 0
D-0679 is on a distinguished road
Dear all,
I'm new to OF 3.0.x, coming from realms of lifting line theories and panel method. My goal is to study wing/wake interference in both OF and 3D panel method.

I wonder, if there is any tutorial for external flow over 3D wings or airplane. A common practice in aerospace is to make a spherical domain around the object (wing) and prescribe freestream (farfield) BC on the boundary. So far I have found only tutorials, where the domain is a box corresponding to a wind tunnel.
All of these tutorial are working for me, but are quite useless in aerospace world since we need to change angle of attack and side slip angle.

So I decided to make my own tutorial: I have a rectangular wing with l=6000mm, c=1000mm and NACA 0010 airfoil. I created a spherical domain with R=15000mm around the wing with freestream and frestreamPressure BC. Running simpleFoam with laminar turbulence model, after 200 iterations it gives for alpha=5.7deg CL=0.39, CM=-0.09, which I consider as realistic. Panel method gives for the same case CL=0.42

So far so good, but when I try to run potentialFoam, it ends with sigFpe error:

Code:
Calculating potential flow
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::adjustPhi(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&) at ??:?
Floating point exception
I assume the issue is related to the freestream BCs, since the "wind tunnel" domain was working OK. Please does anyone have any experience with this? How should I update the BCs to make the potentialFoam work?

Best regards
Paul

p:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.x                                 |
|   \\  /    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
{
    FREE
    {
        type            freestreamPressure;
        value           uniform 0;
    }

    SYM
    {
         type symmetryPlane;
    }
    WING
    {
        type            zeroGradient;
    }

    
}

// ************************************************************************* //
U:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.x                                 |
|   \\  /    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 (10 0 1);

boundaryField
{
    FREE
    {
         type freestream;
         freestreamValue uniform (10 0 1);
    }
    SYM
    {
         type symmetryPlane;

    }

    WING
    {
// 		type fixedValue;
// 		value	 uniform (0. 0. 0.);   
   		type slip;
 
    }

}

// ************************************************************************* //
Attached Images
File Type: jpg fig55.jpg (54.9 KB, 51 views)
File Type: jpg fig54.jpg (55.0 KB, 46 views)
D-0679 is offline   Reply With Quote

Old   December 25, 2016, 14:43
Default potentialFoam bug?
  #2
New Member
 
Paul
Join Date: Dec 2016
Posts: 2
Rep Power: 0
D-0679 is on a distinguished road
After a day spent trying to fix the problem, I'm thinking about a bug in potential foam. When I set a "traditional wind tunnel" BCs:
Code:
inlet: U - fixed value, p - zero gradient
outlet: U - zero gradient, p - fixed value
potentialFoam runs without problem.

When i set BCs of the spherical boundary:
Code:
U:      type freestream;
         freestreamValue uniform (10 0 1);
p:      type            freestreamPressure;
        value           uniform 0;
then the potentialFoam asks to set reference cell for field Phi. When I provide:
Code:
potentialFlow
{
    nNonOrthogonalCorrectors 20;
    PhiRefCell        0;
    PhiRefValue       0;
}
then potentialFoam crashes with the error mentioned above.
Maybe I'm missing something important, but the fact that I can run the case using simpleFoam and get realistic results, points me to an idea that potentialFoam can not handle this type of mixed BC.
Please do you have any ideas to solve the case using potentialFoam?
D-0679 is offline   Reply With Quote

Old   September 10, 2017, 17:10
Default
  #3
New Member
 
Terence Annarelli
Join Date: Aug 2017
Location: France
Posts: 7
Rep Power: 8
TerenceA is on a distinguished road
Hi, I have no - for now - idea about why potentialfoam does not handle these mixed BC, but as I am working these days on an aeronautic problem, I īm very interested in your spherical domain. I had many problems these days trying to set properly a wind tunnel with AoA and slip angle which vary. Could you hint me about the method you used in order to create the spherical domain please ? with Blockmesh it seems difficult .
I plan to test it with a NACA 2418 wing for which I have "real" lift and drag coefficients.
I am of course willing to help you and investigate simplefoam and potentialfoam for my case.
Thanks in advance for your help !


Sent from my iPhone using CFD Online Forum mobile app
TerenceA is offline   Reply With Quote

Old   September 16, 2017, 15:49
Default
  #4
New Member
 
Terence Annarelli
Join Date: Aug 2017
Location: France
Posts: 7
Rep Power: 8
TerenceA is on a distinguished road
About the potentialFoam crash, it seems I had the same problem until I set up some reference values in fvSolution file.
Using this post :
--> FOAM FATAL IO ERROR: Unable to set reference cell for field p Please supply
TerenceA is offline   Reply With Quote

Reply

Tags
external flow


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
CGNS Compiling Diego Main CFD Forum 17 December 21, 2014 01:40
Particle-Laden Flow Tutorial alan81 Siemens 13 May 17, 2011 14:45
How do I select solver options for external flow over an aircraft by fluent? hadieliasi FLUENT 5 May 2, 2011 03:54
Wing lift in Solidwork Flow Simulation brianmcv Main CFD Forum 6 April 11, 2011 08:16
External Flow Pressure Meri CFX 2 May 6, 2004 10:36


All times are GMT -4. The time now is 03:54.