A method for hydraulic fracturing a subterranean formation traversed by a wellbore, comprising: characterizing the formation using measured properties of the formation, including mechanical properties of geological interfaces; identifying a formation fracture height wherein the identifying comprises calculating a contact of a hydraulic fracture surface with geological interfaces and a weak mechanical interface between similar or different lithological layers, a weak mechanical interface being a mechanical discontinuity that has low bonding strength with respect to a strength of a rock matrix; and fracturing the formation wherein a fluid viscosity or a fluid flow rate or both are selected using the calculating, characterized by using a hydraulic fracture simulator workflow from a beginning of a fracturing job t 0 up to an end T, wherein every subsequent time step a fracture propagation problem is solved conventionally, such as there is no interaction with interfaces in the rock, whereafter, provided that the hydraulic fracture has contacted or crossed the weak mechanical interface a fracturing fluid leakoff module is called to update the hydraulic fracture fluid volume, flowrate, and fluid pressure variations within the hydraulic fracture and the infiltrated weak mechanical interface, whereafter, if the hydraulic fracture tip reaches the weak mechanical interface, a module is assessing the potential fracture tip arrest or crossing of the weak mechanical interface at the given time step, wherein if the fracture tip is arrested, the fracture tip remains non-propagating for the next time step, wherein, otherwise, if the hydraulic fracture is crossing the weak mechanical interface or is not contacted, the hydraulic fracture increments its length and goes to the next time step. characterizing the formation using measured properties of the formation, including mechanical properties of geological interfaces; identifying a formation fracture height wherein the identifying comprises calculating a contact of a hydraulic fracture surface with geological interfaces and a weak mechanical interface between similar or different lithological layers, a weak mechanical interface being a mechanical discontinuity that has low bonding strength with respect to a strength of a rock matrix; and fracturing the formation wherein a fluid viscosity or a fluid flow rate or both are selected using the calculating, characterized by using a hydraulic fracture simulator workflow from a beginning of a fracturing job t 0 up to an end T, wherein every subsequent time step a fracture propagation problem is solved conventionally, such as there is no interaction with interfaces in the rock, whereafter, provided that the hydraulic fracture has contacted or crossed the weak mechanical interface a fracturing fluid leakoff module is called to update the hydraulic fracture fluid volume, flowrate, and fluid pressure variations within the hydraulic fracture and the infiltrated weak mechanical interface, whereafter, if the hydraulic fracture tip reaches the weak mechanical interface, a module is assessing the potential fracture tip arrest or crossing of the weak mechanical interface at the given time step, wherein if the fracture tip is arrested, the fracture tip remains non-propagating for the next time step, wherein, otherwise, if the hydraulic fracture is crossing the weak mechanical interface or is not contacted, the hydraulic fracture increments its length and goes to the next time step. using a hydraulic fracture simulator workflow from a beginning of a fracturing job t 0 up to an end T, wherein every subsequent time step a fracture propagation problem is solved conventionally, such as there is no interaction with interfaces in the rock, whereafter, provided that the hydraulic fracture has contacted or crossed the weak mechanical interface a fracturing fluid leakoff module is called to update the hydraulic fracture fluid volume, flowrate, and fluid pressure variations within the hydraulic fracture and the infiltrated weak mechanical interface, whereafter, if the hydraulic fracture tip reaches the weak mechanical interface, a module is assessing the potential fracture tip arrest or crossing of the weak mechanical interface at the given time step, wherein if the fracture tip is arrested, the fracture tip remains non-propagating for the next time step, wherein, otherwise, if the hydraulic fracture is crossing the weak mechanical interface or is not contacted, the hydraulic fracture increments its length and goes to the next time step.