CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   boundary condition for zerothickness surface :( (https://www.cfd-online.com/Forums/openfoam-pre-processing/152315-boundary-condition-zerothickness-surface.html)

Naresh yathuru April 15, 2015 08:05

boundary condition for zerothickness surface :(
 
Hi Foamers,

sorry for restarting the thread again. I need to implement baffles in my case. i have some basic question can some one please help me.
I m having a zero thickness surface in my geometry and i have read a lot of posts regarding how to implement baffles which helped me create a mesh with baffles in snappyHexMesh. (thanks to the changes in snappyhexmesh)

code in snappyHexmesh, refinementsurfaces
Code:

table
        {
        level (2 2);
        faceZone table;

        // Create baffles for all faces on the surface
        faceType baffle;

        cellZone table;
        cellZoneInside inside;
        }

In paraview i have two patches created, a master and a slave. so far its good.
and i have checked in the polymesh/boundary folder two boundaries are created of type wall.
Code:

table
    {
        type            wall;
        inGroups        1(wall);
        nFaces          588;
        startFace      653617;
    }
    table_slave
    {
        type            wall;
        inGroups        1(wall);
        nFaces          588;
        startFace      654205;
    }

now my questions are
1.How can i define B.C to these patches like U,P,K,epsilon
2. do i have to make a folder for "createbafflesDict" to specify boundary conditions or can i specify B.C like for other patches?
3. last and much important question is can i spesify different boundary conditions for the master and slave patch similar to twosidedwall in fluent?

I have looked in to couple of tutorials but could not get a clear answer.

I m using OF 2.3.0

I m banging my head on the wall. could someone please help me.

Regards,
Naresh

[ Moderator note: Moved post from http://www.cfd-online.com/Forums/ope...nal-faces.html ]

Naresh yathuru April 28, 2015 12:58

boundary condition for zerothickness surface :(
 
Hi Foamers,

I have a case with zero thickness sucface inside my domain. I innitially thought that i need to have createBafflesDict then i came to know that i can create baffles using STL files in the snappyHexMesh. thanks to SHM.

Now i m kind of stuck trying to set booundary conditions for the master and slave patches ,where to specify the B.C?

can somebody please help me.

Code:

// Which of the steps to run
castellatedMesh true;    // make basic mesh ?
snap            true;    // decide to snap back to surface ?
addLayers      false;  // decide to add viscous layers ?


geometry // Load in STL files here
{     
    /*baffle
    {
        type searchablePlate;
        origin (2.4 1.8 0.8);
        span (1.2 2.7 0.8);
        regions
        {
            region0
            {
              name  baffle;
            }
        }
    }*/
             
    inlet.stl {type triSurfaceMesh; name inlet;}
    outlet.stl {type triSurfaceMesh; name outlet;}
    heater.stl {type triSurfaceMesh; name heater;}
    roomwall.stl {type triSurfaceMesh; name roomwall;}
        roof.stl {type triSurfaceMesh; name roof;}
        floor.stl {type triSurfaceMesh; name floor;}
        window.stl {type triSurfaceMesh; name window;}
        table.stl {type triSurfaceMesh; name table;}
        man1.stl {type triSurfaceMesh; name man1;}
        man2new.stl {type triSurfaceMesh; name man2new;}
    //fullgeomnew.stl {type triSurfaceMesh; name fullgeomnew;}
        //mergedwithouttable.stl {type triSurfaceMesh; name mergedwithouttable;}
    //refinementBox {type searchableBox; min (-2 -2 6); max (7 5 -2);}
};

castellatedMeshControls
{
    maxLocalCells 500000;  //max cells per CPU core
    maxGlobalCells 4000000; //max cells to use before mesh deletion step
    minRefinementCells 10;  //was 0 - zero means no bad cells are allowed during refinement stages
    maxLoadUnbalance 0.10;
    nCellsBetweenLevels 3;  // expansion factor between each high & low refinement zone

    // Explicit feature edge refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    features // taken from STL from each .eMesh file created by "SurfaceFeatureExtract" command
    (
      {file "inlet.eMesh"; level 5;}
        {file "outlet.eMesh"; level 3;}
        {file "roomwall.eMesh"; level 3;}
        {file "heater.eMesh"; level 2;}
        {file "roof.eMesh"; level 1;} 
        {file "floor.eMesh"; level 2;}
        {file "window.eMesh"; level 3;}
        {file "table.eMesh"; level 3;}
        {file "man1.eMesh"; level 2;}
        {file "man2new.eMesh"; level 3;}
        //{file "mergedwithouttable.eMesh"; level 3;}
    );

    // Surface based refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~

    refinementSurfaces // Surface-wise min and max refinement level
    {
    inlet {
        level (5 5);//faceZone inlet;cellZone inlet;cellZoneInside inside;
        } // was 0 0
        outlet {
        level (3 3);//faceZone outlet;cellZone outlet;cellZoneInside inside;
        }
    roomwall {
        level (3 3);//faceZone roomwall;cellZone roomwall;cellZoneInside inside;
        }  //was 3 3
    heater {
        level (2 2);//faceZone heater;cellZone heater;cellZoneInside inside;
        } // was 4 4
        roof {
        level (2 2);///faceZone roof;cellZone roof;cellZoneInside inside;
        }
        floor {
        level (2 2);//faceZone floor;cellZone floor;cellZoneInside inside;
        }
        window {
        level (3 3);//faceZone window;cellZone window;cellZoneInside inside;
        }
        //table {
        //level (0 0);//faceZone table;cellZone table;cellZoneInside inside;
        //}
        man1 {
        level (3 3);//faceZone man1;cellZone man1;cellZoneInside inside;
        }
        man2new {
        level (3 3);//faceZone  man2;cellZone man2;cellZoneInside inside;
        }
        //baffle {level (3 3);}
        table
        {
        level (3 3);
        faceZone table;

        // Create baffles for all faces on the surface
        faceType baffle;

        cellZone table;
        cellZoneInside inside;
        } 
       
       
    } 


    resolveFeatureAngle 30;  // (before 80) .Resolve sharp angles // Default 30
    //refinementRegions        // In descending levels of fine-ness
    //{fullgeomnew //{mode inside;levels ((0.3 3));}}      //error: shell mergedtest is suitable for inside mode.
   
    //{mode distance; levels ((0.01 4) (0.03 3) (0.1 2));}} // was ((0.001 4) (0.003 3) (0.01 2))
    //when i tried like this
    refinementRegions{}
   
    //the whole geometry is meshed and the cell are not removed.*/
    locationInMesh (1 1 1);  //to decide which side of mesh to keep **
    allowFreeStandingZoneFaces true; // before true
}


// Settings for the snapping.
snapControls
{
    nSmoothPatch 5;// before 3
    tolerance 1.0; // before 2
    nSolveIter 50;// before 30
    nRelaxIter 10; //before 5
    nFeatureSnapIter 25; // default is 10
   
// New settings from openfoam 2.2 onwards for SHMesh

implicitFeatureSnap false; // default is false - detects without doing surfaceFeatureExtract
explicitFeatureSnap true; // default is true
multiRegionFeatureSnap true; // deafault is false - detects features between multiple surfaces

}

I m using buoyantBoussinessqsimpleFoam solver. As a first step i m intended to implement a no-slip U(0,0,0) B.c

I have looked into some tutorials but each tutorials has a different style of implementing the baffles. so i could not able to find it myself.
I m desperate for help. :(
Thank you ,

regards,
Naresh

wyldckat April 30, 2015 12:40

Quick answer: Study the tutorial cases "compressible/rhoPimpleDyMFoam/annularThermalMixer" and "incompressible/pimpleFoam/TJunctionFan".
Hints:
  • The first one demonstrates how to create the baffles.
  • The second one demonstrates how to define the boundary conditions while it's creating the baffles.

Naresh yathuru May 4, 2015 04:26

Dear Bruno,
Thank you for your reply. I will check it out.

Regards,
Naresh Yathuru

Naresh yathuru September 19, 2016 04:35

Hello foamers,

I took me a while to update this post. I was not successful
so I tried a very simple geometry of a box with a zero thickness surface inside. i created the geometry in salome.Exported geometry as stl files and meshed in snappyHexMesh. I used the "facetype baffles" in snappy hex mesh to create baffle.
I have the following questions:
1. After meshing it shows the master and slave boundary in polymesh/boundary files. how to set boundary conditions for these surfaces in 0 folder?

Am I missing something. There is no tutorials for the method where snappyhexmesh is used to create baffles. I have tried the tutorials Tjunctionfan and thermal baffles tutorials but they use createbafflesDict. but I want to generate baffles for the geometry stl file i created in Salome.
When I triedto use my stl files in createbafflesdict there was snapping problem. I created stairscasestep mesh.



Could someone through some light. I m stuck at this point.

I m using OpenFoam 2.3.0

regards,
Naresh

wyldckat September 29, 2016 16:37

Quick answers:
  1. Take a step back and create a simpler test case, similar to your geometry, but preferably one that means that it is a small test case that you can share with us, so it's easier to help you. This way it makes it easier to test things and diagnose any problems.
  2. After a quick re-search, I still haven't double-checked, but:
    1. createBaffles is always needed, but it essentially will assign faces inside the mesh from the faceZones that were created by snappyHexMesh.
    2. Boundary conditions can be assigned either:
      • manually inside the field files that you have inside the folder "0";


All times are GMT -4. The time now is 11:03.