def bar1s(ep,ed):
    """
    Compute element force in spring element (spring1e).
    
    Parameters:
    
        ep = k          spring stiffness or analog quantity
        ed = [u1 u2]    element displacements
                        u1, u2: nodal displacements
                        
    Returns:
    
        es              element force [N]
    
    """
    k = ep
    return k*(ed[1]-ed[0]);