# yade-users team mailing list archive

## Re: ball - wall collision

```Thanks for your answer. Is the component of the velocity in direction normal to the wall inverted as well in this procedure or not?
-Ahmed

----- Original Message ----
From: Janek Kozicki <cosurgi@xxxxxxxxx>
Sent: Tuesday, November 14, 2006 12:35:04 PM
Subject: Re: [Yade-users] ball - wall collision

Ahmed ELMEKATI said:     (by the date of Tue, 14 Nov 2006 08:29:02 -0800 (PST))

> Do you have a refrence that explains the mechanics of collision between a ball and a wall including how to evaluate and apply forces resulting from this collision?

I still have difficulties in understanding your question. I will try
to answer as best as I can.

Collision between ball and a wall is calculated as between two balls,
assuming the wall as being a "mirror" sphere with double radius of
the bouncing ball. This allows to keep track of shearing force. The
mirror's surface is the box's surface.

This is written in file
InteractingBox2InteractingSphere4SpheresContactGeometry.cpp

The formulas that calculate the force of contact are implemented
inside ElasticContactLaw.cpp, those formulas are the same as used in
SDEC program.

The derivation of those formulas comes from Frederic Donze, I think I
should be able to find it somewhere if you need it. This is a
document in french language. Currently we don't have a better
documentation, I'm sorry about that :/

Finally the force is applied by NewtonsForceLaw.cpp and
NewtonsMomentumLaw.cpp, then the position is integrated in time using
a leap frog integration method: LeapFrogPositionIntegrator.cpp and
LeapFrogOrientationIntegrator.cpp. Runge Kutta integration will be
implemented too.

All that can be found inside function

void SDECSpheresPlane::createActors(shared_ptr<MetaBody>& rootBody);

in file SDECSpheresPlane.cpp

To find all those files in this big directory tree hierarhy you can
use command find :)

find -iname "*Spheres*"

--
# Janek Kozicki
_______________________________________________
```_______________________________________________