# Simulating flow in a branched pipe

I am trying to simulate 1D advection and convection of a solute in the following blood vessel segment. I would like to know if this system can be simulated in COMSOL or MATLAB.

I have used pdepe solver in MATLAB for simulating flows in 1D pipes without branches. However, I am not aware of a tool that can be used for simulating simple branched segments like the above.

Any suggestions?

• That's a question you should ask on the Comsol or Matlab mailing lists/forums. In essence, what you have here is a "quantum graph" on which you want to solve your system, and among the questions you'll have to answer is how flow decides which branch of the pipe to take. – Wolfgang Bangerth Nov 20 '19 at 16:46
• @WolfgangBangerth Thanks a lot for the response. I'll post on both mailing lists. For, the toy model that I want to simulate, the velocity of the fluid in each segment of pipe is available. I am not aware of studies that have used "quantum graph" approach. Is this a commonly used approach for studying flow dynamics in pipe networks? – Natasha Nov 20 '19 at 17:21
• Well, a quantum graph is really just a network where you have an ODE or PDE on each edge. If you simulate each pipe segment via a 1d model, then in essence a pipe network is a quantum graph. – Wolfgang Bangerth Nov 21 '19 at 4:41
• @WolfgangBangerth Thank you, I'm am trying to solve using a similar approach that you mentioned. But, it is not clear to me how flux conservation is established at a node connecting two edges. I also posted a question on this recently. If there are references in the literature that have implemented this kind of approach, I would be happy to learn from those implementations. – Natasha Nov 21 '19 at 5:10
• Flux conservation is simply an algebraic condition (not a differential equation) that has to hold at any given time: Whatever flows into a node at time $t$ has to flow out of it a time $t$. – Wolfgang Bangerth Nov 22 '19 at 1:09