Bodylight.js

Bodylight.js

  • Docs
  • GitHub

›Physiological application

Getting started

  • Introduction
  • Compiling Modelica

Simple project

  • Creating a simple project
  • Adding the model
  • Visualisation
  • Controls
  • Events and Actions

Physiological application

  • Pressure volume cardiac simulator
  • Creating the layout
  • Adding the heart
  • Heart Beat
  • Controls
  • Phases
  • Pressure volume chart
  • Rolling charts
  • Custom actions
  • Buttons
  • Finishing touches

API

  • Model
  • Plotly chart
  • Range
  • Toggle

Heart Beat

  • Select the ValveAOV_anim control in the left tree view
  • Click the Value button, search for the valveAOV variable and select it
  • Set Maximum to 1
  • Select the ValvePV_anim animation control
  • And bind it to the ValvePV variable
  • Next we will bind the ValveMV_anim
  • Note that the animation starts in an open state
  • So we need to reverse the input from the model
  • Now we can check if the valves are working properly
  • They are, although a bit too fast
  • We decrease the step speed of the model
  • Lovely
  • Next we bind the AtriumLeft_anim to volumeLeftAtrium_ml
  • The AtriumRight_anim to volumeRightAtrium_ml
  • And preview the results
  • Lastly we bind the VentricleLeft_anim to volumeLeftVentricle_ml
  • And VentricleRight_anim to volumeRightVentricle_ml
  • And check the results, a beating heart!
  • In the next part we will control the heart rate

Composer project file (.bjp)

← Adding the heartControls →
Copyright © 2019 Creative Connections s.r.o.