Skip to content
Snippets Groups Projects
Commit 45b2d8ad authored by Delvigne Frank's avatar Delvigne Frank
Browse files

Upload New File

parent fdfe6143
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed May 4 12:30:02 2022
@author: delvigne
"""
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
'''
Exercice 2.14: gas balance analysis
'''
#Import data from excel
df = pd.read_excel ("data_gasbalance.xlsx")
time = df['Time (h)']
CL = df['C_L (%)']
Qin = df['Q_in (L/min)']
O2 = df['%O2']
CO2 = df['%CO2']
# Parameters
C0L = 10; # mg/L
VL = 10; # Bioreactor volume (effective)
# Computation
percentN2OUT1=[]
QINO2 =Qin*0.209
QINN2= 0.79*Qin
percentN2OUT = [100-x-y for x,y in zip(O2,CO2)]
Qout = [100/x*y for x,y in zip(percentN2OUT,QINN2)]
QoutO2 = [x*(y/100) for x,y in zip(Qout,O2)]
qO2 = QINO2-QoutO2
KLa = [x/(C0L-((y/100)*C0L))*(32000/(22.4*VL))*60 for x,y in zip(qO2,CL)]
#Plotting
plt.plot(KLa)
plt.xlabel('Time (min)')
plt.ylabel('KLa (h-1)')
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment