How to use the pcsaft.pcsaft_hres function in pcsaft

To help you get started, we’ve selected a few pcsaft examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zmeri / PC-SAFT / tests / test_cython.py View on Github external
# Toluene ----------
    x = np.asarray([1.])
    m = np.asarray([2.8149])
    s = np.asarray([3.7169])
    e = np.asarray([285.69])
    pyargs = {'m':m, 's':s, 'e':e}

    den = pcsaft_den(t, p, x, pyargs, phase='liq')
    ref = -36809.39 # J mol^-1
    calc = pcsaft_hres(t, den, x, pyargs)
    if print_result:
        print('Toluene, liquid:\t\t', calc, ref, (calc-ref)/ref*100, 'J/mol')
    assert abs((calc-ref)/ref*100) < 1e-2
    den = pcsaft_den(t, p, x, pyargs, phase='vap')
    ref = -362.6777 # J mol^-1
    calc = pcsaft_hres(t, den, x, pyargs)
    if print_result:
        print('Toluene, vapor:\t\t', calc, ref, (calc-ref)/ref*100, 'J/mol')
    assert abs((calc-ref)/ref*100) < 1e-2

    # Acetic acid ---------
    m = np.asarray([1.3403])
    s = np.asarray([3.8582])
    e = np.asarray([211.59])
    volAB = np.asarray([0.075550])
    eAB = np.asarray([3044.4])
    pyargs = {'m':m, 's':s, 'e':e, 'e_assoc':eAB, 'vol_a':volAB}

    den = pcsaft_den(t, p, x, pyargs, phase='liq')
    ref = -38924.64 # J mol^-1
    calc = pcsaft_hres(t, den, x, pyargs)
    if print_result:

pcsaft

The PC-SAFT equation of state, including dipole, association and ion terms.

GPL-3.0
Latest version published 2 years ago

Package Health Score

39 / 100
Full package analysis

Similar packages