This module 'kirchhoff' is part of a series of pyton packages encompassing a set of class and method implementations for a kirchhoff network datatype, which includes a visualization routine based on plotly. The concept is to build kirchhoff networks from networkx graphs, by providing a container for the graphs as well as separate containers for network attributes meant for fast(er) computation in the follow-up modules 'hailhydro' and 'goflow'
This module 'kirchhoff' is part of a series of pyton packages encompassing a set of class and method implementations for a kirchhoff network datatype, which includes a visualization routine based on plotly. The concept is to build kirchhoff networks from networkx graphs, by providing a container for the graphs as well as separate containers for network attributes meant for fast(er) computation in the follow-up modules 'hailhydro' and 'goflow'
## Installation
pip install kirchhoff
## Usage
Generally, just take a weighted networkx graph and read it in as shown. You can plot the network interactivly, with full display of edge and node attributes if desired. Default attributes are 'source'/'potential' for nodes and 'conductivity'/'flow_rate' for edges.
Generally, just take a weighted networkx graph and read it in as shown. You can plot the network interactivly, with full display of edge and node attributes if desired. Default attributes are 'source'/'potential' for nodes and 'conductivity'/'flow_rate' for edges.
```
import kirchhoff.circuit_init as ki
...
...
@@ -23,7 +23,7 @@ Single and dual networks are supported at the moment, and can be constructed fro
- random voronoi tesselation, initialize_circuit_from_random(random_type='default',periods=10,sidelength=1): 'default': planar voronoi tesselation with periodic boundaries, 'voronoi_volume': 3D voronoi tesselation with periodic boundaries
- intertwined systems, initialize_dual_circuit_from_minsurf(dual_type='simple',num_periods=2): supporting most of the above in 3D
Further one can define 'flow' and 'flux' circuits for hydrodynamic simulations which are based on Hagen-Poiseuille flow and transport of solutes via advection-diffusion. Doing so will enable more specifically tailored methods for source/solute influx topology control:
```
import kirchhoff.circuit_flow as kfc
...
...
@@ -51,7 +51,13 @@ fig.show()

./notebook contains examples to play with in the form of jupyter notebooks
description="Collection of routines for creation and manipulation of Kirchhoff circuits based on resistor-only networks, together with 2D/3D spatial embeddings. ",