← Back to team overview

yade-dev team mailing list archive

Re: [Branch ~yade-pkg/yade/git-trunk] Rev 3804: new simple contact law with normal viscose damping which allows to specify kn and ks/kn in Ip2

 

On 28/01/14 14:10, Anton Gladky wrote:
> That is true. I actually moved an implementations into
> ViscoelasticCapillarPM [1], but parameters are still in the parent
> class. Any suggestions how to improve it are very welcome.

If I don't miss something, it could be just like CapillaryPhys, which
inherits from FrictPhys.
The "cappilar" version of the contact law would read

Law2_ScGeom_ViscElPhys_Capillar::go(...) {
    Law2_ScGeom_ViscElPhys_Basic::go(...);
   // add capillary forces here
   ...
}

If not possible (*), you can extract code blocks from
Law2_ScGeom_ViscElPhys_Basic::go and put them in separate functions that
can be called in child classes.

Law2_ScGeom_ViscElPhys_Capillar::go(...) {
    Law2_ScGeom_ViscElPhys_Basic::computeForceTorque(...,f);
   // add capillary forces here
   ...
}

(*) one problem I anticipate is that Law2_ScGeom_ViscElPhys_Basic::go()
could erase an interaction that is still alive wrt the capillary model.
Hence the split of go() in different functions.

Bruno


Follow ups

References