File: entrance_distance_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 (14 lines) | stat: -rw-r--r-- 457 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import matplotlib.pyplot as plt
import numpy as np
from fluids.fittings import entrance_distance_methods
from fluids.fittings import entrance_distance

ts = np.linspace(0,0.3, 1000)
for method in entrance_distance_methods:
    Ks = [entrance_distance(Di=1.0, t=t, method=method) for t in ts]
    plt.plot(ts, Ks, label=method)
plt.legend()
plt.title("Comparison of available methods for re-entrant entrances")
plt.xlabel('t/Di')
plt.ylabel('K')
#plt.show()