simvent.js is a javascript library for the simulation of phenomenons relative to mechanical ventilation of the lung.
It can be used to simulate basic modes of ventilation like CMV-VC or exotic ones like HFPV. It includes basic lung models with linear compliance and models with sigmoid pressure volume relation and hysteresis between inspiration and expiration. It can also simulate patient spontaneous breathing and patient ventilator interactions.
simvent.js can be imported in the browser, node.js or observablehq as an ES6 module.