# branch vector & contact normal

Hi all,

I want to get the macroscale stress for a local region. I use the equation in Catherine O’Sullivan's book (page 325, equation 9.38). this book is here:

https:/

In this equation, we need the branch vector, it said that the brach vector for contact c directed from particle a to particle b. we can get the branch vector in[1].

for branch vector: we can use p2-p1, we can also use p1-p2 (here p means the position vector of the particle),

Do you guys have any ideas about this? (i mean which one should I choose.)

In the excel I provided the results of the branch vector and the contact normal, I use the following code to get the branch vector as well we the contact normal.

#######

body_id1 = O.bodies[i.id1]

body_id2 = O.bodies[i.id2]

branch_

branch_

branch_

branch_

contact_

contact_

contact_

contact_

#######

it shows that the norm for the branch vector and the contact normal are not the same. but [2] says that the contact normal is: Unit vector oriented along the interaction, from particle #1, towards particle #2.

the results in the excel shows that the components for the branch vector and contact normal for each contact point has the same ratio,(no matter its a negative or positive value)

so, the definition of the contact normal is the contact point to the center of the particle (which particle?) or the contact normal is the vector connects the center of these two particles? if it is the vector connects two centers, why the branch vector is not the same as the contact normal?

I know it's easy to implement this equation using python(no matter using the branch vector or contact normal), I just want to know the difference of the branch vector and contact normal in YADE.

thanks

Yong

references:

[1]https:/

[2]https:/

## Question information

- Language:
- English Edit question

- Status:
- Answered

- For:
- Yade Edit question

- Assignee:
- No assignee Edit question

- Last query:
- 2020-05-01

- Last reply:
- 2020-05-02

Jan Stránský (honzik) said : | #1 |

Hi,

> why the branch vector is not the same as the contact normal?

> contact normal is: Unit vector

you answered yourself

i.geom.normal is normalized (unit) vector from the branch vector (for the case of sphere-sphere contact)

> i mean which one should I choose.

consistently with which one force you choose (applied on body1 or body2)

cheers

Jan

nobody (nobody01) said : | #2 |

Hi Jan,

sorry, I didn't fully understand your answer for the:

>consistently with which one force you choose (applied on body1 or body2)

could you explain more clearly?

thanks!

Yong

Jan Stránský (honzik) said : | #3 |

stress = ... f_i l_j

l ... branch

f ... force

Branch can be lAB (from particleA to particleB) or lBA (from particleB to particleA).

The same for force. It is internal force, and can be either fAB (force applied to particleB) or fBA (force applied to particleA).

It does not matter if you choose AB or BA (multiplication makes the result the same), but you have to be consistent (using the "same" for both branch and force).

This formula is usually denoted as Love-Weber stress tensor in Yade and is utilized in utils.bodyStres

cheers

Jan

### non-uniqueness of branch and internal force

O.bodies.

O.step()

i = O.interactions[0,1]

b1,b2 = [O.bodies[j] for j in (i.id1,i.id2)]

print("

print("

print("

print("

print("

print("

###

[1] https:/

[2] https:/

[3] https:/

[4] https:/

## Can you help with this problem?

Provide an answer of your own, or ask nobody for more information if necessary.