Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux-course
Commits
730badc4
Commit
730badc4
authored
Jul 17, 2018
by
Dennis Gläser
Browse files
[exercise-fluidsys] remove obsolete plot density function
parent
0edb68a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
exercises/exercise-fluidsystem/components/plotdensityfunction.py
deleted
100644 → 0
View file @
0edb68a9
#!usr/bin/env python
import
numpy
as
np
import
matplotlib.pyplot
as
plt
# function to calculate rho dependent on pressure
rho_min
=
1440
;
rho_max
=
1480
;
k
=
5e-7
;
def
rho
(
p
):
return
rho_min
+
(
rho_max
-
rho_min
)
/
(
1
+
rho_min
*
np
.
exp
(
-
1.0
*
k
*
(
rho_max
-
rho_min
)
*
p
));
# sample pressure in range (1e4, 1e7) and compute corresponding densities
p
=
np
.
logspace
(
4
,
7
,
100
)
r
=
rho
(
p
)
# plot density vs. pressure
plt
.
semilogx
(
p
,
r
)
plt
.
show
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment