Graphnics: Combining FEniCS and NetworkX to simulate flow in complex networks
Network models facilitate inexpensive simulations, but require careful handling of bifurcation conditions. We here present the graphnics library, which combines FEniCS with NetworkX to facilitate network simulations using the finite element method. Graphnics features (i) a FenicsGraph class built on top of the NetworkX DiGraph class, that constructs a global mesh for a network and provides FEniCS mesh functions describing how they relate to the graph structure. (ii) Example models showing how the FenicsGraph class can be used to assemble and solve different network flow models. (iii) Demos showing e.g. how to run simulations on complex biological networks. Interestingly, the results show that vasomotion modelled as a travelling sinusoidal wave is capable of driving net perivascular fluid flow through an arterial tree, as has been proposed based on experimental data.
READ FULL TEXT