Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungRefreshed repository pull requests page generally available(22.09.2026 um 03:25 Uhr)
Sichere ProgrammierungThe Joy of Learning the Basics Again(22.09.2026 um 03:28 Uhr)
Sichere ProgrammierungZero-Code OpenTelemetry Tracing for Dagster(22.09.2026 um 03:39 Uhr)
Linux Tipps & Hardening`prime-all`(22.09.2026 um 02:28 Uhr)
IT Security Toolsopensoho v0.15.2(22.09.2026 um 03:33 Uhr)
IT Security NachrichtenUS Proposes AI Incident Alert System in Talks With China, Bessent Says(22.09.2026 um 04:01 Uhr)
Sichere ProgrammierungRefreshed repository pull requests page generally available(22.09.2026 um 03:25 Uhr)
Sichere ProgrammierungThe Joy of Learning the Basics Again(22.09.2026 um 03:28 Uhr)
Sichere ProgrammierungZero-Code OpenTelemetry Tracing for Dagster(22.09.2026 um 03:39 Uhr)
Linux Tipps & Hardening`prime-all`(22.09.2026 um 02:28 Uhr)
IT Security Toolsopensoho v0.15.2(22.09.2026 um 03:33 Uhr)
IT Security NachrichtenUS Proposes AI Incident Alert System in Talks With China, Bessent Says(22.09.2026 um 04:01 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

I Simulated an Entire Human Body in Python: From Ion Channels to Sepsis

What if you could create a human being inside your computer — not a 3D avatar, but a physiological one? A body with a beating heart whose blood pressure responds to blood loss, lungs that desaturate at altitude, a pancreas that releases i…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

humanbody — whole-body physiology simulator



What if you could create a human being inside your computer — not a 3D avatar, but a physiological one? A body with a beating heart whose blood pressure responds to blood loss, lungs that desaturate at altitude, a pancreas that releases insulin after a meal, and an immune system that can tip into sepsis?



That's humanbody: a single Python object you step forward in time.




from humanbody import HumanBody

body = HumanBody()
for _ in range(60): # 60 seconds of life
body.step(dt=1.0)

print(body.state_summary())
# HR=72, MAP=93, PaO2=97, SaO2=0.98, glucose=94, cortisol=15, pH=7.40 ...






Every number that comes out of state_summary() is the emergent result of dozens of coupled differential equations — not a lookup table. Change one thing (bleed the patient, feed them, send them up a mountain) and the whole body responds the way a real body would.



It's 255 tests of mathematical physiology, and it's open source.




🔗 Code: github.com/cosmosoneness/Cosmos (under Emulation/Human_Body/)







Why build this?



Textbooks teach physiology one system at a time: here's the cardiac cycle, here's the nephron, here's the HPA axis. But the body isn't a list of chapters — it's a giant feedback network. When you exercise, your muscles demand oxygen, which raises your heart rate, which the baroreflex modulates, which shifts your blood pressure, which changes kidney filtration, which adjusts your fluid balance… all at once.



I wanted to feel those couplings, not just read about them. The only way to really understand a control system is to build one and watch it misbehave.



So I built the whole thing — fourteen phases, from molecules up to clinical scenarios.






The architecture: thinking in scales



The model is organized by biological scale, and the dependency arrow always points up:




molecular   →  enzyme kinetics, Hill dissociation, ATP/PCr/lactate
cellular → Hodgkin–Huxley ion channels, membrane potential
tissue → Krogh-cylinder oxygen diffusion
systems/ → 9 organ systems (the meat)
integration → HumanBody aggregator + homeostasis
scenarios → clinical challenges you can run






The nine organ systems each implement well-known models from the literature:
















































System Model
Cardiovascular Suga–Sagawa time-varying elastance + Ursino Windkessel + baroreflex
Respiratory Otis–Rohrer mechanics + alveolar gas equation + Hill O₂ dissociation
Nervous Wilson–Cowan cortical mass + brainstem rhythm generator + autonomic tone
Endocrine HPA / HPT / HPG axes + Dalla Man glucose–insulin + ADH/RAAS
Digestive 5-compartment GI transit + liver glycogen + microbiome SCFA
Renal glomerulus + tubular handling + countercurrent multiplier + acid–base
Musculoskeletal Hill-type muscle + PCr/lactate buffering + Lemaire bone remodeling
Integumentary Gagge two-node thermal model
Immune innate + adaptive + Perelson pathogen dynamics + SIRS criteria


They talk to each other through a shared signal bus — a dictionary of cross-system variables like mean arterial pressure, arterial oxygen, glucose, and cortisol — plus an event bus for discrete events like "a meal was eaten."






The hard part: time



Here's the thing nobody tells you about whole-body simulation — different systems live on wildly different timescales.



The heart beats on the order of milliseconds. A cardiac action potential, valve dynamics, the pressure pulse — all of it is stiff. Meanwhile, your cortisol rhythm plays out over hours, and bone remodeling takes weeks.



My first integration attempt used a naive forward-Euler step at dt = 1 second for everything. The result? Mean arterial pressure exploded to 5 × 10⁴⁹ mmHg. The cardiac ODE was catastrophically unstable at that step size.



The fix was per-system substepping: inside one body.step(dt=1.0), the engine runs the heart and circulation at 1 ms substeps (1000 iterations), the respiratory pump at 50 ms substeps, and everything slower at the full dt.




def step(self, dt=1.0, **perturbations):
# Cardiac dynamics are stiff — substep finely
n_cardio = max(1, int(dt / 1e-3))
for _ in range(n_cardio):
self.cardio.step(1e-3, signal=self.signal)

# Respiratory — medium substep
n_resp = max(1, int(dt / 0.05))
for _ in range(n_resp):
self.respiratory.step(0.05, signal=self.signal)

# Slow systems — one macro step
self.endocrine.step(dt, signal=self.signal)
self.renal.step(dt, signal=self.signal)
self.bus.publish(TickEvent(time=self.t, source="body", dt=dt))






This is the same idea as multi-rate integration in circuit simulators. It's not glamorous, but it's the difference between a model and a number that overflows a float.






Watching it come alive: clinical scenarios



The payoff is the scenario framework. Seven clinical challenges ship built-in:




from humanbody.scenarios import HemorrhageScenario, run_scenario

result = run_scenario(HemorrhageScenario(volume_mL=1000), dt=1.0)
print(result.alerts)
# ['Shock: MAP < 65 mmHg']






Run the hemorrhage scenario and you watch the baroreflex fight to maintain pressure as a liter of blood drains away — heart rate climbs, then pressure finally collapses into shock and the homeostasis monitor raises an alert.



Run sepsis and IL-6 rises, drives a fever and tachycardia, and the system checks itself against the actual SIRS criteria.



Run high-altitude and the barometric pressure drop propagates through the alveolar gas equation into the Hill oxygen-dissociation curve — SaO₂ falls, the chemoreflex kicks in, and ventilation rises.



Run diabetic ketoacidosis and glucose stays sky-high while bicarbonate falls and the pH drops below 7.3.



Each scenario is just a small class — and writing your own takes about a dozen lines:




from humanbody.scenarios.clinical import Scenario

class CaffeineDose(Scenario):
"""200 mg caffeine -> tachycardia + higher cortisol."""
def __init__(self):
super().__init__(name="Caffeine",
description="200 mg single dose",
duration=3600.0)
self.applied = False

def step_perturbation(self, body, t):
if not self.applied and t >= 60:
body.endocrine.hpa.stress_input += 0.2
body.cardio.baroreflex.set_point += 5
self.applied = True
return {}









What it can — and can't — do



Let me be honest about the boundaries, because that matters more than the demo.



It's good for: teaching integrated physiology, prototyping clinical scenarios, "what-if" experiments, and as a scaffold you can subclass into something research-grade. You learn an enormous amount just by breaking it.



It's not: a medical device, a source of patient-specific predictions, or publication-grade quantitative biology. Every ODE is forward-Euler with substepping — accurate enough to be qualitatively right, not quantitatively certified. Do not use it for medical decisions.



There's also a fun gotcha I left in the docs: ask for blood pressure at the wrong instant and you might see "MAP = 8.9 mmHg." That's not a bug — it's the instantaneous pressure sampled at diastole. The cardiac ODE is genuinely pulsatile at 1 ms resolution, so you have to average over a cycle to get a textbook number. The model is more honest than the summary statistic.






The bigger project



humanbody is actually one chapter of a larger repo I'm calling the Cosmos Research Institute — an umbrella for end-to-end "emulators" of real systems, from a cellular artificial-life world to connectome-level whole-brain emulation. The ambition is to keep building computational models of the world we live in until the name stops being a joke.



But you have to start somewhere, and the body is a beautiful place to start: it's the most sophisticated control system any of us will ever own, and now there's a version of it you can pip install and break to your heart's content.






Try it






git clone https://github.com/cosmosoneness/Cosmos.git
cd Cosmos/Emulation/Human_Body
pip install -e ".[dev]"
pytest tests/ -q # 255 passed

humanbody run exercise --duration 600
humanbody serve --port 8000 # REST API







  • 🔗 Source: github.com/cosmosoneness/Cosmos

  • 📖 Tutorial: the TUTORIAL.md in the repo has seven hands-on walkthroughs

  • ⭐ If it teaches you something, a star helps others find it






Built in Python with the help of Claude Code. The individual modules credit the papers they implement — Suga & Sagawa, Ursino, Dalla Man, Wilson & Cowan, Lemaire, Gagge, Perelson, and many others whose mathematical physiology made this possible.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten I Simulated an Entire Human Body in Python: From Ion Channels to Sepsis

Thematisch verwandte Begriffe: Simulated, Entire, Human, Body · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-61647 | NotebookLM MCP is an MCP server and HTTP service for interacting with Go…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick