Properties of particles bonding

Submitted by NTT1508 on Mon, 12/01/2014 - 04:54

Hi all,

I am simulating a group of particle bonding together ( like a string). I divide a string (or fibre) into a number of balls. By this way, I need to define the bonding peroperties (kn; ks) among these balls so that they can be created and also be broken. I got a nice suggestion from Christian (Richti) in terms of granular bond package. Could anyone share with me more information about this package? how can I get and install it? Does it work on public version of LIGGGHTS? DEM simulation would be strongly limited without bonding.

Thanks,

richti83's picture

richti83 | Wed, 05/27/2015 - 12:10


Well, I have checked bond force output by compute property/local and dump/local. They are all right. And plug-in bondreader to visualize bond on Paraview works well. But I think it cannt represent the magnitude of bond force

Why not (note: the mag field is auto-calculated by PV, it is not in the reader itself)

Only strange point is a significant conflict of velocity. Velocity calculated by (Position variation)/timestep is much different from the velocities obtained by Fix/print or Dump. Difference of 1 half verlet step should not result in much variation. But Bond_force is quite close to my analytical calculation.

Did you take the dump rate into account ? How much is the difference ?

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

NTT1508 | Thu, 05/28/2015 - 11:13

Hi Christian,

Yes, the dump/local extracts the bond forces (bforcex, bforcey, bforcez) which should be represented on PV. But I cannt see any of them on PV except solid lines connecting single particles in bonds.
In addition, I tried a case with bond broken. But the bond visualized on PV not disappear while the screen states that bond has been broken.

Regarding velocity, I create 3 atoms bonded. The top one is fixed. The bottom one is moving downward (along Z axis) by Fix/Move/Linear with velocity 1E-5 m/s. Fix/print gives results as below:

Time Z3 Z2 Z1(fixed) VZ3 VZ2 VZ1(Fixed)
0.1 0.191999 0.1959994999 0.2 0.001653314 -3.22853550645284E-005 0
0.2 0.191998 0.1959989999 0.2 0.0033171505 3.92387768258838E-006 0
0.3 0.191997 0.1959985 0.2 0.0049815948 0.000017095 0
0.4 0.191996 0.195998 0.2 0.0066456612 -2.67748788983624E-005 0
0.5 0.191995 0.1959974999 0.2 0.0083093396 -1.44302017179808E-005 0

Here atoms just moving along Z axis, motion in other directions are neglected.

As can be seen, the velocities calculated by [(Z3_t2) - (Z3_t1)]/(t2-t1) of the bottom atom (Z3) are clearly matched input velocity (1e-5) m/s. However, VZ3 recorded is far different and increasing overtime. These velocities are the same as those obtained by dump/custom on Paraview.

This conflict makes me confused for a time. But bond_force is acceptable to my analytical cacluation with respect to the possition variation.

Thank for your interest,

Regards,

richti83's picture

richti83 | Thu, 05/28/2015 - 12:36

Did you download the latest pre-compiled bond reader for PV 4.3.1 ? (I only updated the latest & greatest).
Did you exchanged the reader in PV (even by replacing the file in Paraview-4.3.1/lib/ParaView-4.3.1/plugins or with the Plugin-Manager (first remove reader, close PV, restart PV, load the new library)
Have a look at this Pipeline I created with the new bond reader, it shows the bond-force over time in a f-over-t plot and colors the bonds by bondforce:
http://www.richtisoft.de/transfer/bond_reader_F_over_t.png
For reference here is the new reader outside github:
http://www.richtisoft.de/transfer/libliggghts_bondreader.so

Can you send me the case by eMail ? I'll have a look on the velocities, but I guess something is overriden by fix move/atom, that's why I invented the force-controller !

Cheers,
Christian.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

NTT1508 | Thu, 05/28/2015 - 14:25

Hi Christian,

Well, I see the problem that I used PV4.3.0. It should work with PV4.3.1. Your image looks great, with magnitude of bond_force shown. I will test it soon.

Yes I have tested your force_control but there is a problem. F=(mass)x(acceleration) and F is total force acting on particles including: gravity force, bond force and pull force if applied. Therefore, the force_control using F_pull=(mass)x(acceleration) is not correct. Last time I tried and though it is OK because I did a mistake when create_bond. In fact no bond was generated and the force_control worked fine. With bond_force acting on particle, F_pull=(mass)x(acceleration) not correct any more.

I will send my case to your email. Hope to get your advice on that.

Many thanks,

Regards,

bprasad | Sat, 12/17/2016 - 15:31

Hallo Christian,

i want to do a Nanoindentation simulation using LIGGGHTS. In order to do that i need a bond model, which is unfortunately not available on LIGGGHTS-PUBLIC version 3.5.0. Therefore i have installed LIGGGHTS-BOND and while installing this i have followed each step which u have advised to follow in this forum. Now i want to make LIGGGHTS-BOND executable by writing the command "make linux". While doing this i got many error, which i fixed by changing few things in my makefile. But now it shows the following error:

make[1]: Entering directory '/home/braj/LIGGGHTS-BONDS/src/Obj_linux'
gcc -O -fPIC -DLAMMPS_GZIP -DLAMMPS_JPEG -I../../lib/cuda -DLMP_USER_CUDA -DLMP_USER_OMP -I../../lib/awpmd/ivutils/include -I../../lib/awpmd/systems/interact -I../../lib/atc -I../../lib/reax -I../../lib/poems -I../../lib/meam -DMPICH_SKIP_MPICXX -I/usr/include/openmpi -DFFT_FFTW -I/usr/local/cuda/include -DUNIX -DFFT_CUFFT -DCUDA_PRECISION=1 -DCUDA_ARCH=20 -I/usr/local/lib/kim-api-v1/include -c neigh_gran_omp.cpp
neigh_gran_omp.cpp: In member function ‘void LAMMPS_NS::Neighbor::granular_nsq_no_newton_omp(LAMMPS_NS::NeighList*)’:
neigh_gran_omp.cpp:38:47: error: cannot convert ‘LAMMPS_NS::FixContactHistory*’ to ‘LAMMPS_NS::FixShearHistory* const’ in initialization
FixShearHistory * const fix_history = list->fix_history;
^
In file included from neigh_gran_omp.cpp:16:0:
neigh_list.h:55:9: note: class type ‘LAMMPS_NS::FixContactHistory’ is incomplete
class FixContactHistory *fix_history; // fix that stores history info
^
neigh_gran_omp.cpp: In member function ‘void LAMMPS_NS::Neighbor::granular_bin_no_newton_omp(LAMMPS_NS::NeighList*)’:
neigh_gran_omp.cpp:293:47: error: cannot convert ‘LAMMPS_NS::FixContactHistory*’ to ‘LAMMPS_NS::FixShearHistory* const’ in initialization
FixShearHistory * const fix_history = list->fix_history;
^
In file included from neigh_gran_omp.cpp:16:0:
neigh_list.h:55:9: note: class type ‘LAMMPS_NS::FixContactHistory’ is incomplete
class FixContactHistory *fix_history; // fix that stores history info
^
Makefile:102: recipe for target 'neigh_gran_omp.o' failed
make[1]: *** [neigh_gran_omp.o] Error 1
make[1]: Leaving directory '/home/braj/LIGGGHTS-BONDS/src/Obj_linux'
Makefile:68: recipe for target 'linux' failed
make: *** [linux] Error 2

As i do nt have much idea in C++, i am afraid to change anything it. If you can help me out with this i ll be really thankful to you.

Thanking you
Braj

richti83's picture

richti83 | Thu, 01/12/2017 - 12:40

From the line

gcc -O -fPIC -DLAMMPS_GZIP -DLAMMPS_JPEG -I../../lib/cuda -DLMP_USER_CUDA -DLMP_USER_OMP -I../../lib/awpmd/ivutils/include -I../../lib/awpmd/systems/interact -I../../lib/atc -I../../lib/reax -I../../lib/poems -I../../lib/meam -DMPICH_SKIP_MPICXX -I/usr/include/openmpi -DFFT_FFTW -I/usr/local/cuda/include -DUNIX -DFFT_CUFFT -DCUDA_PRECISION=1 -DCUDA_ARCH=20 -I/usr/local/lib/kim-api-v1/include -c

I guess you enabled ALL features (maybe make all-yes ?). I would advise you to clone a fresh src directory from my github fork and only doing "make fedora" DO NOT ENABLE any other features bc. they are not compatibel.
(pair style gran does not support cuda)

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

bprasad | Thu, 01/12/2017 - 15:08

Hallo Christian,

Thanks a lot. your advice had made my life easy :). Actually i compiled the LIGGGHTS by using the command make fedora and also make linux. Both worked good on my Ubuntu Linux-Distribution. According to your advice i have tried to install the Packages separately and not used make yes-all. Instead of that i have used make yes- molecule and make yes-mc (as i need these Packages for Bond -Model) and then compiled both separately by using the command make g++ and it worked.

Thanks a lot for your help.

Thanking You
Braj

bprasad | Thu, 01/12/2017 - 15:39

Hallo christain,

i have one more question. Actually i want to run the input file "in.template" to get a feel for Bond-Model. So i want to know which Package i need to activate in order to use the bond/gran atom_sytle for e.g. hybrid granular bond/gran n_bondtypes 1 bonds_per_atom 6.

And my second question is : I am trying to install the Granular package and in order to do this i m using the command "make yes-granular" but it shows that the Package granular does not exist. My current Package status in src file is following:

Installed NO: package ASPHERE
Installed NO: package CLASS2
Installed NO: package COLLOID
Installed NO: package DIPOLE
Installed NO: package FLD
Installed NO: package GPU
Package.sh: line 11: cd: GRANULAR: No such file or directory
Installed NO: package GRANULAR
Installed NO: package KIM
Installed NO: package KSPACE
Installed NO: package MANYBODY
Installed YES: package MC
Installed NO: package MEAM
Installed YES: package MOLECULE
Installed NO: package OPT
Installed NO: package PERI
Installed NO: package POEMS
Installed NO: package REAX
Installed NO: package REPLICA
Installed NO: package SHOCK
Installed NO: package SRD
Installed NO: package XTC

Installed NO: package USER-MISC
Installed NO: package USER-ATC
Installed NO: package USER-AWPMD
Installed NO: package USER-CG-CMM
Installed NO: package USER-CUDA
Installed NO: package USER-EFF
Installed NO: package USER-EWALDN
Installed NO: package USER-OMP
Installed NO: package USER-REAXC
Installed NO: package USER-SPH

Can you please help me out ??
(I have installed LIGGGHTS as you have suggested in the starting of the discussion in this Forum, i.e. git clone https://github.com/Polyun/LIGGGHTS-PUBLIC.git LIGGGHTS-BONDS)

Regards
Braj

richti83's picture

richti83 | Wed, 01/25/2017 - 09:57

Well the polyun fork is very old. I would suggest git clone https://github.com/richti83/LIGGGHTS-WITH-BONDS.git .
In all LIGGGHTS versions the granular package is enabled by default. In my fork additionally the molecule and bond package is allready enabled. (make yes-package only copies files from PACKAGE folder into src folder !) Just clone my fork, run make fedora and try one of the examples.
Note: don't miss to read the todos here: https://github.com/richti83/LIGGGHTS-WITH-BONDS/blob/master/src/bond_gra...

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

bprasad | Sun, 02/05/2017 - 12:48

Hallo Christain,

Thanks a lot for your help. I have installed LIGGGHTS-WITH-BONDS sucessfully and now the bond model works perfectly.

Your suggestion have made my life easy.

Thanks once again and wish u a lovely Sunday ahead :)

Regards
Braj

bprasad | Thu, 03/02/2017 - 11:37

Hallo Christain,,

i have one more very basic question. i was going through in.bond file and there i found a variable rb, which is equal to 0.8 times the radius of the particle. Is rb the radius of bond defined between two particles or i m understanding something wrong??

Regards
Braj

richti83's picture

richti83 | Mon, 03/06/2017 - 09:25

In my version (github/richti83) I changed the code in bond_gran.cpp to

rbmin=rb[type]*MIN(radius[i1],radius[i2]); //lamda * min(rA,rB) see P.Cundall, "A bondet particle model for rock"

where rb[type] is rb-parameter from input skript.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

mschramm | Mon, 03/06/2017 - 23:53

@richti83
First, I would like to thank you for the work you have done. You have made my work a-lot easier.

My question comes from getting the flex particle working on 3.6.0. I was able to get the code to compile, but I hit the fun new error of needing to use a seed value that is prime and greater than 10000(?). In the bond/create/gran command in the input file, I get the error that the seed(12345) is too small. I would like to know how the bond/create/gran command is structured as I would like to place the random seed number as an argument that would need to be inputted. From you example in beam.bonds
fix bondcr all bond/create/gran 1 1 1 0.51 1 6 #every itype jtype cutoff btype newperts
I would like this to be called as
fix bondcr all bond/create/gran 1 ${SEED} 1 1 0.51 1 6 #every seed itype jtype cutoff btype newperts

How would this be accomplished?

Would I need to go to fix_bond_create_gran and adjust as follows?
SEED = atoi(arg[4]);
iatomtype = atoi(arg[5]);
jatomtype = atoi(arg[6]);
double cutoff = atof(arg[7]);
btype = atoi(arg[8]);
newperts = atoi(arg[9]);

Is there anything else that would need to be changed?

I plan to start working on the dissipation variable as I will need this for my own research.

Thank you!

richti83's picture

richti83 | Tue, 03/07/2017 - 09:29

As far as I can see the seed is allready there:

} else if (strcmp(arg[iarg],"prob") == 0) {
if (iarg+3 > narg) error->all(FLERR,"Illegal fix bond/create command");
fraction = atof(arg[iarg+1]);
seed = atoi(arg[iarg+2]);

It should work like this:

fix bondcr all bond/create/gran 1 1 1 0.51 1 6 prob 1 15485863

(sets probebility to 100% and seed to large prime.)

Would you like to share your 3.6.0 codebase in a fork of my repository ?
https://help.github.com/articles/fork-a-repo/

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

mschramm | Tue, 03/07/2017 - 17:16

Adding that line to the fix worked.

However there was more work that was needed to get it to fully work (needed to play with compute and thermo files). I got everything working but the beam.bonds example is not working in the sense that the results are not what they should be.

The force is applied to the end atom, but this force does not communicate across to the bonded atom. The omega value does, but not force. I am currently downloading the old 3.3.0 version again and see if I can get that working before I go any further.

The script says that all bonds formed and no breakage occurred, but the other particles refuse to move. Any ideas?

As for the repo, I have to check with my professor and industry contact. I don't see why I can't publish an updated bond package but I should run it through them first.

richti83's picture

richti83 | Wed, 03/08/2017 - 12:18

I got everything working but the beam.bonds example is not working in the sense that the results are not what they should be.
As far as I remember the beam.bonds should bend in z-direction like in this video: https://www.youtube.com/watch?v=o3KRwzNKBmg
I played arround with NTT1508 to do some "pull" tests in x-direction which worked not as expected bc. of internal handling of setforce/velocity and fix freeze which overrules the integrator.
Keep in mind that the force in dump file is the sum of all forces, so it is expected to be 0 in some cases, use compute pair/gran and compute property/local to get pair and bond forces of every contact seperately.
Nice to see that there is more progess on this topic, I stopped developmet 2 years ago bc. we have no funding for it.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

mschramm | Wed, 03/08/2017 - 18:29

Hello,
I got the bond model working for 3.3. I needed to move the fix freeze command to just before the final run. I don't know how the freeze was being unfixed.

I do have some questions in the source code.

bondhistlist[n][0] = dissipate * bondhistlist[n][0] + dnforce[0];

I am assuming that bondhistlist is the forces due to bending and dnforce is the force added due to the particles being compressed/pulled.
Is this assumption correct?
Should contact be applied since liggghts would also add hertz/hooke interactions?

Thank you. I will now start working to get this ported to LIGGGHTS 3.6

Baric | Tue, 03/14/2017 - 12:57

Hi,
I have been using this bond model for a while now and I have spend much time on the code here as well. In general, the bondhistlist stores the values over time timesteps because it is not possible to calculate some of the forces without considering the previous timesteps. You can see that in the lines of the rotation, e.g.:
//rotate normal force
rot = bondhistlist[n][0]*delx + bondhistlist[n][1]*dely + bondhistlist[n][2]*delz;
rot *= rsqinv;
bondhistlist[n][0] = rot*delx;
bondhistlist[n][1] = rot*dely;
bondhistlist[n][2] = rot*delz;

This is where the calculated normal forces x,y,z are rotated to match the current local coordinate system of the particles. (Actually, here I am not 100% sure if I understood correctly)

Therefore, If I understand your question correctly, your assumption is not correct:

bondhistlist[n][0-2]: normal forces
bondhistlist[n][3-5]: tangential forces
bondhistlist[n][6-8]: normal torque
bondhistlist[n][9-11]: tangential torque

additional to this, dnforce/dtforce/dntorque/dttorque are the forces that are added in this timestep.
In the lines
f[i1][0] += (bondhistlist[n][0] + bondhistlist[n][3]);
and following the calculated forces are transferred to the particles.

I have been using this bond model in LIGGGHTS 3.5 without any changes in the source code. However, I have had some issues with many particles (200,000+), such as fragmentation faults. I have also found that sometimes particles are dislocated. All of the sudden they have a different location in the box (single core and parallel). Since I am also using multiprocessing for the high amount of particles, I cannot really use it with the issues I have. I have to add, that I am simulating nanoparticles and therefore I am using some custom contact model and a tabulated interaction potential. I have not investigated further if the issues result from the interaction with one/some of these models. However, Andrew has suggested to write a cohesion model for this. So I have been doing this and it does it's job except one issue, as I have posted here: http://cfdem.com/forums/index-handling-particle-bond-model-potyondy-cohe... . I could not fix it yet, even though I am pretty sure that it is something I have missed. If one of you can find it I am happy to provide this to the community, since it is super easy to maintain and implement using cohesion.

Cheerz
Valentin

NTT1508 | Tue, 03/14/2017 - 23:29

Hi mates,

See my recent work in which I modified the parallel bond model to capture non-linear behaviour of materials. The model was validated to laboratory tests on coconut fibre. Compared to several other non-linear models, this is simpler.

http://www.nrcresearchpress.com/doi/abs/10.1139/cgj-2016-0182#.WMhrqO2lilN

I agree with Baric regading bondhistlist; I have no idea for your large amount of particles. I hope Christian can help. He is really an expert.

Regards,

mschramm | Wed, 03/22/2017 - 19:24

Hello,
I have decided to stay on 3.3 for now while I iron out what I want for the dampening. I have currently turned off bond breaking while I confirm the dampening characteristics against beam theory. After this I would like to do a shear box with these fibers. I am currently trying to figure out how to insert these randomly.
Baric, you stated that you work with 200,000 particles, how are you inserting them and is it randomly? I would like to define these like a "multisphere" object and use the build in tools to do the insertion.

Any ideas are welcome. Thank you.

Baric | Wed, 03/22/2017 - 19:30

Hi mschramm,

I prepare porous particle structures using a different simulation program. I import this structure using read_data. Therefore, I have never used insertion by LIGGGHTS..

mschramm | Wed, 03/29/2017 - 20:59

Hello,

Progress has been made and I am happy with what I am getting so far.
https://www.youtube.com/watch?v=FmAm6QoXeB8

I have started to test with multiple cores and I am receiving segmentation fault errors
[mschramm-precision-tower-5810:01173] *** Process received signal ***
[mschramm-precision-tower-5810:01173] Signal: Segmentation fault (11)
[mschramm-precision-tower-5810:01173] Signal code: Address not mapped (1)
[mschramm-precision-tower-5810:01173] Failing at address: 0x371
[mschramm-precision-tower-5810:01173] [ 0] /lib64/libpthread.so.0[0x3dba40f7e0]
[mschramm-precision-tower-5810:01173] [ 1] bond_debug[0x607ec3]
[mschramm-precision-tower-5810:01173] [ 2] bond_debug[0xa5653b]
[mschramm-precision-tower-5810:01173] [ 3] bond_debug[0xb6bedc]
[mschramm-precision-tower-5810:01173] [ 4] bond_debug[0xb09012]
[mschramm-precision-tower-5810:01173] [ 5] bond_debug[0xa2a8b8]
[mschramm-precision-tower-5810:01173] [ 6] bond_debug[0xa281a9]
[mschramm-precision-tower-5810:01173] [ 7] bond_debug[0xa28ef5]
[mschramm-precision-tower-5810:01173] [ 8] bond_debug[0x40dc1e]
[mschramm-precision-tower-5810:01173] [ 9] /lib64/libc.so.6(__libc_start_main+0xfd)[0x3dba01ed1d]
[mschramm-precision-tower-5810:01173] [10] bond_debug[0x40eb59]
[mschramm-precision-tower-5810:01173] *** End of error message ***

These seem to happen randomly. I thought it was due to all particles leaving a specific core but that turned out to be wrong.
I tried running a simulation on 1, 2, and 5 cores and only the 2-core run failed. The simulation was a particle drop through a tube where cores were distributed throughout the length of the tube.
All processors initially started with particles.

mschramm | Fri, 03/31/2017 - 19:44

I went back to my cantaliever test and I am not happy with the results.

Without a bond dampening coefficient, I get a tip speed of ~5 m/s.
As I increase the coefficient, my tip speed also increases and I do not see any dampening.

I have implemented the dampening as described by Yu Guo in his paper.
Granular Shear Flows of Flexible Rod-like Particles
In this paper he describes the dampening as

df_n_bond = beta1*sqrt(2*Me*Kn)*vn
df_t_bond = beta2*sqrt(2*Me*Kt)*vt
dt_n_bond = beta3*sqrt(2*Js*Ktor)*wn
dt_t_bond = beta4*sqrt(2*Js*Kben)*wt

Where Ms is the equivalent mass -> (1/Me = 1/M1 + 1/M2)
Js is the mass moment of inertia using the equivalent mass
I do have a question on the equivalent equations. Why do we use them? If M1 = M2, then Me = 0.5*M1. Why do we not use the harmonic mean?

I kept the same convention as with the other forces (everything has a negative sign, I do not know why this is and if someone could explain this I would be very grateful).

At the end I add everything together as follows (dissipate is set to 1.0)
bondhistlist[n][ 0] = dissipate*bondhistlist[n][ 0] + dnforce[0] + force_damp_n[0];
bondhistlist[n][ 1] = dissipate*bondhistlist[n][ 1] + dnforce[1] + force_damp_n[1];
bondhistlist[n][ 2] = dissipate*bondhistlist[n][ 2] + dnforce[2] + force_damp_n[2];
bondhistlist[n][ 3] = dissipate*bondhistlist[n][ 3] + dtforce[0] + force_damp_t[0];
bondhistlist[n][ 4] = dissipate*bondhistlist[n][ 4] + dtforce[1] + force_damp_t[1];
bondhistlist[n][ 5] = dissipate*bondhistlist[n][ 5] + dtforce[2] + force_damp_t[2];
bondhistlist[n][ 6] = dissipate*bondhistlist[n][ 6] + dntorque[0] + torque_damp_n[0];
bondhistlist[n][ 7] = dissipate*bondhistlist[n][ 7] + dntorque[1] + torque_damp_n[1];
bondhistlist[n][ 8] = dissipate*bondhistlist[n][ 8] + dntorque[2] + torque_damp_n[2];
bondhistlist[n][ 9] = dissipate*bondhistlist[n][ 9] + dttorque[0] + torque_damp_t[0];
bondhistlist[n][10] = dissipate*bondhistlist[n][10] + dttorque[1] + torque_damp_t[1];
bondhistlist[n][11] = dissipate*bondhistlist[n][11] + dttorque[2] + torque_damp_t[2];

I would be happy to upload what I have for others to look at.
As for as changes that I have done. I added 4 more variables to the bond_coeff call
bond_coeff [type] [rb] [kn] [ks] [damp_fn] [damp_ft] [damp_mn] [damp_mt] (the same)

mschramm | Fri, 04/14/2017 - 00:12

Hello,
I am happy to state that a dampening model that is based on velocity is working and matches my lab experiments.
Below is a video showing "high" dampening and no dampening
https://www.youtube.com/watch?v=fvFRNommYQI

I am now working on making the code 3.6 compatible and would like to submit this to liggghts.
I do need some help understanding what the variable random does in the file fix_bond_create_gran.cpp.
Since liggghts now requires prime numbers larger than 10,000 when calling the random number generator, this has made things difficult.
The line reads
random = new RanMars(lmp,seed + me)
where seed currently equals 12345 and me is the current processor.
How important is is that each processor has its own unique random number?

Ermek Asylbekov | Mon, 11/27/2017 - 11:22

Hi all,
I'm struggling finding out the exact setup for the data file (in.file and data file below).
All I get is either:
ERROR on proc 0: Needed topology not in data file (../read_data.cpp:1468)
or
ERROR on proc 0: Unexpected end of data file (../read_data.cpp:1346)
The mentioned line in read_data.cpp only says that the line is empty. What is the expected end of the data file?
Has someone any experience with read_data using bonded particle model or read_data in general?

thxia

Ermek

My input code:

#-------------------------------------------------------------------------------#
# Globals #
#-------------------------------------------------------------------------------#
#------- Gravity -------#
# Magnitude
variable g equal 0.0 # in m/s²
# Vector
variable gx equal 0.0 # in -
variable gy equal 0.0 # in -
variable gz equal -1.0 # in -
#------- Materials -------#
# Particle type Fein
variable YFein equal 1.e9 # in Pa
variable pFein equal 0.3 # in -
variable rhoFein equal 3000 # in kg/m³
# Particle type Grob
variable YGrob equal 1.e9 # in Pa
variable pGrob equal 0.3 # in -
variable rhoGrob equal 3000 # in kg/m³
# Interactions
variable eFF equal 0.2 # coeff of restitution in -
variable eFG equal 0.2 # coeff of restitution in -
variable eGG equal 0.2 # coeff of restitution in -
variable muFF equal 0.2 # coeff of friction in -
variable muFG equal 0.2 # coeff of restitution in -
variable muGG equal 0.2 # coeff of restitution in -
#-------------------------------------------------------------------------------#
# Particles #
#-------------------------------------------------------------------------------#
#------- Fein -------#
variable rpFein equal 0.025 # radius in m
variable dFein equal 2*${rpFein} # particle diameter
variable rbFein equal ${dFein}+1e-10 # bond radius
#------- Grob -------#
variable rpGrob equal 0.05 # radius in m
variable dGrob equal 2*${rpGrob} # particle diameter
variable rbGrob equal ${dGrob}+1e-10 # bond radius
#------- Bond coefficients -------#
variable simplebreak equal 0
variable stressbreak equal 1
variable I equal 0.25*PI*${rbFein}*${rbFein}*${rbFein}*${rbFein}
variable A equal PI*${rbFein}*${rbFein}
variable kn equal ${YFein}/${dFein}
variable kt equal 12*$I*${YFein}/($A*${dFein}*${dFein}*${dFein})
variable YbFein equal ${YFein} # normal stiffness in Pa
variable GbFein equal ${YFein}/(2*(1+${pFein})) # shear stiffnes in Pa
variable sigma_n equal 1e10 # tensile strength in Pa / normal break criterion
variable sigma_t equal 1e10 # shear strength in Pa / tangential break criterion
#------- Initial velocity -------#
variable vxF equal 0.1 # in m/s
variable vyF equal 0.0 # in m/s
variable vzF equal 0.0 # in m/s
variable vxG equal -0.1 # in m/s
variable vyG equal 0.0 # in m/s
variable vzG equal 0.0 # in m/s
#-------------------------------------------------------------------------------#
# Geometry #
#-------------------------------------------------------------------------------#
variable xMin equal 0.0 # in m
variable xMax equal 0.5 # in m
variable yMin equal 0.0 # in m
variable yMax equal 0.3 # in m
variable zMin equal 0.0 # in m
variable zMax equal 0.3 # in m
#-------------------------------------------------------------------------------#
# Simulation #
#-------------------------------------------------------------------------------#
variable RayleighTime equal 0.001 # in s
variable endTime equal 0.01 # in s
variable nRunSteps equal ${endTime}/${RayleighTime}
variable thermoTime equal 1 # in s
variable dumpTime equal 0.005 # in s
variable thermoInterval equal ${thermoTime}/${RayleighTime} # steps
variable dumpInterval equal ${dumpTime}/${RayleighTime} # steps
variable CellSize equal 2*${rpFein}
##########################################################################################################
##########################################################################################################
#-------------------------------------------------------------------------------#
# Procedure #
#-------------------------------------------------------------------------------#
atom_style hybrid granular bond/gran n_bondtypes 1 bonds_per_atom 6
#atom_style granular
atom_modify map array
boundary f f f
newton off
#processors 1 1 1
communicate single vel yes
units si
#bond
bond_style gran
pair_style gran model hertz tangential history
read_data data/Particles.txt
#region reg block ${xMin} ${xMax} ${yMin} ${yMax} ${zMin} ${zMax} units box
create_box 2 reg
#New pair style
#pair_coeff * *
neighbor 0.01 bin#${CellSize} bin
neigh_modify delay 0 every 1 check yes page 500000 one 50000
variable simplebreak equal 0
variable stressbreak equal 1
#for stressbreak
#bond_coeff 1 1 ${YbFein} ${GbFein} ${stressbreak} ${sigma_n} ${sigma_t}
#added notes bond_type radius_multiplier normal_stiffness shear_stiffness tensile_strength shear_strength
# Bruchkraft Scherfestigkeit
# ==============================================================
# create particles
# ==============================================================
#lattice sc 0.005
#create_atoms 1 single 0.01 0.15 0.15
#create_atoms 2 single 0.49 0.15 0.15
#group grob1 type 2
#group grob2 type 3
group fein type 1
group grob type 2
#set group grob1 density 3 diameter ${rpGrob}
#set group grob2 density 3 diameter ${rpGrob}
#set group fein density ${rhoFein} diameter ${dFein}#${rpFein}
#set group grob density ${rhoGrob} diameter ${dGrob}#${rpFein}
#set group fein vx ${vxF} vy ${vyF} vz ${vzF} #fx 1 fy 2 fz 3
#set group grob vx ${vxG} vy ${vyG} vz ${vzG}
#Material properties required for new pair styles
fix m1 all property/global youngsModulus peratomtype ${YFein} ${YGrob}
fix m2 all property/global poissonsRatio peratomtype ${pFein} ${pGrob}
fix m3 all property/global coefficientRestitution peratomtypepair 2 ${eFF} ${eFG} ${eFG} ${eGG}
fix m4 all property/global coefficientFriction peratomtypepair 2 ${muFF} ${muFG} ${muFG} ${muGG}
mass * 1.0 #dummy
fix bondcr fein bond/create/gran 1 1 1 ${rbFein} 1 6
fix bondcrG grob bond/create/gran 1 2 2 ${rbGrob} 1 6
#fix ID group-ID bond/create/gran Nevery itype jtype Rmin bondtype Nbondsperatom
timestep ${RayleighTime}
fix gravi all gravity $g vector ${gx} ${gy} ${gz}
#fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
#fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.1
#fix top all mesh/surface file top.stl type 1 #move 0.05 0.05 0.2
#fix bottom all mesh/surface file bottom.stl type 1 #move 0.05 0.05 0.05
#fix walls all wall/gran model hertz tangential history mesh n_meshes 2 meshes top bottom
#region and insertion
group nve_group region reg
# cfd coupling
#fix cfd all couple/cfd couple_every 10000 mpi
#fix cfd2 all couple/cfd/force
#apply nve integration to all particles that are inserted as single particles
fix integr nve_group nve/sphere
#output settings, include total thermal energyg
compute 1 all erotate/sphere
variable etotal equal ke+c_1
thermo_style custom step atoms numbond
thermo ${thermoInterval}
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
#insert the first particles so that dump is not empty
#insert particles
shell mkdir post
#run 1
dump dmp all custom ${dumpInterval} post/dump*.liggghts id type x y z vx vy vz fx fy fz omegax omegay omegaz radius
#dump dumpstl all mesh/stl 100 post/dump*.stl
#dump_modify dmp precision 1000000
compute b1 all property/local batom1x batom1y batom1z batom2x batom2y batom2z batom1 batom2 btype
#dump bnd all local 10 post/bonds*.bond c_b1[1] c_b1[2] c_b1[3] c_b1[4] c_b1[5] c_b1[6] c_b1[7] c_b1[8] c_b1[9]
#dump_modify bnd precision 1000000
#run 1 #upto
#fix_modify bondcr every 0
#neigh_modify exclude group fein fein
#write_data data/data.*
run ${nRunSteps} upto

my data file:

2 atoms
1 atom types
1 bond types
0 bonds
6 bonds_per_atom


0.0 0.5 xlo xhi
0.0 0.3 ylo yhi
0.0 0.3 zlo zhi


Bond Coeffs
# Atom-type1 Atom-type2 Y G break model sigman sigmat
1 1 1e10 1e10 1 1e4 1e4

Atoms
# Atom-ID Atom-type x y z diameter density ?
1 1 0.1 0.1 0.1 1 1 0
2 1 0.2 0.2 0.2 2 1 0


Bonds


Velocities
# Atom-ID vx vy vz omegax omegay omegaz
1 0.1 0.0 0.0 0.0 0.0 0.0 0.0
2 0.1 0.0 0.0 0.0 0.0 0.0 0.0

mschramm | Mon, 11/27/2017 - 15:12

How many lines are between atoms the last line of atoms and Bonds?
Make sure that there is one line between each section and there are two lines between Bonds and Velocities.
If this is all correct, have you tried removing the Bonds Sections since there are no bonds?

Ermek Asylbekov | Wed, 11/29/2017 - 09:29

Hi mschramm,

thank you for your response.
I checked it again. There is only one line between each section. I also tried removing the Bonds Section. Still no progress.

Baric | Wed, 11/29/2017 - 12:00

Hi Ermek,

I have no idea what exactly is the problem. However, I have found a way to avoid your errors:

####################################
LIGGGHTS DATA FILE

2 atoms
1 atom types
1 bond types
0 bonds
6 extra bond per atom

0.0 0.5 xlo xhi
0.0 0.3 ylo yhi
0.0 0.3 zlo zhi

Bond Coeffs
# Atom-type1 Atom-type2 Y G break model sigman sigmat
1 1 1e10 1e10 1 1e4 1e4

Atoms
# Atom-ID Atom-type x y z diameter density ?
1 1 0.1 0.1 0.1 1 1 0
2 1 0.2 0.2 0.2 1 1 0

#######################################

The changes I have made is:
1. add two lines in the beginning. starting with LIGGGHTS DATA FILE. If I remove them, I get "Unexpected end of data file"
2. replace bonds_per_atom with "extra bond per atom" However, I am not sure if this does what you need. I do not know what bonds_per_atom does, but if expects you to define bonds, this may cause your error. If I do not exchange them I get "Needed topology not in data file". Therefore, bonds_per_atom might be reserved to the inputfile when you define the atom_style. I assume it does not make sense to define it twice, anyways.

There is a following error when I try to run your code, but thats not related to the data file.

Another remark: The atom property you have marked with "?" is the molecule-ID

Regards,
Valentin

Ermek Asylbekov | Thu, 11/30/2017 - 13:07

Hi Valentin,

thanks A LOT!!!! It finally works! I had some erros within the in.liggghts, but they were pretty obvious, so I fixed them.
The missing first line is probably the last thing I would have thought about. I guess a huge TO-DO of LIGGGHTS developement is to specify the error messages. I'll try to do that in my free time.
The "extra bond per atom" is afaik the amount of bonds each atom can create during the simulation. (e.g. If your atom had 3 bonds in the data file and extra bonds per atom = 3, then it can have up to 6 bonds).

Again thanks a lot.

Regards,
Ermek

Pages