Problem in example code porousPoiseuille2d
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Problem in example code porousPoiseuille2d
 This topic has 6 replies, 3 voices, and was last updated 3 years, 6 months ago by fk.

AuthorPosts

September 23, 2019 at 1:05 am #4549Junwei GuoParticipant
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: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 GuoSeptember 23, 2019 at 9:15 am #4552mathiasKeymasterDear 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
MathiasSeptember 23, 2019 at 9:48 pm #4568Junwei GuoParticipantDear 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.
Regards,
Junwei GuoSeptember 24, 2019 at 9:12 am #4570mathiasKeymasterThe 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
MathiasSeptember 30, 2019 at 3:27 am #4573Junwei GuoParticipantDear 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 GuoOctober 24, 2019 at 5:20 pm #4648fkParticipantWe’re working on it. If you find anything, it would be very helpful if you could post it here.
Thank you and best regards,
FabianDecember 4, 2019 at 9:33 pm #4684fkParticipantDear 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 
AuthorPosts
 You must be logged in to reply to this topic.