Cardiac output, blood pressure, vascular resistance and Poiseuille flow, lung volumes, ventilation and the alveolar gas equation, oxygen content and binding, acid-base, renal clearance and eGFR, Nernst and Goldman-Hodgkin-Katz potentials, cable properties, body composition and metabolic rate (computed values, not medical advice).
4ways to run: desktop app, command line, browser, Python
1.0.0version
What it does
What Human Physiology does
Human Physiology (human-physiology-ai999x) is an offline Python package for human physiology. It covers cardiac output, blood pressure, vascular resistance and Poiseuille flow, lung volumes, ventilation and the alveolar gas equation, oxygen content and binding, acid-base, renal clearance and eGFR, Nernst and Goldman-Hodgkin-Katz potentials, cable properties, body composition and metabolic rate (computed values, not medical advice).
It has 96 capabilities — 96 computational procedures — in 7 topics, the largest being Respiratory, Cardiovascular, Nerve and muscle, Renal, Metabolism and Body fluids. Ask a question in words with ask(), or call a capability by name with typed inputs with solve(). Every answer carries its value and unit, the steps that produced it and the formula in LaTeX.
When a question is not determined — a value is missing, an input is out of range, or the request is outside the package — it says so and names what it needs, instead of guessing. It runs on an ordinary CPU without a network connection (Python >=3.10), and the same question always gets the same answer.
Use it right here in your browser now: the compiled program runs on your own device, with nothing sent anywhere. The AI999X desktop app for Windows and Linux and the command-line program human-physiology follow in their next releases.
Desktop app
One app with every AI999X model: search, ask in words, input forms, live figures and explanations. Human Physiology joins it in its next release; until then, compute with it in your browser.
human-physiology joins the command-line bundle in its next release. Every command it answers, with what it printed, is under Command line on this page.
In your browser
Compute something now
Ask a question in words, or choose a capability and open its calculator: the inputs come filled in with a worked example; change any of them (any unit of the right kind) and press Compute. It runs on your device; nothing is sent anywhere.
The same capabilities as the desktop app and the command line, as WebAssembly in this page. Every capability below also has its own Compute in your browser button.
Worked examples
One example, every way to run it
Each worked example with its answer, then the same question on the command line, from Python and in your browser. A command-line output is exactly what the program printed for that command.
$human-physiology solve hp_egfr_ckd_epi_2021 Scr=1 age=50 sex=male
eGFR = 91.69147861
by: Estimated GFR by the CKD-EPI 2021 creatinine equation (CKD-EPI 2021: k = 0.7/0.9, a = -0.241/-0.302 (female/male))
Scr = 1
age = 50
sex = male
assumes: Scr > 0; 18 <= age <= 120
import human_physiology_ai999x as m
a = m.ask("eGFR CKD-EPI 2021: Scr = 1.0, age = 50, sex = male")
print(a.values or (a.value, a.unit))
Opens this capability’s form with the example filled in; change any input and press Compute.
$human-physiology solve hp_bmi "weight=70 kg" "height=175 cm"
BMI = 22.85714286
by: Body mass index (BMI = W / H^2 (H in m))
weight = 70 kg
height = 1.75 m
assumes: weight, height > 0
import human_physiology_ai999x as m
a = m.ask("body mass index: weight = 70 kg, height = 175 cm")
print(a.values or (a.value, a.unit))
Opens this capability’s form with the example filled in; change any input and press Compute.
Atwater energy: carbohydrate = 300 g, fat = 70 g, protein = 80 g
E = 4C + 9F + 4P + 7A
kcal = 2150
kJ = 8995.6
How it was worked out
Food energy by the Atwater factors
E = 4C + 9F + 4P + 7A
with carbohydrate = 300 g, fat = 70 g, protein = 80 g
→ kcal = 2150, kJ = 8995.6
Terminal
$human-physiology solve hp_atwater_energy "carbohydrate=300 g" "fat=70 g" "protein=80 g"
kcal = 2150
kJ = 8995.6
by: Food energy by the Atwater factors (4/9/4/7 kcal per g; 1 kcal = 4.184 kJ)
carbohydrate = 0.3 kg
fat = 0.07 kg
protein = 0.08 kg
assumes: amounts >= 0, not all zero
import human_physiology_ai999x as m
a = m.ask("Atwater energy: carbohydrate = 300 g, fat = 70 g, protein = 80 g")
print(a.values or (a.value, a.unit))
Opens this capability’s form with the example filled in; change any input and press Compute.
Every command below was run as shown, and the text under it is exactly what human-physiology printed. The same commands work in a Linux terminal and in Windows PowerShell. human-physiology joins the command-line bundle in its next release. The user guide covers install, inputs, outcomes, scripting, and every capability with a command and what it printed: PDF · text.
1
Check the install
Prints the model, its version and that this is the Rust build.
Search the capabilities by what you want to know; the first column is the id to pass to info and solve.
Terminal
$human-physiology search "cardiac output from heart rate and stroke volume"
hp_cardiac_output Cardiac output from heart rate and stroke volume (cardiovascular / cardiac output)
hp_cardiac_index Cardiac index and stroke volume index (cardiovascular / cardiac output)
hp_stroke_work Stroke work and cardiac power (cardiovascular / cardiac work)
hp_stroke_volume_ef Stroke volume and ejection fraction (cardiovascular / cardiac output)
hp_qt_correction Heart-rate corrected QT interval (Bazett, Fridericia, Framingham) (cardiovascular / electrocardiogram)
hp_heart_rate_reserve Maximal heart rate, heart rate reserve and Karvonen target (metabolism / exercise)
hp_fick_cardiac_output Cardiac output by the Fick principle (cardiovascular / cardiac output)
hp_fick_saturations Fick cardiac output from hemoglobin, saturations and PO2 (cardiovascular / cardiac output)
… 12 more
4
List the capabilities
Every capability the program answers: its id (what you pass to solve) and its name.
Terminal
$human-physiology list
hp_aa_gradient Alveolar-arterial oxygen gradient, a/A ratio and P/F ratio
hp_alveolar_gas_equation Alveolar gas equation
hp_alveolar_laplace_pressure Laplace pressure of an alveolus
hp_alveolar_ventilation_co2 Alveolar ventilation from CO2 output and arterial PCO2
hp_anion_gap Serum anion gap and albumin-corrected anion gap
hp_atwater_energy Food energy by the Atwater factors
hp_barometric_altitude Barometric pressure and inspired PO2 at altitude
hp_bernoulli_pressure_drop Bernoulli pressure drop across a narrowing
… 88 more
5
What a capability needs
The equation or method, every input and output with its SI unit. Read this before solve: it tells you the input names.
Terminal
$human-physiology info hp_cardiac_output
Cardiac output from heart rate and stroke volume
CO = HR SV / 1000
in HR heart rate in beats/min []
in SV stroke volume (e.g. in mL) [m^3]
out CO cardiac output in L/min []
out CO_mL cardiac output in mL/min []
6
Solve
Inputs as name=value, each with any unit of the right kind. The answer lists every output, the method used, each input converted to SI, and the conditions the answer assumes.
One JSON request per line in, one JSON answer per line out, in order: for scripts, notebooks and agents (the program starts once). In PowerShell: Get-Content cases.jsonl | human-physiology batch
$human-physiology batch < cases.jsonl
{"outcome":"SOLVED","message":"","value":5.04,"unit":"","solved_for":"CO","si":[["HR",72.0],["SV",0.00007]],"values":[["CO",5.04,""],["CO_mL",5040.0,""]],"target":"CO","phrase":"cardiac output in L/min","assumptions":["HR > 0","SV > 0"],"name":"Cardiac output from heart rate and stroke volume","equation":"CO = HR SV / 1000"}
{"outcome":"SOLVED","message":"","value":99.73,"unit":"","solved_for":"PAO2","si":[["FiO2",0.21],["Patm",101325.01443540001],["PH2O",6266.152208505],["PaCO2",5332.8954966],["RQ",0.8]],"values":[["PiO2",149.73,""],["PAO2",99.73,""],["PAO2_full",101.83,""]],"target":"PAO2","phrase":"inspired PO2 in mmHg","assumptions":["0 < FiO2 <= 1","Patm > PH2O","0 < RQ <= 1.5"],"name":"Alveolar gas equation","equation":"PAO2 = PiO2 - PaCO2/R (+ PaCO2 FiO2 (1 - R)/R)"}
All commands
Command
What it does
human-physiology ask "<question>"
answer a question written in words
human-physiology search "<words>"
find the capabilities that match
human-physiology list
every capability: its id and name
human-physiology info <capability>
the equation or method, its inputs and outputs with their units
human-physiology solve <capability> name=value …
the answer; add –target X to solve an equation for X, –json for JSON
human-physiology figures <capability> name=value … --out DIR
the live figures for those inputs, as SVG files in DIR
human-physiology batch < requests.jsonl
one JSON answer per line, for scripts and agents
human-physiology catalog
every capability with its inputs, as JSON
human-physiology --version
the model and its version
Exit status: 0 when the question was answered, 1 when it was not (the message says why: a missing input, an invalid value, a question outside the model), 2 for a command it does not know.
Python
Use it from Python
After pip install human-physiology-ai999x, ask in words or call a capability. Every snippet was run as shown; the output under it is what it printed. The Python guide covers ask in words, solve, and every capability with a Python example: PDF · text.
import human_physiology_ai999x as m
a = m.ask("cardiac output: HR = 72, SV = 70 mL")
print(a.outcome)
print(a.values)
for step in a.steps:
print(step["name"])
Output
SOLVED
{'CO': 5.04, 'CO_mL': 5040.0}
Cardiac output from heart rate and stroke volume
import human_physiology_ai999x as m
a = m.solve("hp_poiseuille_flow", dP="10 mmHg", eta=3.5, L="10 cm", r="2 mm")
print(a.outcome)
print(a.values)
import human_physiology_ai999x as m
# an input is missing: the answer says what it needs instead of guessing
a = m.solve("hp_poiseuille_flow")
print(a.outcome)
print(a.message)
Output
NEEDS_INPUT
hp_poiseuille_flow needs dP, eta, L, r (pressure drop along the vessel (e.g. in mmHg); blood viscosity in cP (mPa s); vessel length (e.g. in cm); vessel radius (e.g. in mm)). Example: solve('hp_poiseuille_flow', dP='1333.22 Pa', eta=3.5, L='0.1 m', r='0.002 m').
CO = 5.04, CO_mL = 5040
1. Cardiac output from heart rate and stroke volume: CO = HR SV / 1000 with HR = 72, SV = 70 mL -> CO = 5.04, CO_mL = 5040
Assumptions: HR > 0; SV > 0
…
Capabilities
Every capability, explained
Search by name, formula, input or topic. Each capability opens to say what it does, what it needs, what it gives back and why, with its worked example, how to run it (on the command line, from Python, in your browser) and its figures.
96 capabilities
Body composition 5
Body density and fat by hydrostatic weighing1 fig.hp_hydrostatic_weighing
Body volume (Ma – Mw)/rho_w – RV – GI gas, body density and Siri percent fat.
$human-physiology solve hp_hydrostatic_weighing "mass_air=70 kg" "mass_water=3 kg" "water_density=0.9957 g/mL" "RV=1.2 L"
volume = 65.98934418
density = 1.060777325
fat_Siri = 16.63893384
by: Body density and fat by hydrostatic weighing (Archimedes' principle, then Siri)
mass_air = 70 kg
mass_water = 3 kg
water_density = 995.7 kg/m^3
RV = 0.0012 m^3
assumes: mass_water < mass_air; computed density 0.9-1.2
import human_physiology_ai999x as m
a = m.solve("hp_hydrostatic_weighing", mass_air="70 kg", mass_water="3 kg", water_density="0.9957 g/mL", RV="1.2 L")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Body fat from body density (Siri and Brozek)2 fig.hp_body_fat_from_density
Percent body fat by Siri (495/D – 450) and Brozek (457/D – 414.2) from whole-body density.
\%BF = \frac{495}{D} – 450
You give
Meaning
Unit
Example
\text{density}
Body density (e.g. in g/mL)
kg/m^3
1.05 g/mL
You get
Meaning
Unit
Example
\text{fat\_Siri}
Body fat in % (Siri)
—
21.42857143
\text{fat\_Brozek}
Body fat in % (Brozek)
—
21.03809524
Values with a unit may be written in any unit of the right kind.
Applies when
0.9 < density < 1.2
Outside these conditions it says what is wrong instead of returning a number.
Worked example
body fat from density: density = 1.05 g/mL
fat_Siri = 21.42857143
fat_Brozek = 21.03809524
Run it
Terminal
$human-physiology solve hp_body_fat_from_density "density=1.05 g/mL"
fat_Siri = 21.42857143
fat_Brozek = 21.03809524
by: Body fat from body density (Siri and Brozek) (two-compartment models)
density = 1050 kg/m^3
assumes: 0.9 < density < 1.2
import human_physiology_ai999x as m
a = m.solve("hp_body_fat_from_density", density="1.05 g/mL")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Body mass index2 fig.hp_bmi
BMI = weight/height^2 (kg/m^2).
BMI = \frac{W}{H^2}
You give
Meaning
Unit
Example
\text{weight}
Weight (e.g. in kg)
kg
70 kg
\text{height}
Height (e.g. in cm)
m
175 cm
You get
Meaning
Unit
Example
\text{BMI}
Body mass index in kg/m²
—
22.85714286
Values with a unit may be written in any unit of the right kind.
Applies when
weight, height > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
body mass index: weight = 70 kg, height = 175 cm
BMI = 22.85714286
Run it
Terminal
$human-physiology solve hp_bmi "weight=70 kg" "height=175 cm"
BMI = 22.85714286
by: Body mass index (BMI = W / H^2 (H in m))
weight = 70 kg
height = 1.75 m
assumes: weight, height > 0
import human_physiology_ai999x as m
a = m.solve("hp_bmi", weight="70 kg", height="175 cm")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Body surface area (DuBois, Mosteller, Haycock, Gehan-George)2 fig.hp_body_surface_area
Body surface area by the DuBois (1916), Mosteller (1987), Haycock (1978) and Gehan-George (1970) formulas.
import human_physiology_ai999x as m
a = m.solve("hp_body_surface_area", weight="70 kg", height="175 cm")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Lean body mass by the Boer formula2 fig.hp_lean_body_mass_boer
Boer (1984): male 0.407 W + 0.267 H – 19.2, female 0.252 W + 0.473 H – 48.3 (kg), and the remaining fat mass.
LBM_m = 0.407\,W + 0.267\,H – 19.2
You give
Meaning
Unit
Example
\text{weight}
Weight (e.g. in kg)
kg
70 kg
\text{height}
Height (e.g. in cm)
m
175 cm
\text{sex}
Sex for the formula choice
—
male
You get
Meaning
Unit
Example
\text{LBM}
Lean body mass in kg
—
56.015
\text{fat\_mass}
Weight – LBM in kg
—
13.985
Values with a unit may be written in any unit of the right kind.
Applies when
0 < LBM < weight
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Boer lean body mass: weight = 70 kg, height = 175 cm, sex = male
LBM = 56.015
fat_mass = 13.985
Run it
Terminal
$human-physiology solve hp_lean_body_mass_boer "weight=70 kg" "height=175 cm" sex=male
LBM = 56.015
fat_mass = 13.985
by: Lean body mass by the Boer formula (Boer anthropometric formula)
weight = 70 kg
height = 1.75 m
sex = male
assumes: 0 < LBM < weight
import human_physiology_ai999x as m
a = m.solve("hp_lean_body_mass_boer", weight="70 kg", height="175 cm", sex="male")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Body fluids 6
Body fluid compartments1 fig.hp_body_fluid_compartments
Total body water (60 % of weight by default), intracellular 2/3, extracellular 1/3, interstitial 3/4 and plasma 1/4 of the ECF.
import human_physiology_ai999x as m
a = m.solve("hp_body_fluid_compartments", weight="70 kg")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Gibbs-Donnan equilibrium with an impermeant anion2 fig.hp_gibbs_donnan
Equilibrium NaCl distribution across a membrane when one side holds impermeant anions (charge concentration A) facing a large bath of NaCl c: concentrations, Donnan ratio, potential and osmotic excess.
[Na^+]_i[Cl^-]_i = [Na^+]_o[Cl^-]_o,\quad [Na^+]_i = [Cl^-]_i + A
You give
Meaning
Unit
Example
A
Impermeant anion charge concentration inside in mEq/L
—
20
c
Bath NaCl concentration (e.g. in mmol/L)
mol/m^3
150 mmol/L
T
Temperature (e.g. in degC) (optional; body temperature if omitted) optional
K
You get
Meaning
Unit
Example
\text{Na\_in}
Na+ inside in mmol/L
—
160.3329638
\text{Cl\_in}
Cl- inside in mmol/L
—
140.3329638
r
Donnan ratio Na_in/Na_out = Cl_out/Cl_in
—
1.068886425
V_{\mathrm{mV}}
Membrane potential inside relative to the bath in mV
—
-1.780460072
\text{osmotic\_excess}
Extra diffusible ions inside in mmol/L
—
0.6659275675
Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.
Applies when
A, c > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Gibbs-Donnan equilibrium: A = 20, c = 150 mmol/L
Na_in = 160.3329638
Cl_in = 140.3329638
r = 1.068886425
V_mV = -1.780460072
osmotic_excess = 0.6659275675
Run it
Terminal
$human-physiology solve hp_gibbs_donnan A=20 "c=150 mmol/L"
Na_in = 160.3329638
Cl_in = 140.3329638
r = 1.068886425
V_mV = -1.780460072
osmotic_excess = 0.6659275675
by: Gibbs-Donnan equilibrium with an impermeant anion (Na_in Cl_in = c^2 with Na_in = Cl_in + A (quadratic); V = -(RT/F) ln(Na_in/c))
A = 20
c = 150 mol/m^3
assumes: A, c > 0
import human_physiology_ai999x as m
a = m.solve("hp_gibbs_donnan", A="20", c="150 mmol/L")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Osmolarity of a solution1 fig.hp_solution_osmolarity
Molarity from a mass concentration and the osmolarity (particles per formula unit, times the osmotic coefficient).
\text{osmolarity} = \phi\, i\, \frac{c}{M}
You give
Meaning
Unit
Example
\text{conc}
Mass concentration (e.g. in g/L)
kg/m^3
9 g/L
\text{molar\_mass}
Molar mass (e.g. in g/mol)
kg/mol
58.44 g/mol
i
Number of particles per formula unit (dissociation)
—
2
\phi
Osmotic coefficient (optional; ideal solution if omitted) optional
—
You get
Meaning
Unit
Example
\text{molarity}
Molarity in mmol/L
—
154.0041068
\text{osmolarity}
Osmolarity in mOsm/L
—
308.0082136
Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.
Applies when
conc, molar mass > 0
1 <= i <= 6
Outside these conditions it says what is wrong instead of returning a number.
$human-physiology solve hp_solution_osmolarity "conc=9 g/L" "molar_mass=58.44 g/mol" i=2
molarity = 154.0041068
osmolarity = 308.0082136
by: Osmolarity of a solution (mOsm/L = 1000 c/M x i x phi)
conc = 9 kg/m^3
molar_mass = 0.05844 kg/mol
assumes: conc, molar mass > 0; 1 <= i <= 6
import human_physiology_ai999x as m
a = m.solve("hp_solution_osmolarity", conc="9 g/L", molar_mass="58.44 g/mol", i="2")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Osmotic pressure by van 't Hoff's law1 fig.hp_osmotic_pressure
pi = c R T for an osmolarity c, in Pa, mmHg and atm (about 19.3 mmHg per mOsm/L at 37 degC).
\pi = c R T
You give
Meaning
Unit
Example
\text{osm}
Osmolarity (or osmolarity difference) in mOsm/L
—
300
T
Temperature (e.g. in degC) (optional; body temperature if omitted) optional
K
You get
Meaning
Unit
Example
\pi
Osmotic pressure in Pa
—
773619.1743
\pi_{\mathrm{mmHg}}
Osmotic pressure in mmHg
—
5802.62017
\pi_{\mathrm{atm}}
Osmotic pressure in atm
—
7.635027627
Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.
Applies when
osm >= 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
osmotic pressure: osm = 300
pi = 773619.1743
pi_mmHg = 5802.62017
pi_atm = 7.635027627
Run it
Terminal
$human-physiology solve hp_osmotic_pressure osm=300
pi = 773619.1743
pi_mmHg = 5802.62017
pi_atm = 7.635027627
by: Osmotic pressure by van 't Hoff's law (pi = c R T (ideal dilute solution))
osm = 300
assumes: osm >= 0
import human_physiology_ai999x as m
a = m.solve("hp_osmotic_pressure", osm="300")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Total body water by the Watson equations1 fig.hp_watson_total_body_water
Watson (1980): male 2.447 – 0.09516 age + 0.1074 H + 0.3362 W; female -2.097 + 0.1069 H + 0.2466 W (litres).
Values with a unit may be written in any unit of the right kind.
Applies when
adult
height, weight > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Watson total body water: age = 40, height = 175 cm, weight = 70 kg, sex = male
TBW = 40.9696
Run it
Terminal
$human-physiology solve hp_watson_total_body_water age=40 "height=175 cm" "weight=70 kg" sex=male
TBW = 40.9696
by: Total body water by the Watson equations (Watson anthropometric regression)
age = 40
height = 1.75 m
weight = 70 kg
sex = male
assumes: adult; height, weight > 0
import human_physiology_ai999x as m
a = m.solve("hp_watson_total_body_water", age="40", height="175 cm", weight="70 kg", sex="male")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Two-compartment fluid shift after adding a solution (Darrow-Yannet)2 fig.hp_fluid_shift
New osmolality and intracellular and extracellular volumes at osmotic equilibrium after a volume of solution enters the ECF.
$human-physiology solve hp_fluid_shift "TBW=42 L" Posm=290 "V_added=2 L" C_added=0
osm_final = 276.8181818
ICF = 29.33333333
ECF = 14.66666667
by: Two-compartment fluid shift after adding a solution (Darrow-Yannet) (solute conservation in each compartment, equal osmolality, water conservation)
TBW = 0.042 m^3
Posm = 290
V_added = 0.002 m^3
C_added = 0
assumes: TBW, Posm, V_added > 0; C_added >= 0; solute stays in the ECF, water moves freely
import human_physiology_ai999x as m
a = m.solve("hp_fluid_shift", TBW="42 L", Posm="290", V_added="2 L", C_added="0")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Cardiovascular 26
Bernoulli pressure drop across a narrowing2 fig.hp_bernoulli_pressure_drop
Convective pressure drop 0.5 rho (v2^2 – v1^2) across a stenosis or valve, and the simplified 4 v^2 (mmHg, v in m/s).
\Delta P = \tfrac{1}{2}\rho\,(v_2^2 – v_1^2) \approx 4 v_2^2
You give
Meaning
Unit
Example
\text{v1}
Upstream velocity (e.g. in m/s)
m/s
1 m/s
\text{v2}
Jet velocity (e.g. in m/s)
m/s
4 m/s
\rho
Blood density (e.g. in kg/m³)
kg/m^3
1060 kg/m^3
You get
Meaning
Unit
Example
\text{dP}
Pressure drop in Pa
—
7950
\text{dP\_mmHg}
Pressure drop in mmHg
—
59.62989528
\text{dP\_simplified}
Pressure drop by the simplified Bernoulli equation in mmHg
—
64
Values with a unit may be written in any unit of the right kind.
Applies when
v2 > v1 >= 0
inviscid steady flow
Outside these conditions it says what is wrong instead of returning a number.
import human_physiology_ai999x as m
a = m.solve("hp_bernoulli_pressure_drop", v1="1 m/s", v2="4 m/s", rho="1060 kg/m^3")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Cardiac index and stroke volume index1 fig.hp_cardiac_index
Cardiac index CI = CO/BSA, stroke volume SV = CO/HR and stroke volume index SVI = CI/HR.
CI = \frac{CO}{BSA},\quad SVI = \frac{CI}{HR}
You give
Meaning
Unit
Example
\text{CO}
Cardiac output (e.g. in L/min)
m^3/s
5.04 L/min
\text{BSA}
Body surface area (e.g. in m²)
m^2
1.8 m^2
\text{HR}
Heart rate in beats/min (optional; needed for the stroke volume index) optional
—
72
You get
Meaning
Unit
Example
\text{CI}
Cardiac index in L/min/m²
—
2.8
\text{SVI}
Stroke volume index in mL/m²
—
38.88888889
\text{SV}
Stroke volume in mL
—
70
Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.
Applies when
CO, BSA, HR > 0
Outside these conditions it says what is wrong instead of returning a number.
$human-physiology solve hp_cardiac_index "CO=5.04 L/min" "BSA=1.8 m^2" HR=72
CI = 2.8
SVI = 38.88888889
SV = 70
by: Cardiac index and stroke volume index (CI = CO/BSA; SVI = 1000 CI/HR)
CO = 8.4e-05 m^3/s
BSA = 1.8 m^2
HR = 72
assumes: CO, BSA, HR > 0
import human_physiology_ai999x as m
a = m.solve("hp_cardiac_index", CO="5.04 L/min", BSA="1.8 m^2", HR="72")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Cardiac output by the Fick principle1 fig.hp_fick_cardiac_output
Cardiac output from oxygen consumption and the arteriovenous oxygen content difference: CO = VO2/(CaO2 – CvO2).
CO = \frac{\dot V_{O_2}}{C_aO_2 – C_{\bar v}O_2}
You give
Meaning
Unit
Example
\text{VO2}
Oxygen consumption (e.g. in mL/min)
m^3/s
250 mL/min
\text{CaO2}
Arterial oxygen content in mL O2/dL
—
20
\text{CvO2}
Mixed venous oxygen content in mL O2/dL
—
15
You get
Meaning
Unit
Example
\text{CO}
Cardiac output in L/min
—
5
\text{avDO2}
Arteriovenous O2 content difference in mL/dL
—
5
Values with a unit may be written in any unit of the right kind.
Applies when
VO2 > 0
0 <= CvO2 < CaO2
Outside these conditions it says what is wrong instead of returning a number.
$human-physiology solve hp_fick_cardiac_output "VO2=250 mL/min" CaO2=20 CvO2=15
CO = 5
avDO2 = 5
by: Cardiac output by the Fick principle (CO = VO2 / (10 (CaO2 - CvO2)) (contents per dL -> per L))
VO2 = 4.166666667e-06 m^3/s
CaO2 = 20
CvO2 = 15
assumes: VO2 > 0; 0 <= CvO2 < CaO2
import human_physiology_ai999x as m
a = m.solve("hp_fick_cardiac_output", VO2="250 mL/min", CaO2="20", CvO2="15")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Cardiac output from heart rate and stroke volume2 fig.hp_cardiac_output
Cardiac output CO = HR x SV, in L/min and mL/min.
CO = HR \times SV
You give
Meaning
Unit
Example
\text{HR}
Heart rate in beats/min
—
72
\text{SV}
Stroke volume (e.g. in mL)
m^3
70 mL
You get
Meaning
Unit
Example
\text{CO}
Cardiac output in L/min
—
5.04
\text{CO\_mL}
Cardiac output in mL/min
—
5040
Values with a unit may be written in any unit of the right kind.
Applies when
HR > 0
SV > 0
Outside these conditions it says what is wrong instead of returning a number.
import human_physiology_ai999x as m
a = m.solve("hp_cardiac_output", HR="72", SV="70 mL")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Compliance and elastance2 fig.hp_vascular_compliance
Compliance C = dV/dP and its inverse, the elastance E = dP/dV.
C = \frac{\Delta V}{\Delta P}
You give
Meaning
Unit
Example
\text{dV}
Volume change (e.g. in mL)
m^3
70 mL
\text{dP}
Pressure change (e.g. in mmHg)
Pa
40 mmHg
You get
Meaning
Unit
Example
C
Compliance in mL/mmHg
—
1.75
E
Elastance in mmHg/mL
—
0.5714285714
Values with a unit may be written in any unit of the right kind.
Applies when
dV, dP > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
vascular compliance: dV = 70 mL, dP = 40 mmHg
C = 1.75
E = 0.5714285714
Run it
Terminal
$human-physiology solve hp_vascular_compliance "dV=70 mL" "dP=40 mmHg"
C = 1.75
E = 0.5714285714
by: Compliance and elastance (C = dV/dP)
dV = 7e-05 m^3
dP = 5332.895497 Pa
assumes: dV, dP > 0
import human_physiology_ai999x as m
a = m.solve("hp_vascular_compliance", dV="70 mL", dP="40 mmHg")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Effect of a change of vessel radius on flow and resistance2 fig.hp_radius_flow_ratio
At the same pressure drop, flow scales as r^4 and resistance as 1/r^4 (Poiseuille).
\frac{Q_2}{Q_1} = \left(\frac{r_2}{r_1}\right)^4
You give
Meaning
Unit
Example
\text{r1}
Initial radius (any unit)
—
1
\text{r2}
New radius (same unit)
—
2
You get
Meaning
Unit
Example
\text{flow\_ratio}
New flow / initial flow
—
16
\text{resistance\_ratio}
New resistance / initial resistance
—
0.0625
Applies when
r1, r2 > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
radius change and flow: r1 = 1, r2 = 2
flow_ratio = 16
resistance_ratio = 0.0625
Run it
Terminal
$human-physiology solve hp_radius_flow_ratio r1=1 r2=2
flow_ratio = 16
resistance_ratio = 0.0625
by: Effect of a change of vessel radius on flow and resistance (Q2/Q1 = (r2/r1)^4)
r1 = 1
r2 = 2
assumes: r1, r2 > 0
import human_physiology_ai999x as m
a = m.solve("hp_radius_flow_ratio", r1="1", r2="2")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Fick cardiac output from hemoglobin, saturations and PO21 fig.hp_fick_saturations
Arterial and mixed venous O2 contents (1.34 Hb S + 0.003 PO2) and the Fick cardiac output VO2/(CaO2 – CvO2).
$human-physiology solve hp_fick_saturations "VO2=250 mL/min" Hb=15 SaO2=0.98 SvO2=0.75 "PaO2=95 mmHg" "PvO2=40 mmHg"
CO = 5.2213868
CaO2 = 19.983
CvO2 = 15.195
by: Fick cardiac output from hemoglobin, saturations and PO2 (C = 1.34 Hb S + 0.003 PO2; CO = VO2/(10 (CaO2 - CvO2)))
VO2 = 4.166666667e-06 m^3/s
Hb = 15
SaO2 = 0.98
SvO2 = 0.75
PaO2 = 12665.6268 Pa
PvO2 = 5332.895497 Pa
assumes: saturations between 0 and 1; CvO2 < CaO2
import human_physiology_ai999x as m
a = m.solve("hp_fick_saturations", VO2="250 mL/min", Hb="15", SaO2="0.98", SvO2="0.75", PaO2="95 mmHg", PvO2="40 mmHg")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Values with a unit may be written in any unit of the right kind.
Applies when
QT, HR > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
corrected QT interval: QT = 400 ms, HR = 75
RR = 0.8
QTc_Bazett = 447.2135955
QTc_Fridericia = 430.886938
QTc_Framingham = 430.8
Run it
Terminal
$human-physiology solve hp_qt_correction "QT=400 ms" HR=75
RR = 0.8
QTc_Bazett = 447.2135955
QTc_Fridericia = 430.886938
QTc_Framingham = 430.8
by: Heart-rate corrected QT interval (Bazett, Fridericia, Framingham) (RR in seconds; the three published corrections)
QT = 0.4 s
HR = 75
assumes: QT, HR > 0
import human_physiology_ai999x as m
a = m.solve("hp_qt_correction", QT="400 ms", HR="75")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Hydrostatic pressure of a blood column2 fig.hp_hydrostatic_pressure
Pressure difference rho g h between two points a height h apart in a column of blood (posture effects).
\Delta P = \rho g h
You give
Meaning
Unit
Example
h
Height of the column (e.g. in cm) (positive = the lower point)
m
130 cm
\rho
Blood density (e.g. in kg/m³)
kg/m^3
1060 kg/m^3
You get
Meaning
Unit
Example
\text{dP}
Pressure difference in Pa
—
13513.5637
\text{dP\_mmHg}
Pressure difference in mmHg
—
101.3600488
Values with a unit may be written in any unit of the right kind.
Applies when
rho > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
hydrostatic pressure of a blood column: h = 130 cm, rho = 1060 kg/m^3
dP = 13513.5637
dP_mmHg = 101.3600488
Run it
Terminal
$human-physiology solve hp_hydrostatic_pressure "h=130 cm" "rho=1060 kg/m^3"
dP = 13513.5637
dP_mmHg = 101.3600488
by: Hydrostatic pressure of a blood column (dP = rho g h)
h = 1.3 m
rho = 1060 kg/m^3
assumes: rho > 0
import human_physiology_ai999x as m
a = m.solve("hp_hydrostatic_pressure", h="130 cm", rho="1060 kg/m^3")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Laplace wall tension and wall stress of a vessel or chamber1 fig.hp_laplace_wall_tension
Law of Laplace: wall tension T = P r (cylinder) or P r/2 (sphere) and wall stress T/h.
T = P r \;(\text{cylinder}),\quad T = \tfrac{P r}{2} \;(\text{sphere}),\quad \sigma = T/h
You give
Meaning
Unit
Example
P
Transmural pressure (e.g. in mmHg)
Pa
100 mmHg
r
Radius (e.g. in cm)
m
1.5 cm
\text{shape}
Cylinder (vessel) or sphere (chamber, alveolus) choice
—
cylinder
h
Wall thickness (e.g. in mm) (optional; needed for the wall stress) optional
m
2 mm
You get
Meaning
Unit
Example
T
Wall tension in N/m
—
199.9835811
\text{stress}
Wall stress in kPa
—
99.99179056
Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.
Applies when
P, r, h > 0
thin wall
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Laplace wall tension: P = 100 mmHg, r = 1.5 cm, shape = cylinder, h = 2 mm
T = 199.9835811
stress = 99.99179056
Run it
Terminal
$human-physiology solve hp_laplace_wall_tension "P=100 mmHg" "r=1.5 cm" shape=cylinder "h=2 mm"
T = 199.9835811
stress = 99.99179056
by: Laplace wall tension and wall stress of a vessel or chamber (T = P r (cylinder), P r/2 (sphere); stress = T/h)
P = 13332.23874 Pa
r = 0.015 m
h = 0.002 m
shape = cylinder
assumes: P, r, h > 0; thin wall
import human_physiology_ai999x as m
a = m.solve("hp_laplace_wall_tension", P="100 mmHg", r="1.5 cm", shape="cylinder", h="2 mm")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Left-ventricular volumes and ejection fraction by the Teichholz formula2 fig.hp_teichholz_volumes
Teichholz volume V = 7 D^3/(2.4 + D) from M-mode internal diameters, EF and fractional shortening.
V = \frac{7 D^3}{2.4 + D}
You give
Meaning
Unit
Example
\text{LVIDd}
End-diastolic internal diameter (e.g. in cm)
m
5 cm
\text{LVIDs}
End-systolic internal diameter (e.g. in cm)
m
3.2 cm
You get
Meaning
Unit
Example
\text{EDV}
End-diastolic volume in mL
—
118.2432432
\text{ESV}
End-systolic volume in mL
—
40.96
\text{EF}
Ejection fraction
—
0.6535954286
\text{FS}
Fractional shortening
—
0.36
Values with a unit may be written in any unit of the right kind.
Applies when
0 < LVIDs < LVIDd
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Teichholz volumes: LVIDd = 5 cm, LVIDs = 3.2 cm
EDV = 118.2432432
ESV = 40.96
EF = 0.6535954286
FS = 0.36
Run it
Terminal
$human-physiology solve hp_teichholz_volumes "LVIDd=5 cm" "LVIDs=3.2 cm"
EDV = 118.2432432
ESV = 40.96
EF = 0.6535954286
FS = 0.36
by: Left-ventricular volumes and ejection fraction by the Teichholz formula (V = 7 D^3/(2.4 + D) (D in cm, V in mL))
LVIDd = 0.05 m
LVIDs = 0.032 m
assumes: 0 < LVIDs < LVIDd
import human_physiology_ai999x as m
a = m.solve("hp_teichholz_volumes", LVIDd="5 cm", LVIDs="3.2 cm")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Mean arterial pressure and pulse pressure2 fig.hp_mean_arterial_pressure
Pulse pressure PP = SBP – DBP and the estimated mean arterial pressure MAP = DBP + PP/3.
MAP = DBP + \tfrac{1}{3}(SBP – DBP)
You give
Meaning
Unit
Example
\text{SBP}
Systolic pressure (e.g. in mmHg)
Pa
120 mmHg
\text{DBP}
Diastolic pressure (e.g. in mmHg)
Pa
80 mmHg
You get
Meaning
Unit
Example
\text{MAP}
Mean arterial pressure in mmHg
—
93.33333333
\text{PP}
Pulse pressure in mmHg
—
40
Values with a unit may be written in any unit of the right kind.
Applies when
SBP > DBP > 0
Outside these conditions it says what is wrong instead of returning a number.
import human_physiology_ai999x as m
a = m.solve("hp_mean_arterial_pressure", SBP="120 mmHg", DBP="80 mmHg")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Mean blood velocity from flow and total cross-sectional area2 fig.hp_blood_velocity_area
Continuity: mean velocity v = Q/A (slow in the capillaries because their total area is large).
v = \frac{Q}{A}
You give
Meaning
Unit
Example
Q
Flow (e.g. in L/min)
m^3/s
5 L/min
A
Total cross-sectional area (e.g. in cm²)
m^2
4 cm^2
You get
Meaning
Unit
Example
v
Mean velocity in cm/s
—
20.83333333
Values with a unit may be written in any unit of the right kind.
Applies when
Q, A > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
mean blood velocity: Q = 5 L/min, A = 4 cm^2
v = 20.83333333
Run it
Terminal
$human-physiology solve hp_blood_velocity_area "Q=5 L/min" "A=4 cm^2"
v = 20.83333333
by: Mean blood velocity from flow and total cross-sectional area (v = Q/A (L/min -> cm^3/s))
Q = 8.333333333e-05 m^3/s
A = 0.0004 m^2
assumes: Q, A > 0
import human_physiology_ai999x as m
a = m.solve("hp_blood_velocity_area", Q="5 L/min", A="4 cm^2")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Mean QRS (electrical) axis from leads I and aVF2 fig.hp_qrs_axis
The frontal-plane mean electrical axis atan2(aVF, I) in degrees (hexaxial convention: lead I at 0 deg, aVF at +90 deg).
\theta = \operatorname{atan2}(aVF, I)
You give
Meaning
Unit
Example
\text{lead\_I}
Net QRS deflection in lead I (mm or mV)
—
0.5
\text{aVF}
Net QRS deflection in aVF (same unit)
—
-0.5
You get
Meaning
Unit
Example
\text{axis}
Mean QRS axis in degrees (principal value)
—
-45
\text{amplitude}
Length of the mean vector (same unit)
—
0.7071067812
Applies when
not both zero
Outside these conditions it says what is wrong instead of returning a number.
Worked example
QRS axis: lead_I = 0.5, aVF = -0.5
axis = -45
amplitude = 0.7071067812
Run it
Terminal
$human-physiology solve hp_qrs_axis lead_I=0.5 aVF=-0.5
axis = -45
amplitude = 0.7071067812
by: Mean QRS (electrical) axis from leads I and aVF (axis = atan2(aVF, I))
lead_I = 0.5
aVF = -0.5
assumes: not both zero
import human_physiology_ai999x as m
a = m.solve("hp_qrs_axis", lead_I="0.5", aVF="-0.5")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Poiseuille flow, mean velocity and wall shear stress in a vessel1 fig.hp_poiseuille_flow
Laminar flow Q = dP pi r^4/(8 eta L) through a vessel, its mean velocity and the wall shear stress 4 eta Q/(pi r^3).
Values with a unit may be written in any unit of the right kind.
Applies when
all inputs > 0
steady laminar Newtonian flow
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Poiseuille flow: dP = 10 mmHg, eta = 3.5, L = 10 cm, r = 2 mm
Q = 23.93397902
Q_mL_min = 1436.038741
v_mean = 190.4605534
tau_wall = 13.33223874
Run it
Terminal
$human-physiology solve hp_poiseuille_flow "dP=10 mmHg" eta=3.5 "L=10 cm" "r=2 mm"
Q = 23.93397902
Q_mL_min = 1436.038741
v_mean = 190.4605534
tau_wall = 13.33223874
by: Poiseuille flow, mean velocity and wall shear stress in a vessel (Q = dP pi r^4 /(8 eta L); tau_w = 4 eta Q/(pi r^3))
dP = 1333.223874 Pa
eta = 3.5
L = 0.1 m
r = 0.002 m
assumes: all inputs > 0; steady laminar Newtonian flow
import human_physiology_ai999x as m
a = m.solve("hp_poiseuille_flow", dP="10 mmHg", eta="3.5", L="10 cm", r="2 mm")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Poiseuille resistance of a blood vessel1 fig.hp_poiseuille_resistance
Resistance to laminar flow of a cylindrical vessel R = 8 eta L/(pi r^4), in Pa s/m³ and in mmHg min/mL.
R = \frac{8\eta L}{\pi r^4}
You give
Meaning
Unit
Example
\eta
Blood viscosity in cP (mPa s)
—
3.5
L
Vessel length (e.g. in cm)
m
10 cm
r
Vessel radius (e.g. in mm)
m
2 mm
You get
Meaning
Unit
Example
R
Resistance in Pa s/m³
—
55704230.08
R_{\mathrm{mmHg}}
Resistance in mmHg min/mL
—
0.006963600433
Values with a unit may be written in any unit of the right kind.
Applies when
eta, L, r > 0
steady laminar Newtonian flow in a rigid tube
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Poiseuille resistance: eta = 3.5, L = 10 cm, r = 2 mm
R = 55704230.08
R_mmHg = 0.006963600433
Run it
Terminal
$human-physiology solve hp_poiseuille_resistance eta=3.5 "L=10 cm" "r=2 mm"
R = 55704230.08
R_mmHg = 0.006963600433
by: Poiseuille resistance of a blood vessel (R = 8 eta L/(pi r^4))
eta = 3.5
L = 0.1 m
r = 0.002 m
assumes: eta, L, r > 0; steady laminar Newtonian flow in a rigid tube
import human_physiology_ai999x as m
a = m.solve("hp_poiseuille_resistance", eta="3.5", L="10 cm", r="2 mm")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Pulmonary vascular resistance and transpulmonary gradient1 fig.hp_pulmonary_vascular_resistance
Transpulmonary gradient TPG = mPAP – PCWP and PVR = TPG/CO in Wood units and dyn s cm^-5.
PVR = \frac{\bar P_{PA} – P_{CW}}{CO}
You give
Meaning
Unit
Example
\text{mPAP}
Mean pulmonary artery pressure (e.g. in mmHg)
Pa
15 mmHg
\text{PCWP}
Pulmonary capillary wedge pressure (e.g. in mmHg)
Pa
8 mmHg
\text{CO}
Cardiac output (e.g. in L/min)
m^3/s
5 L/min
You get
Meaning
Unit
Example
\text{PVR}
Pulmonary vascular resistance in Wood units
—
1.4
\text{PVR\_dyn}
Pulmonary vascular resistance in dyn s cm^-5
—
111.9908054
\text{TPG}
Transpulmonary gradient in mmHg
—
7
Values with a unit may be written in any unit of the right kind.
Applies when
mPAP > PCWP >= 0
CO > 0
Outside these conditions it says what is wrong instead of returning a number.
import human_physiology_ai999x as m
a = m.solve("hp_pulmonary_vascular_resistance", mPAP="15 mmHg", PCWP="8 mmHg", CO="5 L/min")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Pulmonary-to-systemic flow ratio Qp/Qs1 fig.hp_qp_qs
Qp/Qs = (SaO2 – SvO2)/(SpvO2 – SpaO2) from oxygen saturations (hemoglobin and dissolved O2 cancel or are neglected).
import human_physiology_ai999x as m
a = m.solve("hp_qp_qs", SaO2="0.95", SvO2="0.65", SpvO2="0.98", SpaO2="0.8")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Pulse wave velocity by the Moens-Korteweg equation1 fig.hp_moens_korteweg
Pulse wave velocity of a thin elastic tube PWV = sqrt(E h/(rho D)).
PWV = \sqrt{\frac{E h}{\rho D}}
You give
Meaning
Unit
Example
E
Wall elastic modulus (e.g. in kPa)
Pa
500 kPa
h
Wall thickness (e.g. in mm)
m
1.5 mm
D
Vessel diameter (e.g. in mm)
m
25 mm
\rho
Blood density (e.g. in kg/m³)
kg/m^3
1060 kg/m^3
You get
Meaning
Unit
Example
\text{PWV}
Pulse wave velocity in m/s
—
5.319951766
Values with a unit may be written in any unit of the right kind.
Applies when
all inputs > 0
thin-walled elastic tube
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Moens-Korteweg pulse wave velocity: E = 500 kPa, h = 1.5 mm, D = 25 mm, rho = 1060 kg/m^3
PWV = 5.319951766
Run it
Terminal
$human-physiology solve hp_moens_korteweg "E=500 kPa" "h=1.5 mm" "D=25 mm" "rho=1060 kg/m^3"
PWV = 5.319951766
by: Pulse wave velocity by the Moens-Korteweg equation (PWV = sqrt(E h /(rho D)))
E = 500000 Pa
h = 0.0015 m
D = 0.025 m
rho = 1060 kg/m^3
assumes: all inputs > 0; thin-walled elastic tube
import human_physiology_ai999x as m
a = m.solve("hp_moens_korteweg", E="500 kPa", h="1.5 mm", D="25 mm", rho="1060 kg/m^3")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Reynolds number of blood flow in a vessel1 fig.hp_vessel_reynolds
Re = rho v D/eta and the mean velocity at which Re reaches 2000 (the customary laminar limit).
Re = \frac{\rho v D}{\eta}
You give
Meaning
Unit
Example
\rho
Blood density (e.g. in kg/m³)
kg/m^3
1060 kg/m^3
v
Mean velocity (e.g. in cm/s)
m/s
30 cm/s
D
Vessel diameter (e.g. in mm)
m
25 mm
\eta
Viscosity in cP
—
3.5
You get
Meaning
Unit
Example
\text{Re}
Reynolds number
—
2271.428571
v_{\mathrm{critical}}
Mean velocity at the customary laminar-limit Reynolds number in cm/s
—
26.41509434
Values with a unit may be written in any unit of the right kind.
Applies when
all inputs > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
vessel Reynolds number: rho = 1060 kg/m^3, v = 30 cm/s, D = 25 mm, eta = 3.5
Re = 2271.428571
v_critical = 26.41509434
Run it
Terminal
$human-physiology solve hp_vessel_reynolds "rho=1060 kg/m^3" "v=30 cm/s" "D=25 mm" eta=3.5
Re = 2271.428571
v_critical = 26.41509434
by: Reynolds number of blood flow in a vessel (Re = rho v D / eta)
rho = 1060 kg/m^3
v = 0.3 m/s
D = 0.025 m
eta = 3.5
assumes: all inputs > 0
import human_physiology_ai999x as m
a = m.solve("hp_vessel_reynolds", rho="1060 kg/m^3", v="30 cm/s", D="25 mm", eta="3.5")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Starling forces and capillary filtration1 fig.hp_starling_filtration
Net filtration pressure (Pc – Pi) – sigma (pi_c – pi_i) and the filtration rate Jv = Kf x NFP (glomerular or systemic capillaries).
$human-physiology solve hp_starling_filtration "Pc=35 mmHg" "Pi=0 mmHg" "pic=28 mmHg" "pii=3 mmHg" Kf=0.5
NFP = 10
Jv = 5
by: Starling forces and capillary filtration (Jv = Kf [(Pc - Pi) - sigma (pi_c - pi_i)])
Pc = 4666.28356 Pa
Pi = 0 Pa
pic = 3733.026848 Pa
pii = 399.9671622 Pa
Kf = 0.5
assumes: Kf > 0; 0 <= sigma <= 1
import human_physiology_ai999x as m
a = m.solve("hp_starling_filtration", Pc="35 mmHg", Pi="0 mmHg", pic="28 mmHg", pii="3 mmHg", Kf="0.5")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Stroke volume and ejection fraction2 fig.hp_stroke_volume_ef
Stroke volume SV = EDV – ESV and ejection fraction EF = SV/EDV from end-diastolic and end-systolic volumes.
SV = EDV – ESV,\quad EF = \frac{SV}{EDV}
You give
Meaning
Unit
Example
\text{EDV}
End-diastolic volume (e.g. in mL)
m^3
120 mL
\text{ESV}
End-systolic volume (e.g. in mL)
m^3
50 mL
You get
Meaning
Unit
Example
\text{SV}
Stroke volume in mL
—
70
\text{EF}
Ejection fraction (fraction)
—
0.5833333333
\text{EF\_percent}
Ejection fraction in %
—
58.33333333
Values with a unit may be written in any unit of the right kind.
Applies when
0 <= ESV < EDV
Outside these conditions it says what is wrong instead of returning a number.
Worked example
stroke volume and ejection fraction: EDV = 120 mL, ESV = 50 mL
import human_physiology_ai999x as m
a = m.solve("hp_stroke_volume_ef", EDV="120 mL", ESV="50 mL")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Stroke work and cardiac power1 fig.hp_stroke_work
External stroke work SW = MAP x SV (J and g m) and the cardiac power output SW x HR.
SW = \bar P\, SV,\quad \dot W = SW \cdot HR
You give
Meaning
Unit
Example
\text{SV}
Stroke volume (e.g. in mL)
m^3
70 mL
\text{MAP}
Mean arterial (ejection) pressure (e.g. in mmHg)
Pa
100 mmHg
\text{HR}
Heart rate in beats/min (optional; needed for the cardiac power) optional
—
72
You get
Meaning
Unit
Example
\text{SW}
Stroke work in J
—
0.9332567119
\text{SW\_gm}
Stroke work in g m
—
95.1657
\text{power}
Cardiac power output in W
—
1.119908054
Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.
Applies when
SV, MAP, HR > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
stroke work: SV = 70 mL, MAP = 100 mmHg, HR = 72
SW = 0.9332567119
SW_gm = 95.1657
power = 1.119908054
Run it
Terminal
$human-physiology solve hp_stroke_work "SV=70 mL" "MAP=100 mmHg" HR=72
SW = 0.9332567119
SW_gm = 95.1657
power = 1.119908054
by: Stroke work and cardiac power (SW = MAP SV (pressure-volume work); power = SW HR/60)
SV = 7e-05 m^3
MAP = 13332.23874 Pa
HR = 72
assumes: SV, MAP, HR > 0
import human_physiology_ai999x as m
a = m.solve("hp_stroke_work", SV="70 mL", MAP="100 mmHg", HR="72")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
$human-physiology solve hp_systemic_vascular_resistance "MAP=93 mmHg" "CVP=3 mmHg" "CO=5 L/min"
SVR = 18
SVR_dyn = 1439.881784
by: Systemic vascular resistance (total peripheral resistance) (SVR = (MAP - CVP)/CO; x 79.9934 for dyn s cm^-5)
MAP = 12398.98203 Pa
CVP = 399.9671622 Pa
CO = 8.333333333e-05 m^3/s
assumes: MAP > CVP >= 0; CO > 0
import human_physiology_ai999x as m
a = m.solve("hp_systemic_vascular_resistance", MAP="93 mmHg", CVP="3 mmHg", CO="5 L/min")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Total resistance of vascular beds in series or in parallel1 fig.hp_vessels_series_parallel
Series beds add resistances; parallel beds (organ circulations) add conductances.
Resistances of the beds (any one unit, e.g. mmHg min/L) vector
—
[2, 3, 6]
\text{arrangement}
Series or parallel choice
—
parallel
You get
Meaning
Unit
Example
R_{\mathrm{total}}
Total resistance (same unit)
—
1
G_{\mathrm{total}}
Total conductance (reciprocal of the resistance unit)
—
1
Applies when
every resistance > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
vessels in series or parallel: R = [2, 3, 6], arrangement = parallel
R_total = 1
G_total = 1
Run it
Terminal
$human-physiology solve hp_vessels_series_parallel "R=[2, 3, 6]" arrangement=parallel
R_total = 1
G_total = 1
by: Total resistance of vascular beds in series or in parallel (series: sum R; parallel: 1/sum(1/R))
arrangement = parallel
assumes: every resistance > 0
import human_physiology_ai999x as m
a = m.solve("hp_vessels_series_parallel", R=[2, 3, 6], arrangement="parallel")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Womersley number of pulsatile blood flow1 fig.hp_womersley_number
alpha = r sqrt(omega rho/eta) with omega = 2 pi HR/60: the ratio of pulsatile inertia to viscous forces.
\alpha = r\sqrt{\frac{\omega\rho}{\eta}}
You give
Meaning
Unit
Example
r
Vessel radius (e.g. in mm)
m
12.5 mm
\text{HR}
Heart rate in beats/min
—
72
\rho
Blood density (e.g. in kg/m³)
kg/m^3
1060 kg/m^3
\eta
Viscosity in cP
—
3.5
You get
Meaning
Unit
Example
\alpha
Womersley number
—
18.88902236
\omega
Angular frequency in rad/s
—
7.539822369
Values with a unit may be written in any unit of the right kind.
Applies when
all inputs > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Womersley number: r = 12.5 mm, HR = 72, rho = 1060 kg/m^3, eta = 3.5
alpha = 18.88902236
omega = 7.539822369
Run it
Terminal
$human-physiology solve hp_womersley_number "r=12.5 mm" HR=72 "rho=1060 kg/m^3" eta=3.5
alpha = 18.88902236
omega = 7.539822369
by: Womersley number of pulsatile blood flow (alpha = r sqrt(omega rho / eta))
r = 0.0125 m
HR = 72
rho = 1060 kg/m^3
eta = 3.5
assumes: all inputs > 0
import human_physiology_ai999x as m
a = m.solve("hp_womersley_number", r="12.5 mm", HR="72", rho="1060 kg/m^3", eta="3.5")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Metabolism 8
Basal metabolic rate by the Harris-Benedict equation1 fig.hp_bmr_harris_benedict
Harris-Benedict BMR, original (1919) or revised by Roza and Shizgal (1984), in kcal/day and kJ/day (computed value).
Original equation or the revised (Roza-Shizgal) equation choice
—
original
You get
Meaning
Unit
Example
\text{BMR}
Basal metabolic rate in kcal/day
—
1702.0125
\text{BMR\_kJ}
Basal metabolic rate in kJ/day
—
7121.2203
Values with a unit may be written in any unit of the right kind.
Applies when
adult
weight, height > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Harris-Benedict BMR: weight = 70 kg, height = 175 cm, age = 30, sex = male, version = original
BMR = 1702.0125
BMR_kJ = 7121.2203
Run it
Terminal
$human-physiology solve hp_bmr_harris_benedict "weight=70 kg" "height=175 cm" age=30 sex=male version=original
BMR = 1702.0125
BMR_kJ = 7121.2203
by: Basal metabolic rate by the Harris-Benedict equation (published linear coefficients)
weight = 70 kg
height = 1.75 m
age = 30
sex = male
version = original
assumes: adult; weight, height > 0
import human_physiology_ai999x as m
a = m.solve("hp_bmr_harris_benedict", weight="70 kg", height="175 cm", age="30", sex="male", version="original")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Basal metabolic rate by the Katch-McArdle equation2 fig.hp_bmr_katch_mcardle
Lean body mass W (1 – body fat) and BMR = 370 + 21.6 LBM in kcal/day (computed value).
BMR = 370 + 21.6\,LBM
You give
Meaning
Unit
Example
\text{weight}
Weight (e.g. in kg)
kg
70 kg
\text{body\_fat}
Body fat fraction
—
0.2
You get
Meaning
Unit
Example
\text{LBM}
Lean body mass in kg
—
56
\text{BMR}
Basal metabolic rate in kcal/day
—
1579.6
Values with a unit may be written in any unit of the right kind.
Applies when
weight > 0
0 ≤ body fat < 1
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Katch-McArdle BMR: weight = 70 kg, body_fat = 0.2
LBM = 56
BMR = 1579.6
Run it
Terminal
$human-physiology solve hp_bmr_katch_mcardle "weight=70 kg" body_fat=0.2
LBM = 56
BMR = 1579.6
by: Basal metabolic rate by the Katch-McArdle equation (Katch-McArdle)
weight = 70 kg
body_fat = 0.2
assumes: weight > 0; 0 <= body fat < 1
import human_physiology_ai999x as m
a = m.solve("hp_bmr_katch_mcardle", weight="70 kg", body_fat="0.2")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Energy expenditure of an activity from METs1 fig.hp_met_energy
1 MET = 3.5 mL O2/kg/min; oxygen uptake MET x 3.5 x W and energy MET x 3.5 x W/200 kcal/min.
Values with a unit may be written in any unit of the right kind.
Applies when
all inputs > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
MET energy expenditure: MET = 8, weight = 70 kg, duration = 30 min
VO2 = 1960
kcal_per_min = 9.8
kcal = 294
Run it
Terminal
$human-physiology solve hp_met_energy MET=8 "weight=70 kg" "duration=30 min"
VO2 = 1960
kcal_per_min = 9.8
kcal = 294
by: Energy expenditure of an activity from METs (kcal/min = MET x 3.5 x W / 200 (about 5 kcal per L O2))
MET = 8
weight = 70 kg
duration = 1800 s
assumes: all inputs > 0
import human_physiology_ai999x as m
a = m.solve("hp_met_energy", MET="8", weight="70 kg", duration="30 min")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
First-order elimination: rate constant and half-life from clearance and volume1 fig.hp_elimination_half_life
Physiology of a one-compartment first-order process: k = CL/Vd, half-life ln 2/k and the fraction remaining after t (not a dosing recommendation).
t_{1/2} = \frac{\ln 2\, V_d}{CL}
You give
Meaning
Unit
Example
\text{CL}
Clearance (e.g. in L/h)
m^3/s
5 L/h
\text{Vd}
Volume of distribution (e.g. in L)
m^3
50 L
t
Elapsed time (e.g. in h) (optional) optional
s
12 h
You get
Meaning
Unit
Example
k
Elimination rate constant per hour
—
0.1
\text{half\_life}
Half-life in h
—
6.931471806
\text{fraction\_remaining}
Fraction remaining after t
—
0.3011942119
Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.
Applies when
CL, Vd > 0
t >= 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
elimination half-life: CL = 5 L/h, Vd = 50 L, t = 12 h
k = 0.1
half_life = 6.931471806
fraction_remaining = 0.3011942119
Run it
Terminal
$human-physiology solve hp_elimination_half_life "CL=5 L/h" "Vd=50 L" "t=12 h"
k = 0.1
half_life = 6.931471806
fraction_remaining = 0.3011942119
by: First-order elimination: rate constant and half-life from clearance and volume (k = CL/Vd; t1/2 = ln 2 / k; C/C0 = exp(-k t))
CL = 1.388888889e-06 m^3/s
Vd = 0.05 m^3
t = 43200 s
assumes: CL, Vd > 0; t >= 0
import human_physiology_ai999x as m
a = m.solve("hp_elimination_half_life", CL="5 L/h", Vd="50 L", t="12 h")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Food energy by the Atwater factors1 fig.hp_atwater_energy
Energy from macronutrients with the general Atwater factors 4 (carbohydrate), 9 (fat), 4 (protein) and 7 (alcohol) kcal/g.
E = 4C + 9F + 4P + 7A
You give
Meaning
Unit
Example
\text{carbohydrate}
Carbohydrate (e.g. in g)
kg
300 g
\text{fat}
Fat (e.g. in g)
kg
70 g
\text{protein}
Protein (e.g. in g)
kg
80 g
\text{alcohol}
Alcohol (e.g. in g) (optional; none if omitted) optional
kg
You get
Meaning
Unit
Example
\text{kcal}
Energy in kcal
—
2150
\text{kJ}
Energy in kJ
—
8995.6
Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.
Applies when
amounts >= 0, not all zero
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Atwater energy: carbohydrate = 300 g, fat = 70 g, protein = 80 g
kcal = 2150
kJ = 8995.6
Run it
Terminal
$human-physiology solve hp_atwater_energy "carbohydrate=300 g" "fat=70 g" "protein=80 g"
kcal = 2150
kJ = 8995.6
by: Food energy by the Atwater factors (4/9/4/7 kcal per g; 1 kcal = 4.184 kJ)
carbohydrate = 0.3 kg
fat = 0.07 kg
protein = 0.08 kg
assumes: amounts >= 0, not all zero
import human_physiology_ai999x as m
a = m.solve("hp_atwater_energy", carbohydrate="300 g", fat="70 g", protein="80 g")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Maximal heart rate, heart rate reserve and Karvonen target1 fig.hp_heart_rate_reserve
Estimated maximal heart rate (220 – age; Tanaka 208 – 0.7 age), the reserve HRmax – HRrest and the Karvonen target HRrest + intensity x reserve.
import human_physiology_ai999x as m
a = m.solve("hp_heart_rate_reserve", age="40", HR_rest="60", intensity="0.7")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Respiratory quotient and energy expenditure (Weir equation)2 fig.hp_weir_energy_expenditure
RQ = VCO2/VO2 and resting energy expenditure by the abbreviated Weir equation (3.941 VO2 + 1.106 VCO2) x 1440 kcal/day (L/min).
EE = (3.941\,\dot V_{O_2} + 1.106\,\dot V_{CO_2})\times 1440
You give
Meaning
Unit
Example
\text{VO2}
Oxygen consumption (e.g. in mL/min)
m^3/s
250 mL/min
\text{VCO2}
CO2 production (e.g. in mL/min)
m^3/s
200 mL/min
You get
Meaning
Unit
Example
\text{RQ}
Respiratory quotient
—
0.8
\text{EE}
Energy expenditure in kcal/day
—
1737.288
\text{EE\_kJ}
Energy expenditure in kJ/day
—
7268.812992
Values with a unit may be written in any unit of the right kind.
Applies when
VO2, VCO2 > 0
Outside these conditions it says what is wrong instead of returning a number.
import human_physiology_ai999x as m
a = m.solve("hp_weir_energy_expenditure", VO2="250 mL/min", VCO2="200 mL/min")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Resting energy expenditure by the Mifflin-St Jeor equation1 fig.hp_bmr_mifflin_st_jeor
Mifflin-St Jeor (1990): 10 W + 6.25 H – 5 A + 5 (male) or – 161 (female), kcal/day (computed value).
REE = 10W + 6.25H – 5A + s
You give
Meaning
Unit
Example
\text{weight}
Weight (e.g. in kg)
kg
70 kg
\text{height}
Height (e.g. in cm)
m
175 cm
\text{age}
Age in years
—
30
\text{sex}
Sex for the constant choice
—
male
You get
Meaning
Unit
Example
\text{REE}
Resting energy expenditure in kcal/day
—
1648.75
\text{REE\_kJ}
Resting energy expenditure in kJ/day
—
6898.37
Values with a unit may be written in any unit of the right kind.
Applies when
adult
weight, height > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Mifflin-St Jeor: weight = 70 kg, height = 175 cm, age = 30, sex = male
REE = 1648.75
REE_kJ = 6898.37
Run it
Terminal
$human-physiology solve hp_bmr_mifflin_st_jeor "weight=70 kg" "height=175 cm" age=30 sex=male
REE = 1648.75
REE_kJ = 6898.37
by: Resting energy expenditure by the Mifflin-St Jeor equation (Mifflin-St Jeor)
weight = 70 kg
height = 1.75 m
age = 30
sex = male
assumes: adult; weight, height > 0
import human_physiology_ai999x as m
a = m.solve("hp_bmr_mifflin_st_jeor", weight="70 kg", height="175 cm", age="30", sex="male")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Nerve and muscle 12
Charge and number of ions to change the membrane potential1 fig.hp_membrane_charge
Q = Cm A dV and the number of monovalent ions it represents (why few ions cross in an action potential).
Q = C_m A \Delta V,\quad N = \frac{|Q|}{e}
You give
Meaning
Unit
Example
\text{Cm}
Specific membrane capacitance (e.g. in uF/cm^2)
F/m^2
1 uF/cm^2
\text{dV}
Voltage change (e.g. in mV)
V
100 mV
\text{area}
Membrane area (e.g. in um²)
m^2
1000 um^2
You get
Meaning
Unit
Example
Q_{\mathrm{pC}}
Charge in pC
—
1
\text{ions}
Number of monovalent ions
—
6241509.074
Values with a unit may be written in any unit of the right kind.
Applies when
Cm, area > 0
dV not 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
membrane charge: Cm = 1 uF/cm^2, dV = 100 mV, area = 1000 um^2
Q_pC = 1
ions = 6241509.074
Run it
Terminal
$human-physiology solve hp_membrane_charge "Cm=1 uF/cm^2" "dV=100 mV" "area=1000 um^2"
Q_pC = 1
ions = 6241509.074
by: Charge and number of ions to change the membrane potential (Q = C A dV; ions = |Q|/e)
Cm = 0.01 F/m^2
dV = 0.1 V
area = 1e-09 m^2
assumes: Cm, area > 0; dV not 0
import human_physiology_ai999x as m
a = m.solve("hp_membrane_charge", Cm="1 uF/cm^2", dV="100 mV", area="1000 um^2")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Conduction velocity scaling with fibre diameter1 fig.hp_conduction_velocity_scaling
Conduction velocity is proportional to diameter for myelinated fibres and to its square root for unmyelinated fibres.
v \propto d \;(\text{myelinated}),\quad v \propto \sqrt{d}\;(\text{unmyelinated})
You give
Meaning
Unit
Example
\text{v1}
Known conduction velocity (e.g. in m/s)
m/s
60 m/s
\text{d1}
Diameter of that fibre (e.g. in um)
m
10 um
\text{d2}
Diameter of the other fibre (e.g. in um)
m
5 um
\text{fiber}
Fibre type choice
—
myelinated
You get
Meaning
Unit
Example
\text{v2}
Conduction velocity of the other fibre in m/s
—
30
\text{ratio}
Ratio of the new to the known velocity
—
0.5
Values with a unit may be written in any unit of the right kind.
Applies when
all inputs > 0
Outside these conditions it says what is wrong instead of returning a number.
$human-physiology solve hp_conduction_velocity_scaling "v1=60 m/s" "d1=10 um" "d2=5 um" fiber=myelinated
v2 = 30
ratio = 0.5
by: Conduction velocity scaling with fibre diameter (v ~ d (myelinated), v ~ sqrt(d) (unmyelinated, cable theory))
v1 = 60 m/s
d1 = 1e-05 m
d2 = 5e-06 m
fiber = myelinated
assumes: all inputs > 0
import human_physiology_ai999x as m
a = m.solve("hp_conduction_velocity_scaling", v1="60 m/s", d1="10 um", d2="5 um", fiber="myelinated")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Hill muscle force-velocity relation1 fig.hp_hill_force_velocity
Hill's equation (F + a)(v + b) = (F0 + a) b: force at shortening velocity v, the power F v and vmax = b F0/a.
(F + a)(v + b) = (F_0 + a)\,b
You give
Meaning
Unit
Example
\text{F0}
Isometric force (e.g. in N)
N
100 N
a
Hill constant a (e.g. in N)
N
25 N
b
Hill constant b (e.g. in m/s)
m/s
0.3 m/s
v
Shortening velocity (e.g. in m/s)
m/s
0.1 m/s
You get
Meaning
Unit
Example
F
Force in N
—
68.75
\text{power}
Power in W
—
6.875
\text{vmax}
Maximal shortening velocity in m/s
—
1.2
Values with a unit may be written in any unit of the right kind.
Applies when
F0, a, b > 0
0 <= v <= vmax
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Hill force-velocity: F0 = 100 N, a = 25 N, b = 0.3 m/s, v = 0.1 m/s
F = 68.75
power = 6.875
vmax = 1.2
Run it
Terminal
$human-physiology solve hp_hill_force_velocity "F0=100 N" "a=25 N" "b=0.3 m/s" "v=0.1 m/s"
F = 68.75
power = 6.875
vmax = 1.2
by: Hill muscle force-velocity relation (F = (F0 b - a v)/(v + b))
F0 = 100 N
a = 25 N
b = 0.3 m/s
v = 0.1 m/s
assumes: F0, a, b > 0; 0 <= v <= vmax
import human_physiology_ai999x as m
a = m.solve("hp_hill_force_velocity", F0="100 N", a="25 N", b="0.3 m/s", v="0.1 m/s")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Ionic current and driving force1 fig.hp_ionic_current
Ohmic ionic current I = g (Vm – E) (positive = outward) and the driving force Vm – E.
I = g\,(V_m – E)
You give
Meaning
Unit
Example
g
Conductance (e.g. in nS)
S
10 nS
\text{Vm}
Membrane potential (e.g. in mV)
V
-70 mV
E
Equilibrium potential of the ion (e.g. in mV)
V
-95 mV
You get
Meaning
Unit
Example
I
Current in pA (positive outward)
—
250
\text{driving\_force}
Driving force in mV
—
25
Values with a unit may be written in any unit of the right kind.
Applies when
g >= 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
ionic current: g = 10 nS, Vm = -70 mV, E = -95 mV
I = 250
driving_force = 25
Run it
Terminal
$human-physiology solve hp_ionic_current "g=10 nS" "Vm=-70 mV" "E=-95 mV"
I = 250
driving_force = 25
by: Ionic current and driving force (I = g (Vm - E); nS x mV = pA)
g = 1e-08 S
Vm = -0.07 V
E = -0.095 V
assumes: g >= 0
import human_physiology_ai999x as m
a = m.solve("hp_ionic_current", g="10 nS", Vm="-70 mV", E="-95 mV")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Length constant of an axon and steady-state attenuation1 fig.hp_length_constant
lambda = sqrt(Rm d/(4 Ri)) of a passive fibre and the steady voltage fraction e^(-x/lambda) at distance x.
Distance from the injection site (e.g. in mm) (optional; needed for the attenuation) optional
m
1 mm
You get
Meaning
Unit
Example
\lambda
Length constant in mm
—
2.236067977
\text{attenuation}
Steady-state fraction of the voltage remaining at distance x
—
0.6394073192
Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.
Applies when
Rm, Ri, d > 0
x >= 0
semi-infinite passive cable
Outside these conditions it says what is wrong instead of returning a number.
Worked example
length constant: Rm = 20000, Ri = 100, d = 10 um, x = 1 mm
lambda = 2.236067977
attenuation = 0.6394073192
Run it
Terminal
$human-physiology solve hp_length_constant Rm=20000 Ri=100 "d=10 um" "x=1 mm"
lambda = 2.236067977
attenuation = 0.6394073192
by: Length constant of an axon and steady-state attenuation (lambda = sqrt(rm/ri))
Rm = 20000
Ri = 100
d = 1e-05 m
x = 0.001 m
assumes: Rm, Ri, d > 0; x >= 0; semi-infinite passive cable
import human_physiology_ai999x as m
a = m.solve("hp_length_constant", Rm="20000", Ri="100", d="10 um", x="1 mm")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Maximal power of a muscle from Hill's equation1 fig.hp_muscle_max_power
The shortening velocity of maximal power v_opt = b (sqrt(1 + F0/a) – 1), the force there and the maximal power.
v_{opt} = b\left(\sqrt{1 + F_0/a} – 1\right)
You give
Meaning
Unit
Example
\text{F0}
Isometric force (e.g. in N)
N
100 N
a
Hill constant a (e.g. in N)
N
25 N
b
Hill constant b (e.g. in m/s)
m/s
0.3 m/s
You get
Meaning
Unit
Example
v_{\mathrm{opt}}
Velocity of maximal power in m/s
—
0.3708203932
F_{\mathrm{opt}}
Force at maximal power in N
—
30.90169944
P_{\mathrm{max}}
Maximal power in W
—
11.45898034
\text{vmax}
Maximal shortening velocity in m/s
—
1.2
Values with a unit may be written in any unit of the right kind.
Applies when
F0, a, b > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
muscle maximal power: F0 = 100 N, a = 25 N, b = 0.3 m/s
v_opt = 0.3708203932
F_opt = 30.90169944
P_max = 11.45898034
vmax = 1.2
Run it
Terminal
$human-physiology solve hp_muscle_max_power "F0=100 N" "a=25 N" "b=0.3 m/s"
v_opt = 0.3708203932
F_opt = 30.90169944
P_max = 11.45898034
vmax = 1.2
by: Maximal power of a muscle from Hill's equation (dP/dv = 0 for P = v (F0 b - a v)/(v + b))
F0 = 100 N
a = 25 N
b = 0.3 m/s
assumes: F0, a, b > 0
import human_physiology_ai999x as m
a = m.solve("hp_muscle_max_power", F0="100 N", a="25 N", b="0.3 m/s")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Membrane potential by the chord conductance equation1 fig.hp_chord_conductance
Steady potential at which the ohmic ionic currents cancel: Vm = (gK EK + gNa ENa + gCl ECl)/(gK + gNa + gCl).
$human-physiology solve hp_chord_conductance gK=1 gNa=0.05 gCl=0.3 "EK=-95 mV" "ENa=67 mV" "ECl=-90 mV"
Vm = -87.88888889
by: Membrane potential by the chord conductance equation (conductance-weighted mean of the equilibrium potentials)
gK = 1
gNa = 0.05
gCl = 0.3
EK = -0.095 V
ENa = 0.067 V
ECl = -0.09 V
assumes: conductances >= 0, not all zero
import human_physiology_ai999x as m
a = m.solve("hp_chord_conductance", gK="1", gNa="0.05", gCl="0.3", EK="-95 mV", ENa="67 mV", ECl="-90 mV")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Membrane time constant and charging1 fig.hp_membrane_time_constant
tau_m = Rm Cm (specific membrane resistance times capacitance) and the fraction of the final voltage reached after t.
\tau_m = R_m C_m
You give
Meaning
Unit
Example
\text{Rm}
Specific membrane resistance in ohm cm²
—
20000
\text{Cm}
Specific membrane capacitance (e.g. in uF/cm^2)
F/m^2
1 uF/cm^2
t
Time (e.g. in ms) (optional; needed for the fraction charged) optional
s
10 ms
You get
Meaning
Unit
Example
\tau
Membrane time constant in ms
—
20
\text{fraction}
Fraction of the final voltage at time t
—
0.3934693403
Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.
Applies when
Rm, Cm > 0
t >= 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
membrane time constant: Rm = 20000, Cm = 1 uF/cm^2, t = 10 ms
tau = 20
fraction = 0.3934693403
Run it
Terminal
$human-physiology solve hp_membrane_time_constant Rm=20000 "Cm=1 uF/cm^2" "t=10 ms"
tau = 20
fraction = 0.3934693403
by: Membrane time constant and charging (tau = Rm Cm; V(t)/V_inf = 1 - exp(-t/tau))
Rm = 20000
Cm = 0.01 F/m^2
t = 0.01 s
assumes: Rm, Cm > 0; t >= 0
import human_physiology_ai999x as m
a = m.solve("hp_membrane_time_constant", Rm="20000", Cm="1 uF/cm^2", t="10 ms")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Nernst equilibrium potential of an ion2 fig.hp_nernst_potential
E = (RT/zF) ln(Cout/Cin) in mV for an ion of valence z.
E = \frac{RT}{zF}\ln\frac{[C]_o}{[C]_i}
You give
Meaning
Unit
Example
z
Ion valence (charge number, negative for anions)
—
1
\text{Cout}
Extracellular concentration in mM
—
4
\text{Cin}
Intracellular concentration in mM
—
140
T
Temperature (e.g. in degC) (optional; body temperature if omitted) optional
K
You get
Meaning
Unit
Example
E
Equilibrium potential in mV
—
-95.02257566
\text{RT\_F}
RT/F in mV
—
26.72665911
Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.
Applies when
z a nonzero whole number
concentrations > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Nernst potential: z = 1, Cout = 4, Cin = 140
E = -95.02257566
RT_F = 26.72665911
Run it
Terminal
$human-physiology solve hp_nernst_potential z=1 Cout=4 Cin=140
E = -95.02257566
RT_F = 26.72665911
by: Nernst equilibrium potential of an ion (Nernst equation)
Cout = 4
Cin = 140
assumes: z a nonzero whole number; concentrations > 0
import human_physiology_ai999x as m
a = m.solve("hp_nernst_potential", z="1", Cout="4", Cin="140")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Nerve conduction velocity from two stimulation sites1 fig.hp_nerve_conduction_velocity
NCV = distance between stimulation sites / difference of the response latencies (mm/ms = m/s).
NCV = \frac{d}{t_p – t_d}
You give
Meaning
Unit
Example
\text{distance}
Distance between stimulation sites (e.g. in mm)
m
250 mm
\text{latency\_proximal}
Latency from the proximal site (e.g. in ms)
s
8.5 ms
\text{latency\_distal}
Latency from the distal site (e.g. in ms)
s
3.5 ms
You get
Meaning
Unit
Example
\text{NCV}
Conduction velocity in m/s
—
50
Values with a unit may be written in any unit of the right kind.
Applies when
latency_proximal > latency_distal
Outside these conditions it says what is wrong instead of returning a number.
Worked example
nerve conduction velocity: distance = 250 mm, latency_proximal = 8.5 ms, latency_distal = 3.5 ms
NCV = 50
Run it
Terminal
$human-physiology solve hp_nerve_conduction_velocity "distance=250 mm" "latency_proximal=8.5 ms" "latency_distal=3.5 ms"
NCV = 50
by: Nerve conduction velocity from two stimulation sites (NCV = d / (t_p - t_d))
distance = 0.25 m
latency_proximal = 0.0085 s
latency_distal = 0.0035 s
assumes: latency_proximal > latency_distal
import human_physiology_ai999x as m
a = m.solve("hp_nerve_conduction_velocity", distance="250 mm", latency_proximal="8.5 ms", latency_distal="3.5 ms")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Resting membrane potential by the Goldman-Hodgkin-Katz equation1 fig.hp_ghk_voltage
import human_physiology_ai999x as m
a = m.solve("hp_ghk_voltage", PK="1", PNa="0.04", PCl="0.45", K_o="4", K_i="140", Na_o="145", Na_i="12", Cl_o="116", Cl_i="4.2")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Threshold current for a pulse width (strength-duration curve)1 fig.hp_strength_duration
Threshold current for a pulse of width t from rheobase and chronaxie: Lapicque (exponential RC) and Weiss (linear charge) forms.
I = \frac{I_{rh}}{1 – 2^{-t/c}}\;(\text{Lapicque}),\quad I = I_{rh}\left(1 + \frac{c}{t}\right)\;(\text{Weiss})
You give
Meaning
Unit
Example
\text{rheobase}
Rheobase current (any unit, e.g. mA)
—
1
\text{chronaxie}
Chronaxie (e.g. in ms)
s
0.5 ms
t
Pulse width (e.g. in ms)
s
0.5 ms
You get
Meaning
Unit
Example
I_{\mathrm{lapicque}}
Threshold current by the Lapicque (exponential) law, in the unit of the rheobase
—
2
I_{\mathrm{weiss}}
Threshold current by the Weiss (linear) law, in the unit of the rheobase
—
2
Values with a unit may be written in any unit of the right kind.
Applies when
all inputs > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
strength-duration threshold: rheobase = 1, chronaxie = 0.5 ms, t = 0.5 ms
I_lapicque = 2
I_weiss = 2
Run it
Terminal
$human-physiology solve hp_strength_duration rheobase=1 "chronaxie=0.5 ms" "t=0.5 ms"
I_lapicque = 2
I_weiss = 2
by: Threshold current for a pulse width (strength-duration curve) (Lapicque: tau = chronaxie/ln 2; Weiss: linear charge law)
rheobase = 1
chronaxie = 0.0005 s
t = 0.0005 s
assumes: all inputs > 0
import human_physiology_ai999x as m
a = m.solve("hp_strength_duration", rheobase="1", chronaxie="0.5 ms", t="0.5 ms")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Renal 12
Calculated and effective plasma osmolality and the osmolal gap2 fig.hp_plasma_osmolality
Calculated osmolality 2 Na + glucose/18 + BUN/2.8, effective osmolality (tonicity) 2 Na + glucose/18 and, with a measured value, the osmolal gap.
Measured osmolality in mOsm/kg (optional) optional
—
You get
Meaning
Unit
Example
\text{calculated}
Calculated osmolality in mOsm/kg
—
290
\text{effective}
Effective osmolality in mOsm/kg
—
285
\text{osmolal\_gap}
Measured – calculated in mOsm/kg
—
Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.
Applies when
Na > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
plasma osmolality: Na = 140 mmol/L, glucose = 90, BUN = 14
calculated = 290
effective = 285
Run it
Terminal
$human-physiology solve hp_plasma_osmolality "Na=140 mmol/L" glucose=90 BUN=14
calculated = 290
effective = 285
by: Calculated and effective plasma osmolality and the osmolal gap (published divisors 18 (glucose) and 2.8 (urea nitrogen))
Na = 140 mol/m^3
glucose = 90
BUN = 14
assumes: Na > 0
import human_physiology_ai999x as m
a = m.solve("hp_plasma_osmolality", Na="140 mmol/L", glucose="90", BUN="14")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Creatinine clearance by the Cockcroft-Gault equation1 fig.hp_cockcroft_gault
Estimated creatinine clearance (140 – age) x weight/(72 x Scr), x 0.85 for female (computed value only).
Values with a unit may be written in any unit of the right kind.
Applies when
18 ≤ age < 140
weight, Scr > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Cockcroft-Gault creatinine clearance: age = 60, weight = 72 kg, Scr = 1, sex = male
CrCl = 80
Run it
Terminal
$human-physiology solve hp_cockcroft_gault age=60 "weight=72 kg" Scr=1 sex=male
CrCl = 80
by: Creatinine clearance by the Cockcroft-Gault equation (Cockcroft-Gault (1976))
age = 60
weight = 72 kg
Scr = 1
sex = male
assumes: 18 <= age < 140; weight, Scr > 0
import human_physiology_ai999x as m
a = m.solve("hp_cockcroft_gault", age="60", weight="72 kg", Scr="1", sex="male")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Creatinine clearance from a timed urine collection1 fig.hp_creatinine_clearance_timed
Urine flow from a timed collection, creatinine clearance U V/P and its value normalized to 1.73 m^2.
C_{Cr} = \frac{U_{Cr}\dot V}{P_{Cr}}
You give
Meaning
Unit
Example
\text{Ucr}
Urine creatinine in mg/dL
—
100
\text{Vurine}
Urine volume collected (e.g. in mL)
m^3
1440 mL
\text{hours}
Collection time (e.g. in h)
s
24 h
\text{Pcr}
Plasma creatinine in mg/dL
—
1
\text{BSA}
Body surface area (e.g. in m²) (optional; standard adult area if omitted) optional
m^2
You get
Meaning
Unit
Example
\text{urine\_flow}
Urine flow in mL/min
—
1
\text{CrCl}
Creatinine clearance in mL/min
—
100
\text{CrCl\_normalized}
Creatinine clearance in mL/min normalized to standard body surface area
—
100
Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.
Applies when
all inputs > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
creatinine clearance from a timed urine: Ucr = 100, Vurine = 1440 mL, hours = 24 h, Pcr = 1
urine_flow = 1
CrCl = 100
CrCl_normalized = 100
Run it
Terminal
$human-physiology solve hp_creatinine_clearance_timed Ucr=100 "Vurine=1440 mL" "hours=24 h" Pcr=1
urine_flow = 1
CrCl = 100
CrCl_normalized = 100
by: Creatinine clearance from a timed urine collection (V = volume/(60 hours); CrCl = U V/P; x 1.73/BSA)
Ucr = 100
Vurine = 0.00144 m^3
hours = 86400 s
Pcr = 1
assumes: all inputs > 0
import human_physiology_ai999x as m
a = m.solve("hp_creatinine_clearance_timed", Ucr="100", Vurine="1440 mL", hours="24 h", Pcr="1")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Estimated GFR by the CKD-EPI 2021 creatinine equation2 fig.hp_egfr_ckd_epi_2021
eGFR = 142 min(Scr/k, 1)^a max(Scr/k, 1)^-1.200 0.9938^age (x 1.012 female), the race-free 2021 CKD-EPI creatinine equation (computed value only).
Estimated GFR in mL/min normalized to standard body surface area
—
91.69147861
Applies when
Scr > 0
18 ≤ age <= 120
Outside these conditions it says what is wrong instead of returning a number.
Worked example
eGFR CKD-EPI 2021: Scr = 1, age = 50, sex = male
eGFR = 91.69147861
Run it
Terminal
$human-physiology solve hp_egfr_ckd_epi_2021 Scr=1 age=50 sex=male
eGFR = 91.69147861
by: Estimated GFR by the CKD-EPI 2021 creatinine equation (CKD-EPI 2021: k = 0.7/0.9, a = -0.241/-0.302 (female/male))
Scr = 1
age = 50
sex = male
assumes: Scr > 0; 18 <= age <= 120
import human_physiology_ai999x as m
a = m.solve("hp_egfr_ckd_epi_2021", Scr="1", age="50", sex="male")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Estimated GFR by the CKD-EPI 2021 creatinine-cystatin C equation1 fig.hp_egfr_ckd_epi_2021_cys
The race-free 2021 CKD-EPI equation from serum creatinine and cystatin C (computed value only).
Estimated GFR in mL/min normalized to standard body surface area
—
88.14399054
Values with a unit may be written in any unit of the right kind.
Applies when
Scr, Scys > 0
18 ≤ age <= 120
Outside these conditions it says what is wrong instead of returning a number.
Worked example
eGFR creatinine-cystatin C: Scr = 1, Scys = 1 mg/L, age = 50, sex = male
eGFR = 88.14399054
Run it
Terminal
$human-physiology solve hp_egfr_ckd_epi_2021_cys Scr=1 "Scys=1 mg/L" age=50 sex=male
eGFR = 88.14399054
by: Estimated GFR by the CKD-EPI 2021 creatinine-cystatin C equation (135 min(Scr/k,1)^a max(Scr/k,1)^-0.544 min(Scys/0.8,1)^-0.323 max(Scys/0.8,1)^-0.778 0.9961^age (x 0.963 female))
Scr = 1
Scys = 0.001 kg/m^3
age = 50
sex = male
assumes: Scr, Scys > 0; 18 <= age <= 120
import human_physiology_ai999x as m
a = m.solve("hp_egfr_ckd_epi_2021_cys", Scr="1", Scys="1 mg/L", age="50", sex="male")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Filtered load, excretion and net tubular reabsorption or secretion1 fig.hp_tubular_handling
Filtered load GFR x Px, excretion rate Ux x V and net reabsorption (positive) or secretion (negative) as their difference.
R_x = GFR\cdot P_x – U_x \dot V
You give
Meaning
Unit
Example
\text{GFR}
GFR (e.g. in mL/min)
m^3/s
120 mL/min
\text{Px}
Plasma concentration in mg/dL
—
100
\text{Ux}
Urine concentration in mg/dL
—
0
V
Urine flow (e.g. in mL/min)
m^3/s
1 mL/min
You get
Meaning
Unit
Example
\text{filtered\_load}
Filtered load in mg/min
—
120
\text{excreted}
Excretion rate in mg/min
—
0
\text{reabsorbed}
Net reabsorption in mg/min (negative = net secretion)
—
120
Values with a unit may be written in any unit of the right kind.
Applies when
GFR, V > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
tubular reabsorption: GFR = 120 mL/min, Px = 100, Ux = 0, V = 1 mL/min
filtered_load = 120
excreted = 0
reabsorbed = 120
Run it
Terminal
$human-physiology solve hp_tubular_handling "GFR=120 mL/min" Px=100 Ux=0 "V=1 mL/min"
filtered_load = 120
excreted = 0
reabsorbed = 120
by: Filtered load, excretion and net tubular reabsorption or secretion (filtered - excreted (mg/dL x mL/min / 100 = mg/min))
GFR = 2e-06 m^3/s
Px = 100
Ux = 0
V = 1.666666667e-08 m^3/s
assumes: GFR, V > 0
import human_physiology_ai999x as m
a = m.solve("hp_tubular_handling", GFR="120 mL/min", Px="100", Ux="0", V="1 mL/min")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Filtration fraction2 fig.hp_filtration_fraction
The fraction of renal plasma flow filtered at the glomerulus, FF = GFR/RPF.
FF = \frac{GFR}{RPF}
You give
Meaning
Unit
Example
\text{GFR}
Glomerular filtration rate (e.g. in mL/min)
m^3/s
120 mL/min
\text{RPF}
Renal plasma flow (e.g. in mL/min)
m^3/s
600 mL/min
You get
Meaning
Unit
Example
\text{FF}
Filtration fraction
—
0.2
\text{FF\_percent}
Filtration fraction in %
—
20
Values with a unit may be written in any unit of the right kind.
Applies when
0 < GFR < RPF
Outside these conditions it says what is wrong instead of returning a number.
Worked example
filtration fraction: GFR = 120 mL/min, RPF = 600 mL/min
import human_physiology_ai999x as m
a = m.solve("hp_filtration_fraction", GFR="120 mL/min", RPF="600 mL/min")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Fractional excretion of a solute1 fig.hp_fractional_excretion
FE = (Ux Pcr)/(Px Ucr): the fraction of the filtered load excreted, with creatinine clearance as GFR (e.g. FENa).
FE_x = \frac{U_x P_{Cr}}{P_x U_{Cr}}
You give
Meaning
Unit
Example
\text{Ux}
Urine concentration of the solute (any unit)
—
40
\text{Px}
Plasma concentration of the solute (same unit)
—
140
\text{Ucr}
Urine creatinine (any unit)
—
100
\text{Pcr}
Plasma creatinine (same unit)
—
1
You get
Meaning
Unit
Example
\text{FE}
Fractional excretion
—
0.002857142857
\text{FE\_percent}
Fractional excretion in %
—
0.2857142857
Applies when
Px, Ucr, Pcr > 0
Outside these conditions it says what is wrong instead of returning a number.
import human_physiology_ai999x as m
a = m.solve("hp_fractional_excretion", Ux="40", Px="140", Ucr="100", Pcr="1")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Glucose titration curve (ideal transport maximum)1 fig.hp_glucose_titration
Filtered, reabsorbed (at most Tm) and excreted glucose and the plasma threshold Tm/GFR, ignoring splay.
E = \max(0,\; GFR\cdot P_G – T_m)
You give
Meaning
Unit
Example
\text{GFR}
GFR (e.g. in mL/min)
m^3/s
125 mL/min
\text{Pglucose}
Plasma glucose in mg/dL
—
400
\text{Tm}
Transport maximum (e.g. in mg/min)
kg/s
375 mg/min
You get
Meaning
Unit
Example
\text{filtered\_load}
Filtered load in mg/min
—
500
\text{reabsorbed}
Reabsorbed in mg/min
—
375
\text{excreted}
Excreted in mg/min
—
125
\text{threshold}
Plasma threshold in mg/dL
—
300
Values with a unit may be written in any unit of the right kind.
Applies when
GFR, Tm > 0
Pglucose >= 0
Outside these conditions it says what is wrong instead of returning a number.
import human_physiology_ai999x as m
a = m.solve("hp_glucose_titration", GFR="125 mL/min", Pglucose="400", Tm="375 mg/min")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Osmolar and free water clearance1 fig.hp_free_water_clearance
Osmolar clearance Cosm = Uosm V/Posm and free water clearance CH2O = V – Cosm (negative when the urine is concentrated).
C_{H_2O} = \dot V – \frac{U_{osm}\dot V}{P_{osm}}
You give
Meaning
Unit
Example
V
Urine flow (e.g. in mL/min)
m^3/s
2 mL/min
\text{Uosm}
Urine osmolality in mOsm/kg
—
150
\text{Posm}
Plasma osmolality in mOsm/kg
—
300
You get
Meaning
Unit
Example
\text{Cosm}
Osmolar clearance in mL/min
—
1
\text{CH2O}
Free water clearance in mL/min
—
1
Values with a unit may be written in any unit of the right kind.
Applies when
all inputs > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
free water clearance: V = 2 mL/min, Uosm = 150, Posm = 300
Cosm = 1
CH2O = 1
Run it
Terminal
$human-physiology solve hp_free_water_clearance "V=2 mL/min" Uosm=150 Posm=300
Cosm = 1
CH2O = 1
by: Osmolar and free water clearance (CH2O = V (1 - Uosm/Posm))
V = 3.333333333e-08 m^3/s
Uosm = 150
Posm = 300
assumes: all inputs > 0
import human_physiology_ai999x as m
a = m.solve("hp_free_water_clearance", V="2 mL/min", Uosm="150", Posm="300")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Renal clearance of a substance (inulin GFR)1 fig.hp_renal_clearance
Clearance C = U V/P (equal to GFR for inulin) and the urinary excretion rate U V.
C_x = \frac{U_x \dot V}{P_x}
You give
Meaning
Unit
Example
U
Urine concentration in mg/dL
—
30
V
Urine flow (e.g. in mL/min)
m^3/s
1 mL/min
P
Plasma concentration in mg/dL
—
0.25
You get
Meaning
Unit
Example
C
Clearance in mL/min
—
120
\text{excretion}
Excretion rate in mg/min
—
0.3
Values with a unit may be written in any unit of the right kind.
Applies when
U >= 0
V, P > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
renal clearance: U = 30, V = 1 mL/min, P = 0.25
C = 120
excretion = 0.3
Run it
Terminal
$human-physiology solve hp_renal_clearance U=30 "V=1 mL/min" P=0.25
C = 120
excretion = 0.3
by: Renal clearance of a substance (inulin GFR) (C = U V / P)
U = 30
V = 1.666666667e-08 m^3/s
P = 0.25
assumes: U >= 0; V, P > 0
import human_physiology_ai999x as m
a = m.solve("hp_renal_clearance", U="30", V="1 mL/min", P="0.25")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Renal plasma and blood flow from PAH clearance1 fig.hp_pah_renal_flow
import human_physiology_ai999x as m
a = m.solve("hp_pah_renal_flow", U_PAH="600", V="1 mL/min", P_PAH="1", Hct="0.45", E="0.9")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Respiratory 27
Alveolar gas equation1 fig.hp_alveolar_gas_equation
Inspired PO2 = FiO2 (PB – PH2O) and alveolar PO2 by the simplified (PiO2 – PaCO2/R) and full (nitrogen-balance) alveolar gas equation.
import human_physiology_ai999x as m
a = m.solve("hp_alveolar_gas_equation", FiO2="0.21", Patm="760 mmHg", PH2O="47 mmHg", PaCO2="40 mmHg", RQ="0.8")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Alveolar ventilation from CO2 output and arterial PCO22 fig.hp_alveolar_ventilation_co2
Alveolar ventilation equation VA (BTPS) = VCO2 (STPD) x 863/PaCO2, with K = 760 x 310.15/273.15 mmHg.
Values with a unit may be written in any unit of the right kind.
Applies when
VCO2, PaCO2 > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
alveolar ventilation from CO2 output: VCO2 = 200 mL/min, PaCO2 = 40 mmHg
VA = 4.314735493
Run it
Terminal
$human-physiology solve hp_alveolar_ventilation_co2 "VCO2=200 mL/min" "PaCO2=40 mmHg"
VA = 4.314735493
by: Alveolar ventilation from CO2 output and arterial PCO2 (VA = VCO2 K / PaCO2, K = 760 x 310.15/273.15)
VCO2 = 3.333333333e-06 m^3/s
PaCO2 = 5332.895497 Pa
assumes: VCO2, PaCO2 > 0
import human_physiology_ai999x as m
a = m.solve("hp_alveolar_ventilation_co2", VCO2="200 mL/min", PaCO2="40 mmHg")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Alveolar-arterial oxygen gradient, a/A ratio and P/F ratio1 fig.hp_aa_gradient
PAO2 from the simplified alveolar gas equation, the A-a gradient PAO2 – PaO2, the a/A ratio and PaO2/FiO2.
A\!-\!a = P_AO_2 – P_aO_2
You give
Meaning
Unit
Example
\text{FiO2}
Inspired O2 fraction
—
0.21
\text{Patm}
Barometric pressure (e.g. in mmHg)
Pa
760 mmHg
\text{PH2O}
Water vapour pressure (e.g. in mmHg)
Pa
47 mmHg
\text{PaCO2}
Arterial PCO2 (e.g. in mmHg)
Pa
40 mmHg
\text{PaO2}
Arterial PO2 (e.g. in mmHg)
Pa
90 mmHg
\text{RQ}
Respiratory quotient
—
0.8
You get
Meaning
Unit
Example
\text{PAO2}
Alveolar PO2 in mmHg
—
99.73
\text{Aa\_gradient}
A-a gradient in mmHg
—
9.73
a_{A,\mathrm{ratio}}
PaO2/PAO2
—
0.9024365788
\text{PF\_ratio}
PaO2/FiO2 in mmHg
—
428.5714286
Values with a unit may be written in any unit of the right kind.
Applies when
0 < FiO2 <= 1
computed PAO2 > 0
Outside these conditions it says what is wrong instead of returning a number.
import human_physiology_ai999x as m
a = m.solve("hp_aa_gradient", FiO2="0.21", Patm="760 mmHg", PH2O="47 mmHg", PaCO2="40 mmHg", PaO2="90 mmHg", RQ="0.8")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Arterial oxygen content1 fig.hp_oxygen_content
CaO2 = 1.34 x Hb x SaO2 + 0.003 x PaO2 (hemoglobin-bound plus dissolved oxygen).
C_aO_2 = 1.34\,Hb\,S_aO_2 + 0.003\,P_aO_2
You give
Meaning
Unit
Example
\text{Hb}
Hemoglobin in g/dL
—
15
\text{SaO2}
Arterial saturation
—
0.98
\text{PaO2}
Arterial PO2 (e.g. in mmHg)
Pa
100 mmHg
You get
Meaning
Unit
Example
\text{CaO2}
Oxygen content in mL O2/dL
—
19.998
\text{bound}
Hemoglobin-bound O2 in mL/dL
—
19.698
\text{dissolved}
Dissolved O2 in mL/dL
—
0.3
Values with a unit may be written in any unit of the right kind.
Applies when
Hb > 0
0 <= SaO2 <= 1
Outside these conditions it says what is wrong instead of returning a number.
import human_physiology_ai999x as m
a = m.solve("hp_oxygen_content", Hb="15", SaO2="0.98", PaO2="100 mmHg")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
ATPS to BTPS and STPD gas volume conversion1 fig.hp_gas_volume_conversion
A spirometer volume measured at ambient temperature and pressure, saturated (ATPS), converted to body (BTPS) and standard dry (STPD) conditions.
Values with a unit may be written in any unit of the right kind.
Applies when
Patm > PH2O
Patm > 47 mmHg
Outside these conditions it says what is wrong instead of returning a number.
Worked example
gas volume conversion: V = 1 L, T = 22 degC, Patm = 760 mmHg, PH2O = 19.8 mmHg
V_BTPS = 1.090909061
V_STPD = 0.9013509188
Run it
Terminal
$human-physiology solve hp_gas_volume_conversion "V=1 L" "T=22 degC" "Patm=760 mmHg" "PH2O=19.8 mmHg"
V_BTPS = 1.090909061
V_STPD = 0.9013509188
by: ATPS to BTPS and STPD gas volume conversion (ideal gas law on the dry-gas partial pressures)
V = 0.001 m^3
T = 295.15 K
Patm = 101325.0144 Pa
PH2O = 2639.783271 Pa
assumes: Patm > PH2O; Patm > 47 mmHg
import human_physiology_ai999x as m
a = m.solve("hp_gas_volume_conversion", V="1 L", T="22 degC", Patm="760 mmHg", PH2O="19.8 mmHg")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Barometric pressure and inspired PO2 at altitude1 fig.hp_barometric_altitude
Standard-atmosphere barometric pressure P = 101325 (1 – 0.0065 h/288.15)^(g M/(R L)) and the humidified inspired PO2.
P = P_0\left(1 – \frac{L h}{T_0}\right)^{gM/(RL)}
You give
Meaning
Unit
Example
h
Altitude (e.g. in m)
m
3000 m
\text{FiO2}
Inspired oxygen fraction (optional; dry air if omitted) optional
—
You get
Meaning
Unit
Example
\text{Patm}
Barometric pressure in mmHg
—
525.8605769
\text{PiO2}
Humidified inspired PO2 in mmHg
—
100.3212909
\text{Patm\_kPa}
Barometric pressure in kPa
—
70.10898756
Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.
Applies when
0 <= h <= 11000 m
Outside these conditions it says what is wrong instead of returning a number.
Worked example
barometric pressure at altitude: h = 3000 m
Patm = 525.8605769
PiO2 = 100.3212909
Patm_kPa = 70.10898756
Run it
Terminal
$human-physiology solve hp_barometric_altitude "h=3000 m"
Patm = 525.8605769
PiO2 = 100.3212909
Patm_kPa = 70.10898756
by: Barometric pressure and inspired PO2 at altitude (ICAO standard troposphere (lapse 6.5 K/km))
h = 3000 m
assumes: 0 <= h <= 11000 m
import human_physiology_ai999x as m
a = m.solve("hp_barometric_altitude", h="3000 m")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Bicarbonate from pH and PCO2 (Henderson-Hasselbalch)1 fig.hp_bicarbonate_from_ph
HCO3 = 0.03 PaCO2 x 10^(pH – 6.1).
[HCO_3^-] = 0.03\,P_{CO_2}\,10^{pH – 6.1}
You give
Meaning
Unit
Example
\text{pH}
PH
—
7.4
\text{PaCO2}
PCO2 (e.g. in mmHg)
Pa
40 mmHg
You get
Meaning
Unit
Example
\text{HCO3}
Bicarbonate in mmol/L
—
23.94314778
Values with a unit may be written in any unit of the right kind.
Applies when
6.5 <= pH <= 8.0
PaCO2 > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
bicarbonate from pH: pH = 7.4, PaCO2 = 40 mmHg
HCO3 = 23.94314778
Run it
Terminal
$human-physiology solve hp_bicarbonate_from_ph pH=7.4 "PaCO2=40 mmHg"
HCO3 = 23.94314778
by: Bicarbonate from pH and PCO2 (Henderson-Hasselbalch) (Henderson-Hasselbalch solved for bicarbonate)
pH = 7.4
PaCO2 = 5332.895497 Pa
assumes: 6.5 <= pH <= 8.0; PaCO2 > 0
import human_physiology_ai999x as m
a = m.solve("hp_bicarbonate_from_ph", pH="7.4", PaCO2="40 mmHg")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Blood pH by the Henderson-Hasselbalch equation2 fig.hp_ph_henderson_hasselbalch
pH = 6.1 + log10(HCO3/(0.03 PaCO2)) and the hydrogen-ion concentration in nmol/L.
Values with a unit may be written in any unit of the right kind.
Applies when
HCO3, PaCO2 > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
blood pH: HCO3 = 24 mmol/L, PaCO2 = 40 mmHg
pH = 7.401029996
H = 39.71641174
Run it
Terminal
$human-physiology solve hp_ph_henderson_hasselbalch "HCO3=24 mmol/L" "PaCO2=40 mmHg"
pH = 7.401029996
H = 39.71641174
by: Blood pH by the Henderson-Hasselbalch equation (pK' 6.1, CO2 solubility 0.03 mmol/L per mmHg)
HCO3 = 24 mol/m^3
PaCO2 = 5332.895497 Pa
assumes: HCO3, PaCO2 > 0
import human_physiology_ai999x as m
a = m.solve("hp_ph_henderson_hasselbalch", HCO3="24 mmol/L", PaCO2="40 mmHg")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
FEV1/FVC ratio2 fig.hp_fev1_fvc_ratio
The fraction of the forced vital capacity exhaled in the first second.
\frac{FEV_1}{FVC}
You give
Meaning
Unit
Example
\text{FEV1}
Forced expiratory volume in the first second (e.g. in L)
m^3
3.2 L
\text{FVC}
Forced vital capacity (e.g. in L)
m^3
4 L
You get
Meaning
Unit
Example
\text{ratio}
FEV1/FVC
—
0.8
\text{percent}
FEV1/FVC in %
—
80
Values with a unit may be written in any unit of the right kind.
Applies when
0 < FEV1 <= FVC
Outside these conditions it says what is wrong instead of returning a number.
import human_physiology_ai999x as m
a = m.solve("hp_fev1_fvc_ratio", FEV1="3.2 L", FVC="4 L")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Fick's law of diffusion across a membrane1 fig.hp_fick_diffusion
Steady diffusive flux J = D A dC/T across a barrier of thickness T, and the diffusion time T^2/(2D).
J = D A \frac{\Delta C}{T},\quad t = \frac{T^2}{2D}
You give
Meaning
Unit
Example
D
Diffusion coefficient (e.g. in cm²/s)
m^2/s
1.5e-05 cm^2/s
A
Membrane area (e.g. in cm²)
m^2
2 cm^2
\text{dC}
Concentration difference (e.g. in mmol/L)
mol/m^3
0.5 mmol/L
T
Membrane thickness (e.g. in um)
m
2 um
You get
Meaning
Unit
Example
J
Diffusion rate in mmol/s
—
7.5e-05
t_{\mathrm{diffusion}}
Characteristic diffusion time across the membrane in s
—
0.001333333333
Values with a unit may be written in any unit of the right kind.
Applies when
D, A, T > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Fick diffusion: D = 1.5e-05 cm^2/s, A = 2 cm^2, dC = 0.5 mmol/L, T = 2 um
J = 7.5e-05
t_diffusion = 0.001333333333
Run it
Terminal
$human-physiology solve hp_fick_diffusion "D=1.5e-05 cm^2/s" "A=2 cm^2" "dC=0.5 mmol/L" "T=2 um"
J = 7.5e-05
t_diffusion = 0.001333333333
by: Fick's law of diffusion across a membrane (J = D A dC / T (units converted to cm))
D = 1.5e-09 m^2/s
A = 0.0002 m^2
dC = 0.5 mol/m^3
T = 2e-06 m
assumes: D, A, T > 0
import human_physiology_ai999x as m
a = m.solve("hp_fick_diffusion", D="1.5e-05 cm^2/s", A="2 cm^2", dC="0.5 mmol/L", T="2 um")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Hill coefficient and P50 from two points of the dissociation curve1 fig.hp_hill_fit
The Hill coefficient n and P50 of the curve through two measured (PO2, saturation) points (Hill plot slope).
n = \frac{\ln\frac{S_2/(1-S_2)}{S_1/(1-S_1)}}{\ln(P_2/P_1)}
You give
Meaning
Unit
Example
\text{P1}
First PO2 (e.g. in mmHg)
Pa
20 mmHg
\text{S1}
Saturation at P1
—
0.3121240186
\text{P2}
Second PO2 (e.g. in mmHg)
Pa
60 mmHg
\text{S2}
Saturation at P2
—
0.8980776441
You get
Meaning
Unit
Example
n
Hill coefficient
—
2.7
\text{P50}
P50 in mmHg
—
26.8
Values with a unit may be written in any unit of the right kind.
Applies when
0 < S < 1
saturation increases with PO2
Outside these conditions it says what is wrong instead of returning a number.
$human-physiology solve hp_hill_fit "P1=20 mmHg" S1=0.3121240186 "P2=60 mmHg" S2=0.8980776441
n = 2.7
P50 = 26.8
by: Hill coefficient and P50 from two points of the dissociation curve (slope of log(S/(1-S)) against log PO2)
P1 = 2666.447748 Pa
S1 = 0.3121240186
P2 = 7999.343245 Pa
S2 = 0.8980776441
assumes: 0 < S < 1; saturation increases with PO2
import human_physiology_ai999x as m
a = m.solve("hp_hill_fit", P1="20 mmHg", S1="0.3121240186", P2="60 mmHg", S2="0.8980776441")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Laplace pressure of an alveolus2 fig.hp_alveolar_laplace_pressure
Pressure needed to keep a spherical alveolus open, P = 2 gamma/r (why surfactant matters).
P = \frac{2\gamma}{r}
You give
Meaning
Unit
Example
\gamma
Surface tension (e.g. in mN/m)
N/m
25 mN/m
r
Alveolar radius (e.g. in um)
m
100 um
You get
Meaning
Unit
Example
P
Collapsing pressure in Pa
—
500
P_{\mathrm{cmH2O}}
Collapsing pressure in cmH2O
—
5.098581065
Values with a unit may be written in any unit of the right kind.
Applies when
gamma, r > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
alveolar Laplace pressure: gamma = 25 mN/m, r = 100 um
P = 500
P_cmH2O = 5.098581065
Run it
Terminal
$human-physiology solve hp_alveolar_laplace_pressure "gamma=25 mN/m" "r=100 um"
P = 500
P_cmH2O = 5.098581065
by: Laplace pressure of an alveolus (P = 2 gamma / r)
gamma = 0.025 N/m
r = 0.0001 m
assumes: gamma, r > 0
import human_physiology_ai999x as m
a = m.solve("hp_alveolar_laplace_pressure", gamma="25 mN/m", r="100 um")
print(a.values or (a.value, a.unit))
Figures
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Lung capacities from the four lung volumes1 fig.hp_lung_capacities
Inspiratory capacity, functional residual capacity, vital capacity and total lung capacity from TV, IRV, ERV and RV.
TLC = IRV + TV + ERV + RV
You give
Meaning
Unit
Example
\text{TV}
Tidal volume (e.g. in mL)
m^3
500 mL
\text{IRV}
Inspiratory reserve volume (e.g. in mL)
m^3
3000 mL
\text{ERV}
Expiratory reserve volume (e.g. in mL)
m^3
1100 mL
\text{RV}
Residual volume (e.g. in mL)
m^3
1200 mL
You get
Meaning
Unit
Example
\text{IC}
Inspiratory capacity in mL
—
3500
\text{FRC}
Functional residual capacity in mL
—
2300
\text{VC}
Vital capacity in mL
—
4600
\text{TLC}
Total lung capacity in mL
—
5800
Values with a unit may be written in any unit of the right kind.
Applies when
TV, RV > 0
IRV, ERV >= 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
lung capacities: TV = 500 mL, IRV = 3000 mL, ERV = 1100 mL, RV = 1200 mL
import human_physiology_ai999x as m
a = m.solve("hp_lung_capacities", TV="500 mL", IRV="3000 mL", ERV="1100 mL", RV="1200 mL")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Minute and alveolar ventilation1 fig.hp_minute_ventilation
Minute ventilation VE = VT x RR, alveolar ventilation VA = (VT – VD) x RR and the dead-space fraction VD/VT.
\dot V_A = (V_T – V_D) f
You give
Meaning
Unit
Example
\text{VT}
Tidal volume (e.g. in mL)
m^3
500 mL
\text{RR}
Respiratory rate in breaths/min
—
12
\text{VD}
Dead space (e.g. in mL)
m^3
150 mL
You get
Meaning
Unit
Example
\text{VE}
Minute ventilation in L/min
—
6
\text{VA}
Alveolar ventilation in L/min
—
4.2
\text{VD\_VT}
Dead space fraction
—
0.3
Values with a unit may be written in any unit of the right kind.
Applies when
0 <= VD < VT
RR > 0
Outside these conditions it says what is wrong instead of returning a number.
$human-physiology solve hp_minute_ventilation "VT=500 mL" RR=12 "VD=150 mL"
VE = 6
VA = 4.2
VD_VT = 0.3
by: Minute and alveolar ventilation (VE = VT f; VA = (VT - VD) f)
VT = 0.0005 m^3
RR = 12
VD = 0.00015 m^3
assumes: 0 <= VD < VT; RR > 0
import human_physiology_ai999x as m
a = m.solve("hp_minute_ventilation", VT="500 mL", RR="12", VD="150 mL")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Oxygen consumption and extraction ratio (reverse Fick)1 fig.hp_oxygen_consumption
VO2 = CO (CaO2 – CvO2) x 10 and the oxygen extraction ratio (CaO2 – CvO2)/CaO2.
\dot V_{O_2} = CO\,(C_aO_2 – C_{\bar v}O_2)
You give
Meaning
Unit
Example
\text{CO}
Cardiac output (e.g. in L/min)
m^3/s
5 L/min
\text{Hb}
Hemoglobin in g/dL
—
15
\text{SaO2}
Arterial saturation
—
0.98
\text{SvO2}
Mixed venous saturation
—
0.75
\text{PaO2}
Arterial PO2 (e.g. in mmHg)
Pa
100 mmHg
\text{PvO2}
Mixed venous PO2 (e.g. in mmHg)
Pa
40 mmHg
You get
Meaning
Unit
Example
\text{VO2}
Oxygen consumption in mL/min
—
240.15
\text{O2ER}
Oxygen extraction ratio
—
0.2401740174
\text{CaO2}
Arterial content in mL/dL
—
19.998
\text{CvO2}
Venous content in mL/dL
—
15.195
Values with a unit may be written in any unit of the right kind.
Applies when
CvO2 < CaO2
Outside these conditions it says what is wrong instead of returning a number.
import human_physiology_ai999x as m
a = m.solve("hp_oxygen_consumption", CO="5 L/min", Hb="15", SaO2="0.98", SvO2="0.75", PaO2="100 mmHg", PvO2="40 mmHg")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Oxyhemoglobin saturation by the Hill equation1 fig.hp_hill_saturation
SO2 = PO2^n/(PO2^n + P50^n) for a Hill coefficient n and half-saturation pressure P50.
S = \frac{P^n}{P^n + P_{50}^n}
You give
Meaning
Unit
Example
\text{PO2}
Partial pressure of O2 (e.g. in mmHg)
Pa
40 mmHg
\text{P50}
P50 (e.g. in mmHg)
Pa
26.8 mmHg
n
Hill coefficient
—
2.7
You get
Meaning
Unit
Example
\text{SO2}
Fractional saturation
—
0.7467379184
Values with a unit may be written in any unit of the right kind.
Applies when
PO2 >= 0
P50, n > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Hill saturation: PO2 = 40 mmHg, P50 = 26.8 mmHg, n = 2.7
SO2 = 0.7467379184
Run it
Terminal
$human-physiology solve hp_hill_saturation "PO2=40 mmHg" "P50=26.8 mmHg" n=2.7
SO2 = 0.7467379184
by: Oxyhemoglobin saturation by the Hill equation (Hill equation)
PO2 = 5332.895497 Pa
P50 = 3573.039983 Pa
n = 2.7
assumes: PO2 >= 0; P50, n > 0
import human_physiology_ai999x as m
a = m.solve("hp_hill_saturation", PO2="40 mmHg", P50="26.8 mmHg", n="2.7")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
PCO2 from pH and bicarbonate (Henderson-Hasselbalch)1 fig.hp_pco2_from_ph
import human_physiology_ai999x as m
a = m.solve("hp_pco2_from_ph", pH="7.4", HCO3="24 mmol/L")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Physiological dead space by the Bohr (Enghoff) equation1 fig.hp_bohr_dead_space
VD/VT = (PaCO2 – PECO2)/PaCO2 and the dead-space volume, with arterial PCO2 standing for alveolar (Enghoff).
Values with a unit may be written in any unit of the right kind.
Applies when
0 <= PECO2 < PaCO2
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Bohr dead space: PaCO2 = 40 mmHg, PECO2 = 28 mmHg, VT = 500 mL
VD_VT = 0.3
VD = 150
Run it
Terminal
$human-physiology solve hp_bohr_dead_space "PaCO2=40 mmHg" "PECO2=28 mmHg" "VT=500 mL"
VD_VT = 0.3
VD = 150
by: Physiological dead space by the Bohr (Enghoff) equation (Bohr CO2 mass balance)
PaCO2 = 5332.895497 Pa
PECO2 = 3733.026848 Pa
VT = 0.0005 m^3
assumes: 0 <= PECO2 < PaCO2
import human_physiology_ai999x as m
a = m.solve("hp_bohr_dead_space", PaCO2="40 mmHg", PECO2="28 mmHg", VT="500 mL")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
import human_physiology_ai999x as m
a = m.solve("hp_shunt_fraction", CcO2="21", CaO2="20", CvO2="15")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
PO2 at a given saturation by the Hill equation1 fig.hp_hill_po2
Inverse Hill equation PO2 = P50 (S/(1 – S))^(1/n).
P = P_{50}\left(\frac{S}{1-S}\right)^{1/n}
You give
Meaning
Unit
Example
\text{SO2}
Fractional saturation
—
0.75
\text{P50}
P50 (e.g. in mmHg)
Pa
26.8 mmHg
n
Hill coefficient
—
2.7
You get
Meaning
Unit
Example
\text{PO2}
Partial pressure of O2 in mmHg
—
40.25745998
Values with a unit may be written in any unit of the right kind.
Applies when
0 < SO2 < 1
P50, n > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Hill PO2: SO2 = 0.75, P50 = 26.8 mmHg, n = 2.7
PO2 = 40.25745998
Run it
Terminal
$human-physiology solve hp_hill_po2 SO2=0.75 "P50=26.8 mmHg" n=2.7
PO2 = 40.25745998
by: PO2 at a given saturation by the Hill equation (PO2 = P50 (S/(1-S))^(1/n))
SO2 = 0.75
P50 = 3573.039983 Pa
n = 2.7
assumes: 0 < SO2 < 1; P50, n > 0
import human_physiology_ai999x as m
a = m.solve("hp_hill_po2", SO2="0.75", P50="26.8 mmHg", n="2.7")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
PO2 at a given saturation by the Severinghaus equation1 fig.hp_severinghaus_po2
Inverse of the Severinghaus curve: the real root of P^3 + 150 P = 23400 S/(1 – S).
P^3 + 150P = \frac{23400\,S}{1-S}
You give
Meaning
Unit
Example
\text{SO2}
Fractional saturation
—
0.7494646681
You get
Meaning
Unit
Example
\text{PO2}
Partial pressure of O2 in mmHg
—
40
Applies when
0 < SO2 < 1
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Severinghaus PO2: SO2 = 0.749464668094
PO2 = 40
Run it
Terminal
$human-physiology solve hp_severinghaus_po2 SO2=0.7494646681
PO2 = 40
by: PO2 at a given saturation by the Severinghaus equation (Cardano root of the cubic, Newton polished)
SO2 = 0.7494646681
assumes: 0 < SO2 < 1
import human_physiology_ai999x as m
a = m.solve("hp_severinghaus_po2", SO2="0.7494646681")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Respiratory time constant and passive exhalation1 fig.hp_respiratory_time_constant
tau = R C, the fraction of the volume exhaled after time t, 1 – e^(-t/tau), and 3 tau (about 95 %).
\tau = R C,\quad V(t) = V_0 e^{-t/\tau}
You give
Meaning
Unit
Example
R
Airway resistance in cmH2O s/L
—
5
C
Compliance in mL/cmH2O
—
50
t
Time (e.g. in s) (optional; needed for the fraction exhaled) optional
s
0.5 s
You get
Meaning
Unit
Example
\tau
Time constant in s
—
0.25
\text{fraction\_exhaled}
Fraction exhaled at time t
—
0.8646647168
t_{95}
Three time constants in s
—
0.75
Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.
Applies when
R, C > 0
t >= 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
respiratory time constant: R = 5, C = 50, t = 0.5 s
tau = 0.25
t_95 = 0.75
fraction_exhaled = 0.8646647168
Run it
Terminal
$human-physiology solve hp_respiratory_time_constant R=5 C=50 "t=0.5 s"
tau = 0.25
t_95 = 0.75
fraction_exhaled = 0.8646647168
by: Respiratory time constant and passive exhalation (single-compartment passive emptying)
R = 5
C = 50
t = 0.5 s
assumes: R, C > 0; t >= 0
import human_physiology_ai999x as m
a = m.solve("hp_respiratory_time_constant", R="5", C="50", t="0.5 s")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Saturation by the Severinghaus (1979) dissociation equation1 fig.hp_severinghaus_saturation
Standard human oxyhemoglobin curve S = 1/(23400/(PO2^3 + 150 PO2) + 1) (37 degC, pH 7.40, PCO2 40 mmHg).
S = \left(\frac{23400}{P^3 + 150P} + 1\right)^{-1}
You give
Meaning
Unit
Example
\text{PO2}
Partial pressure of O2 (e.g. in mmHg)
Pa
40 mmHg
You get
Meaning
Unit
Example
\text{SO2}
Fractional saturation
—
0.7494646681
Values with a unit may be written in any unit of the right kind.
Applies when
PO2 > 0
Outside these conditions it says what is wrong instead of returning a number.
Worked example
Severinghaus saturation: PO2 = 40 mmHg
SO2 = 0.7494646681
Run it
Terminal
$human-physiology solve hp_severinghaus_saturation "PO2=40 mmHg"
SO2 = 0.7494646681
by: Saturation by the Severinghaus (1979) dissociation equation (Severinghaus equation)
PO2 = 5332.895497 Pa
assumes: PO2 > 0
import human_physiology_ai999x as m
a = m.solve("hp_severinghaus_saturation", PO2="40 mmHg")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Serum anion gap and albumin-corrected anion gap1 fig.hp_anion_gap
AG = Na – (Cl + HCO3) and the albumin-corrected value AG + 2.5 (4.0 – albumin in g/dL).
AG = [Na^+] – ([Cl^-] + [HCO_3^-])
You give
Meaning
Unit
Example
\text{Na}
Sodium (e.g. in mmol/L)
mol/m^3
140 mmol/L
\text{Cl}
Chloride (e.g. in mmol/L)
mol/m^3
104 mmol/L
\text{HCO3}
Bicarbonate (e.g. in mmol/L)
mol/m^3
24 mmol/L
\text{albumin}
Albumin in g/dL (optional; normal albumin if omitted) optional
—
You get
Meaning
Unit
Example
\text{AG}
Anion gap in mmol/L
—
12
\text{AG\_corrected}
Albumin-corrected anion gap in mmol/L
—
12
Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.
Applies when
all inputs > 0
Outside these conditions it says what is wrong instead of returning a number.
$human-physiology solve hp_anion_gap "Na=140 mmol/L" "Cl=104 mmol/L" "HCO3=24 mmol/L"
AG = 12
AG_corrected = 12
by: Serum anion gap and albumin-corrected anion gap (AG = Na - Cl - HCO3; + 2.5 per g/dL of albumin below 4.0)
Na = 140 mol/m^3
Cl = 104 mol/m^3
HCO3 = 24 mol/m^3
assumes: all inputs > 0
import human_physiology_ai999x as m
a = m.solve("hp_anion_gap", Na="140 mmol/L", Cl="104 mmol/L", HCO3="24 mmol/L")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Static and dynamic compliance and airway resistance1 fig.hp_respiratory_mechanics
import human_physiology_ai999x as m
a = m.solve("hp_respiratory_mechanics", VT="500 mL", Ppeak="25", Pplat="20", PEEP="5", flow="60 L/min")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Systemic oxygen delivery1 fig.hp_oxygen_delivery
DO2 = CO x CaO2 x 10 (mL O2/min), with CaO2 = 1.34 Hb SaO2 + 0.003 PaO2.
D_{O_2} = CO \times C_aO_2 \times 10
You give
Meaning
Unit
Example
\text{CO}
Cardiac output (e.g. in L/min)
m^3/s
5 L/min
\text{Hb}
Hemoglobin in g/dL
—
15
\text{SaO2}
Arterial saturation
—
0.98
\text{PaO2}
Arterial PO2 (e.g. in mmHg)
Pa
100 mmHg
You get
Meaning
Unit
Example
\text{DO2}
Oxygen delivery in mL O2/min
—
999.9
\text{CaO2}
Arterial oxygen content in mL/dL
—
19.998
Values with a unit may be written in any unit of the right kind.
Applies when
CO, Hb > 0
0 <= SaO2 <= 1
Outside these conditions it says what is wrong instead of returning a number.
import human_physiology_ai999x as m
a = m.solve("hp_oxygen_delivery", CO="5 L/min", Hb="15", SaO2="0.98", PaO2="100 mmHg")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Temperature, pH and PCO2 correction of the dissociation curve (Severinghaus)1 fig.hp_virtual_po2
Virtual PO2 = PO2 x 10^(0.024 (37 – T) + 0.40 (pH – 7.40) + 0.06 log10(40/PCO2)) and the saturation from the standard curve (Bohr effect).
$human-physiology solve hp_virtual_po2 "PO2=80 mmHg" "T=39 degC" pH=7.3 "PCO2=50 mmHg"
PO2_virtual = 64.45778629
SO2 = 0.9222276859
factor = 0.8057223286
by: Temperature, pH and PCO2 correction of the dissociation curve (Severinghaus) (Severinghaus (1979) correction, then the standard curve)
PO2 = 10665.79099 Pa
T = 312.15 K
pH = 7.3
PCO2 = 6666.119371 Pa
assumes: 25 <= T <= 43 degC; 6.8 <= pH <= 7.8
import human_physiology_ai999x as m
a = m.solve("hp_virtual_po2", PO2="80 mmHg", T="39 degC", pH="7.3", PCO2="50 mmHg")
print(a.values or (a.value, a.unit))
Figure
Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.
Figures
Computed, not drawn by hand
Every point in these figures is an answer of the model: one input is varied, the others are held at the worked example, and the curve shows how the result responds. The marked point is the worked example itself.
Nernst equilibrium potential of an ion
E = \frac{RT}{zF}\ln\frac{[C]_o}{[C]_i}
E (equilibrium potential in mV) against Cout (extracellular concentration in mM), with Cin = 140, z = 1. 31 points computed by human-physiology-ai999x; marked: Cout = 4, E = -95.0226.
Body fat from body density (Siri and Brozek)
\%BF = \frac{495}{D} – 450
fat_Siri (body fat in % (Siri)) against density (body density (e.g. in g/mL)). 9 points computed by human-physiology-ai999x; marked: density = 1050, fat_Siri = 21.4286.
Two-compartment fluid shift after adding a solution (Darrow-Yannet)
osm_final (final osmolality in mOsm/kg) against TBW (initial total body water (e.g. in L)), with C_added = 0, Posm = 290, V_added = 0.002 m^3. 31 points computed by human-physiology-ai999x; marked: TBW = 0.042, osm_final = 276.818.
Bernoulli pressure drop across a narrowing
\Delta P = \tfrac{1}{2}\rho\,(v_2^2 – v_1^2) \approx 4 v_2^2
dP_mmHg (pressure drop in mmHg) against v1 (upstream velocity (e.g. in m/s)), with rho = 1060 kg/m^3, v2 = 4 m/s. 31 points computed by human-physiology-ai999x; marked: v1 = 1, dP_mmHg = 59.6299.
Human Physiology answers questions in human physiology: cardiac output, blood pressure, vascular resistance and Poiseuille flow, lung volumes, ventilation and the alveolar gas equation, oxygen content and binding, acid-base, renal clearance and eGFR, Nernst and Goldman-Hodgkin-Katz potentials, cable properties, body composition and metabolic rate (computed values, not medical advice). Each answer gives the value with its unit, the steps and the formula in LaTeX.
Is there a desktop app or a command-line program?
Yes, both, for Windows and Linux, in their next release: the AI999X desktop app holds all AI999X models in one window, and the command-line bundle one program per model (human-physiology for this one). Until then this model runs in your browser on this page. Downloads and checksums: https://www.ai999x.com/desktop-cli/
How do I install human-physiology-ai999x?
With pip: pip install human-physiology-ai999x. The same files are on Hugging Face (hf download AI999X/human-physiology-ai999x –local-dir human-physiology-ai999x) and GitHub.
Does it run offline?
Yes. It is a Python package that runs on an ordinary CPU without a network connection (Python >=3.10); no GPU and no API key are needed.
How many capabilities does human-physiology-ai999x have?
96 capabilities in 7 topics, including Respiratory, Cardiovascular, Nerve and muscle, Renal, Metabolism.
Which field and tasks does it cover?
Field: Life Sciences. Tasks: Question Answering, Sentence Similarity, Feature Extraction.
What does an answer look like?
Asked "cardiac output: HR = 72, SV = 70 mL", it answers: CO = 5.04, CO_mL = 5040.
What happens when a question cannot be answered?
It says so and names what is missing or out of range, instead of guessing a number.