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/)
-   -   lift and drag on ship superstructures (https://www.cfd-online.com/Forums/openfoam-solving/76911-lift-drag-ship-superstructures.html)

vaina74 June 8, 2010 09:21

lift and drag on ship superstructures
 
1 Attachment(s)
I'm going to study the aerodynamic aspect of ship superstructures. I started with a simple 2D model (see pic 1-2), a top view of a superstructure (abot 30x80 m). I used the simpleFoam solver (with wall functions) and I'd like to have some suggestions. I already studied airfoils and propeller blades in water (convergence before 1000 iterations and correct y+), but now I think I have a few problems about convergence and y+. Here are my boundary conditions:
p
Code:

#include        "initialConditions"

dimensions      [0 2 -2 0 0 0 0];

internalField  uniform $pressure;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }

    #include "frontBackPatches"

    outlet
    {
        type            fixedValue;
        value          $internalField;
    }

    main_body
    {
        type            kqRWallFunction;
        value          $internalField;
    }
}

U
Code:

#include        "initialConditions"

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

internalField  uniform $flowVelocity;

boundaryField
{
    #include "fixedInlet"

    #include "frontBackPatches"

    outlet
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
        value          $internalField;
    }

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

k
Code:

#include        "initialConditions"

dimensions      [0 2 -2 0 0 0 0];

internalField  uniform $turbulentK;

boundaryField
{
    #include "fixedInlet"

    #include "frontBackPatches"

    main_body
    {
        type            kqRWallFunction;
        value          $internalField;
    }

    outlet
    {
        type            inletOutlet;
        inletValue      $internalField;
        value          $internalField;
    }
}

omega
Code:

#include        "initialConditions"

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

internalField  uniform $turbulentOmega;

boundaryField
{
    #include "fixedInlet"

    #include "frontBackPatches"

    main_body
    {
        type            kqRWallFunction;
        value          $internalField;
    }

    outlet
    {
        type            inletOutlet;
        inletValue      $internalField;
        value          $internalField;
    }
}

My system settings are:
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default steadyState;
}

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

divSchemes
{
    default        none;
    div(phi,U)      Gauss linearUpwindV Gauss linear;
    div(phi,k)      Gauss upwind;
    div(phi,omega)  Gauss upwind;
    div((nuEff*dev(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
    default        Gauss linear corrected;
//    default        Gauss linear limited 0.5;
//    default        Gauss linear limited 0.333;
}

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

snGradSchemes
{
    default        corrected;
}

fluxRequired
{
    default        no;
    p;
}

and
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

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

    k
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-8;
        relTol          0.1;
        nSweeps          1;
    };

    omega
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-8;
        relTol          0.1;
        nSweeps          1;
    };
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;
    convergenceCriterion 1e-5;
}

relaxationFactors
{
    p              0.3;
    U              0.7;
    k              0.7;
    omega          0.7;
}

Maybe the mesh is bad, but I tried to refine it and I obtain worse C_L, C_L and y+. Any suggestions about domain dimensions, fvSchemes, initial conditions (\kappa=0.015 and \omega=80) and so on?

I thought about a different mesh (see pic3) but I'm in troubles with inlet and outlet boundary conditions for p and U. I'd like to set different apparent winds, so I believe I can't establish which patch is an inlet or outlet one beforehand. Are there any derived boundary conditions, similar to inletOutlet and outletInlet, to that aim?

Thanks for your help.

vaina74 June 8, 2010 09:22

1 Attachment(s)
Here is pic2

vaina74 June 8, 2010 09:23

1 Attachment(s)
Here is pic3

vaina74 June 8, 2010 12:30

I changed the outlet bc in the U file:
Code:

outlet
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
        value          uniform (0 0 0);
    }

but I think the case is still not OK. After 2000 iterations (steady case), the aerodynamic coefficients are not so 'stable':
Code:

Time = 1990

smoothSolver:  Solving for Ux, Initial residual = 0.0194878, Final residual = 0.00140397, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.00675477, Final residual = 0.000472691, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.0338792, Final residual = 0.00292316, No Iterations 2
time step continuity errors : sum local = 6.87276e-06, global = 4.32326e-07, cumulative = 0.000196135
smoothSolver:  Solving for omega, Initial residual = 0.000500113, Final residual = 4.49831e-05, No Iterations 4
smoothSolver:  Solving for k, Initial residual = 0.00747582, Final residual = 0.000625669, No Iterations 3
ExecutionTime = 737.82 s  ClockTime = 889 s

forces output:
    forces(pressure, viscous)((1373.57 6530.95 1.82693e-15) (14.9359 2.98526 -5.12444e-18))
    moment(pressure, viscous)((-3265.47 686.785 231467) (-1.49263 7.46796 93.4669))

forceCoeffs output:
    Cd = 1.10008
    Cl = 0.714475
    Cm = 0

Time = 1991

smoothSolver:  Solving for Ux, Initial residual = 0.0191039, Final residual = 0.001403, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.00664963, Final residual = 0.000467334, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.0339034, Final residual = 0.00296081, No Iterations 2
time step continuity errors : sum local = 6.91286e-06, global = 5.84111e-07, cumulative = 0.000196719
smoothSolver:  Solving for omega, Initial residual = 0.000495335, Final residual = 4.50325e-05, No Iterations 4
smoothSolver:  Solving for k, Initial residual = 0.00712408, Final residual = 0.000611907, No Iterations 3
ExecutionTime = 738.23 s  ClockTime = 889 s

forces output:
    forces(pressure, viscous)((1270.77 6686.6 1.88893e-15) (14.8198 3.08212 -4.86763e-18))
    moment(pressure, viscous)((-3343.3 635.386 237418) (-1.54106 7.40989 98.9058))

forceCoeffs output:
    Cd = 1.10742
    Cl = 0.750391
    Cm = 0

Time = 1992

smoothSolver:  Solving for Ux, Initial residual = 0.0186364, Final residual = 0.00139815, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.00654604, Final residual = 0.000462334, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.0342788, Final residual = 0.00299029, No Iterations 2
time step continuity errors : sum local = 6.93894e-06, global = 6.87427e-07, cumulative = 0.000197406
smoothSolver:  Solving for omega, Initial residual = 0.000490721, Final residual = 4.50313e-05, No Iterations 4
smoothSolver:  Solving for k, Initial residual = 0.00676195, Final residual = 0.000597454, No Iterations 3
ExecutionTime = 738.63 s  ClockTime = 889 s

forces output:
    forces(pressure, viscous)((1167.46 6845.19 1.95158e-15) (14.7014 3.17815 -4.62007e-18))
    moment(pressure, viscous)((-3422.6 583.732 243468) (-1.58908 7.35069 104.192))

forceCoeffs output:
    Cd = 1.11509
    Cl = 0.786788
    Cm = 0

Time = 1993

smoothSolver:  Solving for Ux, Initial residual = 0.0181001, Final residual = 0.00138872, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.00644689, Final residual = 0.000457899, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.0347106, Final residual = 0.00300199, No Iterations 2
time step continuity errors : sum local = 6.93254e-06, global = 7.49189e-07, cumulative = 0.000198155
smoothSolver:  Solving for omega, Initial residual = 0.000486142, Final residual = 4.50867e-05, No Iterations 4
smoothSolver:  Solving for k, Initial residual = 0.0064024, Final residual = 0.000582749, No Iterations 3
ExecutionTime = 738.98 s  ClockTime = 890 s

forces output:
    forces(pressure, viscous)((1062.53 7008.45 2.01487e-15) (14.5802 3.2732 -4.46006e-18))
    moment(pressure, viscous)((-3504.23 531.263 249696) (-1.6366 7.29011 109.348))

forceCoeffs output:
    Cd = 1.12318
    Cl = 0.824058
    Cm = 0

Time = 1994

smoothSolver:  Solving for Ux, Initial residual = 0.0175231, Final residual = 0.00137507, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.00635044, Final residual = 0.000453938, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.0347473, Final residual = 0.00297488, No Iterations 2
time step continuity errors : sum local = 6.85089e-06, global = 7.57133e-07, cumulative = 0.000198913
smoothSolver:  Solving for omega, Initial residual = 0.000481471, Final residual = 4.5085e-05, No Iterations 4
smoothSolver:  Solving for k, Initial residual = 0.00605224, Final residual = 0.000567726, No Iterations 3
ExecutionTime = 739.26 s  ClockTime = 890 s

forces output:
    forces(pressure, viscous)((955.289 7176.48 2.07895e-15) (14.4579 3.36829 -4.57355e-18))
    moment(pressure, viscous)((-3588.24 477.645 256113) (-1.68415 7.22897 114.367))

forceCoeffs output:
    Cd = 1.13162
    Cl = 0.86231
    Cm = 0

Time = 1995

smoothSolver:  Solving for Ux, Initial residual = 0.016937, Final residual = 0.00135761, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.00625675, Final residual = 0.000450832, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.0342087, Final residual = 0.0029106, No Iterations 2
time step continuity errors : sum local = 6.70063e-06, global = 7.01239e-07, cumulative = 0.000199614
smoothSolver:  Solving for omega, Initial residual = 0.000477093, Final residual = 4.51017e-05, No Iterations 4
smoothSolver:  Solving for k, Initial residual = 0.00571846, Final residual = 0.000553258, No Iterations 3
ExecutionTime = 739.57 s  ClockTime = 891 s

forces output:
    forces(pressure, viscous)((846.582 7347.19 2.14345e-15) (14.3335 3.46361 -4.82403e-18))
    moment(pressure, viscous)((-3673.59 423.291 262636) (-1.73181 7.16675 119.279))

forceCoeffs output:
    Cd = 1.14023
    Cl = 0.90114
    Cm = 0

Time = 1996

smoothSolver:  Solving for Ux, Initial residual = 0.0163787, Final residual = 0.00133729, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.00615668, Final residual = 0.000448527, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.0330994, Final residual = 0.00282895, No Iterations 2
time step continuity errors : sum local = 6.52723e-06, global = 5.932e-07, cumulative = 0.000200207
smoothSolver:  Solving for omega, Initial residual = 0.000472781, Final residual = 4.51361e-05, No Iterations 4
smoothSolver:  Solving for k, Initial residual = 0.00540995, Final residual = 0.000539806, No Iterations 3
ExecutionTime = 739.9 s  ClockTime = 891 s

forces output:
    forces(pressure, viscous)((737.789 7516.79 2.20766e-15) (14.2067 3.55839 -5.0285e-18))
    moment(pressure, viscous)((-3758.39 368.895 269100) (-1.7792 7.10333 124.06))

forceCoeffs output:
    Cd = 1.14867
    Cl = 0.939827
    Cm = 0

Time = 1997

smoothSolver:  Solving for Ux, Initial residual = 0.0158759, Final residual = 0.00131455, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.00605029, Final residual = 0.000446912, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.0316095, Final residual = 0.00272361, No Iterations 2
time step continuity errors : sum local = 6.31621e-06, global = 4.49215e-07, cumulative = 0.000200656
smoothSolver:  Solving for omega, Initial residual = 0.00046907, Final residual = 4.51689e-05, No Iterations 4
smoothSolver:  Solving for k, Initial residual = 0.00512825, Final residual = 0.000303408, No Iterations 4
ExecutionTime = 740.26 s  ClockTime = 891 s

forces output:
    forces(pressure, viscous)((628.927 7684.96 2.27177e-15) (14.0771 3.65174 -5.07449e-18))
    moment(pressure, viscous)((-3842.48 314.464 275471) (-1.82587 7.03855 128.654))

forceCoeffs output:
    Cd = 1.1569
    Cl = 0.978326
    Cm = 0

Time = 1998

smoothSolver:  Solving for Ux, Initial residual = 0.0154559, Final residual = 0.00129072, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.00593228, Final residual = 0.000445859, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.0298766, Final residual = 0.00256894, No Iterations 2
time step continuity errors : sum local = 6.00456e-06, global = 3.05541e-07, cumulative = 0.000200962
smoothSolver:  Solving for omega, Initial residual = 0.000465651, Final residual = 4.52165e-05, No Iterations 4
smoothSolver:  Solving for k, Initial residual = 0.00486797, Final residual = 0.000301362, No Iterations 4
ExecutionTime = 740.64 s  ClockTime = 892 s

forces output:
    forces(pressure, viscous)((520.223 7851.81 2.336e-15) (13.9439 3.74411 -5.15829e-18))
    moment(pressure, viscous)((-3925.91 260.111 281738) (-1.87205 6.97195 133.108))

forceCoeffs output:
    Cd = 1.16496
    Cl = 1.01662
    Cm = 0

Time = 1999

smoothSolver:  Solving for Ux, Initial residual = 0.0151284, Final residual = 0.00126767, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.00580735, Final residual = 0.000445745, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.0279414, Final residual = 0.00237774, No Iterations 2
time step continuity errors : sum local = 5.61149e-06, global = 1.95978e-07, cumulative = 0.000201158
smoothSolver:  Solving for omega, Initial residual = 0.000462446, Final residual = 4.52691e-05, No Iterations 4
smoothSolver:  Solving for k, Initial residual = 0.00465002, Final residual = 0.000301046, No Iterations 4
ExecutionTime = 740.99 s  ClockTime = 892 s

forces output:
    forces(pressure, viscous)((413.176 8014.36 2.40016e-15) (13.8087 3.83569 -5.36615e-18))
    moment(pressure, viscous)((-4007.18 206.588 287786) (-1.91784 6.90434 137.402))

forceCoeffs output:
    Cd = 1.17267
    Cl = 1.05409
    Cm = 0

Time = 2000

smoothSolver:  Solving for Ux, Initial residual = 0.0148846, Final residual = 0.00124765, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.00568015, Final residual = 0.000446866, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.0257257, Final residual = 0.0021881, No Iterations 2
time step continuity errors : sum local = 5.21265e-06, global = 8.4432e-08, cumulative = 0.000201242
smoothSolver:  Solving for omega, Initial residual = 0.00045956, Final residual = 4.53259e-05, No Iterations 4
smoothSolver:  Solving for k, Initial residual = 0.00447416, Final residual = 0.000302495, No Iterations 4
ExecutionTime = 741.69 s  ClockTime = 893 s

forces output:
    forces(pressure, viscous)((308.845 8170.8 2.46409e-15) (13.6723 3.9266 -5.67718e-18))
    moment(pressure, viscous)((-4085.4 154.422 293552) (-1.9633 6.83616 141.523))

forceCoeffs output:
    Cd = 1.17989
    Cl = 1.09033
    Cm = 0

End

Finalising parallel run

Waiting for suggestion :(


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