Skip to content

Set Periodic Boundary condition and set contact angle for multiphase simulation

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Set Periodic Boundary condition and set contact angle for multiphase simulation

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1864
    Zhipeng Zhu
    Member

    Hi everyone. I’m new to LB method and i’m trying to use OpenLB to simulate Multiphase flow in porous median. However, I’m stuck here. Can someone help me? Thank you very much!

    My first question is: All the examples set up periodic Boundary condition after the Cuboid geometry is created. However in my case, I need to create a complex geometry and I created by using indicators
    IndicatorIdentity3D<bool,T> Pore(cuboid+inflow+outflow-Sphere1-Sphere2);
    CuboidGeometry3D<T> *cuboidGeometry = new CuboidGeometry3D<T>(Pore, 0.00001/N, singleton::mpi().getSize() );

    Later on I try to set Periodic BC for this *cuboidGeometry, but I can’t do it. Can someone give me some advice about how to do this?

    My second question is how to set contact angle of fluid? I didn’t see any example has it.
    Thank you very much. I have been trying to build this model for a month 🙁

    #2458
    robin.trunk
    Keymaster

    Hi applous6,

    do you get an error message? Maybe the periodic boundary is colliding with some velocity boundaries what can lead to problems. Did you set the periodicity for all directions?

    Best
    Robin

    #2459
    Zhipeng Zhu
    Member

    I want to set y and z direction as periodic BC by:

    IndicatorIdentity3D<bool,T> Pore(cuboid+inflow+outflow-Sphere1-Sphere2);
    CuboidGeometry3D<T> *cuboidGeometry = new CuboidGeometry3D<T>(Pore, 0.00001/N, singleton::mpi().getSize() );
    *cuboidGeometry.setPeriodicity(false, true, true);

    The error message is:
    ” request for member ‘setPeriodicity in ‘cuboidGeometry , which is of non-class type ‘olb::CuboidGeometry 3d<double>*”

    In other examples, the Periodic BC can be set by:

    CuboidGeometry3D<T> cuboidGeometry(0, 0, 0, 1, nx, ny, nz, noOfCuboids);
    cuboidGeometry.setPeriodicity(true, true, true);

    So I assume I can set mine as well, but I couldn’t.

    Thank you for your help Robin

    #2460
    mathias
    Keymaster

    Dear applous6,

    since you created a pointer you need to use cuboidGeometry->setPeriodicity(true, true, true). We strongly recomment our spring school in March 2017.

    Best
    Mathias

    #2461
    Zhipeng Zhu
    Member

    Thank you very much Mathias. I will definitely join the Spring school!
    Do you know about setting the contact angle for different phases.

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