File: entrance_rounded_plot.py

package info (click to toggle)
python-fluids 1.0.22-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 12,980 kB
  • sloc: python: 53,243; f90: 1,033; javascript: 49; makefile: 47
file content (15 lines) | stat: -rw-r--r-- 490 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from fluids.fittings import entrance_rounded_methods
from fluids.fittings import entrance_rounded

rcs = np.linspace(0,0.4, 1000)
for method in entrance_rounded_methods:
    Ks = [entrance_rounded(Di=1.0, rc=rc, method=method) for rc in rcs]
    plt.plot(rcs, Ks, label=method)
plt.legend()
plt.title('Comparison of available methods for rounded flush entrances to pipes')
plt.xlabel('rc/Di')
plt.ylabel('K')
#plt.show()