Beispiel #1
0
    def adjust_speed(self, new_speed):
        """Defines pump characteristics that are based on pump speed.

        Only applies to variable displacement (centrifugal) pumps. Variable names match pump law equations.

        :param new_speed: Requested (new) speed of the pump

        :return: Pump speed, flow rate, outlet pressure, and power
        :rtype: tuple
        """
        n2 = new_speed  # Validate input

        if self.speed == 0:  # Pump initially stopped
            n1 = 1
        else:
            n1 = self.speed
        v1 = self.flow
        hp1 = self.outlet_pressure

        self.flow = v1 * (n2 / n1)  # New flow rate
        self.outlet_pressure = hp1 * math.pow((n2 / n1), 2)  # New outlet pressure
        self.speed = n2  # Replace old speed with new value
        delta_p = self.diff_press_psi(self.head_in, utility_formulas.press_to_head(self.outlet_pressure))
        self.power = self.pump_power(self.flow, delta_p)
Beispiel #2
0
def gate7_open():
    ffc.gate7.open()
    ffc.pump3.head_in = utility_formulas.press_to_head(ffc.gate7.press_out)
Beispiel #3
0
def gate6_open():
    ffc.gate6.open()
    ffc.pump2.head_in = utility_formulas.press_to_head(ffc.gate6.press_out)
Beispiel #4
0
def gate5_open():
    ffc.gate5.open()
    ffc.pump1.head_in = utility_formulas.press_to_head(ffc.gate5.press_out)
Beispiel #5
0
gate5 = valve.Gate("Gate valve 5")
gate5.calc_coeff(4)

gate6 = valve.Gate("Gate valve 6",
                   sys_flow_in=gate3.flow_out + gate4.flow_out,
                   press_in=gate3.press_out + gate4.press_out)
gate6.calc_coeff(4)

gate7 = valve.Gate("Gate valve 7")
gate7.calc_coeff(4)

# Fuel pumps
# 1480 rpm
pump1 = pump.PositiveDisplacement("Pump 1",
                                  flow_rate_out=0.0,
                                  pump_head_in=utility_formulas.press_to_head(
                                      gate5.press_out),
                                  displacement=0.24)

pump2 = pump.PositiveDisplacement("Pump 2",
                                  flow_rate_out=0.0,
                                  pump_head_in=utility_formulas.press_to_head(
                                      gate6.press_out),
                                  displacement=0.24)

pump3 = pump.PositiveDisplacement("Pump 3",
                                  flow_rate_out=0.0,
                                  pump_head_in=utility_formulas.press_to_head(
                                      gate7.press_out),
                                  displacement=0.24)

# Pump outlet manifold
Water level is 4 feet above tank bottom; total water head = 14 feet.
"""
import utility_formulas

from PipingSystems.pump.pump import CentrifPump, PositiveDisplacement
from PipingSystems.valve.valve import Gate, Globe, Relief

# Gate Valve 1
valve1 = Gate("Valve 1", position=100, flow_coeff=200, sys_flow_in=utility_formulas.gravity_flow_rate(2, 1.67),
              press_in=utility_formulas.static_press(14))
valve1.flow_out = valve1.flow_in
valve1.press_drop(valve1.flow_out)
valve1.get_press_out(valve1.press_in)

# Centrif Pump
pump1 = CentrifPump("Pump 1", pump_head_in=utility_formulas.press_to_head(valve1.press_out))
pump1.start_pump(1750, 50, 16)

# Globe valve 1
throttle1 = Globe("Throttle 1", position=100, flow_coeff=21, press_in=pump1.outlet_pressure,
                  sys_flow_in=pump1.flow)
throttle1.flow_out = throttle1.flow_in
throttle1.press_drop(throttle1.flow_out)
throttle1.valve_flow_out(throttle1.Cv, throttle1.deltaP)
throttle1.get_press_out(throttle1.press_in)

# Gate Valve 2
valve2 = Gate("Valve 2", position=100, flow_coeff=200, press_in=throttle1.press_out, sys_flow_in=throttle1.flow_out)
valve2.flow_out = valve2.flow_in
valve2.press_drop(valve2.flow_out)
valve2.valve_flow_out(valve2.Cv, valve2.deltaP)
 def test_pump1_input_press(self):
     pump1.head_in = utility_formulas.press_to_head(valve1.press_out)
     assert pump1.head_in == 8.119222584669064
 def test_pump2_input_press(self):
     pump2.head_in = utility_formulas.press_to_head(valve3.press_out)
     assert pump2.head_in == 23.542088964737797