CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] defining layers in snappyhexmesh (https://www.cfd-online.com/Forums/openfoam-meshing/84337-defining-layers-snappyhexmesh.html)

Leilders February 9, 2011 07:55

in reality there would be an outlet. that is what i want to simulate.

Leilders February 15, 2011 10:44

Here we are again... Adapted my snappyhexmesh untill it passed the checkmesh. I used a higher refinement and set the maxskewness to 0.5. Giving quite good results.

Code:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:          677206
    faces:            1798140
    internal faces:  1710919
    cells:            561545
    boundary patches: 8
    point zones:      0
    face zones:      0
    cell zones:      0

Overall number of cells of each type:
    hexahedra:    460753
    prisms:        30962
    wedges:        0
    pyramids:      0
    tet wedges:    124
    tetrahedra:    0
    polyhedra:    69706

Checking topology...
    Boundary definition OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
    Patch              Faces    Points  Surface topology                 
    maxY                210      249      ok (non-closed singly connected) 
    minX                210      249      ok (non-closed singly connected) 
    maxX                210      249      ok (non-closed singly connected) 
    minY                210      249      ok (non-closed singly connected) 
    minZ                799      974      ok (non-closed singly connected) 
    maxZ                797      972      ok (non-closed singly connected) 
    stlSurface_Sail    81905    85179    ok (non-closed singly connected) 
    stlSurface_Suck    2880    3844    ok (non-closed singly connected) 

Checking geometry...
    Overall domain bounding box (-10.75 -10.3595 -5.52462e-06) (10 10 30)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (2.53646e-16 1.24211e-16 -1.78792e-16) OK.
    Max cell openness = 9.50189e-16 OK.
    Max aspect ratio = 13.2989 OK.
    Minumum face area = 6.84828e-05. Maximum face area = 16.8984.  Face area magnitudes OK.
    Min volume = 2.70464e-06. Max volume = 33.7968.  Total volume = 12544.9.  Cell volumes OK.
    Mesh non-orthogonality Max: 62.8324 average: 8.96609
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 1.2706 OK.

Mesh OK.

End

As you can see the checkmesh is OK. but very confident in this new achievement I started a new simulation. This time I did not apply sucktion @ the sucktion area. so it is just the flow around my mesh but again it failed.



Code:

Time = 70

smoothSolver:  Solving for Ux, Initial residual = 0.00795705, Final residual = 7.13943e-05, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.0110534, Final residual = 0.000101015, No Iterations 4
smoothSolver:  Solving for Uz, Initial residual = 0.101537, Final residual = 0.000387196, No Iterations 5
GAMG:  Solving for p, Initial residual = 0.0691879, Final residual = 0.000240485, No Iterations 4
time step continuity errors : sum local = 0.000322106, global = -2.5441e-06, cumulative = -0.000247151
smoothSolver:  Solving for epsilon, Initial residual = 0.384302, Final residual = 0.000275313, No Iterations 2
bounding epsilon, min: -577.335 max: 4.34232e+07 average: 272.56
smoothSolver:  Solving for k, Initial residual = 0.0316469, Final residual = 0.000295912, No Iterations 3
bounding k, min: -1.23476 max: 3342.86 average: 0.483003
ExecutionTime = 260.45 s  ClockTime = 261 s

forceCoeffs output:
    Cd = 1.04372
    Cl = 1.91814
    Cm = -0.564935

forceCoeffs output:
    Cd = 0.966914
    Cl = 1.87556
    Cm = -0.564033

forceCoeffs output:
    Cd = 0.0768036
    Cl = 0.0425825
    Cm = -0.000902006

Time = 71

smoothSolver:  Solving for Ux, Initial residual = 0.308738, Final residual = 0.0023828, No Iterations 5
smoothSolver:  Solving for Uy, Initial residual = 0.167585, Final residual = 0.000735947, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.23801, Final residual = 0.00192168, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.0718548, Final residual = 0.000221095, No Iterations 4
time step continuity errors : sum local = 0.000302917, global = 1.43559e-05, cumulative = -0.000232795
smoothSolver:  Solving for epsilon, Initial residual = 0.108878, Final residual = 0.00106995, No Iterations 4
bounding epsilon, min: -27638.7 max: 2.86248e+07 average: 249.215
smoothSolver:  Solving for k, Initial residual = 0.271598, Final residual = 0.00251725, No Iterations 5
bounding k, min: -67.7914 max: 4138.36 average: 0.486237
ExecutionTime = 264.09 s  ClockTime = 265 s

forceCoeffs output:
    Cd = 1.24648
    Cl = 1.95098
    Cm = -0.468876

forceCoeffs output:
    Cd = 1.16514
    Cl = 1.90592
    Cm = -0.467914

forceCoeffs output:
    Cd = 0.0813401
    Cl = 0.0450539
    Cm = -0.00096219

Time = 72

smoothSolver:  Solving for Ux, Initial residual = 0.999998, Final residual = 0.00776452, No Iterations 5
smoothSolver:  Solving for Uy, Initial residual = 0.999999, Final residual = 0.00811549, No Iterations 4
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.00648876, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.674664, Final residual = 0.00246658, No Iterations 4
time step continuity errors : sum local = 74714.8, global = 2712.55, cumulative = 2712.55
smoothSolver:  Solving for epsilon, Initial residual = 1, Final residual = 0.00265908, No Iterations 5
bounding epsilon, min: -1.75341e+13 max: 3.03906e+14 average: 8.17846e+09
smoothSolver:  Solving for k, Initial residual = 1, Final residual = 0.00157535, No Iterations 2
bounding k, min: -2.28545e+11 max: 9.35617e+12 average: 1.09552e+08
ExecutionTime = 267.75 s  ClockTime = 269 s

forceCoeffs output:
    Cd = -1.93271e+07
    Cl = -3.8579e+07
    Cm = -6.25219e+06

forceCoeffs output:
    Cd = -1.93341e+07
    Cl = -3.85828e+07
    Cm = -6.25209e+06

forceCoeffs output:
    Cd = 6971.54
    Cl = 3785.83
    Cm = -98.9127

Time = 73

smoothSolver:  Solving for Ux, Initial residual = 0.765646, Final residual = 0.00289439, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.797186, Final residual = 0.00462204, No Iterations 3
smoothSolver:  Solving for Uz, Initial residual = 0.656947, Final residual = 0.00441734, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.999727, Final residual = 0.00550768, No Iterations 5
time step continuity errors : sum local = 41235.4, global = 17613.6, cumulative = 20326.2
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so"
#1  Foam::sigFpe::sigFpeHandler(int) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so"
#2  in "/lib/libc.so.6"
#3  Foam::LimitedScheme<double, Foam::limitedLinearLimiter<Foam::NVDTVD>, Foam::limitFuncs::magSqr>::limiter(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const in "/opt/openfoam171/lib/linux64GccDPOpt/libfiniteVolume.so"
#4  Foam::limitedSurfaceInterpolationScheme<double>::weights(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const in "/opt/openfoam171/lib/linux64GccDPOpt/libfiniteVolume.so"
#5  Foam::fv::gaussConvectionScheme<double>::fvmDiv(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&) const in "/opt/openfoam171/lib/linux64GccDPOpt/libfiniteVolume.so"
#6  Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::div<double>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::word const&) in "/opt/openfoam171/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#7  Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::div<double>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&) in "/opt/openfoam171/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#8  Foam::incompressible::RASModels::RNGkEpsilon::correct() in "/opt/openfoam171/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#9 
 in "/opt/openfoam171/applications/bin/linux64GccDPOpt/simpleFoam"
#10  __libc_start_main in "/lib/libc.so.6"
#11 
 in "/opt/openfoam171/applications/bin/linux64GccDPOpt/simpleFoam"
created temporary '35degr2.OpenFOAM'

looking at the log I get the feeling it has something to do with my fv settings?

Code:

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

solvers
{
    p
    {
        solver          GAMG;
        tolerance        1e-8;
        relTol          0.01;
        //smoother        GaussSeidel;
        smoother        DIC;
        nPreSweeps      0;
        nPostSweeps      1;
        cacheAgglomeration on;
        agglomerator    faceAreaPair;
        nCellsInCoarsestLevel 10;
        mergeLevels      1;
    };
    U
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-7;
        relTol          0.01;
        nSweeps          1;
    };
    k
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-6;
        relTol          0.01;
        nSweeps          1;
    };
    epsilon
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance        1e-6;
        relTol          0.01;
        nSweeps          1;
    };
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;    //0;    // 0, 1 or 2
    pRefCell 0;
    pRefValue 0;
}

relaxationFactors
{
    p              0.3;        //0.3;
    U              0.7;        //0.7;
    k              0.7;        //0.7;
    epsilon        0.7;  //0.7;
}

Code:

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

ddtSchemes
{
    default steadyState;
}

gradSchemes
{
    default        Gauss linear;  //was 0.5
}

divSchemes
{
    default                          none;
    div(phi,U)                      Gauss GammaV 0.5; //was 0.5 1.0
    div(phi,k)                      Gauss limitedLinear 1;
    div(phi,epsilon)                Gauss limitedLinear 1;
    div((nuEff*dev(grad(U).T())))    Gauss linear;
    //div((nuEff*dev(grad(U).T())))    Gauss linear faceMDLimited Gauss linear 0.85;
    //div(phi,U)                      Gauss linearUpwindV faceMDLimited linear 0.68; //was 0.5 1.0
    //div(phi,k)                      Gauss linearUpwind faceMDLimited Gauss linear 0.2;
    //div(phi,epsilon)                Gauss linearUpwind faceMDLimited Gauss linear 0.91;
    //div((nuEff*dev(grad(U).T())))    Gauss linearUpwind faceMDLimited Gauss linear 0.85;
}

laplacianSchemes
{
    default        Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        corrected;
}

fluxRequired
{
    default        no;
    p;
}


Do you have any suggestions ?
Again many thanks for helping me so far! really appreciate it!
Leon

Leilders March 10, 2011 06:15

nNonOrthogonalCorrectors 0;
had to be
nNonOrthogonalCorrectors 2;

Did the trick! Thanks for your help!


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