Skip to content

Curved boundary

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #9466
    Bran
    Participant

    Dear community:
    I want to apply the wall function to the curved boundary. I tried this:

      sLattice.defineDynamics<ExternalTauEffLESForcedBGKdynamics>(superGeometry, 2);
      setWallFunctionBoundary<T,DESCRIPTOR>(sLattice, superGeometry, 2, converter, wallFunctionParam);

    It reports the curved area can’t setWallFunctionBoundary. It seems that it can’t get the discreteNormal.
    [setWallFunctionBoundary] Warning: Could not setWallFunctionBoundary (120, 0, 43), discreteNormal=(0,0,0,0), set to bounceBack
    How can I solve this problem. The following is the geometry I got.
    Danke!
    Geometry

    • This topic was modified 1 month ago by Bran.
    #9483
    FBukreev
    Keymaster

    Hello,

    you need to apply correct wall model parameters.

    ‘template
    struct wallFunctionParam {
    /* Used method for density reconstruction
    * 0: Zou-He (only for straight wall)
    * 1: extrapolation (0th order)
    * 2: constant (rho = 1.)
    */
    int rhoMethod = 1;

    /* Used method for non-equilibrium particle distribution reconstruction
    * 0: regularized NEBB (Latt, BounceBack, use for straight walls)
    * 1: extrapolation NEQ (Guo Zhaoli, more precise, less stable)
    * 2: regularized second order finite Differnce (for straight walls)
    * 3: equilibrium scheme (less precise, more stability)
    */
    int fneqMethod = 1;

    /* Used wall profile
    * 0: Musker profile
    * 1: power law profile
    */
    int wallProfile = 0;

    /// check if descriptor with body force is used
    bool bodyForce;

    /// special formulation for straight boundaries
    bool curved = true;

    /// use van Driest damping function in boundary cell, stabilizes LES
    bool useVanDriest = true;

    /// von Karman constant for van Driest model (~0.3-0.5)
    T vonKarman = 0.375;

    /// distance from cell to real wall in lattice units
    T latticeWalldistance = 0.5;
    };’

    Choose the options for curved walls.

    #9489
    Bran
    Participant

    Thanks for your reply. I did so, but it doesn’t work. I mainly follow the channel3d case to do so, except I changed the geometry and I also set the wallFunctionParam.curved = true.
    I don’t think it is the wall model parameters problem. It just can’t calculate the discreteNormal, I don’t know how to solve this problem.

    #9490
    FBukreev
    Keymaster

    You can tray to use rhoMethod=2 and fneqMethod=3 there.

    #9493
    Bran
    Participant

    Still doesn’t work, only this part, can’t be setWallfunctionboundary.
    Hump
    Following is how I create the geometry:

    STLreader<T> Hump( "Hump.stl", converter.getConversionFactorLength(), 1, 1);
    CuboidGeometry3D<T> cuboidGeometry(Hump, converter.getPhysDeltaX(), noOfCuboids);
    cuboidGeometry.setPeriodicity(true, false, true);
    HeuristicLoadBalancer<T> loadBalancer(cuboidGeometry);
    SuperGeometry<T,3> superGeometry(cuboidGeometry, loadBalancer);
    prepareGeometry(superGeometry, Hump, converter);
    
    void prepareGeometry(SuperGeometry<T,3>& superGeometry,
                         IndicatorF3D<T>& Hump,
                         UnitConverter<T,DESCRIPTOR> const& converter)
    {
      OstreamManager clout(std::cout,"prepareGeometry");
      clout << "Prepare Geometry ..." << std::endl;
      superGeometry.rename(0,2,Hump);
      superGeometry.rename(2,1,{0,1,0});
      superGeometry.clean();
      superGeometry.innerClean();
      superGeometry.checkForErrors();
      superGeometry.print();
      olb::Vector<T, 3> PhyMax = superGeometry.getStatistics().getMaxPhysR(2);
      olb::Vector<T, 3> PhyMin = superGeometry.getStatistics().getMinPhysR(2);
      clout << "Dimension of the channel in meters: x = " << PhyMax[0] - PhyMin[0];
      clout << " ; y = " << PhyMax[1] - PhyMin[1];
      clout << " ; z = " << PhyMax[2] - PhyMin[2] << std::endl;
      clout << "Prepare Geometry ... OK" << std::endl;
    }
    • This reply was modified 4 weeks, 1 day ago by Bran.
    #9501
    FBukreev
    Keymaster

    With the wall function in this release you can try to make this hump in the prepareGeometry section with a separate indicator and then rename all material number 1 cells to material number 2 inside of that hump indicator. By me, that has worked now.

    #9511
    Bran
    Participant

    Thank you.
    I didn’t make it. Could you please give an example so that I can learn how to do this right? I kind of can’t understand how the discreteNormal was calculated. I also tried inclined channel, the same problem appears. It seems that if there are more than one layer geometry whose material are 0 around the boundary, then the dicreteNormal won’t be set properly.
    inclined channel

    #9512
    FBukreev
    Keymaster

    Yes, material 0 is the problem here.

    You just leave the channelas it is in the main method and create a cylinder in the prepareGeometry section like:

    IndicatorCylinder3D cyl(center1, center2, radius);
    superGeometry.rename(1,2,cyl);

    #9513
    Bran
    Participant

    Do you mean doing these steps? It will make the whole domain become material 0.

    STLreader<T> Hump("Hump.stl", converter.getConversionFactorLength(), 1, 1);
    IndicatorLayer3D<T> extendedDomain(Hump, converter.getConversionFactorLength());
    CuboidGeometry3D<T> cuboidGeometry(extendedDomain, converter.getPhysDeltaX(), noOfCuboids);
    cuboidGeometry.setPeriodicity(true, false, true);
    HeuristicLoadBalancer<T> loadBalancer(cuboidGeometry);
    SuperGeometry<T,3> superGeometry(cuboidGeometry, loadBalancer);
    prepareGeometry(superGeometry, extendedDomain, Hump, converter);
    void prepareGeometry(SuperGeometry<T,3>& superGeometry,
                         IndicatorF3D<T>& extendedDomain,
                         STLreader<T>& Hump,
                         UnitConverter<T,DESCRIPTOR> const& converter)
    {
      OstreamManager clout(std::cout,"prepareGeometry");
      clout << "Prepare Geometry ..." << std::endl;
      superGeometry.rename(0,2,extendedDomain);
      superGeometry.rename(1,2,Hump);
      superGeometry.clean();
      superGeometry.innerClean();
      superGeometry.checkForErrors();
      superGeometry.print();
      clout << "Prepare Geometry ... OK" << std::endl;
    }

    This is how my stlfile looks like.
    Hump of stl

    • This reply was modified 3 weeks, 3 days ago by Bran.
    #9515
    FBukreev
    Keymaster

    I mean do not use stl, generate geomnetry only with indicators.

    #9516
    Bran
    Participant

    How can I generate this hump with indicator? For inclined channel, also with indicators?

    #9517
    FBukreev
    Keymaster

    combining the indicators. Cuboid – cylinder.

    #9518
    Bran
    Participant

    It is not a regular cylinder, but an irregular shape, can openlb do this?

    #9519
    Adrian
    Keymaster

    Yes, using indicators you can describe non-primitive geometries. Either by combining primitives into more complex setups using indicator arithmetic as Fedor suggested or by importing STL(s) using the STLreader indicator. The basic usage of indicators for constructing geometries is also detailed in the user guide.

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.