CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: blockMesh (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/)
-   -   Problem with 0012 simple case (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/103331-problem-0012-simple-case.html)

Tetragramm June 17, 2012 18:16

Problem with 0012 simple case
 
1 Attachment(s)
I'm teaching myself to use OpenFOAM, but I'm having a little trouble with getting started. Specifically, in this case, I'm trying to use a NACA 0012 airfoil at 0 degrees alpha, with icoFOAM. I've gotten it to mesh and run, but the results I'm getting suggest that the problem is with my mesh. I'm going to include the important parts of all the files in case that's not the problem.

Basically, what I think has happened is that I've made the inside of the airfoil a separate block, but for the outside it's as if it didn't exist. I don't know, really. I've attached the image I see in paraFoam at t=0.2s. The images are the x, y, and z components of velocity. The y and z components are both very very small, like 1.0e-11 or less.

If anyone could point me to what I'm doing wrong, I'd be thankful.

First, my blockMeshDict:
Code:

convertToMeters 1;

vertices
(
    (-3 -3 -1)
    (3 -3 -1)
    (3 3 -1)
    (-3 3 -1)
    (-3 -3 1)
    (3 -3 1)
    (3 3 1)
    (-3 3 1)
    (0.00273905        0.00911102 -1)
    (0.00273905        0.00911102 1)
    (0.00273905        -0.00911102 -1)
    (0.00273905        -0.00911102 1)
    (1.00000000        0.00000000 -1)
    (1.00000000        0.00000000 1)
);
blocks
(
    hex (0 1 2 3 4 5 6 7) (500 500 1) simpleGrading (1 1 1)
    hex (8 10 12 12 9 11 13 13) (10 10 1) simpleGrading (1 1 1)
);

edges
(
    arc 8 10 (0 0 -1)
    arc 9 11 (0 0 1)
    spline 12 8
        ((0.99726095        0.00038712 -1)
        (0.98907380        0.00153653 -1)
        (0.97552826        0.00341331 -1)
        (0.95677273        0.00596209 -1)
        (0.93301270        0.00911073 -1)
        (0.90450850        0.01277464 -1)
        (0.87157241        0.01686084 -1)
        (0.83456530        0.02127128 -1)
        (0.79389263        0.02590486 -1)
        (0.75000000        0.03065806 -1)
        (0.70336832        0.03542434 -1)
        (0.65450850        0.04009273 -1)
        (0.60395585        0.04454642 -1)
        (0.55226423        0.04866201 -1)
        (0.50000000        0.05231025 -1)
        (0.44773577        0.05535862 -1)
        (0.39604415        0.05767604 -1)
        (0.34549150        0.05913940 -1)
        (0.29663168        0.05964120 -1)
        (0.25000000        0.05909742 -1)
        (0.20610737        0.05745444 -1)
        (0.16543470        0.05469379 -1)
        (0.12842759        0.05083398 -1)
        (0.09549150        0.04592861 -1)
        (0.06698730        0.04006079 -1)
        (0.04322727        0.03333431 -1)
        (0.02447174        0.02586248 -1)
        (0.01092620        0.01775595 -1))
    spline 13 9
        ((0.99726095        0.00038712 1)
        (0.98907380        0.00153653 1)
        (0.97552826        0.00341331 1)
        (0.95677273        0.00596209 1)
        (0.93301270        0.00911073 1)
        (0.90450850        0.01277464 1)
        (0.87157241        0.01686084 1)
        (0.83456530        0.02127128 1)
        (0.79389263        0.02590486 1)
        (0.75000000        0.03065806 1)
        (0.70336832        0.03542434 1)
        (0.65450850        0.04009273 1)
        (0.60395585        0.04454642 1)
        (0.55226423        0.04866201 1)
        (0.50000000        0.05231025 1)
        (0.44773577        0.05535862 1)
        (0.39604415        0.05767604 1)
        (0.34549150        0.05913940 1)
        (0.29663168        0.05964120 1)
        (0.25000000        0.05909742 1)
        (0.20610737        0.05745444 1)
        (0.16543470        0.05469379 1)
        (0.12842759        0.05083398 1)
        (0.09549150        0.04592861 1)
        (0.06698730        0.04006079 1)
        (0.04322727        0.03333431 1)
        (0.02447174        0.02586248 1)
        (0.01092620        0.01775595 1))
    spline 12 10
        ((0.99726095        -0.00038712 -1)
        (0.98907380        -0.00153653 -1)
        (0.97552826        -0.00341331 -1)
        (0.95677273        -0.00596209 -1)
        (0.93301270        -0.00911073 -1)
        (0.90450850        -0.01277464 -1)
        (0.87157241        -0.01686084 -1)
        (0.83456530        -0.02127128 -1)
        (0.79389263        -0.02590486 -1)
        (0.75000000        -0.03065806 -1)
        (0.70336832        -0.03542434 -1)
        (0.65450850        -0.04009273 -1)
        (0.60395585        -0.04454642 -1)
        (0.55226423        -0.04866201 -1)
        (0.50000000        -0.05231025 -1)
        (0.44773577        -0.05535862 -1)
        (0.39604415        -0.05767604 -1)
        (0.34549150        -0.05913940 -1)
        (0.29663168        -0.05964120 -1)
        (0.25000000        -0.05909742 -1)
        (0.20610737        -0.05745444 -1)
        (0.16543470        -0.05469379 -1)
        (0.12842759        -0.05083398 -1)
        (0.09549150        -0.04592861 -1)
        (0.06698730        -0.04006079 -1)
        (0.04322727        -0.03333431 -1)
        (0.02447174        -0.02586248 -1)
        (0.01092620        -0.01775595 -1))
    spline 13 11
        ((0.99726095        -0.00038712 1)
        (0.98907380        -0.00153653 1)
        (0.97552826        -0.00341331 1)
        (0.95677273        -0.00596209 1)
        (0.93301270        -0.00911073 1)
        (0.90450850        -0.01277464 1)
        (0.87157241        -0.01686084 1)
        (0.83456530        -0.02127128 1)
        (0.79389263        -0.02590486 1)
        (0.75000000        -0.03065806 1)
        (0.70336832        -0.03542434 1)
        (0.65450850        -0.04009273 1)
        (0.60395585        -0.04454642 1)
        (0.55226423        -0.04866201 1)
        (0.50000000        -0.05231025 1)
        (0.44773577        -0.05535862 1)
        (0.39604415        -0.05767604 1)
        (0.34549150        -0.05913940 1)
        (0.29663168        -0.05964120 1)
        (0.25000000        -0.05909742 1)
        (0.20610737        -0.05745444 1)
        (0.16543470        -0.05469379 1)
        (0.12842759        -0.05083398 1)
        (0.09549150        -0.04592861 1)
        (0.06698730        -0.04006079 1)
        (0.04322727        -0.03333431 1)
        (0.02447174        -0.02586248 1)
        (0.01092620        -0.01775595 1))
);

boundary
(
    movingWall
    {
        type wall;
        faces
        (
            (0 4 7 3)
            (1 5 6 2)
        );
    }
    fixedWalls
    {
        type wall;
        faces
        (
            (8 9 11 10)
            (8 12 13 9)
            (10 12 13 11)
        );
    }
    allAround
    {
        type empty;
        faces
        (


            (3 7 6 2)
            (1 5 4 0)

            (0 3 2 1)
            (4 5 6 7)
        );
    }
);

mergePatchPairs
(
);

Now the controlDict:
Code:

application    icoFoam;

startFrom      startTime;

startTime      0;

stopAt          endTime;

endTime        0.2;

deltaT          0.001;

writeControl    runTime;

writeInterval  0.01;

purgeWrite      0;

writeFormat    ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision  6;

runTimeModifiable true;

and transportProperties:
Code:

nu              nu [ 0 2 -1 0 0 0 0 ] 0.01;
and my U at t=0:
Code:

dimensions      [0 1 -1 0 0 0 0];

internalField  uniform (1 0 0);

boundaryField
{
    movingWall
    {
        type            fixedValue;
        value          uniform (1 0 0);
    }

    fixedWalls
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }

    frontAndBack
    {
        type            empty;
    }
}


colinB June 19, 2012 06:58

Hey there,

did I get your idea right, that you are meshing inside the airfoil?

Quote:


Basically, what I think has happened is that I've made the inside of the airfoil
a separate block, but for the outside it's as if it didn't exist.

Usually one is interested in the flow around a foil and not inside.
And this consequently mean you have to model everything except the inside.

For that I used 6 blocks (also for an NACA 0012)

one the goes from the symmetry line of the profile to the max extension
upwards. This block is wrapping around the profile.

The second one goes from the max extension to the end of the profile

And the last one going along the symmetry line behind the profile.

now you can use a symmetry plane for the other 3 blocks if you have 0
angle of attack to save time
or as in my case model the other half like wise on the other side of the
profile.

Hint: Use offsets you can get from the internet and manipulate them with
e.g. excell or open office and copy and paste them into the blockMesh file

further details you find here:

http://www.cfd-online.com/Forums/ope...-naca0012.html

note that I suggested to use 8 blocks here which has to do with the fact
that I used a submerged hydrofoil. but you should get an idea how it
works.

regards
Colin

Tetragramm June 19, 2012 22:52

So, if I understand what you mean me to do, there's no way to make a solid object? You just have to fit the edges of the air to the shape you want? Is there nothing like solidHex or something?

That's unfortunate. In the case I plan on getting to eventually, it would be so much easier to just map the solid object.

colinB June 20, 2012 04:44

Sure there is a way to make solids, but you don't have to mesh them.
That's what I tried to explain.

If you want to see the flow around a foil you have to mesh the surroundings
not the solid its self.
All the patches connected then to the solid are then assigned as wall
patches and this is then how you model a solid.

For further understanding I recommend you the motorBike tutorial, which is
basically the same, but the profile has been replaced by a motor bike.


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