  We present an implementation of realistic static friction in molecular
dynamics (MD) simulations of granular particles. In our model, to break
contacts between two particles, one has to apply a finite amount of force,
determined by the Coulomb criterion. Using a two dimensional model, we show
that piles generated by avalanches have a {\it finite} angle of repose
$\theta_R$ (finite slopes). Furthermore, these piles are stable under tilting
by an angle smaller than a non-zero tilting angle $\theta_T$, showing that
$\theta_R$ is different from the angle of marginal stability $\theta_{MS}$,
which is the maximum angle of stable piles. These measured angles are compared
to a theoretical approximation. We also measure $\theta_{MS}$ by continuously
adding particles on the top of a stable pile.
