How do I handle elastic contacts in a simulation with friction I'm trying to simulate a wheel as it hits the ground.
Problem 1
Suppose a disc is dropped from a height. It has initial velocity of $-x,-y$ caused by throwing and gravity. It has no initial angular velocity. When it hits the ground it should have some rotation resulting from the collision.


*

*How to calculate force that caused torque for that rotation?


Problem 2
The same disc is dropped from height. It doesn't have velocity on the side direction. It already spinning fast. When it hits the ground the spinning should cause some translation.


*

*How to calculate force that caused this linear acceleration?

*Some rotation must be lost in the collision, how to calculate that?


To simplify assume static $friction = 1$ and $g = -10$.
 A: First consider a rough surface (infinite friction). At the moment of impact there is a momentum transfer from the ground to the disk. This is called impulse and it is a vector passing through the contact point. With a rough surface the impulse in the horizontal direction (along the contact) is independent of the impulse in the vertical direction (contact normal). 
The effect of the two impulses $J_x$ and $J_y$ have on the motion of the disk can be analyzed using the 2D inertia matrix at the contact point A.
$$\begin{pmatrix}J_x \\J_y \\0\end{pmatrix} = \begin{vmatrix} m & 0 & -m R \\ 0 & m & 0 \\ -m R & 0 & I+m R^2 \end{vmatrix} \begin{pmatrix} \Delta \dot{x}_A \\ \Delta \dot{y}_A \\ \Delta \omega \end{pmatrix} $$
NOTE: This is a direct consequence of the equations of motion at the center of mass, expressed in terms of the linear motion (change) at A $(\Delta \dot{x}_A,  \Delta \dot{y}_A)$ and the angular velocity (change) $\Delta \omega$. 
From the above we get the impulse required for a specific change in linear velocity (as well as the change in angular velocity).
$$ \begin{align} J_x & = \left( \frac{1}{m} + \frac{R^2}{I} \right)^{-1} \Delta \dot{x}_A
\\ J_y & = \left( m \right) \Delta \dot{y}_A \\
\Delta \omega &= \frac{R}{I} J_x \end{align} $$
The elastic collision law states that the change in motion is such that the final velocity at the contact is a fraction $\epsilon$ of the initial velocity, but in the opposite direction. For the impact with an immovable floor this is
$$ \begin{pmatrix}  \dot{x}_A \\ \dot{y}_A \end{pmatrix} + \begin{pmatrix} \Delta \dot{x}_A \\ \Delta \dot{y}_A  \end{pmatrix} = -\epsilon \begin{pmatrix}  \dot{x}_A \\ \dot{y}_A  \end{pmatrix} $$ 
So the change in linear velocity is given by
$$  \begin{pmatrix} \Delta \dot{x}_A \\ \Delta \dot{y}_A  \end{pmatrix} = -(1+\epsilon) \begin{pmatrix}  \dot{x}_A \\ \dot{y}_A  \end{pmatrix} $$ 
and the change in angular velocity
$$\begin{align} 
  \Delta \omega &= \frac{R}{I} \left( \frac{1}{m} + \frac{R^2}{I} \right) \Delta \dot{x}_A \\ 
  & = -(1+\epsilon) \frac{R}{I} \left( \frac{1}{m} + \frac{R^2}{I} \right) \dot{x}_A\\ 
  & = -(1+\epsilon) \frac{R}{I} \left( \frac{1}{m} + \frac{R^2}{I} \right) \left(\dot{x}+R \omega \right) \end{align}  $$
where $\dot{x}$ and $\omega$ are the initial horizontal and rotation velocity of the center of mass.
The final velocities at the center are found by transforming the (change) motion from the contact point to the center of mass
$$\begin{align} 
  \dot{x}^\star &= \dot{x} + (\Delta \dot{x}_A-R \Delta \omega) \\
  \dot{y}^\star &= \dot{y} + (\Delta \dot{y}_A) \\
  \omega^\star & = \omega + \Delta \omega
\end{align}$$
After some simplifications I get
$$\begin{align} 
  \dot{x}^\star &= - \frac{(1+\epsilon)I R \omega + (\epsilon I-m R^2) \dot{x}}{I+m R^2}\\
  \dot{y}^\star &= -\epsilon \dot{y}\\
  \omega^\star & = \omega - \frac{(1+\epsilon)m R (\dot{x}+R \omega)}{I+m R^2}
\end{align}$$
Impulses are back calculated as $$\begin{align} J_x &= -(1+\epsilon) \left( \frac{1}{m} + \frac{R^2}{I} \right)^{-1} (\dot{x}+R \omega) \\ J_y &=-(1+\epsilon) m \dot{y} \end{align}$$
NOTE: $\left( \frac{1}{m} + \frac{R^2}{I} \right)^{-1}$ is the effective mass in the horizontal direction at the contact point. 

Finally, to handle finite friction you must limit $|J_x| \leq \mu | J_y |$ but retaining the direction (sign) it would have with infinite friction. Since $J_x$ is specified the change in horizontal and rotational motion is going to be different also accordingly.
