Find answers, ask questions, and connect with our <br>community around the world.

Home Forums OpenFOAM Forum Lesson 6

  • Lesson 6

    Posted by Himanshu Dhurve on January 22, 2024 at 8:59 pm

    Hello Professor,

    1. I have a question regarding the ‘layers’ option in the “addLayerControls” sub-dict for the snappyHexMesh. I was curious as to what the syntax would look like in case we need to add layers on different surfaces. During the lecture, layers were added only on the lowerWall|motorBike, if in case we wanted to add layers to any other surface what should the syntax look like? For your reference, I have added the syntax based on my understanding below (exampleWall)

    %=============================<wbr>==============%
    layer
    {
    “(lowerWall|motorBike).*”
    {
    nSurfaceLayers 1;
    }
    ////Here I add the second surface for adding layers////////
    {
    “(exampleWall|motorBike).*”
    {
    nSurfaceLayers 5;
    }
    }
    }
    %=============================<wbr>==============%

    2. Should the syntax for the adding layers include the same format i.e. “(name_of_the_wall | motorBike).*”

    3. Do the ‘finalLayerThickness’ and ‘minThickness’ have dimension or are they dimensionless, in the lecture, it did say to be a ratio but I wanted to be sure.

    Barış Bicer replied 4 months, 3 weeks ago 2 Members · 1 Reply
  • 1 Reply
  • Barış Bicer

    Moderator
    January 23, 2024 at 9:46 pm

    Hi Himanshu,

    1. First, we know that we should have boundary layer on the boundaries which are defined as wall, right?

    To see this you should check contant/polyMesh/boundary file.

    So, how you can define later for your each wall boundaries? Lets say that you have 4 wall boundaries with naming such as: wall_1, wall_2, pipe, example:

    // first thing : you can define all boundaries separately if the names are not similar

    layers

    {

    wall_1

    {

    nSurfaceLayers 1;

    }

    wall_2

    {

    nSurfaceLayers 1;

    }

    //since the wall_1 and wall_2 name are similar in order not to repeat the similar names like in motorBike_… you can also define both as follows: DONT FORGET THAT YOU SHOULD ONE OF THEM!!! ABOVE SEPARATELY OR COMBINED BELOW ONE FOR WALL_1 AND WALL_2


    “(wall).*” –> this means that the all boundaries with start name “wall” assing all of them layer 1 similar to motorBike

    {

    nSurfaceLayers 1;

    }

    pipe

    {

    nSurfaceLayers 1;

    }

    example

    {

    nSurfaceLayers 1;

    }


    }

    3. Yes all of them are dimensionless ratio. Why? because in the begining of

    addLayersControls
    {
    // Are the thickness parameters below relative to the undistorted
    // size of the refined cell outside layer (true) or absolute sizes (false).

    relativeSizes true; —> True means that your below parameters will be ratio not absolute size. If you choose false then you have to use absolute size, which I dont recommend since it is quite difficult to cover this in snappyHexMesh

Log in to reply.

error: Content is protected !!