Bond in SPH simulation

Dear All,

I want to simulate a system using the SPH method. For that I define: atom_style sph. However, I also want to have bonds and angles between SPH particles, but the sph atom style doesn’t attribute bonds and angles. I have tried with: atom_style hybrid sph molecular, but lammps complaints that density of sph style cannot attribute to molecular style.

So, my question is what is the strategy, should I implement bonds and angles into the sph style? If yes, is it very difficult? Or you may suggest other approaches? Thank you very much.

The approach you describe should work. Perhaps you did not implement it correctly.

Thank you very much. Could you please give hints how to implement bonds and angles into the atom style sph?

This works just fine for me (and it should!). If it does not work for you, then there must be some error in your input somewhere else.

Thank you very much. Indeed, it works for me too, at least LAMMPS is happy with this atom_style hybrid sph molecular.

The simulation reads an input data file where I define bonds, angles, positions etc. The atoms are defined as usual:


1 1 1 16.75 0 0
4 1 4 17.25 0 0

The simulation runs OK with this input file if only atom_style molecular is used. However, if I use atom_style hybrid molecular sph, then I got an error:

reading atoms …
ERROR: Incorrect format in Atoms section of data file: 1 1 1 16.75 0 0 (src/atom.cpp:1069)

I am wondering what is wrong with the data file. Why it works with molecular style but not with hybrid. I had a look at line 1069 of atom.cpp, but don’t really understand.

Thank you very much in advance for your explanation.

Please read the documentation of the read_data command. The format and content of the Atoms section changes with the atom style. So for a hybrid atom style the more properties need to be stored with the atoms.