```
In [15]:
```from fluids import *
import matplotlib.pyplot as plt
from math import *
% matplotlib inline
import numpy as np
from scipy.interpolate import *
from scipy.constants import *

```
In [4]:
```%timeit size_control_valve_l(rho=965.4, Psat=70.1E3, Pc=22120E3, mu=3.1472E-4,P1=680E3, P2=220E3, Q=0.1, D1=0.1, D2=0.09, d=0.08, FL=0.9, Fd=0.46)
%timeit size_control_valve_l(rho=965.4, Psat=70.1E3, Pc=22120E3, mu=3.1472E-4, P1=680E3, P2=220E3, Q=0.1, D1=0.1, D2=0.1, d=0.95, FL=0.6, Fd=0.98)
%timeit size_control_valve_l(rho=965.4, Psat=70.1E3, Pc=22120E3, mu=3.1472E-2, P1=680E3, P2=220E3, Q=0.001, D1=0.01, D2=0.01, d=0.01, FL=0.6, Fd=0.98)

```
```

```
In [5]:
```%timeit size_control_valve_g(T=433., MW=44.01, mu=1.4665E-4, gamma=1.30, Z=0.988, P1=680E3, P2=310E3, Q=38/36., D1=0.08, D2=0.1, d=0.05, FL=0.85, Fd=0.42, xT=0.60)
%timeit size_control_valve_g(T=320., MW=39.95, mu=5.625E-5, gamma=1.67, Z=1.0, P1=2.8E5, P2=1.3E5, Q=0.46/3600., D1=0.015, D2=0.015, d=0.015, FL=0.98, Fd=0.07, xT=0.8)

```
```

```
In [6]:
```%timeit gravity(55, 1E4)

```
```

```
In [5]:
```print 'General'
%timeit entrance_rounded(Di=0.1, rc=0.0235)
%timeit spiral(Di=0.01, rmax=.1, rmin=.02, pitch=.01, fd=0.0185)
%timeit contraction_conical(Di1=0.1, Di2=0.04, l=0.04, fd=0.0185)
%timeit diffuser_conical(Di1=2/3., Di2=1, angle=120, fd=0.0185)
%timeit diffuser_conical_staged(Di1=1., Di2=10., DEs=[2,3,4,5,6,7,8,9], ls=[1,1,1,1,1,1,1,1,1], fd=0.01)
print 'Darby'
%timeit Darby3K(NPS=2., Re=10000., name='Valve, Angle valve, 45°, full line size, β = 1')
%timeit Darby3K(NPS=12., Re=10000., K1=950, Ki=0.25, Kd=4)
print 'Hooper'
%timeit Hooper2K(Di=2., Re=10000., name='Valve, Globe, Standard')

```
```

```
In [11]:
```%timeit TANK(D=1.2, L=4, horizontal=False).V_total
%timeit TANK(D=1.2, L=4, horizontal=False).V_from_h(.5)
%timeit TANK(V=10, L_over_D=0.7, sideB='conical', sideB_a=0.5)
%timeit TANK(D=8., L=10., horizontal=False, sideA='torispherical', sideB='torispherical', sideA_a=1.3547, sideB_a=1.3547, sideA_f=1., sideA_k=0.06, sideB_f=1., sideB_k=0.06).h_from_V(.5)

```
```

```
In [12]:
```%timeit dP_packed_bed(dp=8E-4, voidage=0.4, vs=1E-3, rho=1E3, mu=1E-3)
%timeit dP_packed_bed(dp=8E-4, voidage=0.4, vs=1E-3, rho=1E3, mu=1E-3, Dt=0.01)

```
```

```
In [14]:
```%timeit nearest_pipe(Do=.273, schedule='5S')
%timeit gauge_from_t(.5, False, 'BWG'), gauge_from_t(0.005588, True)

```
```

```
In [17]:
```%timeit VFD_efficiency(100*hp, load=0.5)
%timeit CSA_motor_efficiency(100*hp, closed=True, poles=6, high_efficiency=True)
# TODO FIX THIS

```
```

```
In [ ]:
```

```
In [20]:
```from fluids.safety_valve import API520_SH
%timeit API520_SH(593+273.15, 1066.325E3)

```
```