Skip to content
Snippets Groups Projects
Commit 4dfc9f14 authored by felix's avatar felix
Browse files

update package version and requirements

parent 764fa24b
No related branches found
No related tags found
No related merge requests found
# kirchhoff
## Introduction
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
- crystals/periodic, initialize_circuit_from_crystal(crystal_type='default',periods=1): 'default': simple cubic lattice 3D, 'chain': 1D chain, 'bcc': bcc lattice 3D, 'fcc': fcc lattice 3D,'diamond': diamond lattice 3D,'laves': laves lattice 3D,'trigonal_stack': trigonal lattice stacked and interconnected 3D, 'square': simple cubic lattice 2D, 'hexagonal': hexagonal lattice 2D,'trigonal_planar': trigonal lattice 2D
- 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()
![hex](./gallery/hexagonal.png)
./notebook contains examples to play with in the form of jupyter notebooks
## Requirements
``` pandas ```,``` networkx ```, ``` numpy ```,```plotly```
```
networkx==2.5
numpy==1.19.1
pandas==1.1.1
plotly==5.3.1
scipy==1.5.2
```
## Gallery
![simple](./gallery/simplecubic3d.png)
![dual](./gallery/duallaves.png)
......
networkx==2.5
numpy==1.19.1
pandas==1.1.1
plotly==5.3.1
scipy==1.5.2
......@@ -5,15 +5,15 @@
# @Last modified by: Felix Kramer
# @Last modified time: 2021-09-05T00:06:04+02:00
# @License: MIT
import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="kirchhoff",
version="0.2.0",
version="0.2.1",
author="felixk1990",
author_email="felixuwekramer@protonmail.com",
description="Collection of routines for creation and manipulation of Kirchhoff circuits based on resistor-only networks, together with 2D/3D spatial embeddings. ",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment