OrgPad logo

Pharmacolibrary lightning talk TK

Created by Tomas Kulhanek

Pharmacolibrary lightning talk  TK

Physiologically based pharmacokinetic modeling with MODELICA and FMI: demo integration with PK database

Tomáš Kulhánek

VITO, Mol, Belgium

1st Faculty of Medicine, Charles University, Prague, Czechia

standard Modelica language

image

image

Commercial tools:

imageDymola,image

image

, …

Open-source:

image

1. models

standard Modelica library 4.0.0

image

custom libraries for specific domains

Physiolibrary 3.0.0

www.physiolibrary.orgimage

Dymola qmDZxxtrfj

Physiomodel

firefox SHzAoizS4q

Complex model of physiology in Modelica and Physiolibrary

https://physiomodel.org

blood-gas exchange

Dymola qmDZxxtrfj

hemodynamics of cardiovascular system

Dymola 9CIA5zGnUy

respiration

Dymola sdXGmJf24o

co-simulation of multiple models via FMI in static web app with bodylight.js

iimage

https://egolem.online/demo/

new library: Pharmacolibrary 25.04 (beta)

connectors and components:

image

1-compartment model (in diagram)

image

equivalent 1-compartment model (in equations)

VirtualBoxVM 4UK0GmE2mR

gentamicine

image

2-compartment model

image

midazolam

image

3-compartment model

image

fentanyl

image

Physiology based kinetic model

image

simulation PBK model

image

why in Modelica?

model of complex system may lead to implementation errors

 

image

A C Guyton, T G Coleman, H J Granger, Circulation: overall regulation, Annu Rev Physiol.1972;34:13-46.doi: 10.1146/annurev.ph.34.030172.000305.

Correction of schema after reimplementation in 2010

image

J.Kofránek, et al., Restoration of Guyton‘s Diagram for Regulation of the Circulation ...Physiol Res. 2010;59(6):897-908.doi: 10.33549/physiolres.931838.

comprehensibility

Frank-Starling law is  much more visible in component model - "force of the heart muscle depends on pressure of incoming blood". 

equivalent implementation in component and acausal modeling language

image

2.simulation

standard for simulation - FMI

image

Modelica tools support FMI

Matlab SIMULINK

FMPy for Python

Bodylight.js for web (model → FMI → emscripten → FMI JS with WebAssembly → + other components for charts, animation, markdown ...)

workflow - 1. export model to FMI unit 2. simulate in Python & fmpy & 3. get data from external data (PK-DB.com) 4. compare/fit/...

VirtualBoxVM TIsoOjFLH2

compile FMI unit to Webassembly & simulate FMI unit in web application (in-browser simulation)

brave OZ24t5RrJ2

powered by Bodylight.js: https://bodylight.physiome.cz 

web app simulation & interactive animation

ironmodelsimulation

final remarks

image

pharmacology & influence of physiology