espressomd-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo-devel] A bug in Espresso


From: Stefan Kesselheim
Subject: Re: [ESPResSo-devel] A bug in Espresso
Date: Tue, 03 Jul 2012 16:45:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0

Hi,

On 07/03/2012 04:29 PM, Ivan Cimrak wrote:
> Hello,
>
> I noticed some strange behaviour. I created an lbfluid, initiated it
> with some nonzero velocity and let it evolve (EXTERNAL_FORCES were
> switched off). I printed the velocity profile of the fluid
> throughout the simulation. Then I put a particle in the fluid and
> again printed the velocity of the fluid. I supposed, that the outcome
> should be different, since any particles influence the behaviour of
> the fluid. But the output was identical.


>
>
> Then I did the same with EXTERNAL_VELOCITY switched on and the
> outputs were different.


What is EXTERNAL_VELOCITY? I have never heard of that and the Espresso sources show no sign of it.

>
>
> I think that in file lb.c, in procedure lb_viscous_coupling, after
> local_f is increased by
>
> local_f[0] += delta[3*x+0]*delta[3*y+1]*delta[3*z+2]*delta_j[0];
> local_f[1] += delta[3*x+0]*delta[3*y+1]*delta[3*z+2]*delta_j[1];
> local_f[2] += delta[3*x+0]*delta[3*y+1]*delta[3*z+2]*delta_j[2];
>
> also the flag lbfields[node_index[(z*2+y)*2+x]].hasforce shold be set
> to 1. Otherwise, in procedure lb_collide_stream, the procedure
> lb_apply_forces is not called
>
> if (lbfields[index].has_force) lb_apply_forces(index, modes);
>
> When EXTERNAL_FORCES are switched on, this problem does not occur.


OK. I just realize that I never checked the LB without having EXTERNAL_FORCES switched on. Probably if it is deactivated the coupling just does not work, because the "has_force" flag is not set/read properly. I will fix that soon, but please switch on EXTERNAL_FORCES meanwhile. I tend to just remove the has_force flag, because the computational cost of calculating the influence of the force is not very large compared to the rest of the LB calculation.

That would also explain the behaviour you mentionend in the upper part of the mail.
Cheers
Stefan
>
>
>
> Thanks,
>
> Ivan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]