// Last edited on 2011-05-12 21:00:10 by stolfilocal #macro un4_generic_ref_grid(lo_X,hi_X, lo_Y,hi_Y, org, step, line_R) texture{ tx } // A horizontal rectangular axis-aligned frame from coordinates // {loX,lo_Y} to {hi_X,hi_Y}, at Z coordinate {org.z}. The frame // is filled with a regular grid, with gridline spacing {step} and // origin at {org}. If the {step} is zero, the grid // is omitted. The thinner lines have radius {line_R}. The // whole is painted with texture {tx}. #local org_dot_R = 2.0*line_R; #local big_rod_R = 1.5*line_R; // Thick line. #local sma_rod_R = 1.0*line_R; // Thin line. #local crn_dot = sphere{ <0,0,0>, big_rod_R texture{ tx } } // Corner-filling dot. #local rod_WE = cylinder{ , , big_rod_R } #local rod_NS = cylinder{ <0,lo_Y,0>, <0,hi_Y,0>, big_rod_R } union{ object{ crn_dot translate < lo_X, lo_Y, org.z > } object{ crn_dot translate < hi_X, lo_Y, org.z > } object{ crn_dot translate < lo_X, hi_Y, org.z > } object{ crn_dot translate < hi_X, hi_Y, org.z > } object{ rod_NS translate < lo_X, 0, org.z > } object{ rod_NS translate < hi_X, 0, org.z > } object{ rod_WE translate < 0, lo_Y, org.z > } object{ rod_WE translate < 0, hi_Y, org.z > } #if (step > 0.0001) #local bar_WE = cylinder{ , , sma_rod_R } #local bar_NS = cylinder{ <0,lo_Y,0>, <0,hi_Y,0>, sma_rod_R } #local nX = int((lo_X - org.x)/step) - 1; #local bX = org.x + nX*step; #while (bX < hi_X) #if (bX > lo_X) object{ bar_NS translate < bX, 0, org.z > } #end #local bX = bX + step; #end #local nY = int((lo_Y - org.y)/step) - 1; #local bY = org.y + nY*step; #while (bY < hi_Y) #if (bY > lo_Y) object{ bar_WE translate < 0, bY, org.z > } #end #local bY = bY + step; #end #if ((lo_X < org.x) & (hi_X > org.x) & (lo_Y < org.y) & (hi_Y > org.y)) #local org_dot = sphere{ <0,0,0>, org_dot_R texture{ tx } } // Origin dot. object{ org_dot translate org } #end #end texture{ tx } } #end #macro un4_horizontal_ref_frame(lo_X,hi_X, lo_Y,hi_Y, frame_Z, line_R) texture{ tx } // An horizontal axis-aligned rectangular frame with the // diagonals and symmetry axes, spanning from {lo_X,lo_Y} to {hi_X,hi_Y}, at Z // coordinate {frame_Z}. The thin lines have radius {line_R}. // The whole is painted with texture {tx}. #local big_rod_R = 1.5*line_R; // Thick line. #local sma_rod_R = 1.0*line_R; // Thin line. #local md_X = (lo_X + hi_X)/2; #local md_Y = (lo_Y + hi_Y)/2; #local crn_dot = sphere{ <0,0,0>, big_rod_R texture{ tx } } // Corner-filling dot. #local rod_WE = cylinder{ , , big_rod_R } #local rod_NS = cylinder{ <0,lo_Y,0>, <0,hi_Y,0>, big_rod_R } #local bar_SW_NE = cylinder{ , , sma_rod_R } #local bar_SE_NW = cylinder{ , , sma_rod_R } union{ object{ crn_dot translate < lo_X, lo_Y, frame_Z> } object{ crn_dot translate < hi_X, lo_Y, frame_Z> } object{ crn_dot translate < lo_X, hi_Y, frame_Z> } object{ crn_dot translate < hi_X, hi_Y, frame_Z> } object{ rod_NS translate < lo_X, 0, frame_Z > } object{ rod_NS translate < md_X, 0, frame_Z > } object{ rod_NS translate < hi_X, 0, frame_Z > } object{ rod_WE translate < 0, lo_Y, frame_Z > } object{ rod_WE translate < 0, md_Y, frame_Z > } object{ rod_WE translate < 0, hi_Y, frame_Z > } object{ bar_SW_NE translate < 0, 0, frame_Z > } object{ bar_SE_NW translate < 0, 0, frame_Z > } texture{ tx } } #end #macro un4_placeholder_for_internal_rooms() // Origin at building SW corner of "mid" block and OP ref level. #local lo_X = un4_building_upp_lo_X + un4_building_EW_pillar_size_X; #local hi_X = un4_building_upp_hi_X - un4_building_EW_pillar_size_X; #local lo_Y = un4_building_lo_Y + un4_building_EW_pillar_size_Y; #local hi_Y = un4_building_hi_Y - un4_building_EW_pillar_size_Y; #local lo_Z = un4_storey_0_lo_Z; #local hi_Z = un4_service_floor_Z - 0.600; difference{ union{ box{ < lo_X, lo_Y, lo_Z > - epsv, < hi_X, hi_Y, hi_Z > + epsv } } object{ un4_drywell_enclosure_massive() translate un4_reactor_axis } object{ un4_shroud_enclosure_massive() translate un4_reactor_axis } object{ un4_pools_massive() } bounded_by{ box{ < lo_X, lo_Y, lo_Z > - 3*epsv, < hi_X, hi_Y, hi_Z > + 3*epsv } } } #end // Wall thicknesses: #local W_T = un4_storey_0_W_wall_thk; #local MW_T = un4_storey_0_MW_wall_thk; #local ME_T = un4_storey_0_MW_wall_thk; #local E_T = un4_storey_0_E_wall_thk; #local S_T = un4_storey_0_S_wall_thk; #local N_T = un4_storey_0_N_wall_thk; // The cavity in the basement where the torus sits: #declare un4_torus_storey_W_wall_thk = 1.600; // Typical thickness of -X outer wall [B3N][E]. #declare un4_torus_storey_E_wall_thk = 1.600; // Typical thickness of +X outer wall [B3N][E]. #declare un4_torus_storey_S_wall_thk = 1.600; // Typical thickness of -Y outer wall [B3W][E]. #declare un4_torus_storey_N_wall_thk = 1.600; // Typical thickness of -Y outer wall [B3W][E]. #declare un4_torus_storey_floor_Z = -2.060; // Z of bottom of cavity rOP [B3N][B3W][G]. #declare un4_torus_storey_ceiling_Z = +7.930; // Z of top of cavity rOP [B3N][E]. // HEATING AND VENTILATION STOREY #declare un4_hvac_storey_W_wall_thk = 0.000; // Typical thickness of -X outer wall [E]. #declare un4_hvac_storey_E_wall_thk = 0.500; // Typical thickness of +X outer wall [E]. #declare un4_hvac_storey_S_wall_thk = 0.500; // Typical thickness of -Y outer wall [E]. #declare un4_hvac_storey_N_wall_thk = 0.500; // Typical thickness of +Y outer wall [E]. #declare un4_hvac_storey_lo_Z = +17.100; // Z of floor rOP. #declare un4_hvac_storey_hi_Z = +21.600; // Z of ceiling in east part rOP [TBC]. #macro un4_drywell_and_shroud_cavity() // Includes steps for the shield plug. // Oigin at OP on reactor axis. #local sphere_ctr = < 0, 0, un4_drywell_sphere_ctr_Z>; #local sphere_rad = un4_drywell_sphere_rad; #local dw_cyl_top = < 0, 0, un4_shroud_cavity_Z + 0.500 >; #local dw_cyl_rad = un4_drywell_stem_rad; #local sh_cyl_bot = < 0, 0, un4_shroud_cavity_Z >; #local sh_cyl_top = < 0, 0, un4_service_floor_Z + 0.500 >; #local sh_cyl_rad = un4_shroud_cavity_rad; union{ sphere{ sphere_ctr, sphere_rad + eps } cylinder{ sphere_ctr, dw_cyl_top, dw_cyl_rad + eps } cylinder{ sh_cyl_bot - eps*z, sh_cyl_top + eps*z, sh_cyl_rad + eps } object{ un4_shield_plug_cavity(0) } object{ un4_shield_plug_cavity(1) } object{ un4_shield_plug_cavity(2) } } #end