def test_case_one_pipe1_pc(log_results=False): """ :param log_results: :type log_results: :return: :rtype: """ net = nw.gas_one_pipe1(method="pc") 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)
def test_case_one_pipe1_n(log_results=False): """ :param log_results: :type log_results: :return: :rtype: """ net = nw.gas_one_pipe1(method="n") 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)
def test_update(log_results=False): """ :param log_results: :type log_results: :return: :rtype: """ # before: gas_case3.json net = nw.gas_one_pipe1() p_diff, v_diff_abs = pipeflow_stanet_comparison( net, log_results, only_update_hydraulic_matrix=True) assert np.all(p_diff < 0.01) assert np.all(v_diff_abs < 0.05)