Hi all,
I have a simulation in which I calculate the average per particle force and use it to control the sim, i.e.
compute avg_f all reduce ave fx fy fz
variable mag_ave_f equal sqrt(c_avg_f[1]^2+c_avg_f[2]^2+c_avg_f[3]^2)
This works fine. At some point I "freeze" the particles (unfix the nve/sphere integration) and continue with a thermal-only sim using this static contact network. Thermo outputs including kinetic energy and the average coordination number (also calculated using a compute reduce) are constant, however my average force is increasingly slowly, but consistently.
Is this likely just a rounding error, or am I missing something fundamental here?
Thanks! Mark
ckloss | Fri, 10/28/2011 - 00:47
Hi Mark, the only reason I
Hi Mark,
the only reason I could guess for this is that you are probably using a style with shear history? Although your particles are stationary due to not being integrated, they still have non-zero velocity and the shear history is still being integrated by the pair style.
What you could try is zero all velocities with "set" at the point where you remove integration.
Cheers, Christoph
msbentley | Fri, 10/28/2011 - 09:55
I am indeed using a style with history
That sounds like the explanation! I'll zero out the velocities in my next run - many thanks!!
J_Wang | Thu, 01/10/2013 - 02:51
how to calculate the grain force magnitude and then average
Hi Mark,
I also need to calculate the average force magnitude but I think first take an average over the vector and then calculate the magnitude have some difference from calculate each grain's force magnitude first and then take average. Do you have any idea about how to do that?
Thanks
Jipeng
ckloss | Thu, 01/10/2013 - 11:08
you can use a per-particle
you can use a per-particle variable first to calculate the magnitude and then compute reduce to average it
Cheers,
Christoph
J_Wang | Thu, 01/10/2013 - 17:32
Thanks a lot
That's a quite good way. I forgot the varaible atom function. Thank you!
Jipeng