Coverage for /home/caleb/Documents/University/CHE2703/fluids/fluids/pump.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# -*- coding: utf-8 -*- Copyright (C) 2016, Caleb Bell <Caleb.Andrew.Bell@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.'''
'Corripio_pump_efficiency', 'Corripio_motor_efficiency', 'specific_speed', 'specific_diameter', 'speed_synchronous', 'nema_sizes', 'nema_sizes_hp', 'motor_round_size', 'nema_min_P', 'nema_high_P', 'plug_types', 'voltages_1_phase_residential', 'voltages_3_phase', 'frequencies', 'residential_power', 'industrial_power', 'current_ideal']
r'''Estimates pump efficiency using the method in Corripio (1982) as shown in [1]_ and originally in [2]_. Estimation only
.. math:: \eta_P = -0.316 + 0.24015\ln(Q) - 0.01199\ln(Q)^2
Parameters ---------- Q : float Volumetric flow rate, [m^3/s]
Returns ------- effciency : float Pump efficiency, [-]
Notes ----- For Centrifugal pumps only. Range is 50 to 5000 GPM, but input variable is in metric. Values above this range and below this range will go negative, although small deviations are acceptable. Example 16.5 in [1]_.
Examples -------- >>> Corripio_pump_efficiency(461./15850.323) 0.7058888670951621
References ---------- .. [1] Seider, Warren D., J. D. Seader, and Daniel R. Lewin. Product and Process Design Principles: Synthesis, Analysis, and Evaluation. 2 edition. New York: Wiley, 2003. .. [2] Corripio, A.B., K.S. Chrien, and L.B. Evans, "Estimate Costs of Centrifugal Pumps and Electric Motors," Chem. Eng., 89, 115-118, February 22 (1982). '''
r'''Estimates motor efficiency using the method in Corripio (1982) as shown in [1]_ and originally in [2]_. Estimation only.
.. math:: \eta_M = 0.8 + 0.0319\ln(P_B) - 0.00182\ln(P_B)^2
Parameters ---------- P : float Power, [W]
Returns ------- effciency : float Motor efficiency, [-]
Notes ----- Example 16.5 in [1]_.
Examples -------- >>> Corripio_motor_efficiency(137*745.7) 0.9128920875679222
References ---------- .. [1] Seider, Warren D., J. D. Seader, and Daniel R. Lewin. Product and Process Design Principles: Synthesis, Analysis, and Evaluation. 2 edition. New York: Wiley, 2003. .. [2] Corripio, A.B., K.S. Chrien, and L.B. Evans, "Estimate Costs of Centrifugal Pumps and Electric Motors," Chem. Eng., 89, 115-118, February 22 (1982). '''
#print [Corripio_motor_efficiency(137*745.7)]
[0.35, 0.8, 0.88, 0.91, 0.92, 0.94, 0.95], [0.41, 0.83, 0.9, 0.93, 0.94, 0.95, 0.96], [0.47, 0.86, 0.93, 0.94, 0.95, 0.96, 0.97], [0.5, 0.88, 0.93, 0.95, 0.95, 0.96, 0.97], [0.46, 0.86, 0.92, 0.95, 0.95, 0.96, 0.97], [0.51, 0.87, 0.92, 0.95, 0.95, 0.96, 0.97], [0.47, 0.86, 0.93, 0.95, 0.96, 0.97, 0.97], [0.55, 0.89, 0.94, 0.95, 0.96, 0.97, 0.97], [0.61, 0.91, 0.95, 0.96, 0.96, 0.97, 0.97], [0.61, 0.91, 0.95, 0.96, 0.96, 0.97, 0.97]] [3, 5, 10, 20, 30, 50, 60, 75, 100, 200, 400], VFD_efficiencies)
r'''Returns the efficiency of a Variable Frequency Drive according to [1]_. These values are generic, and not standardized as minimum values. Older VFDs often have much worse performance.
Parameters ---------- P : float Power, [W] load : float, optional Fraction of motor's rated electrical capacity being used
Returns ------- effciency : float VFD efficiency, [-]
Notes ----- The use of a VFD does change the characteristics of a pump curve's efficiency, but this has yet to be quantified. The effect is small. This value should be multiplied by the product of the pump and motor efficiency to determine the overall efficiency.
Efficiency table is in units of hp, so a conversion is performed internally. If load not specified, assumed 1 - where maximum efficiency occurs. Table extends down to 3 hp and up to 400 hp; values outside these limits are rounded to the nearest known value. Values between standardized sizes are interpolated linearly. Load values extend down to 0.016.
Examples -------- >>> VFD_efficiency(10*hp) 0.96 >>> VFD_efficiency(100*hp, load=0.5) 0.96
References ---------- .. [1] GoHz.com. Variable Frequency Drive Efficiency. http://www.variablefrequencydrive.org/vfd-efficiency '''
'''list: all NEMA motor sizes in increasing order, in horsepower. ''' '''list: all NEMA motor sizes in increasing order, in Watts. '''
r'''Rounds up the power for a motor to the nearest NEMA standard power. The returned power is always larger or equal to the input power.
Parameters ---------- P : float Power, [W]
Returns ------- P_actual : float Actual power, equal to or larger than input [W]
Notes ----- An exception is raised if the power required is larger than any of the NEMA sizes. Larger motors are available, but are unstandardized.
Examples -------- >>> motor_round_size(1E5) 111854.98073734052
References ---------- .. [1] Natural Resources Canada. Electric Motors (1 to 500 HP/0.746 to 375 kW). As modified 2015-12-17. https://www.nrcan.gc.ca/energy/regulations-codes-standards/products/6885 '''
#print nema_min_full_closed_8p_i(345)
r'''Returns the efficiency of a NEMA motor according to [1]_. These values are standards, but are only for full-load operation.
Parameters ---------- P : float Power, [W] closed : bool, optional Whether or not the motor is enclosed poles : int, optional The number of poles of the motor high_efficiency : bool, optional Whether or not to look up the high-efficiency value
Returns ------- effciency : float Guaranteed full-load motor efficiency, [-]
Notes ----- Criteria for being required to meet the high-efficiency standard is:
* Designed for continuous operation * Operates by three-phase induction * Is a squirrel-cage or cage design * Is NEMA type A, B, or C with T or U frame; or IEC design N or H * Is designed for single-speed operation * Has a nominal voltage of less than 600 V AC * Has a nominal frequency of 60 Hz or 50/60 Hz * Has 2, 4, or 6 pole construction * Is either open or closed
Pretty much every motor is required to meet the low-standard efficiency table, however.
Several low-efficiency standard high power values were added to allow for easy programming; values are the last listed efficiency in the table.
Examples -------- >>> CSA_motor_efficiency(100*hp) 0.93 >>> CSA_motor_efficiency(100*hp, closed=True, poles=6, high_efficiency=True) 0.95
References ---------- .. [1] Natural Resources Canada. Electric Motors (1 to 500 HP/0.746 to 375 kW). As modified 2015-12-17. https://www.nrcan.gc.ca/energy/regulations-codes-standards/products/6885 ''' else: else: else:
# Test high efficiency: #print([CSA_motor_efficiency(k*hp, high_efficiency=False, closed=i, poles=j) for i in [True, False] for j in [2, 4, 6, 8] for k in nema_min_P])
r'''Returns the efficiency of a motor opperating under its design power according to [1]_.These values are generic; manufacturers usually list 4 points on their product information, but full-scale data is hard to find and not regulated.
Parameters ---------- P : float Power, [W] load : float, optional Fraction of motor's rated electrical capacity being used
Returns ------- effciency : float Motor efficiency, [-]
Notes ----- If the efficiency returned by this function is unattractive, use a VFD. The curves used here are polynomial fits to [1]_'s graph, and curves were available for the following motor power ranges: 0-1 hp, 1.5-5 hp, 10 hp, 15-25 hp, 30-60 hp, 75-100 hp If above the upper limit of one range, the next value is returned.
Examples -------- >>> motor_efficiency_underloaded(1*hp) 0.8705179600980149 >>> motor_efficiency_underloaded(10.1*hp, .1) 0.6728425932357025
References ---------- .. [1] Washington State Energy Office. Energy-Efficient Electric Motor Selection Handbook. 1993. ''' else: else:
r'''Returns the specific speed of a pump operating at a specified Q, H, and n.
.. math:: n_S = \frac{n\sqrt{Q}}{H^{0.75}}
Parameters ---------- Q : float Flow rate, [m^3/s] H : float Head generated by the pump, [m] n : float, optional Speed of pump [rpm]
Returns ------- nS : float Specific Speed, [rpm*m^0.75/s^0.5]
Notes ----- Defined at the BEP, with maximum fitting diameter impeller, at a given rotational speed.
Examples -------- Example from [1]_.
>>> specific_speed(0.0402, 100, 3550) 22.50823182748925
References ---------- .. [1] HI 1.3 Rotodynamic Centrifugal Pumps for Design and Applications '''
r'''Returns the specific diameter of a pump operating at a specified Q, H, and D.
.. math:: D_s = \frac{DH^{1/4}}{\sqrt{Q}}
Parameters ---------- Q : float Flow rate, [m^3/s] H : float Head generated by the pump, [m] D : float Pump impeller diameter [m]
Returns ------- Ds : float Specific diameter, [m^0.25/s^0.5]
Notes ----- Used in certain pump sizing calculations.
Examples -------- >>> specific_diameter(Q=0.1, H=10., D=0.1) 0.5623413251903491
References ---------- .. [1] Green, Don, and Robert Perry. Perry's Chemical Engineers' Handbook, Eighth Edition. McGraw-Hill Professional, 2007. '''
r'''Returns the synchronous speed of a synchronous motor according to [1]_.
.. math:: N_s = \frac{120 f \cdot\text{phase}}{\text{poles}}
Parameters ---------- f : float Line frequency, [Hz] poles : int, optional The number of poles of the motor phase : int, optional Line AC phase
Returns ------- Ns : float Speed of synchronous motor, [rpm]
Notes ----- Synchronous motors have no slip. Large synchronous motors are not self-starting.
Examples -------- >>> speed_synchronous(50, poles=12) 1500.0 >>> speed_synchronous(60, phase=1) 3600.0
References ---------- .. [1] All About Circuits. Synchronous Motors. Chapter 13 - AC Motors http://www.allaboutcircuits.com/textbook/alternating-current/chpt-13/synchronous-motors/ '''
r'''Returns the current drawn by a motor of power `P` operating at voltage `V`, with line AC of phase `phase` and power factor `PF` according to [1]_.
Single-phase power:
.. math:: I = \frac{P}{V \cdot \text{PF}}
3-phase power:
.. math:: I = \frac{P}{V \cdot \text{PF} \sqrt{3}}
Parameters ---------- P : float Power, [W] V : float Voltage, [V] phase : int, optional Line AC phase, either 1 or 3 PF : float, optional Power factor of motor
Returns ------- I : float Power drawn by motor, [A]
Notes ----- Does not include power used by the motor's fan, or startor, or internal losses. These are all significant.
Examples -------- >>> current_ideal(V=120, P=1E4, PF=1, phase=1) 83.33333333333333
References ---------- .. [1] Electrical Construction, and Maintenance. "Calculating Single- and 3-Phase Parameters." April 1, 2008. http://ecmweb.com/basics/calculating-single-and-3-phase-parameters. ''' else:
|