Skip to content

A python implementatation of HumMod

License

Notifications You must be signed in to change notification settings

Zpankz/PyHumMod

 
 

Repository files navigation

This is a PyHumMod

This is a python implementation of the HumMod model of human physiology. The HumMod model is written in a custom XML language. By re-writing the model in python I hope to make it more accessible.

The HumMod model of physiology is the result of collaboration between many physiologists over many decades. It consists of over 10,000 variables and the equations that relate them. Running the model means setting a lot of parameters then stepping forward in short time steps and recalculating the values of the body's parameters at each timestep.

Required python packages:

  • scipy

run from command line:

from the PyHumMod directory run:

python example_default.py

to run with custom parameters, simply set the chosen parameters before running the simulation, as in example_10000_feet_altitude.py or example_beta_blockade.py

the structure

HumMod consists of hundreds of files representing different components of human phsyiology. In pyHumMod each file is represented by a class. All classes are defined in a single file: src/hummod.py

Functions that solve differential equations or define custom cubic splines are in src/special_functions.py

convert to python afresh

Included in this respository is the script I used to convert the standard HumMod library into python.

To do this afresh, change the source directory in HumMod_to_python_converter.py to point to a standard HumMod repository

Then, from the PyHumMod directory run:

python HumMod_to_python_converter.py

About

A python implementatation of HumMod

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 63.8%
  • Python 36.2%