Пример #1
0
def test_keyword_single2():
    tab = Tab("3P_single-fluid_key2.tab")
    assert tab.metadata["properties"][2] == "ROG"
    assert tab.metadata["nfluids"] == 1
    tab.export_all()
    assert tab.data.values[9][0][2] == 2.01195861
    assert tab.metadata['properties'][-1] == 'SEHL'
Пример #2
0
def test_type():
    fixed_single = Tab("3P_single-fluid_fixed.tab")
    fixed_multiple = Tab("3P_multi-fluid_fixed.tab")
    keyword_single = Tab("3P_single-fluid_key.tab")
    keyword_multiple = Tab("3P_multi-fluid_key.tab")

    assert fixed_single.tab_type == 'fixed'
    assert fixed_multiple.tab_type == 'fixed'
    assert keyword_single.tab_type == 'keyword'
Пример #3
0
def test_keyword_multiple():
    tab = Tab("3P_multi-fluid_key.tab")
    assert tab.metadata["nfluids"] == 3
    tab.export_all()
    assert tab.metadata["properties"][3] == "ROHL"
Пример #4
0
def test_keyword_single():
    tab = Tab("3P_single-fluid_key.tab")
    assert tab.metadata["properties"][3] == "ROHL"
    assert tab.metadata["nfluids"] == 1
    tab.export_all()
Пример #5
0
def test_fixed_single():
    tab = Tab("3P_single-fluid_fixed.tab")
    assert "WATER DENSITY" in tab.data.Property[1044]
    assert tab.data.Property[1044] == "WATER DENSITY"
    tab.export_all()
    assert tab.data.values[11][-1][1] == -.138758E+07
Пример #6
0
def test_fixed_multiple():
    tab = Tab("3P_multi-fluid_fixed.tab")
    assert "GAS ENTROPY" in tab.data.Property[42215]
    assert tab.data.Property[42215] == "GAS ENTROPY"
    tab.export_all()
    assert tab.data.values[61][-1][1] == -.382735E+03