ERROR : when using the read_restart command in a code with bonds

Submitted by jonathancuba on Sat, 06/08/2019 - 05:47

Hello :
I have a problem, the write_restar and read_restar command worked correctly (to restart the simulation from file.restart), for simulations without bonds, but in my code that has bonds (bond style gran), it does not allow me to read the file with the "read_restart file.restart" command, sends me error: segment violation.
Can you help me solve this problem please?

it is necessary to eliminate the create_atoms, and lattice in this code?

thanks.
I attach my code

AttachmentSize
Plain text icon second.txt3.23 KB

tjleps | Mon, 06/10/2019 - 22:51

I often had trouble using restart files with bonds, so I resorted to doing read data and write data. I do have to modify the data files slightly though. It fails to output the bond coefficients, and adds a couple of extra zeros to the end of the grain data. The extra zeros are easily fixed with a 'sed' command. Bond coefficients can be copied from your script and pasted into the relevant section at the beginning of the file.

If you define the density instead of the mass of the particles you also need to enter a mass into the data file.

jonathancuba | Tue, 06/11/2019 - 03:47

the program worked well for me in the following order:

atom_style hybrid granular bond/gran n_bondtypes 1 bonds_per_atom 6
atom_modify map array
boundary f f f
newton off
communicate single vel yes
units si
region reg block -13. 10. -15. 15. -20.0 16.5 units box
#create_box 2 reg
bond_style gran #must go in this order, the region command must be left as a comment
read_restart carga.restart
neighbor 0.06 bin
neigh_modify delay 0