Python vascular Network Solver
Python JavaScript CSS HTML
Clone or download
Latest commit 0cba56c Nov 28, 2016
Permalink
Failed to load latest commit information.
Results added cython Bessels for mac and linux. Now Scipy package is required… Apr 27, 2012
XML Update vascular_network.xml Mar 11, 2016
includes fixed Bessel for 64bit linux May 23, 2012
.gitignore fixed the feature handling xml output files Sep 13, 2012
Adaptation.py minor fixes Feb 20, 2013
Assembler.py Fixes Numpy > 1.9.0 Nov 22, 2016
Bessel.pyx v0.4.2 new method for input/output files and default networks Sep 4, 2012
BoundaryConditions.py added support for multiple pressure output Apr 28, 2015
DofMap.py v0.4.2 new method for input/output files and default networks Sep 4, 2012
Elements.py Fixes Numpy > 1.9.0 Nov 22, 2016
Evaluator.py v0.4.2 new method for input/output files and default networks Sep 4, 2012
Export.py v0.4.2 new method for input/output files and default networks Sep 4, 2012
InverseWomersley.py v0.4.2 new method for input/output files and default networks Sep 4, 2012
License.txt new postProc features with json and index.html. Fixed adaptation. Fix… Apr 5, 2012
MeshGenerator.py v0.4.2 new method for input/output files and default networks Sep 4, 2012
MeshGenerator_Script.py v0.4.2 new method for input/output files and default networks Sep 4, 2012
ModelAdaptor.py added inputGnuid method for computing information for setting gnuid b… Sep 24, 2012
ModelAdaptor_Script.py v0.4.2 new method for input/output files and default networks Sep 4, 2012
NetworkGraph.py fixed warnings message for lxml package Sep 10, 2012
NetworkMesh.py v0.4.2 new method for input/output files and default networks Sep 4, 2012
NetworkSolutions.py minor fixes Feb 20, 2013
Profiling.py v0.4.2 new method for input/output files and default networks Sep 4, 2012
README.md Update README.md Feb 15, 2016
README_BESSEL.txt fixed bessel setup and its readme May 23, 2012
SimulationContext.py v0.4.2 new method for input/output files and default networks Sep 4, 2012
Solver.py added support for multiple pressure output Apr 28, 2015
Solver_Script.py v0.4.2 new method for input/output files and default networks Sep 4, 2012
changeLog.pdf v0.4.2 new method for input/output files and default networks Sep 4, 2012
pyNS.py fixed output subfolders and output file names Feb 26, 2013
setup.py fixed bessel setup and its readme May 23, 2012

README.md

pyNS

A modular solver framework for 0D/1D problems. Stable release, current version is 0.4.2

##Software architecture

pyNS has been designed with an object-oriented approach, which allows to abstracts the concept of element from the numerical solver itself.

##Installation Requirements:

Numpy removed support for NumArray, on which pyns depends, starting from version 1.9.0. Source : http://docs.scipy.org/doc/numpy/release.html

The last supported version is Numpy 1.8.2.

A browser for visualizing simulation results (internet connection is not required). Currently supported browser are Firefox, Chrome, Safari, Opera and Internet Explorer.

For additional features:

  • MEncoder library (Only for velocity profile videos)
  • MatPlotLib library (Post processing using png files instead of default browser visualization and for velocity profile videos.)
  • LXML package (Only for xml files validation feature).

How to

Open a terminal, cd into pyNS directory and type: [For Mac/Linux Users]

python pyNS.py --help 

[For Windows Users]

pyNS.py --help

Standard benchmark simulation: By default pyNS runs a vascular network which represents the arterial vasculature of a right arm. Open a terminal cd into pyNS directory and type: [For Mac/Linux Users]

python pyNS.py --default

[For Windows Users]

pyNS.py --default

Documentation

For a complete documentation please go to http://archtk.github.com

The vascular network model

The vascular network model implemented in pyNS is a network graph consisting of segments and nodes serially connected on the basis of the anatomical configuration. Each segment is discretized in one or more elements, each of them modeled as an electronic circuit using the hydraulic analogy, with its own relation for pressure drop (p) and flow volume (q). Since elements are independent, we just sum across them in different ways for different circuit configurations. Thus, each kind of element represents a mathematical model which is implemented for the scope of modeling and studying pressure, volumetric flow rate and wall-shear stress distributions over the complete vascular system or a specific part of it. Each segment of the network only exposes its external nodes and each element has its own local degrees of freedom depending of the nature of the element itself. If an element is connected to one or more elements the connection node and its local degree of freedom are shared between elements. This structure allows to build complex vascular network, which can be potentially composed by different types of segments, ensuring mass and momentum conservation over the entire network.

Guidelines for templates simulations

Guidelines for parameters.csv file, needed for arm templates simulations:

  • Date of birth (dob) has to be in dd/mm/yyyy
  • Date of surgery (dos) has to be in dd/mm/yyyy
  • Gender 0 Female, 1 Male
  • Arm 0 Left, 1 Right
  • ftype 0 End-to-end radio-cephalic fistula, 1 End-to-side radio-cephalic fistula, 3 End-to-side brachio-cephalic fistula, 5 End-to-side brachio-basilic fistula
  • Diabetes 0 No, 1 Yes
  • Hypertension 0 No, 1 Yes
  • Height has to be in cm
  • Weight has to be in Kg
  • Systolic and diastolic pressures (sys and diap) have to be in mmHg
  • Cardiac output is not mandatory but has to be in mL/min
  • Period is the cardiac period, measured in seconds
  • Brachial, radial and ulnar flows have to be in mL/min
  • Hematocrit (ht) has to be in %
  • Protein plasma concentration (cp) has to be in g/dL

If any parameter is not specified, pyNS assumes default values:

  • dos = 27/07/2010
  • dob = 27/07/1960
  • gender Male
  • Arm Right
  • Fistula Type End-to-side radio-cephalic
  • Height 175 cm
  • Weight 70 Kg
  • Systolic Pressure 110 mmHg
  • Diastolic Pressure 70 mmHg
  • Brachial Flow 130 mL/min
  • Radial Flow 20 mL/min
  • Ulnar Flow 30 mL/min
  • Period 1 second
  • Hematocrit 45 %
  • Protein Plasma Concentration 7 g/dL
  • Hypertension No
  • Diabetes No

Guidelines for radii.csv file, needed for arm templates simulations:

Each specific value has to be expressed in [m] name_of_the_edge;radius[s=0];radius[s=1]

where s is the curvilinear abscissa

License

Copyright (c) Simone Manini, Luca Antiga. Distributed under the BSD License.