
Calibrating the Simulation
The metabolism simulation - glucose and insulin - on this site models how the body processes food. It offers a glimpse into the body’s processing mechanisms that is normally hard to come by.
For the glucose curve (blood sugar) there are devices for both one-off and continuous measurements - but the reaction to specific food takes exactly as long as digesting that food. For insulin there are no devices that can be used as conveniently outside of a lab.
What the Simulation Contains
This article gets a bit dry: I’m sharing information about the calibration and contents of the simulation algorithm. This is more of a nerd thing - for those who want to understand what I’m simulating here and what I’m (not yet) simulating. None of this is required for sensible use of the simulator; it’s optional background detail.
The simulation makes no claim to medical precision - it models a hypothetical (configurable) organism with certain assumptions about digestion, but deliberately or inadvertently leaves out some influencing factors.
The values here are to be used informatively, not as medical reality.
The following aspects are covered in the first calibrations, through mid-June 2026:
Circadian Rhythm (Sleep/Wake Cycles) for Daytime-Active People
The early bird gets a cortisol spike.
The simulation runs from midnight to midnight, and simulates days on this rhythm. Wake time is configurable in the personal profile (default 6:00). 90 minutes before waking, the body releases cortisol, which causes a slight rise in blood sugar. This appears in the simulation as the “dawn effect”.
The model assumes 8 hours of sleep. 8 hours before the configured wake time, blood sugar - and with it the insulin level - drops slightly: the liver slows its glucose production, and growth hormone shifts energy metabolism towards fat burning - the body switches into economy mode. This is most visible when these levels were not already elevated by a late meal.
Meal Order
Grandma was right: “Don’t snack before dinner!”
For food absorption, and thus the rise in blood sugar, it makes a difference in what order macronutrients are consumed: fat and protein first, carbohydrates after, produces a gentler blood sugar rise. Sugar or a soft drink before eating produces a steeper and higher spike. One study (Shukla et al., 2015) found that with protein and vegetables first, then carbohydrates, the blood sugar peak dropped by around 37% and the insulin load by around 57%.
Limits
This effect is modelled - however the model does not yet know about dietary fibre, which can flatten the curve somewhat further. This is planned for the next version.
One note though: a flatter curve generally also means a longer load. Delaying absorption alone does not make blood sugar healthier: the body still has to process the same amount.
Tendency: Healthy
Both blood sugar and insulin tend towards a healthy value. However, you have to let them: if food (particularly carbohydrate-rich food) keeps blood sugar persistently high, it - along with the insulin level - may over time become elevated.
If you give the body the chance, it will step by step approach a healthy value. In the interactive day simulation this is barely visible, but in the multi-day or multi-week simulations the effect comes into play.
Limit
The most recent algorithm update that introduced this behaviour only runs in the single-day simulation, not yet in the multi-week one.
Interactive vs. Day Plan
The interactive simulation - which allows meals to be entered and selected while the day unfolds in real time - runs for 16 hours and assumes eating only happens during the waking phase. It contains none of the circadian simulations. When the result of an interactive simulation is saved as a day plan, a start time between 0 and 8 o’clock can be selected. When that day plan is then simulated, the circadian functions come into play.
Insulin Injections in Interactive Mode
The interactive simulation allows insulin injections to be entered - depending on the personal profile: anyone who selects “I inject insulin” in their metabolic profile can add insulin artificially alongside the interactive meals. This is a feature the day plan lacks. It also makes it effectively impossible to run multi-week simulations with insulin dosing, since dosing is always highly dependent on the concrete (unsimulated) values and how the person is feeling on the day.
Support for this in a later version is planned but not yet implemented.
Starting Point of the 24h Simulation (Day Plan)
Earlier versions of the 24h simulation started from baseline: blood sugar and insulin were always at the “fasting” value at midnight. Since mid-June they can (in the day-plan simulation) also be elevated: the simulation runs in two phases. The first, invisible, phase determines the state at the end of the day and restarts from exactly that point. This assumes that the diet of two consecutive days is broadly similar.
In the second phase, the simulation runs with those found starting values and displays the result. A late meal can therefore have a real effect on the sleep period after midnight.
Limit: Insulin Injections
Due to this two-pass run without interactive insulin injections, the 24h simulation starts from unrealistic values, particularly for Type 1 diabetes profiles (and generally for all profiles that allow insulin injection).
Summary of Known Limitations
Dietary fibre is not simulated. The meal-order effect is therefore weaker than in the studies.
No biphasic insulin peak: The model overslept the first round. In Type 2 diabetes the fast first insulin phase (0-10 minutes after a meal) is absent; the simulation only knows the second phase. This leads to T2D profiles modelling the glucose spike too flat.
No individual variation: Real CGM curves show considerable differences between people eating identical meals. The simulation models an “average person”. This can be partially addressed by adjusting the profile, where various values are configurable.
Insulin injection scenarios (Type 1 diabetes) do not yet run stably in the day plan - the two-pass model converges poorly when the basal rate is critical to equilibrium.
Exercise, stress, sleep deprivation: The hormonal effects of exercise and stress on blood sugar have not yet been incorporated. The model assumes fairly stable energy requirements throughout the day and will therefore deviate significantly from actual measured CGM values in cases of exercise and stress. Sleep deprivation can have a similar effect.
Calibration Methods
Various studies help set expectations; a few people have already shared real measurements and meals with me.
The intent behind the test scenarios is: “the values look realistic, directionally they behave as the studies found and reported”, and “there are no inexplicable contradictions with the shared real measurements.”
Scenarios tested:
24h fasting
The sample day plans with profiles that do not require insulin injections
Specific day plans that consume 20g fat 10 minutes before 60g carbohydrates, and vice versa (for the variation in absorption rates)
Not numerical precision but plausibility was the goal - the curve should “feel right”.





