Commit 730badc4 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[exercise-fluidsys] remove obsolete plot density function

parent 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()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment