Im currently trying to model a porous printing substrate (paper :)) and am haveing some issues with OpenLB. Im very new to OpenLB and LB in general, and as such have been learning from examples and papers.

I am trying to analyse a domain of 500?m x 500?m containing cylindrical obstacles of radius 12.5?m, due to these parameters the Reynolds number associated with the system (I am useing the packed beds formula for porous media, see Ergun Equation) tends to be less than 1. Using such a reynolds number produces simulations that look and behave in a strange way, where after a certain number of iterations, the values for energy and density begin to oscillate, then increase exponentially. Increasing the reynolds number to about 2-3, leaving the rest of the parameters the same, will produce results and behaviours for the system that I would expect to see. Also decreasing the lattice speed/time step allows the simulation to run for more iterations.

Attempts i have made to at least get reasonable results for more simple cases have included, varying the number of particulates, varying particulate size, playing with different collision steps. However my problem still remains, the only systems i can model with openLB as it stands are those that give a reynolds number of greater then 2-3.

A final point, i have increased the resolution of the lattice, which also allows the simulation to run for more iterations, however exactly the same type of behaviour is observed. Also increasing the resolution above 500 will produce a segmentation fault for me, with N= 501 giving the seg fault, and N=499 being able to run.

Any ideas? been struggling with this for some time…

what is the value of your LB relaxation time? And which boundary conditions do you use (obstacles, inlet, outlet)? What is a typical packing fraction of your system (volume of obstacles versus total volume)? What is the mean width of the small channels between two obstacles?
One thing I do not understand: You say that increasing Re increases the stability, while decreasing the speed also increases stability. But usually you increase Re by increasing the velocity. You have to write down more details and parameter values in order for us to understand your problem better.

by speed I was referring to lattice speed, The speed i have used for Re refers to the macroscopic speed i expect the fluid to be at when coming into contact with the porous medium. The configuration of obstacles is random by design, mean width is something i have not considered, I have seen various approaches to gaining values for Re, I thought id start with the most general. Cylinders were considered using a bounce back scheme, inlet and side walls are currently velocity boundaries, with outlet being a pressure boundary (as is with cylinder 2d). As for packing density this is variable.

Since making my original post this morning, i realised that i had not tried varying the lattice speed for the BGK dynamics collision step (i had been useing constantRhoBGKdynamics). With this in mind i believe i have been able to produces a reasonable model, flow about the cylinders seems reasonable, and i can vary the particulate density within an acceptable range. My lbunits looks like this:

LBunits converter(
(T) 256e-10, // uMax
(T) .019098, // Re
499, // N
1., // lx
1. // ly
);

The code is a modified version of cylinder2d at the moment, I still have the segfault at a resolution of greater then 500 however…

Thank you for responding so quickly, I wasn’t expecting to be able to find much assistance on this.

Maybe your relaxation time is too close to 1/2 (0.50201). You should try increasing the velocity definitely. Remember that you can not go above ~0.01 for the lattice units velocity. If it still unstable try to use the “bare” BGKdynamics to see if it is still unstable.

I cannot tell you what is going wrong, since I have never used cylinder2d and I have never simulated porous media flow.
But which value of relaxation parameter do you have? Isn’t the flow speed through your media a bit small? Usually, I work with values between 0.001 and 0.1 for maximum streaming velocity.

hey, your lattice velocity is really tiny. make it larger! you don’t need a small lattice velocity to get a small reynolds. and try different boundary conditions. start with a simulation which has only periodic or bounce-back boundaries. this is usually the most stable configuration.

hehe, yes my lattice speed is exceptionally small in that case, bearing in mind this is a model under construction and im trying to establish conditions for which it can be stable. However it should be noted that the simulation is very unstable at what i have seen to be “adequate” lattice speeds, with 0.001 never working no matter what I try.

Bare BGKdynamics and reduction of lattice speed is what got this model working. The seg fault still occurs at a resolution greater then 500, any ideas?