Periodic Outlet Boundary Conditions ( nonequilibrium extrapolation method)
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Periodic Outlet Boundary Conditions ( nonequilibrium extrapolation method)
- This topic has 35 replies, 5 voices, and was last updated 1 year, 3 months ago by jan.
-
AuthorPosts
-
December 8, 2023 at 2:10 pm #8004RookieParticipant
Dear jan,
It is true that this 2 refers to the material, since I chose the channel flow, I assume that setting 1 or 2 will give the same value. There are also some problems in my compiled code. There is no movement of particles after they are generated at the entrance. I guess it may be caused by too many settings I changed at one time.I am using stokes drag and periodic boundaries first to verify that periodicity is correct.
Best regards,
RookieDecember 10, 2023 at 5:08 am #8006RookieParticipantDear jan,
I’m happy to report that I implemented periodic boundaries for the particles. But I’ve run into another problem which I guess could be the parallel setting. With the old particle system, if I set it to parallel, the fluid would simulate correctly, while the particles would not be generated correctly at the inlet, and in the picture is the difference between whether I use parallel or not. With parallel turned on the particles are only generated and moving in one of the blocks, even with new particle system the particles are only generated in the first block in the bottom right corner.
https://postimg.cc/gallery/vsjHcY9
I switch to the code below in parallel:
CXX := mpic++
PARALLEL_MODE := MPIBest regards,
RookieDecember 10, 2023 at 12:32 pm #8007RookieParticipantI know why this problem occurs, I have to load all the vtu files in this timestep one by one and can’t just load the folder, is there any other way to solve it.
December 11, 2023 at 11:29 am #8010janParticipantDear Rookie,
unfortunately, I’m not aware of what exactly you want to achieve and which functions you are currently using, but I’m glad to hear that you found a way to make it work. Though I don’t understand the issue with loading them separately as you could just use c++ features to iterate over all existing vtu files as mentioned here: https://stackoverflow.com/questions/612097/how-can-i-get-the-list-of-files-in-a-directory-using-c-or-c
Best regards,
JanDecember 11, 2023 at 1:30 pm #8015RookieParticipantDear jan,
Is the method you are talking about using c++ to read the files directly and post-processing, I have tried using Python to process the vtk files before. But I wanted to do more data processing then I chose Paraview to process the data. In parallel fluid is integrating vti file to vtm file and particle is integrating vtu file to pvd file, I was able to make it work after changing the filename issue in the pvd file based on the reported error. Thanks anyway for your continued help.
file=”data/particles_iT1467675iC00007.vtu”/> change into file=”particles_iT1467675iC00007.vtu”/>
Best regards,
RookieDecember 12, 2023 at 4:15 pm #8017janParticipantDear Rookie,
I may have misunderstood you, but I suggest that you still read the files “one by one”. However, you can use a simple loop in c++ to do this for you by getting a list of files with the c++ function mentioned above.
But I want to emphasize that this is just a guess that it will work in your case, because I don’t have enough knowledge about your problem/case.
For more in-depth discussions, you should consider attending the next occurrence of our annual [Spring School](https://www.openlb.net/spring-school-2024/).
Best regards,
Jan -
AuthorPosts
- You must be logged in to reply to this topic.