Beispiel #1
0
simple.add_component(
  Pipe(
    1.0, 0.5, Point(4.0, 0.0), name = 'Pipe 3', angle = 0.0,
    label_location = 'center', label_pad = 0.0, label_angle = 0.0
  )
)

simple.add_node(1.5, 0.0, name = 'Node 1')
simple.add_node(1.5, 1.0, name = 'Node 2')

simple.add_node(3.5, 1.0, name = 'Node 3')
simple.add_node(3.5, 0.0, name = 'Node 4')

simple.connect(
  'Pipe 1:outlet', 'Node 1', 'Node 2', 'Pipe 2:inlet',
  name = 'Junction 1', label_edge_number = 0, label_location = 'top',
  label_pad = 1.0, label_angle = 0.0, label_shift = 1.0
)

simple.connect(
  'Pipe 2:outlet', 'Node 3', 'Node 4', 'Pipe 3:inlet',
  name = 'Junction 2', label_edge_number = 2, label_location = 'top',
  label_pad = 1.0, label_angle = 0.0, label_shift = -1.0
)

CAN = Canvas(border_thickness = 0.05, grid = True)
CAN.add_system(simple)

CAN.draw(save_file = 'test.pdf', display = True, print_information = False)
Beispiel #2
0
command_line_parser = ExampleDebugger("A simple system.")
command_line_parser.parse()

from schematics import Canvas
from schematics import System
from schematics import Pipe
from schematics import Pump
from schematics import CoreChannel
from schematics import Point

tmi = System("tmi")

radius = 1.0
px = 0.0
py = 0.0
y = (0.5 * radius) + py
x = (3.0 * radius) + px
tmi.add_node(x, y, name="outlet")

PumpA = Pump(radius, Point(px, py), name="Pump", ref=None, angle=90.0, label_angle=0.0)
tmi.add_component(PumpA)

tmi.connect("Pump:outlet", "outlet")


CAN = Canvas(border_thickness=0.05, grid=True)
CAN.add_system(tmi)

CAN.draw(save_file="tmi.pdf", display=True)
Beispiel #3
0
from schematics import Canvas
from schematics import System
from schematics import Pipe
from schematics import Point

simple = System('simple')

simple.add_component(
  Pipe(
    1.0, 0.5, Point(), name = 'Pipe 1', angle = 0.0,
    label_location = 'center', label_pad = 0.0, label_angle = 0.0
  )
)

simple.add_component(
  Pipe(
    1.0, 0.5, Point(1.5, 0.0), name = 'Pipe 2', angle = 0.0,
    label_location = 'center', label_pad = 0.0, label_angle = 0.0
  )
)

simple.connect(
  'Pipe 1:outlet', 'Pipe 2:inlet',
  name = 'Junction 1', label_edge_number = 0, label_location = 'top',
  label_pad = 1.0, label_angle = 0.0, label_shift = 0.0
)

CAN = Canvas(border_thickness = 0.05, grid = True)
CAN.add_system(simple)
CAN.draw(save_file = 'test.pdf', display = True, print_information = False)
Beispiel #4
0
x = Bypass.center_of_rotation.x
tmi.add_node(x, y, name = 'bypass_pipe:LowerPlenum')

x = CH1.center_of_rotation.x
tmi.add_node(x, y, name = 'CH1:LowerPlenum')

x = CH2.center_of_rotation.x
tmi.add_node(x, y, name = 'CH2:LowerPlenum')

x = CH3.center_of_rotation.x
tmi.add_node(x, y, name = 'CH3:LowerPlenum')

# Lower Plenum Connections
tmi.connect(
  'DownComer-B:outlet', 'DownComer-B:LowerPlenum', 'LowerPlenum1', 'LowerPlenum2', 'CH1:LowerPlenum', 'CH1:inlet'
)

tmi.connect(
  'DownComer-B:outlet', 'DownComer-B:LowerPlenum', 'LowerPlenum1', 'LowerPlenum2', 'CH2:LowerPlenum', 'CH2:inlet'
)

tmi.connect(
  'DownComer-A:outlet', 'DownComer-A:LowerPlenum', 'LowerPlenum1', 'LowerPlenum2', 'CH3:LowerPlenum', 'CH3:inlet'
)

tmi.connect(
  'DownComer-A:outlet', 'DownComer-A:LowerPlenum', 'LowerPlenum1', 'LowerPlenum2', 'bypass_pipe:LowerPlenum', 'bypass_pipe:inlet',
  name = 'LowerPlenum', label_edge_number = 1, label_location = 'bottom',
  label_pad = 1.0, label_angle = 0.0, label_shift = 1.0
)
Beispiel #5
0
         0.5,
         Point(),
         name='Pipe 1',
         angle=0.0,
         label_location='center',
         label_pad=0.0,
         label_angle=0.0))

simple.add_component(
    Pipe(1.0,
         0.5,
         Point(1.5, 0.0),
         name='Pipe 2',
         angle=0.0,
         label_location='center',
         label_pad=0.0,
         label_angle=0.0))

simple.connect('Pipe 1:outlet',
               'Pipe 2:inlet',
               name='Junction 1',
               label_edge_number=0,
               label_location='top',
               label_pad=1.0,
               label_angle=0.0,
               label_shift=0.0)

CAN = Canvas(border_thickness=0.05, grid=True)
CAN.add_system(simple)
CAN.draw(save_file='test.pdf', display=True, print_information=False)
Beispiel #6
0
from schematics import Canvas
from schematics import System
from schematics import Pipe
from schematics import Pump
from schematics import CoreChannel
from schematics import Point

tmi = System('tmi')

radius = 1.0
px = 0.0
py = 0.0
y = (0.5 * radius) + py
x = (3.0 * radius) + px
tmi.add_node(x, y, name='outlet')

PumpA = Pump(radius,
             Point(px, py),
             name='Pump',
             ref=None,
             angle=90.0,
             label_angle=0.0)
tmi.add_component(PumpA)

tmi.connect('Pump:outlet', 'outlet')

CAN = Canvas(border_thickness=0.05, grid=True)
CAN.add_system(tmi)

CAN.draw(save_file='tmi.pdf', display=True)