def rayleigh_coefficients(zeta, omega_1, omega_2):
    """
    Compute the coefficients for rayleigh damping such, that the modal damping
    for the given two eigenfrequencies is zeta.

    Parameters
    ----------
    zeta : float
        modal damping for modes 1 and 2
    omega_1 : float
        first eigenfrequency in [rad/s]
    omega_2 : float
        second eigenfrequency in [rad/s]

    Returns
    -------
    alpha : float
        rayleigh damping coefficient for the mass matrix
    beta : float
        rayleigh damping for the stiffness matrix

    """
    beta = 2*zeta/(omega_1 + omega_2)
    alpha = omega_1*omega_2*beta
    return alpha, beta