From 730badc426f54a73808c890e4ea5e512ee6cae95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Gl=C3=A4ser?= <dennis.glaeser@iws.uni-stuttgart.de> Date: Tue, 17 Jul 2018 20:13:06 +0200 Subject: [PATCH] [exercise-fluidsys] remove obsolete plot density function --- .../components/plotdensityfunction.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 exercises/exercise-fluidsystem/components/plotdensityfunction.py diff --git a/exercises/exercise-fluidsystem/components/plotdensityfunction.py b/exercises/exercise-fluidsystem/components/plotdensityfunction.py deleted file mode 100644 index 2b256689..00000000 --- a/exercises/exercise-fluidsystem/components/plotdensityfunction.py +++ /dev/null @@ -1,19 +0,0 @@ -#!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() -- GitLab