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

Adding the heart

For this part you will need the Heart.js file and the Model file.

  • Let’s add the Modelica model which will provide simulation data
  • Drag the fmi Model component from the Blocks palette to the canvas
  • Select the model file
  • Set the step length to 0.2
  • We will be adjusting the step length throughout the tutorial
  • To better highlight the configured features
  • Next rename the model to “HeartModel”
  • And set the model step interval to 4 ms
  • Next we will add a Heart animation to our simulator
  • Drag the Animation component into the left Row container
  • And select the animation file
  • There are multiple control elements of the animation
  • Note that valves can start in a closed or an open state
  • You can also double click the animation to select elements
  • Lastly we set the padding right and padding left to “10%”
  • In the next part we will connect the animation with the model

Composer project file (.bjp)

← Creating the layoutHeart Beat →
Copyright © 2019 Creative Connections s.r.o.