CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   forces on a hydrofoil (https://www.cfd-online.com/Forums/openfoam-solving/74202-forces-hydrofoil.html)

vaina74 March 26, 2010 07:57

forces on a hydrofoil
 
I included a subroutine in the controlDict file to evaluate the lift and drag coefficients on a blade section of a marine propeller:

Code:

functions
(
forces
{
type forces;
functionObjectLibs ("libforces.so"); // Lib to load
patches (wall); // change to your patch name
rhoName rhoInf;
rhoInf 1025; // Reference density for fluid
CofR (0 0 0); // Origin for moment calculations
}
forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
patches (wall); // change to your patch name
rhoName rhoInf;
rhoInf 1025;
CofR (0 0 0);
liftDir (0 1 0);
dragDir (1 0 0);
pitchAxis (0 0 0);
magUInf 7.30;
lRef 0.305;
Aref 0,00306;
}
);

I set the hydrofoil chord as lRef and the wetted surface as Aref (or is Aref its projection on the chord?) and this is the output:

Code:

[0]
[0]
[0] keyword outputControl is undefined in dictionary "::functions::forces"
[0]
[0] file: ::functions::forces from line 56 to line 60.
[0]
[0]    From function dictionary::lookupEntry(const word&, bool, bool) const
[0]    in file db/dictionary/dictionary.C at line 388.
[0]
FOAM parallel run exiting
[0]
[1]
[1]
[1] keyword outputControl is undefined in dictionary "::functions::forces"
[1]
[1] file: ::functions::forces from line 56 to line 60.
[1]
[1]    From function dictionary::lookupEntry(const word&, bool, bool) const
[1]    in file db/dictionary/dictionary.C at line 388.
[1]
FOAM parallel run exiting
[1]

What's the problem, please?

maddalena March 28, 2010 16:09

Hi,
you missed one keyword! See here: http://www.cfd-online.com/Forums/ope...ing-1-6-a.html
Cheers,

maddalena

vaina74 March 29, 2010 12:49

Thanks, Maddalena. First I merged all the threads about lift and drag, then I found the nacaAirfoil tutorial (in compressible/sonicFoam/ras). I included in my controlDict:
Code:

functions
{
    forces
    {
        type        forces;
        functionObjectLibs ( "libforces.so" );  // lib to load
        outputControl timeStep;
        outputInterval 1;
        patches
        (
            wall  // change to your patch name
        );
        // name of fields
        pName      p;
        UName      U;
        log        true; // dump to file
        rhoInf      1025;
        CofR        ( 0 0 0 );
    }
    forcesCoeffs
    {
        type        forceCoeffs;
        functionObjectLibs ( "libforces.so" );  // lib to load
        outputControl timeStep;
        outputInterval 1;
        patches
        (
            wall  // change to your patch name
        );
        // name of fields
        pName      p;
        UName      U;
        log        true; // dump to file
        rhoInf      1025;
        CofR        ( 0 0 0 );
        liftDir    ( 0 1 0 );
        dragDir    ( 1 0 0 );
        pitchAxis  ( 0 0 0 );
        magUInf    7.30;
        lRef        0.305;
        Aref        0.001525;
    }
}

I'm still in doubt: is Aref the projection of the area on the chord or the whole wetted surface?

maddalena March 29, 2010 16:10

Ehi Vaina,
Quote:

Is Aref the projection of the area on the chord or the whole wetted surface?
Well, I do not know if something changes with hydrofoils. In any case, the definition of aerodynamic force coefficient for an airfoil (2d) is c_F = F/(0.5 * rhoInf * v_inf^2 *c), thus I would set Aref = 1. What do you think?
Cheers,
maddalena

vaina74 March 30, 2010 06:19

I know the lift (or drag) equation is:

C_L= \frac{L}{\frac{1}{2}{\rho}v^2A_{ref}}

where A_{ref} is planform area. In the section lift coefficient (based on the concept of an infinite wing of non-varying cross-section), the lift is defined per unit span of the wing:

c_l= \frac{L}{\frac{1}{2}{\rho}v^2c}

In OpenFOAM all geometries are generated in 3 dimensions and my hydrofoil span is 0.05 mm. So I think A_{ref} is equal to c\cdot span.

maddalena March 30, 2010 07:30

Perfect! ;)


All times are GMT -4. The time now is 02:34.