def test_links_1(): with Simulation(MODEL_WEIR_SETTING_PATH) as sim: print("\n\n\nLINKS\n") c1c2 = Links(sim)["C1:C2"] assert (c1c2.linkid == "C1:C2") assert (c1c2.is_conduit() == True) assert (c1c2.is_pump() == False) assert (c1c2.is_orifice() == False) assert (c1c2.is_weir() == False) assert (c1c2.is_outlet() == False) assert (c1c2.connections == ("J1", "J2")) assert (c1c2.inlet_node == "J1") assert (c1c2.outlet_node == "J2")
def test_links_1(): with Simulation(MODEL_WEIR_SETTING_PATH) as sim: print("\n\n\nLINKS\n") c1c2 = Links(sim)["C1:C2"] print(c1c2.flow) print(c1c2.is_conduit()) print(c1c2.is_pump()) print(c1c2.is_orifice()) print(c1c2.is_weir()) print(c1c2.is_outlet()) print(c1c2.connections) print(c1c2.inlet_node) print(c1c2.outlet_node) print(c1c2.average_head_loss) sim.step_advance(300) for ind, step in enumerate(sim): if c1c2.flow > 9.19: c1c2.target_setting = 0.9