What is GlucoDyn?

GlucoDyn was created to educate T1D's and their caregivers about blood sugar dynamics. Each day T1D's make decisions about what and when to eat, and how much insulin to use to cover carbohydrates effect. It can be difficult to visualize what is happening throughout the day as carb absorption raises blood sugar and insulin reduces it – particularly when multiple events interact with one another.

GlucoDyn uses calculations similar to an insulin pump’s bolus wizard ( see the Background section for details on the calculations ) to create graphs of blood sugar versus time, based on your inputs of carb and insulin events.

The user can enter carb events, boluses, and temp basals, and GlucoDyn calculates the effect on blood sugar over time.

Seeing the curves and understanding the effects of bolus timing, carbohydrate absorption rate GI value, temp basal timing and rates, etc. will help users with their overall understanding of Type 1 diabetes and its management.

GlucoDyn also allows the user to “slide” the events around once they have been entered – allowing you to see what would have happened to your blood sugar curve if you had bloused earlier or eaten a different amount of carbs “on the fly” – the curves change as you move the sliders.


Carbohydrate Inputs

On the graph above, the user has entered 30 grams of carbohydrate with an absorption time of 90 minutes ( ie a "fast", high GI carg ), which was given at minute 40 in the simulation.

Blood sugar rises from an initial level of 100 to 200 at about minute 130 in the simulation. You can roll-over your mouse on the graph above to see how blood glucose changes over time as the carbohydrate is absorbed.

Insulin Inputs

On the graph above, the user has entered a 2U bolus of fast acting insulin which was given at minute 20 in the simulation.

Blood sugar lowers from an initial level of 200 to 100 at about minute 200 in the simulation. You can roll-over your mouse on the graph above to see how blood glucose changes over time as the carbohydrate is absorbed.

Combined Inputs

On the graph above, we show both insulin and carbohydrate inputs. GlucoDyn shows the dynamics involved in the interaction of both the carbohydrates and insulin as body absorbs them and result in a change in blood glucose.


User Settings

The first thing a user needs to do when they run GlucoDyn is to enter their settings.

Click the yellow Settings button and it reveals a number of inputs for the simulation that will be used across all the events. These settings will be saved to local storage so unless the user decides to change them they should not have to be entered again.

Once you have entered your settings, click the yellow Settings button one last time to save them.

Carb Ratio (gr/Unit)
Ratio of how many grams of carbohydrate are covered by 1 unit of insulin

Insulin Sensitivity Factor (mg/dl)/Unit
How many “points” of blood sugar (in mg/dl) will someone drop when given one unit of insulin

Insulin Duration (hours)
This is used by the IOB calculator and represents how long it takes a bolus of insulin to be used by the body. The IOB calculator uses different curves depending on the duration.

The Initial Blood Sugar (mg/dl)
This is simply the “relative” starting point for the simulation.

The Simulation Duration (hours)
This is important because depending on how long you run the simulation, statistics such as Average Blood Sugar and Standard Deviation will change if the final event’s effect on blood sugar ends and the simulation continues on with a flat blood sugar value. As you add and subtract events, the amount of simulation time you need will change depending on the length of the carb or insulin events. We have included an Automatic option – the user will be prompted if a given simulation’s events exceed this value and will be given the choice to leave their value in place or have GlucoDyn calculate the right simulation length.

Show Statistics
This toggles the statistic table on and off

Show Insulin and Carb Effect
This toggles off curves for the total insulin and total carb effect from the simulation individually. Example – the carb curve is what would have happened to blood sugar had the carbs in the simulation been given but no insulin had been given. The insulin curve is the opposite. This is useful in understanding insulin and carb’s individual effects on blood sugar.

Carb Events

Once the user has entered their settings, they are ready to run the simulation. By clicking on the green Carbs button, the carb entry menu will be revealed. There are three key parameters that each car event must include. Each can be entered by the sliders and hit the green Confirm button at the bottom to save the event

Carb Input Time (minutes)
When did the user ingest carbs.

Carb Amount (grams)
How many carbs did the user ingest.

Carb Type / Absorption Time (minutes)
How long will these carbs take to absorb?

Absorption time is a critical input parameter as each food type is different and can lead to vastly different blood sugar profiles.

The Glycemic Index is often used to compare the absorption times for various types of foods. A “high GI food absorbs very quickly, such as candy or white bread. A “low GI” food absorbs very slowly – bran cereal for example. To accurately predict blood sugar one needs to know the absorption time of the type of carbs one is eating. It is generally accepted that high GI foods, on average, absorb within 90 minutes. Medium GI foods take about 180 minutes to absorb and low GI foods about 240 minutes. However, with the slider, the user can input their best estimate of the absorption time of the carbs they are eating, or simply click the button to easily move the slider to one of the average values. See the ***Assumptions*** section for a discussion on the shape of the carbohydrate absorption curve.

Insulin Events

By clicking the red Insulin button, a series of inputs are revealed for bolus or temp basal entry.

First click the button to enter either a bolus or temp basal, and click Confirm when completed.

Bolus Input (minutes)
When did the user take their bolus insulin

Insulin Amount (Units)
How much insulin did the user take at that event

There is also the option to enter insulin using a temp basal. This may seem counter intuitive since the simulation assumes there is NO basal effect on blood sugar since basals are modeled as perfectly covering unused sugar from the liver that enters the blood stream. Temp basals can be used to deliver both positive – and “negative” boluses over a period of time. See Walsh’s “super basals” for more explanation.

Temp Basal Time Range (min)
Use this slider to enter the starting minute and stopping minute of the temp basal

Insulin Rate (U/min)
How many units of insulin per minute will be used by this event. This number can be positive or negative. Note - this is likely different then your pump which uses Units / Hour.

IMPORTANT – the simulation has no idea what the true basal rate is of the user. If using a negative temp basal, you should not use more then the actual basal rate!

Live Example

To enable the user to see cause and effect, the sliders in Input History can be used to modify the simulation “on the fly”. The first slider represents the amount (of carbs or insulin) and the second slider represents the time when it was given. The user can move these sliders at will, and the resulting graph moves dynamically.

It’s quite interesting, for example, to see the effect of pre-bolusing. By delaying the carb intake by say 20 minutes, you reduce the max blood sugar from about 200 mg/dl to just under 170 mg/dl. But, you have to be careful – before the carbs have time to absorb insulin is working, and the minimum blood sugar drops from 100 mg/dl to about 85 mg/dl. These are the kinds of tradeoffs that are critical to the management of T1D.

Understanding changes to timing and amounts, combinations of GI foods, etc. will allow users to better understand their own blood sugar results and improve control.


Please read carefully

GlucoDyn's calculations are based on the equations contained in background.pdf (add link)

GlucoDyn assumes your basal insulin is covering any excess glucose production that enters your blood stream from the liver. This means if you add no carb events or insulin events, your blood sugar stays completely flat in the simulation!

GlucoDyn uses similar calculations to your pump’s bolus wizard. The effects of insulin and carbohydrates follow the typical formulas

- Change in blood sugar from a bolus is units of insulin / sensitivity ratio
- The insulin required to cover carbohydrates is carbohydrates / carb ratio

GlucoDyn ignores renal effects for high blood sugars, hepatic effects for very low blood sugars, and any other second order effects such as insulin duration changes versus dose size. The user sets their own carb ratio and insulin sensitivity parameters in the Settings tab.

GlucoDyn uses insulin-on-board (IOB) calculations for fast acting insulin from Walsh’s books and papers to model to speed of insulin’s reduction of blood sugar. The user sets their insulin duration in the Settings tab.

GlucoDyn models carbohydrate absorption rates as a parameter in each carb event that the user enters, allowing users to estimate absorption times for various GI foods. The shape of the absorption rate curve is similar to those found in Think Like a Pancreas by Gary Scheiner (fig. 7-8). It results in an “S” shaped blood sugar response to carbohydrates, with the length of time defined by the user for each event. Details in the Background Math document in the repo.

GlucoDyn only accepts mg/dl at the current time.