[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ESPResSo-users] Multi-realaxation time model
From: |
Ulf Schiller |
Subject: |
Re: [ESPResSo-users] Multi-realaxation time model |
Date: |
Tue, 8 Mar 2016 13:16:50 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
Hi Markus,
On 03/08/2016 01:02 PM, Wink, Markus wrote:
> Dear Espresso-users,
>
> I've just read part of the source code (mainly lb.cpp) and some questions
> arose (concerning the MRT algorithm) which probably one of you could answer.
>
> 1) In lb_reinit_parameters() "gamma_shear" and "gamma_bulk" are chosen as
> proposed by Duenweg, Schiller, Ladd, PRE 76(3):036704 (2007).
>
> - What values are chosen for gamma_odd and gamma_even (for the relaxation
> rates of the ghost modes). It is written that it is set to
> "lbpar.gamma_odd[0]" (line 1925). But what is the actual value (I cannot find
> it in the source code)
In bulk systems the relaxation values for the ghost modes can be set to
zero. This will typically give the best numerical stability. However, if
you have boundaries in the system, the ghost mode relaxation has to be
adjusted for second order accuracy. This is most easily achieved by
using a two relaxation time model (TRT). I think this is partially
implemented in ESPResSo, but I am not sure what the latest status is.
> 2) In lb_relax_modes() I was wondering about the following:
>
> - The density is set to "rho = mode[0] +
> lbpar.rho[0]*lbpar.agrid*lbpar.agrid*lbpar.agrid" (line 2346). Where does the
> second summand come from? I thought, that the density is just m[0] in MRT.
The populations are internally stored without the leading order term,
which reduces numerical round-off errors. That's why the average density
has to be added again to the zeroth mode. All other modes are orthogonal
to the density.
> - It is possible from line 2373-2391 to find out the used relaxation matrix.
> Is there any source where it is taken from (like the paper of Prof. Duenweg
> and Ulf for the shear and bulk viscosity)?
> - mode[0] until mode[3] are not relaxed due mass and momentum conservation,
> mode[4] is relaxed with the shear stress relaxation rate, mode[5]-mode[9]
> with the bulk stress relaxation rate. Is that correct?
Yes, that's right. In the TRT model all stresses would be relaxed at the
same rate.
> - Probably already answered by the question under 1, but in any case: What
> are the relaxation rates for the ghost modes (mode[10]-mode[18])? If it is
> zero: of course it would be the simplest choice. But doesn't one have to be
> careful with boundaries then? How is this taken into account?
I don't know if the interface to set the ghost relaxation values is
already released, but it is under development. In any case it should not
be too complicated to manually modify the desired values in the code.
Hope this helps. Best wishes,
Ulf
> -----Ursprüngliche Nachricht-----
> Von: Ulf Schiller [mailto:address@hidden
> Gesendet: Dienstag, 30. Juni 2015 11:17
> An: Wink, Markus; address@hidden
> Betreff: Re: AW: AW: [ESPResSo-users] Multi-realaxation time model
>
> On 30/06/15 10:10, Wink, Markus wrote:
>> Hello Ulf,
>>
>> perfect, that was exactly what I was looking for! Thanks a lot.
>>
>> One quick question. Does ESPResSo use the collide-stream or stream-collide
>> algorithm? In the source code it is written, that it uses stream-collide if
>> the macro "PULL" is defined, otherwise it uses the collide-stream.
>> Nevertheless, I cannot find, whether this macro is defined, neither in the
>> source code, nor in the configure- or in the Make-files.
>
> Collide-stream is the default, and I don't know if anyone has used PULL as of
> late, so try it at your own risk...
>
> Cheers,
> Ulf
>
>> -----Ursprüngliche Nachricht-----
>> Von: Ulf Schiller [mailto:address@hidden
>> Gesendet: Dienstag, 30. Juni 2015 10:23
>> An: Wink, Markus; address@hidden
>> Betreff: Re: AW: [ESPResSo-users] Multi-realaxation time model
>>
>> On 30/06/15 09:10, Wink, Markus wrote:
>>> Hello Ulf,
>>>
>>> thanks a lot.
>>>
>>> But I am still puzzled concerning the matrix. I thought that the collision
>>> operator Omega should look something like that in MRT:
>>> Omega = M^-1*S*(m_eq-m)
>>>
>>> whereas M transforms the distribution function f into momentum space: m =
>>> M*f.
>>> S is a diagonal matrix of the form = diag(s_0,s_1,....,s_18) consisting of
>>> the relaxation parameters. So basically in D3Q19 the matrix S should has 19
>>> parameters.
>>> I assume that, for instance, s_0 should be equal to 1 (incompressible limit
>>> of the LBM ???) and that some are equal.
>>>
>>> The question I have is: If there are four relaxation parameters in ESPResSo
>>> (`gamma_shear`, `gamma_bulk`, `gamma_odd`, `gamma_even`), how is the
>>> diagonal matrix S explicit built out of them?
>>
>> The application of the matrix S is performed in `lb_relax_modes(...)` where
>> you can read off how the relaxation parameters relate to the matrix. Due to
>> symmetries there are only four relaxation parameters, and often only
>> gamma_odd and gamma_even are used (TRT - two relaxation time model).
>>
>> Cheers,
>> Ulf
>>
>>> -----Ursprüngliche Nachricht-----
>>> Von:
>>> address@hidden
>>> [mailto:address@hidden
>>> org] Im Auftrag von Ulf Schiller
>>> Gesendet: Dienstag, 30. Juni 2015 09:23
>>> An: address@hidden
>>> Betreff: Re: [ESPResSo-users] Multi-realaxation time model
>>>
>>> On 30/06/15 08:16, Wink, Markus wrote:
>>>> Dear ESPResSo users and developers,
>>>>
>>>>
>>>>
>>>> I have a question concerning the MRT Lattice Boltzmann model used in
>>>> ESPResSo. In MRT the linearized collision operator is transformed to
>>>> momentum space via the collision matrix M. I have found the
>>>> collision matrix in the file lb-d3q19.hpp.
>>>>
>>>> But I didn't find the relaxation parameters.
>>>>
>>>>
>>>>
>>>> Shouldn't there be some kind of diagonal matrix S containing the
>>>> relaxation rates for the different moments?
>>>>
>>>> Does anybody know where I can find them or tell me which relaxation
>>>> rates ESPResSo is using for the MRT algorithm?
>>>
>>> The relaxation rates are `gamma_shear`, `gamma_bulk`, `gamma_odd`,
>>> `gamma_even` and are set in `lb_reinit_parameters()`.
>>>
>>> Cheers,
>>> Ulf
>>
>> --
>> Dr Ulf D Schiller
>> Centre for Computational Science
>> University College London
>> 20 Gordon Street
>> London WC1H 0AJ
>> United Kingdom
>>
>> Phone: +44 (0)20 7679 5300
>>
>
>
> --
> Dr Ulf D Schiller
> Centre for Computational Science
> University College London
> 20 Gordon Street
> London WC1H 0AJ
> United Kingdom
>
> Phone: +44 (0)20 7679 5300
>
--
Dr. Ulf D. Schiller
Assistant Professor
Department of Materials Science and Engineering
Clemson University
161 Sirrine Hall
Clemson, SC 29634
Office: 299c Sirrine Hall
Phone: 1-864-656-2669
Fax: 1-864-656-5973