Beispiel #1
0
def test_case_one_pipe1_n(log_results=False):
    """

    :param log_results:
    :type log_results:
    :return:
    :rtype:
    """
    net = nw.water_one_pipe1(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)
Beispiel #2
0
def test_case_one_pipe1_pc(log_results=False):
    """

    :param log_results:
    :type log_results:
    :return:
    :rtype:
    """
    net = nw.water_one_pipe1(method="pc", results_from="stanet")
    p_diff, v_diff_abs = pipeflow_stanet_comparison(net,
                                                    log_results,
                                                    friction_model="colebrook")
    assert np.all(p_diff < 0.002)
    assert np.all(v_diff_abs < 0.03)
Beispiel #3
0
def test_case_one_pipe_1_sj(log_results=False):
    net = nw.water_one_pipe1(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)