Implementation of the Van Der Waals force model on LIGGGHTS

Submitted by Huihuang Xia on Thu, 03/28/2019 - 17:21

Dear all,

I just implemented the Van Der Waals force model proposed in this paper 'Yang, R., et al. (2000). Physical review E 62(3): 3900., Equ.8'. What I did is as following:

1. Implemented this model as one of the cohesion models of LIGGGHTS.
2. Registered some parameters used in the model in 'global_properties.h' and 'global_properties.cpp'.

Finally, I recompiled this model in LIGGGHTS successfully using 'make clean-auto and make -j32 auto'. However, when I tried to preform some DEM simulations using this newly implemented model, I got this error:

ERROR on proc 0: unknown contact model (/build/liggghts-QCz4in/liggghts-3.3.1+repack1/src/pair_gran_proxy.cpp:73)

Could you please tell me how to fix this problem?

Thank you in advance.

With kind regards,
Huihuang Xia

Bias's picture

Bias | Fri, 03/29/2019 - 09:05

Hi,
It sounds like the compilation didn't find the new cohesion model. Just to check: did you create a new file with the cohesion model that is in LIGGGHTS/src?
For example "cohesion_model_newmod.h"?

What is "make clean-auto"? This is probably the problem. Does it work if you only run that command? I usually run
make clean-all;
make auto -j;

Just a tip also if you find yourself running make clean-all a lot when adding new files you could try installing ccache it considerably speeds up the recompilation from "make clean-all"
https://askubuntu.com/questions/470545/how-do-i-set-up-ccache

lakshmiIC35134 | Sun, 01/16/2022 - 10:11

Hi. I tried running "make clean-all" and I get this:
rm -rf Obj_* *.a *.so MAKE/Makefile.auto.options* lmp_*
Is it right? I dont know if it is, and what to do further. Kindly let me know.

mschramm | Mon, 01/17/2022 - 17:29

The command "make clean-all"
simply cleans (deletes) all build and compiled files.
rm -rf -> remove recursively and forcibly
Obj_* -> is a folder structure that holds all dependency and complied files.
*.a -> refers to static libraries (I don't think this is used anymore and is simple left over...)
*.so -> refers to shared libraries
MAKE/Makefile.auto.options* -> Custom options saved from the "make auto" command that need to be deleted before a new compilation.
lmp_* -> the executable that is created.

After running this command, you are now able to cleanly build liggghts again -> "make auto".

lakshmiIC35134 | Tue, 01/18/2022 - 15:07

Thank you for the detailed explanation.

Huihuang Xia | Mon, 04/01/2019 - 08:48

Hello,

Many thanks for your very kind reply and help, I just fixed this problem. As I installed both stable and development version of LIGGGHTS on my computer, I always call the stable verion after recompiling every time. This is the reason why I always got an error, and the new model works well in the development version now.

Regards,
Huihuang Xia

jagan1mohan | Thu, 05/28/2020 - 20:45

Hello Xia, Greetings. Could you point me to any resources on modifying the source code and add van der Waals force to LIGGGHTS? I'm looking to add the same force to my build. Please let me know your email address. My contact is jugsandmugs@gmail.com. Looking forward to a positive reply from you.

Thank you,
Jagan Mohan.

laptmu | Tue, 06/16/2020 - 19:17

Could you share your model or resources to modify the source code and add van der Waals force to LIGGGHTS.
Thank your very much in advance.
My contact is lapnv81@wru.vn. Looking forward to a positive reply from you.