Geomechanics for well design and construction