Skip to content

Periodicity in fourRollMill2d

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #8527
    Benmansour Yacine

    Dear Community,
    I am reaching out to seek your assistance with configuring periodicity in OpenLB. I am currently working with the “FourRollMill2d” input file. I’ve modified this file by adding an inlet velocity, without activating the cylinder rotation, aiming to have the bubble exit on the right side and reappear on the left side. However, after extensive research, I am beginning to think that what I want to achieve might not be possible with the current settings.

    I was not aware of this limitation when I attended the Spring School, otherwise I would have taken the opportunity to discuss it directly with you.. Does anyone have experience or suggestions on how to properly set up the periodicity to achieve this goal? Any help or guidance would be greatly appreciated.

    Thank you very much for your time and expertise.

    Best regards,


    Where and how did you add the inlet velocity? (As the fourRollMill2d is periodic in all directions by default)

    Benmansour Yacine

    I added velocity in PrepareLattice like this :

    std::vector<T> Vg( 2,T(velocity) );
    AnalyticalConst2D<T,T> constantVelocity( Vg);
    // add second fluid (tank)
    SmoothIndicatorCuboid2D<T,T> cuboid( {T(nx2)/T(2),T(nx)/T(2)}, T(nx2),T(nx+2), converter.getPhysLength(alpha) );
    AnalyticalIdentity2D<T,T> rho( one );
    AnalyticalIdentity2D<T,T> phi( one – cuboid – cuboid );


    1/ You need to set deacivate the periodicity in the flow direction like..

    cGeometry->setPeriodicity( true, true ); -> cGeometry->setPeriodicity( true, false);

    2/ Set a new material number for the inflow and one for the outflow region (as indicated in e.g. cylinder2d example)

    3/ Add a boundary condition for the inflow (as indicated in e.g. cylinder2d example)

    4/ Add a boundary condition for the outlow (as indicated in e.g. cylinder2d example)

    5/ Define the boundary values for the inflow and outflow materials (as indicated in e.g. cylinder2d example)

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