Average force magnitude increasing without integration

msbentley's picture
Submitted by msbentley on Thu, 10/27/2011 - 14:29

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's picture

ckloss | Fri, 10/28/2011 - 00:47

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

J_Wang | Thu, 01/10/2013 - 02:51

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's picture

ckloss | Thu, 01/10/2013 - 11:08

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

That's a quite good way. I forgot the varaible atom function. Thank you!

Jipeng