import src.pymanifold as pymf sch = pymf.Schematic(dim=[0, 0, 10, 10]) sch.port('in', 'input', x=3, y=3, fluid_name='water') sch.port('out', 'output', x=1, y=1) sch.node('middle node', x=3, y=1) sch.channel('in', 'middle node', min_length=2, min_width=0.9) sch.channel('middle node', 'out', min_width=0.9) model = sch.solve(show=True) print(model) def test_answer(): assert model != "No solution found"
import src.pymanifold as pymf sch = pymf.Schematic([0, 0, 10, 10]) # I # | # C--N----------A # | # W cathode_node = 'cathode' anode_node = 'anode' input_node = 'in' waste_node = 'out' junction_node = 'ep_c' min_channel_length = 1 min_channel_width = 1 min_channel_height = 0.001 cathode_voltage = 0 anode_voltage = 2 # syntax: sch.elec_port(name, design[, voltage, pressure, flow_rate, density, X_pos, Y_pos]) sch.elec_port(cathode_node, 'input', voltage=cathode_voltage, min_pressure=1) #, fluid_name='mineraloil') sch.elec_port(anode_node, 'output', voltage=anode_voltage) # normal ports do not have voltages; syntax is otherwise the same sch.port(input_node, 'input', min_pressure=1, fluid_name='ep_cross_test_sample') sch.port(waste_node, 'output')
import src.pymanifold as pymf sch = pymf.Schematic([0, 0, 1, 1]) # I # | # C--N----------A # | # W cathode_node = 'cathode' anode_node = 'anode' input_node = 'in' waste_node = 'out' junction_node = 'ep_c' cathode_voltage = 0 anode_voltage = 200 # syntax: sch.elec_port(name, design[, voltage, pressure, flow_rate, density, X_pos, Y_pos]) sch.elec_port(cathode_node, 'input', x=0.01, y=0.02, voltage=cathode_voltage) # , fluid_name='water') sch.elec_port(anode_node, 'output', x=0.1, y=0.02, voltage=anode_voltage) # normal ports do not have voltages; syntax is otherwise the same sch.port(input_node, 'input', x=0.02, y=0.01, fluid_name='ep_cross_test_sample') sch.port(waste_node, 'output', x=0.02, y=0.03) # ep_cross node sch.node(junction_node, x=0.02, y=0.02, kind='ep_cross') # syntax: sch.channel(shape, min_length, width, height, input, output) sch.channel(cathode_node, junction_node, min_height=0.0002, min_width=0.00021, phase='tail') sch.channel(junction_node, anode_node, min_height=0.0002, min_width=0.00021, min_sampling_rate=10, phase='separation') sch.channel(input_node, junction_node, min_height=0.0002, min_width=0.00021)