Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Modelling physical and biological systems
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mipi
Lectures
Modelling physical and biological systems
Commits
45b2d8ad
Commit
45b2d8ad
authored
2 years ago
by
Delvigne Frank
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
fdfe6143
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Ex_2_14.py
+44
-0
44 additions, 0 deletions
Ex_2_14.py
with
44 additions
and
0 deletions
Ex_2_14.py
0 → 100644
+
44
−
0
View file @
45b2d8ad
#!/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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment