espressomd-users
[Top][All Lists]

## Re: [ESPResSo-users] LBM fluid velocity difference GPU/CPU

 From: Owen Hickey Subject: Re: [ESPResSo-users] LBM fluid velocity difference GPU/CPU Date: Mon, 1 Jul 2013 17:22:55 +0200

Hey Markus,

There appears to be a bug in both the cpu and gpu versions in this case. The following appears to fix the problem for the gpu though there is still some weirdness in the cpu version:https://github.com/ohickey/espresso/commit/cf28bc1b0ac21130d718c6807de6cbc713b74da8

While it appears to work in your script, I would be a bit weary of setting velocities inside the wall as in theory they should not escape the wall (or at least that's my understanding). For that reason I am somewhat surprised that the fluid moves at all in your script.

Owen

On Mon, Jul 1, 2013 at 4:23 PM, Markus Gusenbauer wrote:
Hi all,

I have a simple simulation with 1 particle in a channel and lbfluid. I put a certain velocity at one side of the channel. Resulting particle velocities differ a lot if I use GPU or CPU. In fact, 10 times the velocity of CPU fluid equals approximately the velocity of the GPU (I just compare particle position). I am using the latest master release from github.

Here is the example script:

setmd time_step 0.1
setmd skin 0.2
thermostat off

setmd box_l 40 40 100

lbfluid gpu grid 1 dens 1.0 visc 1.5 tau 0.1 friction 0.5

lbboundary wall normal 1 0 0 dist 0.5 type 501
lbboundary wall normal -1 0 0 dist -39.5 type 501
lbboundary wall normal 0 1 0 dist 0.5 type 501
lbboundary wall normal 0 -1 0 dist -39.5 type 501

part 0 pos 20 20 20 type 0 mol 0 mass 1.5

set i 0
while { \$i < 100 } {
puts "\$i / 100, particle position [part 0 print pos]\r"

for { set iii 0 } { \$iii < 40} { incr iii } {
for { set jjj 0 } { \$jjj < 40 } { incr jjj } {
for { set kkk 0 } { \$kkk < 1 } { incr kkk } {
lbnode \$iii \$jjj \$kkk set u 0.0 0.0 0.1
}
}
}

integrate 1
incr i
}

I am not sure if the factor 10 is important or just a lucky coincidence.

Markus