Dumping per-contact parameters

Submitted by scottwmccoy on Thu, 04/19/2012 - 03:20

Has anyone developed a simple way to dump per-contact parameters such as maximum normal force per contact? For example, I would like a file that stored time of contact, location of contact, and max normal force.

I had this implemented in an old version of LAMMPS by creating a new pair style pair_gran__hertz_history_stats and by expanding LSHEAR and shearpartner in fix_shear_history.cpp, but these changes generated some interesting segmentation faults.

cheers,
Scott

ckloss's picture

ckloss | Thu, 04/19/2012 - 14:13

>>Has anyone developed a simple way to dump per-contact parameters
yes, see compute pair/gran/local

I am sure you can extend it to dump the things you are interested in

Cheers, Christoph

ckloss's picture

ckloss | Thu, 04/19/2012 - 14:32

>>and by expanding LSHEAR and shearpartner in fix_shear_history.cpp
ps: I have resolved that, have a look at fix_contact_history.cpp

Cheers, Christoph

scottwmccoy | Thu, 04/19/2012 - 21:46

Thanks Christoph! I see how to add a new function to pair/gran/local to calc the contact normal forces at the instant the compute is called, but it is not clear how to find the max normal force over the duration of that contact using a call to a fix or dump (short of dumping every time step). I am having a similar issue calculating contact duration.

How I did this before seems like the easiest solution (i.e. expand shear in PairGranHookeHistory to allow other histories to be tracked like time of contact, max force, or energy dissipated). With your new fix_contact_history it seem that if I change dnum in PairGranHookeHistory::PairGranHookeHistory(LAMMPS *lmp) : PairGran(lmp) to dnum=6 and then add names and newtonflags for each history value in PairGranHookeHistory::history_args(char** args) I should be good to go. Does this hack sound like a bad idea (i.e. have I overlooked a simple solution?)

Thanks!