Combine 2024 lightning talk - Tomas Kulhanek
Created by Tomas Kulhanek

Modeling and simulation using industrial standards Modelica, FMI and web components.

!. some key features of modeling technologies
equation based
component based (modular, hierarchical, object oriented)
model of glucose insulin regulation



GI equation

components


supporting libraries
Physiolibrary & Chemical https://physiolibrary.org
Mateják, M. (2023, December). Creating cardiovascular and respiratory models using Physiolibrary 3.0. In Modelica Conferences (pp. 463-468).
hemodynamics of cardiovascular system

Ježek, F., Kulhánek, T., Kalecký, K., & Kofránek, J. (2017). Lumped models of the cardiovascular system of various complexity. Biocybernetics and Biomedical Engineering, 37(4), 666-678.
model of glucose insulin regulation - acausal form with components

2. why
Readability & Plausability
model of complex system may lead to implementation errors

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

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.
Guyton's original scheme part of circulatory dynamics

equivalent implementation in component and acausal modeling language

Physiomodel

Complex model of physiology in Modelica based on HumMod and Physiolibrary
https://physiomodel.org
>60 000 equations
comprehensibility
Frank-Starling law is much more visible in component model - "force of the heart muscle depends on pressure of incoming blood".
standard for modeling -Modelica


Commercial tools:
Dymola,

, …
Open-source:

standard for simulation - FMI

Modelica tools support FMI
Matlab SIMULINK
PyFMI for Python
Bodylight.js for JS and web (model → FMI → emscripten → FMI JS with WebAssembly → + other components for charts, animation, markdown ...)
standard for exchange simulation setup - SSP

hemodynamics of cardiovascular system

blood-gas exchange

respiration

co-simulation of multiple models via FMI in static web app with bodylight.js
i
https://egolem.online/demo/
medical simulators for education
lecture supported by simulators

physiology and pathophysiology
web simulators in a browser / desktop/tablet

HTML, Markdown, web-components
hemodynamics
native mobile apps


control HW mannequin - simulation of patient on ECMO



OPC & REST API
bring virtual reality to life


WebGL+WebXR Unity+WebView
Conclusion
- consider to use industrial standards
- modeling 0D and 1D - Modelica, simulation - FMI (functional mockup interface), simulation setup and orchestration - SSP (system structure and parameterization)
- visualisation - web standards (HTML, WebAssembly, web components, WebGL, Canvas, Unity, ...)


links
models & libraries: https://www.physiolibrary.org
technology for simulation in web: https://bodylight.physiome.cz (with source codes at GITHUB)
product demo: https://egolem.online
connect & colaborate
www.linkedin.com/in/tomaskulhanek/
acausal - do not dictate causality = rapid increase in reusability