How implement a new contact model ?

JF's picture
Submitted by JF on Thu, 11/11/2010 - 17:14

Hi Christoph,

I am developing a new contact model. In my case as you suggested, I took the pair_gran_hooke_history like base.

For the first step, I only replaced the name of class PairGranHistory by PairLatticeHistory.

I have two files pair_lattice_history.cpp and pair_lattice_history.h. In the file .h, I change:

#ifdef PAIR_CLASS
PairStyle(lattice/history,PairLatticeHistory)
#else
#ifndef LMP_PAIR_LATTICE_HISTORY_H
#define LMP_PAIR_LATTICE_HISTORY_H

Thus into my simulation file, I can use this key word: pair_style lattice/history 1 0

I also modified the file style_pair.h.

Do I need to modify other files ? for example fix_wall_gran_hooke_history files, or ....

Regards
JF

ckloss's picture

ckloss | Fri, 11/12/2010 - 08:52

Hi JF,

what you did is right

>>I also modified the file style_pair.h.
There is no need for that...

>>Do I need to modify other files ? for example fix_wall_gran_hooke_history files
For your model I think no - for the lattice beam model, I guess you will impose BCs in another way...
Anyway, at some point, fix_wall_gran will be outdated since in the future, the plan is to represent walls as (triangular) particles

One thing that you may need is additional material params input by the user? If so, take a look at fix_heat_gran in order to know how to enforce it.

Cheers,
Christoph