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
def ray_trace_test_geometry(): air = Material(0.0, color='white') steel = Material(0.2, color='red') box = create_hollow(create_rectangle(12., 12.), create_rectangle(10., 10.)) ring = create_hollow(create_circle(12.), create_circle(10.)) translate_rotate_mesh(box, rotate=angle_matrix(45.)) sim = Simulation(air, diameter=50.) sim.detector.width = 30. sim.geometry.solids.append(Solid(ring, steel, air)) sim.geometry.flatten() return sim
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
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., 10.), create_rectangle(18., 8.)) hollow_circle = create_hollow(create_circle(3.9), create_circle(2.9)) translate_rotate_mesh(hollow_circle, [-9 + 3.9 + 0.1, 0.]) small_box_1 = create_rectangle(2., 2.) translate_rotate_mesh(small_box_1, [6., 2.]) small_box_2 = create_rectangle(2., 2.) translate_rotate_mesh(small_box_2, [6., -2.]) sim = Simulation(air, 50., 30., 'arc') #sim = Simulation(air, diameter=50.,) sim.detector.width = 30. 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