I am trying to build flexible, visual tool to calculate flow distribution through the piping network (mobile hydraulics).
I have root node of the network which has defined flow and pressure inputs.
Each node (of course including root one) can have multiple children - lines, connectors or outputs. Each branch ends up with outlet to atmospheric pressure.
So far I know that I have to calculate losses at each node going from the bottom of the tree, but losses are flow dependent... When I would have losses at each node, I could somehow (how?) calculate flow distribution going from the root node I would get flow to each child, then for each child flow to each of its children etc. Not sure if it helps, but I know the target flow for each output.
The main issue is probably the fact that there is no particular example as it suppose to be generic tool.
Any help?
I though it is pretty simple (I still believe it is) but I got stuck and cannot find the way out.