Equations in use:

These are written in javascript form, (ie Math.pow), since that is how they are used in the animation. They should be written the way Jason sent them for a publication, or formal info page. (I also have additional "if" clauses to protect from dividing by zero where needed, and also to deal with V/Q = infinity.)

V/Q (for 1 unit) = V[unit1 A] / Q[unit A]

PAO2 (for 1 unit) = (17.5229 + 44.295 * VQ + 361.931 * Math.pow(VQ, 2)) / (0.437074 + 1.11927 * VQ + 2.4552 * Math.pow(VQ, 2))

this equation is from Jason Torchinsky's email from February 8, 2022

PaO2 (for 1 unit AND for Combo) = PAO2 – (( patientAge22 + 10 ) / 4 )

this equation is from Chris Green's email March 25th 9:26 AM

SaO2 (for 1 unit) =

var numerator = math.add(math.multiply(1955.0394699543847, PartO2), math.add(math.multiply(-213.2662843886982, math.pow(PartO2, 2)), math.add(math.multiply(41.54640092306389, math.pow(PartO2, 3)), math.pow(PartO2, 4))));

var denominator = math.add(-106448.2587420381, math.add(math.multiply(65913.51184300154, PartO2), math.add(math.multiply(-851.451203713157, math.pow(PartO2, 2)), math.add(math.multiply(45.05377099788284, math.pow(PartO2, 3)), math.pow(PartO2, 4)))));

return math.divide(numerator, denominator);

this equation is from Jason Torchinsky's email from February 8, 2022, but then translated into javascript on 4-14 and with more decimal points included.

ComboSaO2 = (Q[unitA] * SaO2[unitA] + Q[unitB] * SaO2[unitB]) / (Q[unitA] + Q[unitB])

this equation is from Chris Green's email from Thu, Feb 17, 3:54 PM

ComboPaO2 =

var a0 = math.divide(math.subtract(10.38660023076597, math.multiply(11.26344274947071, comboSaO2)), math.subtract(comboSaO2, 1));

var b0 = math.divide(math.add(math.multiply(comboSaO2, math.subtract(math.multiply(1075.0947060911885, comboSaO2), 1645.7226752215443)), 573.7033803407896), math.pow(math.subtract(comboSaO2, 1), 2));

var c0 = math.multiply(3.940786557660247e-14, math.multiply(math.pow(math.pow(math.subtract(comboSaO2, 1), 3), 1./3.), math.subtract(math.multiply(math.subtract(3.6519627291763246e63, math.multiply(3.678206421048116e63, comboSaO2)), comboSaO2), 7.704925727224935e61)));

var c1 = math.subtract(math.multiply(math.add(3.0493168812921595e140, math.multiply(math.subtract(math.multiply(6.139089782895964e141, comboSaO2), 6.396790839353522e141), comboSaO2)), comboSaO2), 1.1635911791364433e139);

var c2 = math.add(2.0877433016741836e278, math.multiply(math.subtract(math.multiply(math.add(7.469118128223332e281, math.multiply(math.subtract(math.multiply(math.add(6.87738499223727e283, math.multiply(math.subtract(math.multiply(4.5671677653081645e283, comboSaO2), 1.0231982990880378e284), comboSaO2)), comboSaO2), 1.2853844024371706e283), comboSaO2)), comboSaO2), 1.7530444761963444e280), comboSaO2));

var b1 = math.divide(c0, math.multiply(math.pow(math.subtract(comboSaO2, 1), 2), math.pow(math.add(c1, math.pow(c2, 1./2.)), 1./3.)));

var b2 = math.multiply(math.multiply(math.divide(1, math.pow(math.pow(math.subtract(comboSaO2, 1), 3), 1./3.)), 7.252577143003733e-45), math.pow(math.add(c1, math.pow(c2, 1./2.)), 1./3.));

var a1 = math.multiply(0.5, math.pow(math.add(b0, math.add(b1, b2)), 1./2.));

var b3 = math.divide(math.add(1147.4067606815793, math.multiply(math.subtract(math.multiply(2150.189412182377, comboSaO2), 3291.4453504430885), comboSaO2)), math.pow(math.subtract(comboSaO2, 1), 2));

var c3 = math.add(30698.87177532589, math.multiply(math.subtract(math.multiply(math.subtract(414157.8781909889, math.multiply(193051.12355792642, comboSaO2)), comboSaO2), 251816.41301363567), comboSaO2));

var b4 = math.divide(c3, math.multiply(2, math.multiply(math.pow(math.subtract(comboSaO2, 1), 3), a1)));

var a2 = math.multiply(0.5, math.pow(math.add(math.subtract(math.subtract(b3, b1), b2), b4), 1./2.));

var tempComboPartO2 = math.re(math.add(a0, math.add(a1, a2)));

this equation is from Jason Torchinsky's inverting of the Sa)2 Eq and translating it into javascript from 4-14-22

Javascript code:

It's used within Adobe Animate, so this code won't run on it's own because the objects are defined elsewhere in the program. But the logic is all here.