CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[mesh manipulation] mirrorMesh with included boundaries?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By HenningW

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 3, 2015, 08:36
Default mirrorMesh with included boundaries?
  #1
Member
 
Join Date: Feb 2015
Posts: 39
Rep Power: 9
HenningW is on a distinguished road
Hi everyone. I have a case that uses sliding meshes (two oscillation airfoils using multiSolidBodyMotionFvMeshCoeffs). Unluckly the solution shows some asymmetry that does not make sense. This I want to create half the domain, run sHM and mirror the case to be sure that I have a symmetric mesh (at least for the timestep 0, later both airfoils oscillate in phase). It works fine for the mesh but it does not include a mirrored copy of the boundaries and cellZones which I need for the oscillation.

Do you guys have any idea how to get those as well? Or is there a setting that lets sHM create a symmetric mesh along a plane so I don't have to run mirrorMesh?

Here is my sHM file:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
|       o          |                                                          |
|    o     o       | HELYX                                                  |
|   o   O   o      | Version: v2.1.1                                           |
|    o     o       | Web:     http://www.engys.com                            |
|       o          |                                                          |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version 2.0;
    format ascii;
    class dictionary;
    location system;
    object snappyHexMeshDict;
}

    castellatedMesh true;
    snap true;
    addLayers true;
    autoBlockMesh false;
    blockData ( 0.01 0);
    crackDetection false;
    crackTol 0.05;
    geometry
    {
        box_wake
        {
            type searchableBox;
            min ( 0.3 0.0 0 );
            max ( 2.0 1.4 0.5 );
        }

        box_right
        {
            type searchableBox;
            min ( -0.2 0.0 0.1 );
            max ( 1.0 1.2 0.7 );
        }

        airfoil_right.stl
        {
            type triSurfaceMesh;
            name airfoil_right;
            appendRegionName false;
        }

        zylinder_right.stl
        {
            type triSurfaceMesh;
            name slidingCellZoneRight;
            appendRegionName false;
        }

    }

    castellatedMeshControls
    {
        features
        (
        {
        file "right_bottom.eMesh";
        level 3;
      }
      {
        file "right_top.eMesh";
        level 3;
      }
      {
        file "right_TE.eMesh";
        level 3;
      }
        );
        refinementSurfaces
        {
            airfoil_right
            {
                level ( 3 3 );
            }
            slidingCellZoneRight
            {
                cellZoneInside inside;
                cellZone movingZoneRight;
                faceType boundary;
                faceZone movingZoneRight;
                level ( 3 3 );
            }

        }

        refinementRegions
        {
            box_wake
            {
                mode inside;
                levels (( 1E5 1 ));
            }

            box_right
            {
                mode inside;
                levels (( 1E5 1 ));
            }

        }

        locationInMesh ( 0.1 0.1 0.1 );
        maxLocalCells 100000000;
        maxGlobalCells 100000000;
        minRefinementCells 100;
        maxLoadUnbalance 0.10;
        nCellsBetweenLevels 3;
        resolveFeatureAngle -60.;
        featureRefineAngle 20.;
        refineSurfaceBoundary false;
        allowFreeStandingZoneFaces false;
        balanceThenRefine true;
        nGapRefinements 0;
        minZoneRegionSize 0;
        wrapper
        {
            wrap false;
            cutoff 0.02;
            sigma 3.0;
            volSources true;
            volDistance 1.0;
            meshInMM false;
            maxIter 200;
            writeFields false;
            invert false;
        }

    }

    snapControls
    {
        featureEdges
        {
        }

        nOuterIter 1;
        nPreFeatureIter 0;
        nSolveIter 10;
        nFeatureIter 60;
        globalFeatureEdges true;
        globalRegionSnap false;
        nSmoothPatch 2;
        tolerance 4.0;
        nRelaxIter 5;
        zoneFeatureSnapping true;
        directFeatureSnapping true;
        regionFeatureLines false;
        geometryFeatureLines true;
        snapSurfBoundary true;
        collapseTol 0.25;
    }

    addLayersControls
    {
        layers
        {
            airfoil_right
            {
                nSurfaceLayers 4;
                expansionRatio 1.5;
                fch 5.0E-4;
                grownUp false;
            }

            floor
            {
                nSurfaceLayers 6;
                expansionRatio 1.5;
                fch 5.0E-4;
            }

            ceiling
            {
                nSurfaceLayers 6;
                expansionRatio 1.5;
                fch 5.0E-4;
            }

            right
            {
                nSurfaceLayers 6;
                expansionRatio 1.5;
                fch 5.0E-4;
            }

        }

        relativeSizes true;
        expansionRatio 1.25;
        finalLayerThickness 0.4;
        minThickness 0.2;
    featureAngle 180; //Added later on
        featureAngleMerge 180;        // changed from 91
        featureAngleTerminate 180;    // changed from 91
        nRelaxIter 5;
        maxFaceThicknessRatio 2.0;
        maxThicknessToMedialRatio 0.3;
        minMedialAxisAngle 90;
        maxLayerIter 30;
        growConvexEdge true;
        growConcaveEdge true;
        growUpPatches true;
        preBalance false;
        writeVTK false;
        noErrors false;
        layerRecovery 1;
        growZoneLayers false;
        projectGrownUp 0.0;
    }

    meshQualityControls
    {
        maxNonOrtho 65;
        maxBoundarySkewness 20;
        maxInternalSkewness 4;
        maxConcave 80;
        minFlatness 0.5;
        minVol 1e-14;
        minTetQuality -1e30;
        minArea 1e-13;
        minTwist 0.05;
        minDeterminant 0.0001;
        minFaceWeight 0.05;
        minVolRatio 0.01;
        minTriangleTwist -0.99;
        nSmoothScale 10;
        errorReduction 0.75;
        faceFaceCells true;
    }

    debug 0;
    mergeTolerance 1E-6;
    repatchRegions
    {
        movingPatchRight
        {
            location ( 0.0 0.1 0.35 );
            excludePatches ( slidingCellZoneRight slidingCellZoneRight_slave );
            zone movingZoneRight;
        }
    }
Thanks for your help.

Henning

Here is a picture of (a part of) the mirrored mesh without the zones and boundaries at and around the upper airfoil:



Last edited by HenningW; June 3, 2015 at 11:02. Reason: Picture did not work
HenningW is offline   Reply With Quote

Old   June 3, 2015, 10:44
Default
  #2
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
Henning,

First off, welcome to the forum. Secondly, you have numerous approaches to solve your problem:
  1. topoSet:On your mirrored mesh you can create a cellZone of your region you want to move using topoSet and then continue from there. There is an example topoSetDict in the topoSet application directory. If you create a cellSet, just make sure to use setsToZones to create the cellZone.
  2. Mirror your surfaces and remesh in a larger domain: For this method, you can make a copy of surfaces to encompass the new mirrored surfaces (either use a CAD software, Blender, etc. to make it or simply copy the surface and then rotate and/or translate the surface with surfaceTransformPoints); increase the size of your cellZones (or add more) to encompass your new mirrored surfaces; and remesh on a larger domain.

I would try the first option, though I'm not sure how well mirrorMesh turned out since your images did not appear in your post. Good luck and I hope this helps.
chegdan is offline   Reply With Quote

Old   June 3, 2015, 11:56
Default
  #3
Member
 
Join Date: Feb 2015
Posts: 39
Rep Power: 9
HenningW is on a distinguished road
Hi Dan,

tanks a lot for your response. I think I tried your second approach by generating a large domain and putting in 2 stl files symmetric to my x-axis. After that I ran sHM and pimpleDyMFoam. Unluckly, those are the results that are not symmetric and why I wanted to try mirrorMesh, because I am not 100% suer that the mesh is symmetric along the x-axis in that approach.

I will take a look at the first approach. However, I have never done that and might ask a few more questions about topoSet soon =)

However, thanks again for your help

Henning
chegdan likes this.
HenningW is offline   Reply With Quote

Reply

Tags
mirrormesh, multisolidbodymotionfvmes, shm, sliding mesh, snappyhexmesh

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Definition of y+ in yPlusRAS (1.7.1) Taka1 OpenFOAM Programming & Development 41 May 23, 2020 12:05
[OpenFOAM.org] OpenFOAM 5.x (mrklein patch) and macOS High Sierra podallaire OpenFOAM Installation 14 March 27, 2020 14:45
error during compilation of new solver harsha_kulkarni OpenFOAM Programming & Development 2 November 7, 2019 00:47
error compiling modified applications yvyan OpenFOAM Programming & Development 21 March 1, 2016 04:53
Compilation errors in ThirdPartymallochoard feng_w OpenFOAM Installation 1 January 25, 2009 06:59


All times are GMT -4. The time now is 05:37.