def zener_maxcurrent(Vz, powerrating):
    """
    Vz: breakdown voltage of zener diode
    powerrating: power rating of the diode

    Returns the maximum current (in A) passing through the diode
    """
    I_max = powerrating / Vz
    return I_max
