Positive displacement pump class

Positive displacement pumps are any pumps that have a set amount of fluid capacity per revolution, which includes rotary, reciprocating, and linear types. Examples include screw pumps, gear pumps, piston pumps, and diaphragm pumps.

The following code listings define the generic characteristics for any positive displacement pump; because it is a general class, any true simulation would require more specific engineering formulas:

# pump.py (part 13)1 class PositiveDisplacement(Pump): 2 """Defines a positive-displacement pump.""" 3 4 def __init__(self, name="", flow_rate_out=0.0, pump_head_in=0.0, press_out=0.0, pump_speed=0, displacement=0.0): 5 super(PositiveDisplacement, self).__init__(name, flow_rate_out, ...

Get Learn Programming in Python with Cody Jackson now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.