OpenFOAM calculation mesh artefacts.

Discussion in 'Hydrodynamics and Aerodynamics' started by Alexanov, Apr 24, 2026.

  1. Alexanov
    Joined: Feb 2003
    Posts: 244
    Likes: 30, Points: 38, Legacy Rep: 10
    Location: Norway Sola

    Alexanov Senior Member

    upload_2026-4-24_18-34-50.png
    Is anyoune, who works with OpenFOAM knows how to remove such artefacts form smooth surface. They appear adter prepating calculation mesh.
     
  2. mc_rash
    Joined: Aug 2020
    Posts: 243
    Likes: 70, Points: 28
    Location: Netherlands

    mc_rash Senior Member

    Hi Alexanov, could you post your mesh settings? I assume you created the mesh using snappy?
     
  3. Alexanov
    Joined: Feb 2003
    Posts: 244
    Likes: 30, Points: 38, Legacy Rep: 10
    Location: Norway Sola

    Alexanov Senior Member

    FoamFile
    {
    version 2.0;
    format ascii;
    class dictionary;
    object snappyHexMeshDict;
    }

    castellatedMesh true;
    snap false;
    addLayers false;
    mergeTolerance 1e-6;

    geometry
    {
    hull
    {
    type triSurfaceMesh;
    file "hull.stl";
    }
    }

    castellatedMeshControls
    {
    maxLocalCells 1000000;
    maxGlobalCells 2000000;
    minRefinementCells 10;
    nCellsBetweenLevels 2;
    resolveFeatureAngle 30;

    refinementSurfaces
    {
    hull
    {
    level (4 5);
    patchInfo
    {
    type wall;
    }
    }
    }

    locationInMesh (4 0.5 -0.5);
    allowFreeStandingZoneFaces false;
    }

    snapControls
    {
    nSmoothPatch 3;
    tolerance 1.0;
    nSolveIter 30;
    nRelaxIter 5;
    }

    meshQualityControls
    {
    maxNonOrtho 65;
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave 80;
    minTetQuality 1e-30;
    minVol 1e-13;
    minVolRatio 0.01;
    minArea -1;
    minTwist 0.02;
    minDeterminant 0.001;
    minFaceWeight 0.05;
    nSmoothScale 4;
    errorReduction 0.75;
    }
     
  4. Night Sky Yachts
    Joined: Oct 2025
    Posts: 5
    Likes: 3, Points: 3
    Location: Gdansk, Poland

    Night Sky Yachts Junior Member

    Hi Alexander!

    I see that you have value "false" for "snap" so your snappyHexMesh is executing only castellatedMesh. Your hull is made only by splitting and removing blocks from the domain. If you want a smooth shape of the hull you should set "snap" to "true".
     
  5. mc_rash
    Joined: Aug 2020
    Posts: 243
    Likes: 70, Points: 28
    Location: Netherlands

    mc_rash Senior Member

    Didn't have the time to take a look but I assume Alexanov set snap and addLayers to false for debugging/ step-by -step meshing. Otherwise we wouldn't see the hull at all @Night Sky Yachts
     
  6. Night Sky Yachts
    Joined: Oct 2025
    Posts: 5
    Likes: 3, Points: 3
    Location: Gdansk, Poland

    Night Sky Yachts Junior Member

    Ok, that makes sense. I didn't look at the picture in detail.
    Probably, the problem is in the base size of cells in the domain or in snapControls.
    I usually use a lot more iterations in "snap" step.
    My typical settings for the hull below:

    snapControls
    {
    nSmoothPatch 4;
    tolerance 2;
    nSolveIter 150;
    nRelaxIter 15;
    nFeatureSnapIter 50;
    implicitFeatureSnap false;
    explicitFeatureSnap true;
    multiRegionFeatureSnap false;
    }
     

  • Loading...
    Similar Threads
    1. Surfer Naval Architect
      Replies:
      0
      Views:
      2,894
    2. Surfer Naval Architect
      Replies:
      2
      Views:
      3,858
    3. Surfer Naval Architect
      Replies:
      0
      Views:
      6,863
    4. nrbt
      Replies:
      3
      Views:
      3,448
    5. JoshTruman
      Replies:
      0
      Views:
      1,919
    6. captncoop
      Replies:
      5
      Views:
      3,076
    7. ClaudioD
      Replies:
      20
      Views:
      6,281
    8. S V
      Replies:
      0
      Views:
      3,320
    9. Alexanov
      Replies:
      12
      Views:
      4,159
    10. Rabah
      Replies:
      12
      Views:
      10,511
    Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
    When making potentially dangerous or financial decisions, always employ and consult appropriate professionals. Your circumstances or experience may be different.