def test_case_meshed_2valves_pc(log_results=False): net = nw.water_meshed_2valves(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.001) assert np.all(v_diff_abs < 0.001)
def test_case_meshed_2valves_n(log_results=False): net = nw.water_meshed_2valves(method="n", results_from="stanet") p_diff, v_diff_abs = pipeflow_stanet_comparison(net, log_results) assert np.all(p_diff < 0.001) assert np.all(v_diff_abs < 0.001)
def test_case_meshed_2valves_sj(log_results=False): net = nw.water_meshed_2valves(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)