import math


def calc_sigma(z,N0,Nz,c,phi):
    """Calculate yield strength.

    z: depth
    N0: effective pressure
    Nz: effective pressure gradient
    c: cohesion
    phi: angle of internal friction"""

    return (N0+Nz*z)*math.tan(math.radians(phi))+c