Skip to content

Problem in example code porousPoiseuille2d

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Problem in example code porousPoiseuille2d

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #4549
    guojuw
    Participant

    Dear OLB developers:

    I am trying to use the GuoZhaoBGKdynamics:
    1. download the olb source code.
    2. navigate to $openlbRoot/examples/porousMedia/porousPoiseuille2d
    3. type ‘make’ to compile the example, and type ‘mpirun porousPoiseuille2d’ to run the program.
    4. plot the velocity profile given in $openlbRoot/examples/porousMedia/porousPoiseuille2d/tmp/centerVel.dat:

    guoZhao example velocity profile

    5. The LBM numerical results do not match the analytical solution. I do read the reference by Guo and Zhao (2002). I also changed the resolution or time stepping size. I also tried to initilize the initial velocity field with analytical solution. The solutions still did not match.

    Thanks for your help.
    Regards,
    Junwei Guo

    #4552
    mathias
    Keymaster

    Dear Junwei,

    did you check what happents of you have dx and quater dt? Is the numerical solution closer to the analytical one? Can you provide a plot for that dx,td choise?

    Best
    Mathias

    #4568
    guojuw
    Participant

    Dear Dr. Mathias,

    I tried the resolutions from 20 to 200. In each case, the ratio of dx^2/dt is consistent, which means the kinematic viscosity conversion factors are unique in all cases.

    The velocity profiles did not converge to the analytical one, but still converge to the highest resolution case.

    I plotted the velocity profiles for all cases here. The L2 error compared with the analytical solution is alose compared.

    velocity profiles

    error analysis

    Regards,
    Junwei Guo

    #4570
    mathias
    Keymaster

    The max. velocity seems all right. Can you check the distance to the wall? Maybe, the channel width is not correct, i.e. does not fit the one assumed for the analytical solution.

    Best
    Mathias

    #4573
    guojuw
    Participant

    Dear Dr. Mathias,

    I think the channel width in simulation is correctly set. In spite of the convergence problem, there are still a few other forcing problems.

    I used these commands to output the forces:

    SuperLatticeGuoZhaoPhysBodyForce2D<T, DESCRIPTOR> bodyForce(sLattice, converter);
    SuperLatticePhysDarcyForce2D<T, DESCRIPTOR> darcyForce(sLattice, superGeometry,1 ,converter);
    SuperLatticeField2D<T,DESCRIPTOR,olb::descriptors::FORCE> FORCE_field (sLattice);

    The body force outputted is 10, however the imposed body force is 10000. The output Darcy force is always zero. The external force “olb::descriptors::FORCE>” is also not matching.

    Regards,
    Junwei Guo

    #4648
    fk
    Participant

    We’re working on it. If you find anything, it would be very helpful if you could post it here.

    Thank you and best regards,
    Fabian

    #4684
    fk
    Participant

    Dear Junwei,

    I am sorry for the late response, but the error was very tricky to find. Fortunately the bug is very easy to fix.

    Please open the file “src/dynamics/guoZhaoDynamics.hh” and change in lines 67 and 116 from “this->_momenta.computeRhoU(cell, rho, u);” to “this->computeRhoU(cell, rho, u);“, i.e. remove “_momenta.”.

    Best regards,
    Fabian

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