Text this: A generalized three invariants cap model and its numerical implementation to study soil-foundation interaction