示例#1
0
def _test():
    """execute detailed test run of multiRP"""
    import rptest
    rptest.settest('multiRP')
示例#2
0
def _test():
    """execute detailed test run of multiRP"""
    import rptest
    rptest.settest('multiRP')
示例#3
0
    resetup(fluid, mRP=mRP)
    for each in range(100):
        #put value into pipe
        mRP['cpipe'].send(
            press(303 + each, 58, [0.4, 0.6])['p'])
    mRP['cpipe'].close()

if __name__ == '__main__':
    #add module file path to python sys path
    import multiRP as _filename
    _filename = (os.path.dirname(_filename.__file__))
    sys.path.append(_filename)

    #test multiRP without multiprocessing
    import rptest
    rptest.settest('multiRP')

    #initiate multirefprop, this will create global 'mRP'
    multirefprop()

    #create setup details
    H2O = setup('def', 'WATER')
    H2O_NH3 = setup('def', 'AMMONIA', 'WATER')
    CH4 = setup('def', 'METHANE')
    CH4_C2H6 = setup('def', 'METHANE', 'ETHANE')

    #various refprop functions named
    peen = mRP['process'](target=critp, args=([1], H2O, mRP))
    ptwee = mRP['process'](target=critp, args=([0.4, 0.6],),
                           kwargs={'prop':H2O_NH3, 'mRP':mRP})#alternative input
    pdrie = mRP['process'](target=critp, args=([1], CH4, mRP))
示例#4
0
    resetup(fluid, mRP=mRP)
    for each in range(100):
        #put value into pipe
        mRP['cpipe'].send(press(303 + each, 58, [0.4, 0.6])['p'])
    mRP['cpipe'].close()


if __name__ == '__main__':
    #add module file path to python sys path
    import multiRP as _filename
    _filename = (os.path.dirname(_filename.__file__))
    sys.path.append(_filename)

    #test multiRP without multiprocessing
    import rptest
    rptest.settest('multiRP')

    #initiate multirefprop, this will create global 'mRP'
    multirefprop()

    #create setup details
    H2O = setup('def', 'WATER')
    H2O_NH3 = setup('def', 'AMMONIA', 'WATER')
    CH4 = setup('def', 'METHANE')
    CH4_C2H6 = setup('def', 'METHANE', 'ETHANE')

    #various refprop functions named
    peen = mRP['process'](target=critp, args=([1], H2O, mRP))
    ptwee = mRP['process'](target=critp,
                           args=([0.4, 0.6], ),
                           kwargs={