A friction to flow constitutive law and its application to a 2‐D modeling of earthquakes