BodyFood

How the simulator works

BodyFood is an educational simulator. It runs simplified, published physiology models in your browser and shows what a diet or training plan might do to a simulated person. It is not a medical device and does not give personal advice. This page lists how it works, what has been checked, and what is still a guess. Version: engine v0.1, pages v1, updated 2026-11-26.

Constants from published sources
36
Derived or tuned to a target
25
Guesses (marked)
34

What is modelled

  • Energy balance and body composition. Resting burn from fat and lean mass (Hall 2009), activity as a physical activity level plus logged workouts (Ainsworth Compendium METs), the thermic effect of food by macronutrient (Westerterp 2004), and adaptive thermogenesis (Hall 2011). A surplus or deficit is split between fat and lean tissue with the Forbes/Hall partition, adjusted for protein intake and training.
  • Glucose and insulin. A minimal model in the style of Bergman (1979), with gut absorption slowed by fat, fiber and protein and sped up for drinks. Fructose is mostly routed to the liver. The default person is calibrated to normal glucose tolerance on the standard 75 g oral glucose tolerance test (ADA categories); prediabetes and type 2 diabetes profiles use published fasting levels and lower insulin sensitivity.
  • Muscle and strength. Six regions grow with weekly training volume, energy and protein (rates anchored on Wernbom 2007 for untrained people, protein plateau at about 1.6 g/kg from Morton 2018), with diminishing returns toward a natural ceiling and age-related loss after 40. Strength includes early neural gains and fatigue.

What has been checked

CheckStatus
75 g glucose test shape for normal, prediabetic and type 2 profiles (ADA categories)Done, automated tests
Energy is conserved exactly (intake − burn = change in stored energy)Done, automated tests
Weight loss matches Hall’s closed-form model for a 500 kcal/day cutDone, automated tests
Beginner muscle growth in the 5–15% per 12 weeks range of training studiesDone, automated tests
Case-by-case comparison with the NIH Body Weight PlannerNot done yet
Published mixed-meal glucose curves (e.g. fast food)Not done yet

What the numbers on our pages mean

Food and what-if pages use the default simulated person: a 30-year-old man, 180 cm, 80 kg, 20% body fat, moderately active (PAL 1.5), sleeping 7.5 hours, with normal glucose tolerance. Food pages add one serving a day to a steady diet tuned so his weight stays flat for a year, and compare the two runs. Real people differ: women, older or heavier people, and people with diabetes get different numbers. Every page has a button that opens the same scenario in the simulator, where you can change the person.

Numbers are rounded, and long-horizon results are “if nothing else changed”. We do not yet show uncertainty ranges, so read every result as a rough estimate of direction and size, not a precise figure.

Illustrative indices

The simulator also shows inflammation, hunger (ghrelin/leptin) and liver-fat indices. Their drivers are physiologically sensible but their sizes are not measured quantities, so they are labelled illustrative in the app and not used for claims on these pages. Processing level (NOVA), added sugar and glycemic index for USDA foods are estimated from the nutrient profile and food category.

Not modelled

Alcohol, caffeine, medication (including insulin and GLP-1 drugs), blood pressure, the menstrual cycle, day-to-day sleep changes, vitamins and minerals, gut microbiome, and long-term disease risk.

Food data

Foods come from USDA FoodData Central (Foundation Foods and SR Legacy, public domain), searched in the app from a bundled index, and from manufacturer labels for a few branded items such as the Big Mac. Each food page links to its USDA record.

Every constant

Each value used by the engine, with its confidence: published (from or inside the range of the cited source), derived (computed from published values or tuned to a published target), or guess (plausible, no direct source yet).

KeyValueUnitConfidenceSource / note
p10.031/minpublishedGlucose effectiveness SG. Bergman et al. 1979 (Am J Physiol 236:E667); healthy 0.02–0.035/min.
p20.0221/minderivedRemote insulin action decay. Bergman 1979 range 0.01–0.05; tuned to OGTT shape (Abdul-Ghani 2007).
siNormal0.00061/min per µU/mLpublishedInsulin sensitivity SI for normal glucose tolerance. Bergman 1989 review; healthy 3–8e-4.
glucoseVolume1.7dL/kgpublishedGlucose distribution volume. Dalla Man et al. 2007 (IEEE TBME 54:1740): VG ≈ 1.49–1.88 dL/kg.
glucoseBioavailability0.9fractionpublishedFraction of ingested glucose reaching plasma. Dalla Man 2007: f = 0.90.
gutAbsorptionRate0.0251/minderivedGut→portal absorption rate. Dalla Man 2007 kabs ≈ 0.057/min; about half that here because this simpler chain lacks Dalla Man's nonlinear emptying, and the OGTT calibration needs a broader peak.
basalGlucoseNormal88mg/dLpublishedFasting plasma glucose, healthy adult. ADA: normal <100 mg/dL; population mean ≈ 85–92.
basalGlucosePrediabetic108mg/dLpublishedADA impaired fasting glucose 100–125 mg/dL.
basalGlucoseType2150mg/dLpublishedADA diabetes ≥126 mg/dL; untreated T2D commonly 130–180.
basalInsulinNormal6µU/mLpublishedFasting insulin, healthy 2–10 µU/mL (Johnson 2010, NHANES).
insulinClearance0.161/minpublishedPlasma insulin fractional clearance n. Bergman 1979: 0.1–0.3/min.
insulinSecretionGain0.08µU/mL/min per mg/dLderivedβ-cell gain; tuned so a 75 g OGTT peaks insulin ≈ 50–80 µU/mL (Kraft 1975 normal pattern).
insulinSecretionLate0.002µU/mL/min² per mg/dLderivedBergman 1979 second-phase γ term (integral of hyperglycaemia); keeps insulin up while glucose stays high.
renalThreshold180mg/dLpublishedRenal glucose threshold ≈ 180 mg/dL (Gerich 2010, Diabet Med 27:136).
renalClearance0.0021/minguessGlycosuria rate above threshold, expressed as plasma fraction per min.
fructoseToPlasmaGlucose0.25fractionderivedFraction of ingested fructose that appears as plasma glucose within the meal window. Tappy & Lê 2010 (Physiol Rev 90:23): ~30–50 % converted over hours, mostly stored as liver glycogen.
fructoseShareAddedSugar0.5fractionpublishedSucrose / HFCS-55 are ~50–55 % fructose.
fructoseShareOtherSugar0.3fractionguessAverage fructose share of non-added sugars (fruit ~50 %, dairy lactose 0 %).
tauGut045minderivedBaseline gastric half-emptying for a small solid carb meal. Scintigraphy normal T½ 45–90 min (Camilleri 2013).
tauGutFiber1.5min/gguessFiber slows emptying (Benini 1995 direction; magnitude guessed).
tauGutFat0.9min/gguessFat slows emptying (Hunt & Stubbs 1975 caloric-density control; magnitude guessed).
tauGutProtein0.4min/gguessProtein slows emptying slightly.
liquidEmptyingKcalPerMin3.5kcal/minderivedLiquid / near-pure sugar loads leave the stomach at a roughly constant energy rate, ~2–4 kcal/min (Brener 1983, Gastroenterology 85:76; Hunt & Stubbs 1975). Half-emptying τ = kcal ÷ (2 × rate). 3.5 keeps the 75 g OGTT (281 kcal) at τ ≈ 40 min, which hits the normal OGTT shape; a 355 mL cola (149 kcal) gets τ ≈ 21 min. Replaces the old fixed −5 min liquid shortcut, which made small drinks too slow.
tauGutMin15minguessFloor.
tauGutMax240minguessCeiling.
liverGlycogenCap100gpublishedLiver glycogen ≈ 80–120 g fed state (docs/02; Taylor 1996).
muscleGlycogenPerKg15g/kg musclepublished≈ 13–18 g/kg wet muscle in untrained, fed (Bergström 1967; Areta & Hopkins 2018). ~450 g for 30 kg muscle.
glycogenWaterRatio3g water/g glycogenpublishedOlsson & Saltin 1970: ≈ 3–4 g water stored per g glycogen.
carbOxBaseFraction0.4fraction of EEpublishedResting RQ ≈ 0.82–0.85 on mixed diet → ~40 % energy from carbohydrate.
glycogenRestingFill0.8fraction of capacityguessGlycogen fill at which resting carbohydrate oxidation equals the base fraction (the avatar starts at 80 % full).
carbOxGlycogenExponent2exponentguessHow strongly carbohydrate oxidation follows glycogen fill. Direction: carbohydrate balance is tightly autoregulated (Flatt 1987, Am J Clin Nutr 45:296; Acheson 1988). Magnitude guessed so a ~500 kcal carb-and-oil cut drops ~0.5 kg of glycogen + water rather than ~1.7 kg.
dnlFractionOfOverflow0.1fractionguessShare of carbohydrate overflow (glycogen full) that goes through hepatic de novo lipogenesis; the rest is oxidised preferentially (Acheson 1988: DNL is small unless overfed for days).
hallGammaFat3.2kcal/kg/daypublishedRMR cost of fat mass. Hall 2009 (Am J Physiol Endo 297:E449).
hallGammaLean22kcal/kg/daypublishedRMR cost of fat-free mass. Hall 2009.
adaptiveThermogenesisBeta0.14fraction of ΔEIpublishedHall et al. 2011 (Lancet 378:826): β_AT = 0.14.
deficitActivityBeta0.16fraction of ΔEIderivedExtra fall in expenditure during a deficit beyond Hall’s β_AT: people eating less also move less and burn less than body composition predicts (Martin 2007, Obesity 15:2964; Redman 2009, Cell Metab 9:206; CALERIE-2). Magnitude tuned so a 500 kcal/day cut loses ~11–12.5 kg in year 1 for the default man, matching CALERIE-2 men (Das 2017: −9.5 kg at 12 mo on ~15 % restriction). Not applied in a surplus.
adaptiveThermogenesisTau14daysguessTime constant for adaptation to follow intake change.
adaptiveThermogenesisCap0.15fraction of RMRderiveddocs/02 §3.2: adaptation up to −10 to −15 %.
tefProtein0.25fractionpublishedWesterterp 2004 (Nutr Metab 1:5): protein 20–30 %.
tefCarb0.075fractionpublishedWesterterp 2004: carbohydrate 5–10 %.
tefFat0.02fractionpublishedWesterterp 2004: fat 0–3 %.
tefTau180minderivedTEF lasts ~4–6 h after a meal (Reed & Hill 1996).
resistanceMET5METpublishedAinsworth Compendium 2011: resistance training, vigorous ≈ 5–6.
cardioMET8METpublishedAinsworth Compendium 2011: running ~8 km/h ≈ 8.3.
defaultPAL1.5ratiopublishedFAO/WHO/UNU 2004: sedentary 1.40–1.69.
energyDensityFat9440kcal/kgpublishedHall 2008 (Int J Obes 32:573): ρF = 9440 kcal/kg fat mass. Note: docs/02 quotes 7700 kcal/kg for adipose tissue (fat + water), equivalent.
energyDensityLean1816kcal/kgpublishedHall 2008: ρL = 1816 kcal/kg lean tissue (docs/02 says ≈1800).
forbesConstant10.4kgpublishedForbes 2000 / Hall 2007: p = C/(C+F), C = 10.4 kg × ρL/ρF.
deficitLeanScale0.6multiplier on Forbes pderivedForbes/Hall p predicts ~40–55 % of weight lost as lean for a lean avatar. Measured in nonobese adults on moderate calorie restriction: FFM ≈ 26 % of weight lost overall, ~34 % in men (CALERIE-2, Das 2017, Am J Clin Nutr 105:913). 0.6 brings a 500 kcal/day cut to ~1/3 lean and ~11–12 kg in year 1, in line with CALERIE-2 men (−9.5 kg at 12 mo on ~12–20 % restriction) and Hall 2011 (Lancet 378:826: half of the eventual ~21 kg in about a year).
leanShareThatIsMuscle0.5fractionguessShare of Forbes lean change that is skeletal muscle (rest: organs, water, bone). Roughly matches SMM ≈ 50 % of FFM.
visceralShareMale0.12fraction of fat massderivedVAT ≈ 10–20 % of total fat in men (Shen 2003 MRI).
visceralShareFemale0.07fraction of fat massderivedVAT ≈ 5–10 % of total fat in women (Shen 2003).
visceralLossPreference1.4multiplierderivedVAT is lost proportionally faster than total fat in weight loss (Chaston & Dixon 2008 meta-analysis).
waterPerGramSodium0.31kg/g NaderivedExtracellular fluid holds ~3.2 g Na per L (140 mmol/L), so retained sodium carries ≈0.31 L/g.
sodiumReferenceMg2300mg/daypublishedDietary Guidelines upper limit.
sodiumRetentionTau1.5daysguessRenal adjustment to sodium load takes 1–3 days.
skeletalMuscleShareMale0.5fraction of FFMderivedJanssen 2000 (J Appl Physiol 89:81): SMM ≈ 38 % of body mass in men → ~50 % of FFM.
skeletalMuscleShareFemale0.45fraction of FFMderivedJanssen 2000: ≈ 31 % of body mass in women.
hypertrophyMaxRate0.0011/dayderivedMax relative growth of a trained region with optimal inputs, untrained. Wernbom 2007 (Sports Med 37:225): quad CSA +0.1–0.2 %/day in intensive studies; low end used because whole-body gains in a meta-analysis are smaller (Benito 2020). Was 0.002, which gave +7.3 kg muscle in a beginner’s first year.
hypertrophyDiminishingExp4exponentderivedGrowth rate × (1 − progress to ceiling)^exp. Tuned so a beginner on a full-body program in a high-protein surplus gains ~1.5–2 kg skeletal muscle in 12 weeks (Benito 2020 meta-analysis, Int J Environ Res Public Health 17:1285: +1.1–1.5 kg SMM/lean mass over ~10 weeks; protein adds ~0.3 kg, Morton 2018) and ~3–4.5 kg in year 1, slowing each year.
ceilingFactorMale1.5M_max/M_0derivedNatural FFMI ceiling ≈ 25 (Kouri 1995) vs untrained ≈ 19 → ~+50 % muscle in trained regions.
ceilingFactorFemale1.4M_max/M_0guessAssumed slightly lower relative headroom.
stimulusSetsHalf8sets/weekderivedWeekly sets giving ~63 % of max stimulus. Schoenfeld 2017 dose–response (≥10 sets/week best).
sarcopeniaRate0.0061/yearpublishedMuscle loss ~0.5–1 %/year after ~40–50 (Mitchell 2012, Front Physiol 3:260).
sarcopeniaOnsetAge40yearspublishedMitchell 2012.
proteinOptimal1.6g/kg/daypublishedMorton 2018 meta-analysis (Br J Sports Med 52:376): benefit plateaus ≈1.6 g/kg.
proteinFloor0.5g/kg/dayguessProtein below which training gains are ~zero (RDA is 0.8).
startHeadroom1.15cap/start loadguessAssume the user starts at ~85 % of what they can do for the given reps.
neuralGainMax0.25fractionpublishedEarly strength gains of 20–30 % largely neural (Moritani & deVries 1979; Sale 1988).
neuralGainSessions12sessionsderivedNeural gains mostly in weeks 1–8 (docs/02).
fatiguePerSession15index ptsguessFatigue added per full session on a region.
fatigueRecoveryRate0.51/dayguessFatigue clearance at perfect recovery (~48 h to mostly recover).
fatigueStrengthPenalty0.4fraction at fatigue 100guessHow much residual fatigue lowers usable strength.
siTau30daysguessChronic SI drifts to its target over weeks.
siVisceralSlope0.21/kg VATguessSI falls ~18 % per extra kg visceral fat (direction: Preis 2010; magnitude guessed).
siLiverFatSlope0.041/%guessLiver fat lowers hepatic and whole-body SI (Fabbrini 2009).
siSleepSlope0.061/hderivedShort sleep lowers SI (Spiegel 1999; Donga 2010: −19 % after one 4 h night). Chronic effect assumed smaller.
siTrainingBoost0.15fractionpublishedRegular training raises SI ~10–25 % (Bird & Hawley 2017).
siExerciseAcuteBoost0.3fractionpublishedPost-exercise SI rises ~20–40 % for up to 24–48 h (Richter 1989; Mikines 1988).
siExerciseAcuteTau720minderivedDecay of the acute post-exercise boost.
exerciseGlucoseUptake0.0041/minguessInsulin-independent GLUT4 uptake during exercise, per unit intensity.
hrMaxIntercept208bpmpublishedTanaka 2001 (JACC 37:153): HRmax = 208 − 0.7 × age.
hrMaxSlope0.7bpm/yearpublishedTanaka 2001.
hrPerTefKcalMin20bpm per kcal/minguessPostprandial HR rise +4–12 bpm (docs/02; Kelbaek 1989).
hrPerVisceralKg0.8bpm/kgguessResting HR rises with visceral adiposity.
hrSleepSlope1.5bpm/h shortguessShort sleep raises resting HR slightly.
hrCardioFitnessDrop8bpmderivedEndurance training lowers RHR ~5–10 bpm (Reimers 2018 meta-analysis).
acuteInflTau360minguessILLUSTRATIVE. Decay of the acute inflammation index.
acuteInflPerGlucoseMin0.003pts per mg/dL·min above 140guessILLUSTRATIVE. Kept small: single-meal effects are weakly supported (docs/06).
acuteInflPerSatFatG0.12pts/gguessILLUSTRATIVE.
acuteInflPerTransFatG0.5pts/gguessILLUSTRATIVE.
acuteInflNova41.5pts/mealguessILLUSTRATIVE. Weak evidence for meal-level effect.
acuteInflPerSession6pts/sessionguessILLUSTRATIVE. Transient hormetic exercise signal.
chronicInflTau60daysguessILLUSTRATIVE.
ghrelinTau45minguessILLUSTRATIVE hunger index response time.

Main sources

  • Hall KD. What is the required energy deficit per unit weight loss? Int J Obes 2008;32:573–6.
  • Hall KD. Predicting metabolic adaptation, body weight change, and energy intake in humans. Am J Physiol Endocrinol Metab 2010;298:E449–66.
  • Hall KD, et al. Quantification of the effect of energy imbalance on bodyweight. Lancet 2011;378:826–37.
  • Bergman RN, et al. Quantitative estimation of insulin sensitivity. Am J Physiol 1979;236:E667–77.
  • Dalla Man C, Rizza RA, Cobelli C. Meal simulation model of the glucose-insulin system. IEEE Trans Biomed Eng 2007;54:1740–9.
  • American Diabetes Association. Classification and diagnosis of diabetes. Standards of Care in Diabetes (current edition).
  • Tappy L, Lê KA. Metabolic effects of fructose and the worldwide increase in obesity. Physiol Rev 2010;90:23–46.
  • Westerterp KR. Diet induced thermogenesis. Nutr Metab 2004;1:5.
  • Ainsworth BE, et al. 2011 Compendium of Physical Activities. Med Sci Sports Exerc 2011;43:1575–81.
  • Wernbom M, Augustsson J, Thomeé R. The influence of frequency, intensity, volume and mode of strength training on whole muscle cross-sectional area in humans. Sports Med 2007;37:225–64.
  • Morton RW, et al. A systematic review, meta-analysis and meta-regression of the effect of protein supplementation on resistance training-induced gains. Br J Sports Med 2018;52:376–84.
  • American Heart Association. Added sugars recommendations (≤36 g/day men, ≤25 g/day women).
  • U.S. Department of Agriculture, Agricultural Research Service. FoodData Central, fdc.nal.usda.gov.

Review and changes

The model has not yet been reviewed by a dietitian, physiologist or physician. If you are one and spot a problem, we would like to hear from you. Changes: 2026-11-26: first public methods page (engine v0.1, pages v1).

Related