Overall energy model for preferred growth of TiN films during filtered arc deposition