espressomd-devel
[Top][All Lists]
Advanced

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

Re: [ESPResSo-devel] Particle Masses definition


From: Ulf Schiller
Subject: Re: [ESPResSo-devel] Particle Masses definition
Date: Tue, 23 Jun 2015 10:05:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 23/06/15 09:56, Evyatar Arad wrote:
> Thank you Ulf, Joost. That explains it.
> 
> Another thing i’ve been wondering about.
> I’ve added two new particle properties to the code (in particle_data.pp), 
> both are constant throughout the simulation.
> Under void init_particle(Particle *part), i’ve tried assigning values to the 
> two (both are dependant on langevin_gamma, PMASS and time_step) but it seems 
> the real langevin_gamma are still at 0.0 rather then the 1.0 they later 
> posses (while in the integration loop, for example).
> In short, my question is where do you think is the right place to assign real 
> values to the two, given their other variable dependencies?

You may have to define callback functions to recalculate the
coefficients whenever langevin_gamma, particle mass or time_step are
changed on the script level. As a start it may be easier to define those
coefficients locally in the functions where you need them, similar to
langevin_pref in thermostat.hpp.

As a side remark, the velocities in ESPResSo are scaled internally, so
you want to make sure that your coefficients take that into account if
needed.

Cheers,
Ulf

>> On Jun 22, 2015, at 3:11 PM, Ulf Schiller <address@hidden> wrote:
>>
>> On 22/06/15 12:34, Evyatar Arad wrote:
>>> Good week all,
>>>
>>> I’ve noticed that in friction_thermo_langevin there are two different 
>>> masses used in the langevin equation while calculating force:
>>>      p->f.f[j] = langevin_pref1*p->m.v[j]*PMASS(*p) + 
>>> langevin_pref2*gaussian_random()*massf;
>>>
>>> What is the difference between PMASS(*p) and massf?
>>> both are available even though MASS (mass per particle) is off.
>>
>> The variable `massf` is defined a few lines up in the code
>>
>>  double massf = sqrt(PMASS(*p));
>>
>> Note that the mass only enters this equation when the parameter gamma is
>> not a proper friction coefficient but a relaxation time. See also
>> https://savannah.nongnu.org/bugs/index.php?45349
>>
>> Cheers,
>> Ulf
>>
>> -- 
>> Dr Ulf D Schiller
>> Centre for Computational Science
>> University College London
>> 20 Gordon Street
>> London WC1H 0AJ
>> United Kingdom
>>
>>
> 


-- 
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



reply via email to

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