예제 #1
0
def build_shielded_geometry():
    air = Material(0.1, color='white')
    u235_metal = Material(1.0, color='green')
    poly = Material(1.0, color='red')
    steel = Material(1.0, color='orange')

    box = create_hollow(create_rectangle(20., 10.), create_rectangle(18., 8.))

    hollow_circle = create_hollow(create_circle(3.9), create_circle(2.9))
    hollow_circle.translate([-9 + 3.9 + 0.1, 0.])

    small_box_1 = create_rectangle(2., 2.)
    small_box_1.translate([6., 2.])

    small_box_2 = create_rectangle(2., 2.)
    small_box_2.translate([6., -2.])

    #sim = Simulation(air, 50., 45., 'arc')
    sim = Simulation(air,
                     100,
                     diameter=50.,
                     detector='plane',
                     detector_width=30.)
    sim.detector.width = 30.
    sim.geometry.solids.append(Solid(box, steel, air))
    sim.geometry.solids.append(Solid(hollow_circle, steel, air))
    sim.geometry.solids.append(Solid(small_box_1, poly, air))
    sim.geometry.solids.append(Solid(small_box_2, steel, air))
    sim.geometry.flatten()

    return sim
예제 #2
0
def build_shielded_geometry():
    air = Material(0.0, color="white")
    u235_metal = Material(0.2, 0.1, color="green")
    poly = Material(0.3, color="red")
    steel = Material(0.18, color="orange")

    box = create_hollow(create_rectangle(20.0, 10.0), create_rectangle(18.0, 8.0))

    hollow_circle = create_hollow(create_circle(3.9), create_circle(2.9))
    translate_rotate_mesh(hollow_circle, [-9 + 3.9 + 0.1, 0.0])

    small_box_1 = create_rectangle(2.0, 2.0)
    translate_rotate_mesh(small_box_1, [6.0, 2.0])

    small_box_2 = create_rectangle(2.0, 2.0)
    translate_rotate_mesh(small_box_2, [6.0, -2.0])

    sim = Simulation(air, 50.0, 30.0, "arc")
    # sim = Simulation(air, diameter=50.,)
    sim.detector.width = 30.0
    sim.geometry.solids.append(Solid(box, steel, air))
    sim.geometry.solids.append(Solid(hollow_circle, u235_metal, air))
    sim.geometry.solids.append(Solid(small_box_1, poly, air))
    sim.geometry.solids.append(Solid(small_box_2, steel, air))
    sim.geometry.flatten()

    return sim
예제 #3
0
def build_shielded_geometry():
    air = Material(0.1, color='white')
    u235_metal = Material(1.0, color='green')
    poly = Material(1.0, color='red')
    steel = Material(1.0, color='orange')

    box = create_hollow(create_rectangle(20., 10.), create_rectangle(18., 8.))

    hollow_circle = create_hollow(create_circle(3.9), create_circle(2.9))
    hollow_circle.translate([-9 + 3.9 + 0.1, 0.])

    small_box_1 = create_rectangle(2., 2.)
    small_box_1.translate([6., 2.])

    small_box_2 = create_rectangle(2., 2.)
    small_box_2.translate([6., -2.])

    #sim = Simulation(air, 50., 45., 'arc')
    sim = Simulation(air, 100, diameter=50., detector='plane', detector_width=30.)
    sim.detector.width = 30.
    sim.geometry.solids.append(Solid(box, steel, air))
    sim.geometry.solids.append(Solid(hollow_circle, steel, air))
    sim.geometry.solids.append(Solid(small_box_1, poly, air))
    sim.geometry.solids.append(Solid(small_box_2, steel, air))
    sim.geometry.flatten()

    return sim
예제 #4
0
def ray_trace_test_geometry():
    air = Material(0.0, color='white')
    steel = Material(1.0, color='red')

    box = create_hollow(create_rectangle(12., 12.), create_rectangle(10., 10.))
    ring = create_hollow(create_circle(12.), create_circle(10.))
    box.rotate(45.)

    sim = Simulation(air, diameter=50.)
    sim.detector.width = 30.
    sim.geometry.solids.append(Solid(ring, steel, air))
    sim.geometry.flatten()

    return sim
예제 #5
0
def ray_trace_test_geometry():
    air = Material(0.0, color="white")
    steel = Material(0.2, color="red")

    box = create_hollow(create_rectangle(12.0, 12.0), create_rectangle(10.0, 10.0))
    ring = create_hollow(create_circle(12.0), create_circle(10.0))
    translate_rotate_mesh(box, rotate=angle_matrix(45.0))

    sim = Simulation(air, diameter=50.0)
    sim.detector.width = 30.0
    sim.geometry.solids.append(Solid(ring, steel, air))
    sim.geometry.flatten()

    return sim
예제 #6
0
def ray_trace_test_geometry():
    air = Material(0.0, color='white')
    steel = Material(1.0, color='red')

    box = create_hollow(create_rectangle(12., 12.), create_rectangle(10., 10.))
    ring = create_hollow(create_circle(12.), create_circle(10.))
    box.rotate(45.)

    sim = Simulation(air, diameter=50.)
    sim.detector.width = 30.
    sim.geometry.solids.append(Solid(ring, steel, air))
    sim.geometry.flatten()

    return sim