A computer-implemented method for analyzing wellbore stress, stability, strengthening and mud loss, the method comprising: receiving a plurality of input parameters, each input parameter relating to a wellbore, a formation in which the wellbore is drilled, or a drilling operation used to drill the wellbore with a drilling system; generating a geomechanical model that models the wellbore based on one or more of the received input parameters; performing an integrated mode analysis before a start of drilling or in real-time while drilling is being done of the wellbore in the formation, the integrated mode comprising: performing a stress analysis and a stability analysis for the wellbore based on one or more of the received input parameters, by determining a stress tensor around the wellbore, based on a transient thermo-poro-elastic model, to produce one or more stress and stability analysis output parameters comprising a safe mud weight window, identifying one or more troublesome zones in the wellbore wherein the safe mud weight window is narrow such that, absent a strengthening operation, fractures are likely to occur; and predicting a fracture length; performing a strengthening analysis for the wellbore based on one or more of the received input parameters, and one or more of the stress and stability analysis output parameters to produce one or more strengthening analysis output parameters comprising a fracture width distribution; and performing a mud loss analysis for the wellbore to predict mud loss based on one or more of the received input parameters, the predicted fracture length of the stress and stability analysis output parameters and the fracture width distribution of the strengthening analysis output parameters to produce one or more mud loss analysis output parameters. receiving a plurality of input parameters, each input parameter relating to a wellbore, a formation in which the wellbore is drilled, or a drilling operation used to drill the wellbore with a drilling system; generating a geomechanical model that models the wellbore based on one or more of the received input parameters; performing an integrated mode analysis before a start of drilling or in real-time while drilling is being done of the wellbore in the formation, the integrated mode comprising: performing a stress analysis and a stability analysis for the wellbore based on one or more of the received input parameters, by determining a stress tensor around the wellbore, based on a transient thermo-poro-elastic model, to produce one or more stress and stability analysis output parameters comprising a safe mud weight window, identifying one or more troublesome zones in the wellbore wherein the safe mud weight window is narrow such that, absent a strengthening operation, fractures are likely to occur; and predicting a fracture length; performing a strengthening analysis for the wellbore based on one or more of the received input parameters, and one or more of the stress and stability analysis output parameters to produce one or more strengthening analysis output parameters comprising a fracture width distribution; and performing a mud loss analysis for the wellbore to predict mud loss based on one or more of the received input parameters, the predicted fracture length of the stress and stability analysis output parameters and the fracture width distribution of the strengthening analysis output parameters to produce one or more mud loss analysis output parameters.