def spring1s(ep,ed):
    """
    Compute element force in spring element (spring1e).
    
    :param float ep: spring stiffness or analog quantity
    :param list ed: element displacements [d0, d1]
    :return float es: element force [N]
    """
    k = ep
    return k*(ed[1]-ed[0]);