figshare
Browse

Membrane flux analysis tool

Download (1.67 MB)
Version 2 2025-01-31, 15:10
Version 1 2025-01-31, 15:04
software
posted on 2025-01-31, 15:10 authored by Timothy WarnerTimothy Warner, Nathan Mullins, Charles-François de Lannoy

Description

The program was written to rapidly calculate the water flux of membranes from time-mass data generated by data-logging load cells, input values describing the properties of the membranes, and specified test conditions including time at which the flux testing window should begin and the test pressure at the test time. The program converts mass to volume based on test room temperature and Kell's equation [1], applies data smoothing to reduce fluctuations in the volume data calculated from the load cells, then uses changes in volume and properties of the membranes to calculate flux based on specified test conditions.

Included Modules

Permeance

The permeance module takes flux calculated at each time specified in test_conditions.csv and plots it against the pressure (bar) at that time. It performs linear regression on the data from each load cell, plots trendlines and records the regression parameters in permeance_values.csv in directory outputs/permeance. The permeance plot is saved as a .jpg and .svg file in the same directory. It is recommended to define test conditions at different pressures for this module.

Flux Decline

The flux decline module plots the decrease in flux over time during membrane separation due to fouling or compression. The average flux at each time point is plotted along with the measurement standard deviation (for two or more load cells) and an established exponential model from the literature superimposed on the data [2]. The parameters of the exponential model are saved as model_parameters.csv in directory outputs/flux_decline along with the flux decline and residual plots in .jpg and .svg format. The time in test_conditions.csv must be in HH:MM:SS format, and it is recommended that the times are regular intervals and the pressure kept constant.

Installation and Usage

  1. Download and install Python from https://www.python.org/
  2. (Recommended) Download and install an integrated development environment (IDE) or code editor such as PyCharm or Visual Studio Code.
  3. Download the latest release of the software from figshare or GitHub (https://github.com/Timothy-J-Warner/membrane-flux-analysis-tool).
  4. Unzip downloaded .zip file to access the software folder.
  5. Read the readme file for instructions on using the code.
  6. Modify the data files “Channel_0”, “Channel_1”, etc. in the “data” folder using spreadsheet editor such as Excel. The first column should be time values in HH:MM:SS format and the second should be mass in grams.
  7. Modify the input files in the inputs folder to set membrane properties, experiment configurations, set testing times and pressures, and choose which modules will be used in addition to flux calculations.
  8. (Recommended) Open the project folder in your IDE or code editor of choice.
  9. Run the “membrane-flux-analysis-tool.py” python script.
  10. Find the calculated flux in the “outputs” folder along with the outputs of any selected modules.

GitHub

The GitHub project can be found at: https://github.com/Timothy-J-Warner/membrane-flux-analysis-tool

Funding

Ontario Early Research Award (ERA) - Round 16

NSERC Discovery Grants program - Individual (GRPIN)

History