File: entrance_distance_plot.py

package info (click to toggle)
python-fluids 1.0.27-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,384 kB
  • sloc: python: 59,459; f90: 1,033; javascript: 49; makefile: 47
file content (14 lines) | stat: -rw-r--r-- 431 bytes parent folder | download
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, entrance_distance_methods

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()