def vanderwaals(phase,
                pore_P='pore.pressure',
                pore_T='pore.temperature',
                pore_Pc='pore.critical_pressure',
                pore_Tc='pore.critical_temperature',
                **kwargs):
    r"""
    Uses Van der Waals equation of state to calculate the density of a real gas

    Parameters
    ----------
    pore_P : string
        The dictionary key containing the pressure values in Pascals (Pa)

    pore_T : string
        The dictionary key containing the temperature values in Kelvin (K)

    pore_Pc : string
        The dictionary key containing the critical pressure values in Pascals
        (Pa)

    pore_Tc : string
        The dictionary key containing the critical temperature values in Kelvin
        (K)

    Returns
    -------
    rho, the density in [mol/m3]

    Notes
    -----
    This equation and its constant coefficients are taken [1]_ which uses the
    cgs units system. All input parameters are expected in SI, then converted
    in the method.

    """

    P = phase[pore_P]/100000
    T = phase[pore_T]
    Pc = phase[pore_Pc]/100000  # convert to bars
    Tc = phase[pore_Tc]
    R = 83.1447
    a = 27*(R**2)*(Tc**2)/(64*Pc)
    b = R*(8*Pc)/Tc
    a1 = -1/b
    a2 = (R*T+b*P)/(a*b)
    a3 = -P/(a*b)
    a0 = sp.ones(sp.shape(a1))
    coeffs = sp.vstack((a0, a1, a2, a3)).T
    density = sp.array([sp.roots(C) for C in coeffs])
    value = sp.real(density[:, 2])*1e6  # Convert it to mol/m3
    return value
dataset/ETHPy150Open PMEAL/OpenPNM/OpenPNM/Phases/models/molar_density.py/vanderwaals/swapped operands of `/`