espressomd-users
[Top][All Lists]
Advanced

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

Re: [ESPResSo-users] Printing out velocity


From: Peter Kosovan
Subject: Re: [ESPResSo-users] Printing out velocity
Date: Thu, 11 Aug 2011 13:38:33 +0200 (CEST)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

Because "part $i print v" does not print the value to the screen, it only 
returns it (see sec. 4.1.2 of the manual). To get the returned value printed, you have to 
call something like

puts "velocity of particle $i: [part $i print v ]";

Apart from reading the manual, there is an additional easy way of finding answers to 
relatively simple questions: look at how things are done in the sample scripts which you 
find in the "samples" directory of the Espresso package. When I was starting to 
work with Espresso, I found it very useful to go throuhg all the sample scripts.

peter

--
Peter Košovan
Institute of Computational Physics
University of Stuttgart
Pfaffenwaldring 27
70569 Stuttgart
Germany

On Thu, 11 Aug 2011, Sreekumari  Aparna wrote:

Thank you Peter for explaining me, I have actually done the similar process, I 
am writing it here.

for {set i 0} { $i < $n_part } {incr i} {
   set posx [expr $box_l*[t_random]]
   set posy [expr $box_l*[t_random]]
   set posz [expr $box_l*[t_random]]

   part $i pos $posx $posy $posz type 0
   part 0 dip 1 0 0 dipm 1.0 type 0
}
for {set i 0} { $i < $n_part } {incr i} {
   part $i print v omega  ------------------------------------------------> I 
gave $i for getting all particles velocity. I tried it with one particle also. But 
I am not able to see the values it is outputting.
   }
From the manual i found that i can use variant(2) to get the properties of all 
the particles. I tried it with out specifying the pid, but from the error 
message i got that pid is essential. So only i thought to write the way i 
mentioned above.

Regards,
Aparna
________________________________________
From: Peter Kosovan address@hidden
Sent: Thursday, August 11, 2011 12:25 PM
To: Sreekumari  Aparna
Cc: address@hidden
Subject: Re: [ESPResSo-users] Printing out velocity

Hi Aparna

to print the particle velocities, use the part command. E.g. if you want to 
print velocity and angular velocity of particle 3, call

part 3 print v omega

Part command is abolutely essential and can do a lot of things, so I would 
recommend to read section 4 of the manual in detail.

You have to print v before you start the integration. Velocities are not 
initialized automatically but if you are using a thermostat, random forces and 
friction bring them to the correct distribution after a few integration steps.

peter

--
Peter Košovan
Institute of Computational Physics
University of Stuttgart
Pfaffenwaldring 27
70569 Stuttgart
Germany

On Thu, 11 Aug 2011, Sreekumari  Aparna wrote:

Hello all,

To do the dipole simulation, I have initialised coordinates and dipolemoment 
orientation of dipoles and set the temperature and thermostat. I did not 
initialise velocities by hand. But from the simulation results i found that its 
taking the correct velocities, I would like to print the initial linear and 
angular velocities. I have searched in User's guide, i don't know whether its 
due to my mistake, i could not find it. Can anybody help?

Regards,
Aparna

reply via email to

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