def __init__(self, name, heat_transfer_coefficient = 1, pressure_drop_Pa = 500, a_volume_m3 = 10, b_volume_m3 = 10, contact_area_m2 = physics.medium_heat_exchanger_area_m2, a_pipe_size_m2 = physics.medium_pipe_size_m2, b_pipe_size_m2 = physics.medium_pipe_size_m2, connector_lengths_m = 0.5, height_m=5.0, base_height_m=0): component.__init__(self, name) self.a_volume_m3 = a_volume_m3 self.b_volume_m3 = b_volume_m3 self.a_fluid = self._add_fluid(fluid(name+".a", self.a_volume_m3 / (height_m/2), height_m, base_height_m)) self.b_fluid = self._add_fluid(fluid(name+".b", self.b_volume_m3 / (height_m/2), height_m, base_height_m)) self.a_in = self.a_fluid.add_port(port("a_in", self.a_fluid, a_pipe_size_m2, connector_lengths_m, height_m)) self.a_out = self.a_fluid.add_port(port("a_out", self.a_fluid, a_pipe_size_m2, connector_lengths_m, height_m)) self.b_in = self.b_fluid.add_port(port("b_in", self.b_fluid, b_pipe_size_m2, connector_lengths_m, height_m)) self.b_out = self.b_fluid.add_port(port("b_out", self.b_fluid, b_pipe_size_m2, connector_lengths_m, height_m)) self.contact_area_m2 = contact_area_m2 self.heat_transfer_coefficient = heat_transfer_coefficient self.pressure_drop_Pa = pressure_drop_Pa
def __init__(self, name, length_m = 1, area_m2 = physics.medium_pipe_size_m2, height_m=0): component.__init__(self, name) self.length_m = length_m self.area_m2 = area_m2 self.volume_m3 = area_m2 * length_m self.fluid = self._add_fluid(fluid(name, self.area_m2, length_m, height_m - length_m / 2.0)) self.in_port = self.fluid.add_port(port("in", self.fluid, area_m2, length_m/2.0, height_m)) self.out_port = self.fluid.add_port(port("out", self.fluid, area_m2, length_m/2.0, height_m))
def __init__(self, name, volume_m3, height_m, base_height_m=0, initial_fill_rate=0.7): component.__init__(self, name) self.fluid = self._add_fluid( fluid(name, volume_m3 / height_m, height_m, base_height_m, initial_fill_rate))
def __init__(self, name, length_m = 20.0, start_height_m = 0.0, end_height_m = 0.0, area_m2 = physics.medium_pipe_size_m2): component.__init__(self, name) self.length_m = length_m self.area_m2 = area_m2 self.volume_m3 = area_m2 * length_m base_h = min(start_height_m, end_height_m) h = max(start_height_m, end_height_m) - base_h # TODO: Better area for pipe, base on slope self.fluid = self._add_fluid(fluid(name, self.area_m2, h, base_h)) self.in_port = self.fluid.add_port(port("in_port", self.fluid, area_m2, length_m/2.0, start_height_m)) self.out_port = self.fluid.add_port(port("out_port", self.fluid, area_m2, length_m/2.0, end_height_m))
def __init__(self, name, max_pressure_Pa = physics.medium_pump_pressure_Pa, height_m = 1, base_height_m = 0, area_m2 = physics.medium_pipe_size_m2, pump_length_m = 2): component.__init__(self, name) self.length_m = pump_length_m self.area_m2 = area_m2 self.volume_m3 = self.area_m2 * self.length_m self.fluid = self._add_fluid(fluid(name, self.volume_m3, height_m, base_height_m)) self.in_port = self.fluid.add_port(port("in", self.fluid, area_m2, pump_length_m/2.0, height_m)) self.out_port = self.fluid.add_port(port("out", self.fluid, area_m2, pump_length_m/2.0, height_m)) self.max_pressure_Pa = max_pressure_Pa self.adjust_power(0.5)
def __init__(self, name, height_m=-2.0, pipe_size_m2=physics.large_pipe_size_m2, pipe_length_m=20.0, river_temperature_C=18.0): component.__init__(self, name) self.height_m = height_m self.river_water = self._add_fluid( fluid(name, 100, 10, -5, 0.5, True, True, river_temperature_C)) self.port = self.river_water.add_port( port("river", self.river_water, pipe_size_m2, pipe_length_m, height_m))
def __init__(self, name, length_m=1, area_m2=physics.medium_pipe_size_m2, height_m=0): component.__init__(self, name) self.length_m = length_m self.area_m2 = area_m2 self.volume_m3 = area_m2 * length_m self.fluid = self._add_fluid( fluid(name, self.area_m2, length_m, height_m - length_m / 2.0)) self.in_port = self.fluid.add_port( port("in", self.fluid, area_m2, length_m / 2.0, height_m)) self.out_port = self.fluid.add_port( port("out", self.fluid, area_m2, length_m / 2.0, height_m))
def __init__(self, name, length_m=20.0, start_height_m=0.0, end_height_m=0.0, area_m2=physics.medium_pipe_size_m2): component.__init__(self, name) self.length_m = length_m self.area_m2 = area_m2 self.volume_m3 = area_m2 * length_m base_h = min(start_height_m, end_height_m) h = max(start_height_m, end_height_m) - base_h # TODO: Better area for pipe, base on slope self.fluid = self._add_fluid(fluid(name, self.area_m2, h, base_h)) self.in_port = self.fluid.add_port( port("in_port", self.fluid, area_m2, length_m / 2.0, start_height_m)) self.out_port = self.fluid.add_port( port("out_port", self.fluid, area_m2, length_m / 2.0, end_height_m))
def __init__(self, name, heat_transfer_coefficient=1, pressure_drop_Pa=500, a_volume_m3=10, b_volume_m3=10, contact_area_m2=physics.medium_heat_exchanger_area_m2, a_pipe_size_m2=physics.medium_pipe_size_m2, b_pipe_size_m2=physics.medium_pipe_size_m2, connector_lengths_m=0.5, height_m=5.0, base_height_m=0): component.__init__(self, name) self.a_volume_m3 = a_volume_m3 self.b_volume_m3 = b_volume_m3 self.a_fluid = self._add_fluid( fluid(name + ".a", self.a_volume_m3 / (height_m / 2), height_m, base_height_m)) self.b_fluid = self._add_fluid( fluid(name + ".b", self.b_volume_m3 / (height_m / 2), height_m, base_height_m)) self.a_in = self.a_fluid.add_port( port("a_in", self.a_fluid, a_pipe_size_m2, connector_lengths_m, height_m)) self.a_out = self.a_fluid.add_port( port("a_out", self.a_fluid, a_pipe_size_m2, connector_lengths_m, height_m)) self.b_in = self.b_fluid.add_port( port("b_in", self.b_fluid, b_pipe_size_m2, connector_lengths_m, height_m)) self.b_out = self.b_fluid.add_port( port("b_out", self.b_fluid, b_pipe_size_m2, connector_lengths_m, height_m)) self.contact_area_m2 = contact_area_m2 self.heat_transfer_coefficient = heat_transfer_coefficient self.pressure_drop_Pa = pressure_drop_Pa
def __init__(self, name, max_pressure_Pa=physics.medium_pump_pressure_Pa, height_m=1, base_height_m=0, area_m2=physics.medium_pipe_size_m2, pump_length_m=2): component.__init__(self, name) self.length_m = pump_length_m self.area_m2 = area_m2 self.volume_m3 = self.area_m2 * self.length_m self.fluid = self._add_fluid( fluid(name, self.volume_m3, height_m, base_height_m)) self.in_port = self.fluid.add_port( port("in", self.fluid, area_m2, pump_length_m / 2.0, height_m)) self.out_port = self.fluid.add_port( port("out", self.fluid, area_m2, pump_length_m / 2.0, height_m)) self.max_pressure_Pa = max_pressure_Pa self.adjust_power(0.5)
def __init__(self, name, volume_m3, height_m, base_height_m = 0, initial_fill_rate = 0.7): component.__init__(self, name) self.fluid = self._add_fluid(fluid(name, volume_m3/height_m, height_m, base_height_m, initial_fill_rate))
def __init__(self, name, height_m=-2.0, pipe_size_m2=physics.large_pipe_size_m2, pipe_length_m=20.0, river_temperature_C=18.0): component.__init__(self, name) self.height_m = height_m self.river_water = self._add_fluid(fluid(name, 100, 10, -5, 0.5, True, True, river_temperature_C)) self.port = self.river_water.add_port(port("river", self.river_water, pipe_size_m2, pipe_length_m, height_m))