Skip to content

stonepreston

Due to recent bot attacks we have changed the sign-up process. If you want to participate in our forum please send a message via our contact form.

Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • in reply to: Rotating cuboid not working correctly in 1.8 #10394
    stonepreston
    Participant

    thank you!

    in reply to: Rotating cuboid not working correctly in 1.8 #10377
    stonepreston
    Participant

    this is what I am trying in 1.8 using indicator rotate instead of rotating the cube on construction:

    // ramp
    Vector<T, 2> straightCubeExtend(6.43, 1.85);
    Vector<T, 2> straightCubeOrigin;
    straightCubeOrigin[0] = spillwayGeometry.upperReservoirLength;
    Vector<T, 2> tiltedCubeExtend(8.43, 1.27);
    Vector<T, 2> tiltedCubeOrigin;
    tiltedCubeOrigin[0] = 1;
    tiltedCubeOrigin[1] = 0;
    Vector<T, 2> lowerCubeExtend(6.43, .71);
    Vector<T, 2> lowerCubeOrigin;
    lowerCubeOrigin[0] = spillwayGeometry.upperReservoirLength;
    std::shared_ptr<IndicatorCuboid2D<T>> straightCube(new IndicatorCuboid2D<T>(straightCubeExtend, straightCubeOrigin));
    IndicatorCuboid2D<T> tiltedCube(tiltedCubeExtend, tiltedCubeOrigin);
    auto rotX = tiltedCubeOrigin[0] + tiltedCubeExtend[0] / 2.0;
    auto rotY = tiltedCubeOrigin[1] + tiltedCubeExtend[1] / 2.0;
    Vector<T, 2> rotationPoint(rotX, rotY);
    std::shared_ptr<IndicatorRotate<T, 2>> rotatedCube(new IndicatorRotate<T, 2>(rotationPoint, 0.174533, tiltedCube));
    std::shared_ptr<IndicatorCuboid2D<T>> lowerCube(new IndicatorCuboid2D<T>(lowerCubeExtend, lowerCubeOrigin));
    // * is intersection + is union
    IndicatorIdentity2D<T> straightId(straightCube);
    IndicatorIdentity2D<T> rotatedId(rotatedCube);
    IndicatorIdentity2D<T> lowerId(lowerCube);

    IndicatorIdentity2D<T> ramp((straightCube * rotatedCube) + lowerCube);

    in reply to: Rotating cuboid not working correctly in 1.8 #10376
    stonepreston
    Participant

    Can you provide the functions for the IndicatorCuboid2d class as well?

    The ones provided for the rotate class do work for fixing the rotation issues, but I am needing to be able to combine indicators using union, intersection, difference. I cant seem to work out how to get the rotate indicator to be able to be combined with the cuboid2ds. This is what I did in 1.7:

      Vector<T,2> straightCubeExtend(6.43, 1.85);
      Vector<T,2> straightCubeOrigin;
      straightCubeOrigin[0] = 2;
      Vector<T,2> tiltedCubeExtend(8.43, 1.27);
      Vector<T,2> tiltedCubeOrigin;
      tiltedCubeOrigin[0] = 1;
      tiltedCubeOrigin[1] = 0;
      Vector<T,2> lowerCubeExtend(6.43, .71);
      Vector<T,2> lowerCubeOrigin;
      lowerCubeOrigin[0] = 2;
      std::shared_ptr<IndicatorCuboid2D<T>> straightCube( new IndicatorCuboid2D<T>(straightCubeExtend, straightCubeOrigin ));
      std::shared_ptr<IndicatorCuboid2D<T>> tiltedCube( new IndicatorCuboid2D<T>(tiltedCubeExtend, tiltedCubeOrigin, 0.174533));
      std::shared_ptr<IndicatorCuboid2D<T>> lowerCube( new IndicatorCuboid2D<T>(lowerCubeExtend, lowerCubeOrigin ));
      IndicatorIdentity2D<T> ramp((straightCube * tiltedCube) + lowerCube);
      // Note: have to rename both the 2 material and the 1 material in this indicator region
      superGeometry.rename( 2,2,ramp );
      superGeometry.rename( 1,2,ramp );

    but it seems this does not work when I mix IndicatorCuboids with IndicatorRotates

    in reply to: Rotating cuboid not working correctly in 1.8 #10371
    stonepreston
    Participant

    it seems as if the IndicatorRotate method is actually rotating the indicator into the page (i.e rotating from x to z axis). I would expect the rotation to be from the x to y axis. Is there a way to achieve rotation on the x,y plane instead?

    in reply to: Rotating cuboid not working correctly in 1.8 #10370
    stonepreston
    Participant

    I did find a new rotation class, but using that does not result in the expected output either:

    
        superGeometry.rename(0, 2);
        superGeometry.rename(2, 1, {1, 1});
        Vector<T, 2> extend{2, 2};
        Vector<T, 2> origin{4, 3};
        IndicatorCuboid2D<T> cube(extend, origin);
        IndicatorRotate<T, 2> rotated({5, 4}, 0.174533, cube);
        superGeometry.rename(1, 2, rotated);
    
    in reply to: Strange issue with FreeSurface field definition #9881
    stonepreston
    Participant

    This appears to not affect the simulation, I think it might be due to cleaning boundary cells in conjunction with not adding a layer around my STL.

    in reply to: Strange issue with FreeSurface field definition #9855
    stonepreston
    Participant

    Did you initialize the fields also at nodes with material number zero? Any fields needs to be initialized at all material numbers correctly!

    Is that not what this line does?

    
    sLattice.defineField<FreeSurface::CELL_TYPE>(superGeometry, 0, four);
    

    I thought that would initialize any node with material number 0 in the lattice to 4? Is there something more that needs to be done?

    • This reply was modified 1 year, 9 months ago by stonepreston.
    in reply to: Strange issue with FreeSurface field definition #9845
    stonepreston
    Participant

    I tested whether this was a problem with only FreeSurface fields by adding a custom field to the descriptor. The custom field has the same problem.

    This mainly seems to be affecting material 0 on the outer surface. If I apply fields to other materials inside the surface it looks correct, but its just that outer portion from x=10 onwards that isnt right.

    in reply to: Problem with BreakingDam3D #9816
    stonepreston
    Participant

    Ok perfect, yeah the volume based rendering seems to be what I want. Never used that option before. I will look into the openMP settings and see if that speeds things up. Thanks for your prompt replies

    in reply to: Problem with BreakingDam3D #9814
    stonepreston
    Participant

    ok slicing worked. Id like to be able to view the entire fluid domain, is there an easy way of accomplishing that (sorry for the basic questions, coming from openfoam and havent had to deal with occlusions like walls blocking the view of the fluid)

    in reply to: Problem with BreakingDam3D #9813
    stonepreston
    Participant

    I will try slicing the domain tonight and see if that gets me anywhere. Regarding how I ran it, I simply downloaded openlb, changed into the dambreak2d directory, ran make, and ran the executable. Its possible no parallelization is happening and thats why its so slow. I dont have a GPU, but do have 8 cores available, is there a config setting I need to update?

Viewing 11 posts - 1 through 11 (of 11 total)