Resting energy requirement RER = 70 × (mass in kg)0.75 kcal/day (Kleiber scaling used by veterinary nutrition); daily need MER = k × RER, with k about 1.2 to 1.6 for neutered adults and up to 2-3 for working or growing animals.
Model: a meal fills the stomach S (kcal) which empties exponentially into the body reserve R: dS/dt = −S/τ, dR/dt = S/τ − MER/24 per hour, τ = 3 h. Hunger = 1 − R/R0 (clamped). Playing adds 0.5 MER of extra burn for an hour and raises happiness; unhappiness grows with hunger and dirt. The check line compares the numerical stomach content with the exact S0e−t/τ.
Age: first year 15 human years, second 9 more, then 4 (cat, small dog), 5 (medium dog) or 6.5 (large dog) per year. These are rough rules of thumb, not physiology. This is an educational toy, not veterinary advice.