コード例 #1
0
def test_case_two_pipes_n(log_results=False):
    """

    :param log_results:
    :type log_results:
    :return:
    :rtype:
    """
    net = nw.water_strand_2pipes(method="n", results_from="stanet")
    p_diff, v_diff_abs = pipeflow_stanet_comparison(net, log_results)
    assert np.all(p_diff < 0.002)
    assert np.all(v_diff_abs < 0.03)
コード例 #2
0
def test_case_strand_net_2pipes_sj(log_results=False):
    net = nw.water_strand_2pipes(method="swamee-jain")
    p_diff, v_diff_abs = pipeflow_openmodelica_comparison(net, log_results)
    assert np.all(p_diff < 0.01)
    assert np.all(v_diff_abs < 0.05)