Skip to content

Turbulent flow around a cylinder

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Turbulent flow around a cylinder

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5993
    yx19971028
    Participant

    Hello everyone,

    I want to add a three-dimensional cylinder perpendicular to the Z axis.The code about prepareGeometry is as follows:
    //void prepareGeometry(SuperGeometry3D<T>& superGeometry, IndicatorF3D<T>& indicator,
    UnitConverter<T,DESCRIPTOR> const& converter)
    {
    OstreamManager clout(std::cout,”prepareGeometry”);
    clout << “Prepare Geometry …” << std::endl;

    superGeometry.rename(0,2,indicator);

    superGeometry.rename(2,1,0,0,1);
    superGeometry.clean();
    superGeometry.innerClean();
    superGeometry.checkForErrors();
    superGeometry.print();

    std::vector<T> PhyMax = superGeometry.getStatistics().getMaxPhysR(2);
    std::vector<T> 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;

    Vector<T,3> center1 = {0,2,1};
    Vector<T,3> center2 = {lx,2,1};
    IndicatorCylinder3D<T> cylinder(center1,center2,1);
    superGeometry.rename( 2,5,cylinder );
    superGeometry.clean();
    superGeometry.checkForErrors();

    superGeometry.print();//

    clout << “Prepare Geometry … OK” << std::endl;
    The above code can’t draw a cylinder. I want to ask what are the problems with the code?

    #5998
    jjessberger
    Participant

    Hello,

    could you please provide a more detailed description of what is not working? Without any further information, it’s hard to look for errors. E.g., a paraview plot of the geometry would help. How is the indicator argument set and did you take the code from a specific example in OpenLB?

    Best regards,
    Julius

    #6000
    yx19971028
    Participant

    Dear Julius,
    Thank you for your reply.
    I take the code from the example of channel3D about turbulence and want to simulate the turbulent flow over a square cylinder confined in a channel.
    Best regards,
    Xu Yang.

    #6003
    jjessberger
    Participant

    And what is the output/ the results that you get with your snippet?

    • This reply was modified 2 years, 7 months ago by jjessberger.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.