This MATLAB script calculates pressure as a function of time inside a submerged membrane-bound compartment containing an aqueous PEG solution as an osmotic driver. It can also be used to calculate a membrane's hydraulic permeability by fitting experimental data. The model used accounts for the dilution effects caused by the compartment's expansion.
All of this project's resources can be found in the "Files" section.