// Last edited on 2011-05-11 17:30:35 by stolfilocal // Models of Fukushima Daiichi Unit #4 and its parts. // All sizes and coordinates in meters. // X axis points East, Y North, Z up. // All from unit #1 blueprints - [TBC] #include "un4_dimensions.inc" #include "un4_pressure_vessel.inc" #include "un4_drywell_and_shroud.inc" #include "un4_service_pools.inc" #include "un4_pillars_and_beams.inc" #include "un4_gadgets.inc" #include "un4_reference_grids.inc" // TOP-LEVEL MULTI-MATERIAL OBJECTS // These objects generally take untextured cutters and apply the // standard textures to them: #macro un4_whole(CB,CD,CR,CF,cw,dw,sw,uw,pw) // Whole building with reactor, contaiment, etc. // Origin is at SW corner of "mid" block, OP level. // These arguments should preferably be untextured: // {CB} = cutting object for building and ground (rel building origin). // {CD} = cutting object for drywell and torus (rel reactor axis, OP level). // {CR} = cutting object for reactor vessel (rel. vessel center). // {CF} = cutting object for reactor fuel (rel. fuel center). // {cw} = water level in core. // {dw} = water level in drywell. // {sw} = water level in suppression torus. // {uw} = water level in shroud cavity. // {pw} = water level in spent-fuel pool. #local CB_tc = object{ CB texture{ tx_cut_concrete } } #local CB_tf = object{ CB texture{ tx_cut_fuel } } #local CB_td = object{ CB texture{ tx_dirt } } #local CD_tc = object{ CD texture{ tx_cut_concrete } } #local CD_ts = object{ CD texture{ tx_cut_steel } } #local CR_ts = object{ CR texture{ tx_cut_steel } } #local CF_tf = object{ CF texture{ tx_cut_fuel } } union{ object{ un4_building_structure(CB_tc) } intersection{ object{ un4_spent_fuel() } CB_tf } object{ un4_ground(CB_td) } // object{ un4_storey_5_ceiling_lights(1.00) } union{ object{ un4_containment_vessel(CD_ts,dw,sw,uw) } object{ un4_pressure_vessel_support(CD_tc) } object{ un4_pressure_vessel(CR_ts,CF_tf,cw,1,1,1) translate un4_rpv_Z*z } translate un4_reactor_axis } } #end #macro un4_containment_whole(CD,CR,CF,cw,dw,sw) // Containment vessel (drywell+torus+surgepipes) with reactor vessel // and supporting concrete tube. // Thes objects should preferably be untextured: // {CD} = cutting object for drywell and torus (rel reactor axis, OP level). // {CR} = cutting object for reactor vessel (rel. vessel center). // {CF} = cutting object for fuel (rel. fuel center). // {cw} = water level in core. // {dw} = water level in drywell. // {sw} = water level in suppression torus. // Origin is on reactor axis, OP level. #local uw = 0.000; // Water level in shroud pool. union{ object{ un4_containment_vessel(CD,dw,sw,uw) } object{ un4_pressure_vessel_support(object{ CD texture{ tx_cut_concrete } }) } object{ un4_pressure_vessel(CR,CF,cw,1,1,1) translate un4_rpv_Z*z } } #end #macro un4_containment_vessel(C,dw,sw,uw) // Containment vessel (drywell+torus+surgepipes). // {C} = a textured cutter, assuming origin on rector axis, OP level. intersection{ object{ C } union{ object{ un4_drywell_steel_wall() } object{ un4_shroud() translate un4_shroud_Z*z } object{ un4_torus_steel_wall() } object{ un4_inner_torus_steel_wall() } object{ un4_surge_pipes() } // Add stuff inside torus. // Add water. } } #end #macro un4_spent_fuel_pool(C) // The spent-fuel pool and its concrete walls intersection{ object{ C } difference{ object{ un4_spent_fuel_pool(1) } object{ un4_spent_fuel_pool(0) } } texture{ tx_concrete } } #end #macro un4_dryer_storage_pool(C) // The steam-dryer storage pool and its concrete walls intersection{ object{ C } difference{ object{ un4_dryer_storage_pool(1) } object{ un4_dryer_storage_pool(0) } } texture{ tx_concrete } } #end #macro un4_cask_loading_pool(C) // The cask loading pool and its concrete walls intersection{ object{ C } difference{ object{ un4_cask_loading_pool(1) } object{ un4_cask_loading_pool(0) } } texture{ tx_concrete } } #end // TOP-LEVEL SINGLE-MATERIAL OBJECTS // These objects generally take textured cutters: #macro un4_drywell_and_shroud_enclosure(C) // The concrete around the drywell, with the cavity excavated. // Origin is reactor axis at OP height. // {C} = a textured cutter, assuming origin is on reactor axis, OP level. intersection{ object{ C } difference{ union{ un4_shroud_enclosure_massive() un4_drywell_enclosure_massive() } object{ un4_drywell_cavity() } object{ un4_shroud_cavity() } object{ un4_surge_pipe_cavities() } } texture{ tx_concrete } } #end #macro un4_building_structure(C) // Main concrete structural parts of building // including the roof structure, // but without the reactor support. // Origin is at SW corner of "mid" block, basement level. // {C} = a textured cutter. intersection{ object{ C } union{ object{ un4_building_exterior_paint() } difference{ object{ un4_building_massive() } object{ un4_containment_vessel_cavity() } object{ un4_elevator_well_cavity() } object{ un4_SW_staircase_well_cavity() } object{ un4_spent_fuel_pool_shape(0) } object{ un4_dryer_storage_pool_shape(0) } object{ un4_cask_loading_pool_shape(0) } object{ un4_storey_0_rooms() } object{ un4_storey_1_rooms() } object{ un4_storey_2_rooms() } object{ un4_storey_3_rooms() } object{ un4_storey_4_rooms() } object{ un4_storey_5_rooms() } object{ un4_roof_storey_rooms() } object{ un4_midroof_storey_rooms() } // More later texture{ tx_concrete } } } } #end #macro un4_skinless_structure(C) // Main concrete structural parts of building // including the roof structure and known internal concrete, // but without the reactor support tower, // the exterior walls of storeys 3 to 5, // and the roof of storey 5. // Origin is at SW corner of "mid" block, basement level. // {C} = a textured cutter. intersection{ object{ C } union{ object{ un4_building_und_exterior_paint() } object{ un4_building_mid_exterior_paint() } difference{ object{ un4_building_skinless_massive() } object{ un4_containment_vessel_cavity() } object{ un4_elevator_well_cavity() } object{ un4_SW_staircase_well_cavity() } object{ un4_spent_fuel_pool_shape(0) } object{ un4_dryer_storage_pool_shape(0) } object{ un4_storey_0_rooms() } object{ un4_storey_1_rooms() } object{ un4_storey_2_rooms() } object{ un4_storey_3_rooms() } object{ un4_storey_4_rooms() } object{ un4_storey_5_rooms() } object{ un4_roof_storey_rooms() } object{ un4_midroof_storey_rooms() } // More later texture{ tx_concrete } } object{ un4_pillars_and_beams() texture{ tx_concrete } } } } #end // COMPONENT SINGLE-MATERIAL OBJECTS // These objects generally take no cutters and return // untextured objects. #macro un4_building_massive() // The concrete outline of the building, including the service area, // with all internal spaces filled with concrete. // Origin at SW corner of "mid" block, OP level. union{ object{ un4_building_und_massive() } object{ un4_building_mid_massive() } object{ un4_building_upp_massive() } } #end #macro un4_building_und_massive() // The concrete outline of the "und" block, with all internal spaces // filled with concrete. // Origin at SW corner of "mid" block, OP level. #local lo_Y = un4_building_lo_Y; // Min Y of all three boxes. #local hi_Y = un4_building_hi_Y; // Max Y of all three boxes. #local und_lo_X = un4_building_und_lo_X; // Min X of lower block. #local und_hi_X = un4_building_und_hi_X; // Max X of lower block. #local und_lo_Z = un4_building_lo_Z; // Z of bottom of basement concrete floor rOP. #local und_hi_Z = un4_building_und_hi_Z; // Z of top of lower block (ground floor) rOP. box{ < und_lo_X+eps, lo_Y+eps, und_lo_Z+eps >, < und_hi_X-eps, hi_Y-eps, und_hi_Z-eps > } #end #macro un4_building_mid_massive() // The concrete outline of the "mid" block, with all internal spaces // filled with concrete. // Origin at SW corner of "mid" block, OP level. #local lo_Y = un4_building_lo_Y; // Min Y of all three boxes. #local hi_Y = un4_building_hi_Y; // Max Y of all three boxes. #local mid_lo_X = un4_building_mid_lo_X; // Min X of middle block. #local mid_hi_X = un4_building_mid_hi_X; // Max X of middle block. #local mid_lo_Z = un4_building_und_hi_Z; // Z of bottom of middle block rOP. #local mid_hi_Z = un4_building_mid_hi_Z; // Z of top of middle block (incl. roof lip) rOP. box{ < mid_lo_X+2*eps, lo_Y+2*eps, mid_lo_Z-2*eps >, < mid_hi_X-2*eps, hi_Y-2*eps, mid_hi_Z-eps > } #end #macro un4_building_upp_massive() // The concrete outline of the "upp" block, with all internal spaces // filled with concrete. // Origin at SW corner of "mid" block, OP level. #local lo_Y = un4_building_lo_Y; // Min Y of all three boxes. #local hi_Y = un4_building_hi_Y; // Max Y of all three boxes. #local upp_lo_X = un4_building_upp_lo_X; // Min X of upper block. #local upp_hi_X = un4_building_upp_hi_X; // Max X of upper block. #local upp_lo_Z = un4_building_mid_hi_Z; // Z of bottom of upper block (incl. roof lip) rOP. #local upp_hi_Z = un4_building_upp_hi_Z; // Z of top of upper block (incl. roof lip) rOP. box{ < upp_lo_X+3*eps, lo_Y+3*eps, upp_lo_Z-2*eps >, < upp_hi_X-3*eps, hi_Y-3*eps, upp_hi_Z-eps > } #end #macro un4_building_skinless_massive() // The concrete outline of the building, including the service area, // with all internal spaces filled with concrete, without the // external walls and without the top roof. // Origin at SW corner of "mid" block, OP level. union{ object{ un4_building_und_skinless_massive() } object{ un4_building_mid_skinless_massive() } object{ un4_building_upp_skinless_massive() } } #end #macro un4_building_upp_skinless_massive() // The concrete outline of the "upp" block, with all internal // spaces filled with concrete, minus the external walls and top roof, // but including the floor slab of each storey (up to that storey's walls). // // The top surface and all lateral surfaces are // shaved by {eps}. All inferior faces are bloated // by {2*eps}. // // Origin at SW corner of "mid" block, OP level. union{ object{ un4_storey_3_skinless_massive() } object{ un4_storey_4_skinless_massive() } object{ un4_storey_5_skinless_massive() } } #end #macro un4_building_mid_skinless_massive() // The concrete outline of the "mid" block, with all internal // spaces filled with concrete, minus the external walls and midroof roof, // but including the floor slab of each storey (up to that storey's walls) // and the continuation of the "upp" east wall. // // The top surface and all lateral surfaces are // shaved by {eps}. All inferior faces are bloated // by {2*eps}. // // Origin at SW corner of "mid" block, OP level. union{ object{ un4_storey_1_skinless_massive() } object{ un4_storey_2_skinless_massive() } } #end #macro un4_building_und_skinless_massive() // The concrete outline of the "und" block, with all internal // spaces filled with concrete, minus the external walls and top roof, // but including the floor slab of each storey (up to that storey's walls) // and the continuation of the "upp" east and west walls. // // The top surface and all lateral surfaces are // shaved by {eps}. All inferior faces are bloated // by {2*eps}. // // Origin at SW corner of "mid" block, OP level. object{ un4_storey_0_skinless_massive() } #end #macro un4_building_exterior_paint() // The exerior paint of the building // The paint lies entirely outside the blocks, // is separated by {eps} from their nominal outer surfaces, // and is trimmed by {eps} on the bottom edge. // // Origin at SW corner of "mid" block, OP level. union{ object{ un4_building_und_exterior_paint() } object{ un4_building_mid_exterior_paint() } object{ un4_building_upp_exterior_paint() } } #end #macro un4_building_und_exterior_paint() // Exterior paint on the "und" block, excluding the roof of the // basement outside but including its sides, down to ground level. // // The paint lies entirely outside the block, is separated by {eps} // from its nominal outer surfaces, and is trimmed by {eps} on both // edges. It is extended by {eps} where it should connect to the "mid" // block's paint. // // Origin at SW corner of "mid" block, OP level. #local T = un4_exterior_paint_thk; #local ground_Z = un4_ground_Z; // Z of external ground rOP. #local lo_Y = un4_building_lo_Y; // Min Y of "und" block. #local hi_Y = un4_building_hi_Y; // Max Y of "und" block. #local lo_X = un4_building_und_lo_X; // Min X of "und" block. #local hi_X = un4_building_und_hi_X; // Max X of "und" block. #local lo_Z = max(ground_Z, un4_building_lo_Z); // Z of bottom edge of paint rOP. #local hi_Z = un4_building_und_hi_Z; // Z of top edge of paint (ground floor) rOP. #if ( ground_Z + 2*eps > hi_Z - 2*eps) object{ empty } #else difference{ box{ < lo_X+eps, lo_Y+eps, lo_Z+eps > - , < hi_X-eps, hi_Y-eps, hi_Z-eps > + } box{ < lo_X-eps, lo_Y-eps, lo_Z-eps >, < hi_X+eps, hi_Y+eps, hi_Z+eps > } texture{ tx_exterior_paint } } #end #end #macro un4_building_mid_exterior_paint() // Exterior paint on the "mid" block, // including the topside of the midroof's parapet // but not its inside. // // The paint lies entirely outside the block, // is separated by {eps} from its nominal outer surfaces, // and is trimmed by {eps} on the free edges. // It extends out by {eps} where it should connect to the // "und" and "upp" block's paint or end against concrete. // // Assumes that the "mid" block is entirely above the external ground. // // Origin at SW corner of "mid" block, OP level. #local T = un4_exterior_paint_thk; #local lo_Y = un4_building_lo_Y; // Min Y of all three boxes. #local hi_Y = un4_building_hi_Y; // Max Y of all three boxes. #local mid_lo_X = un4_building_mid_lo_X; // Min X of middle block. #local mid_hi_X = un4_building_mid_hi_X; // Max X of middle block. #local mid_lo_Z = un4_building_mid_lo_Z; // Z of bottom of middle block rOP. #local mid_hi_Z = un4_building_mid_hi_Z; // Z of top of middle block (incl. roof lip) rOP. #local upp_lo_X = un4_building_upp_lo_X; // Min X of upper block. #local upp_hi_X = un4_building_upp_hi_X; // Max X of upper block. #local upp_lo_Z = un4_building_upp_lo_Z; // Z of bottom of upper block (incl. roof lip) rOP. #local upp_hi_Z = un4_building_upp_hi_Z; // Z of top of upper block (incl. roof lip) rOP. #local mrf_lo_X = upp_hi_X + un4_midroof_storey_W_wall_thk; // Min X of midroof floor. #local mrf_hi_X = mid_hi_X - un4_midroof_storey_E_wall_thk; // Max X of midroof floor. #local mrf_lo_Y = mid_lo_X + un4_midroof_storey_S_wall_thk; // Min X of midroof floor. #local mrf_hi_Y = mid_hi_X - un4_midroof_storey_N_wall_thk; // Max X of midorof floor. #local mrf_lo_Z = un4_midroof_storey_lo_Z; // Z of midroof floor rOP. #local mrf_hi_Z = mid_hi_Z; // Z of top of midroof parapet rOP. #local upp_cavity = // Space taken by "upp" block, bloated by {3*eps}. box{ < upp_lo_X-3*eps, lo_Y-3*eps, upp_lo_Z-2*eps >, < upp_hi_X-eps, hi_Y+3*eps, upp_hi_Z > } #local midroof_cavity = // Cavity of midroof terrace, bloated by {eps}. box{ < mrf_lo_X-eps, mrf_lo_Y-eps, mrf_lo_Z-eps >, < mrf_hi_X+eps, mrf_hi_Y+eps, mrf_hi_Z+5*eps > + <0,0,T> } difference{ // Solid paint block, blated below by {eps}, trimmed by {2*eps} elsewhere: box{ < mid_lo_X+2*eps, lo_Y+2*eps, mid_lo_Z-2*eps > - , < mid_hi_X-2*eps, hi_Y-2*eps, mid_hi_Z-eps > + } // Remove "mid" block, bloated by {2*eps}, open bottom: box{ < mid_lo_X-2*eps, lo_Y-2*eps, mid_lo_Z-3*eps >, < mid_hi_X+2*eps, hi_Y+2*eps, mid_hi_Z+eps > } object{ upp_cavity } object{ midroof_cavity } texture{ tx_exterior_paint } } #end #macro un4_building_upp_exterior_paint() // Exterior paint on the "mid" block, // including topside of roof's parapet but not its inside. // // The paint lies entirely outside the block, // is separated by {eps} from its nominal outer surfaces, // and extends out by {eps} where it should connect to the // "mid" block's paint. // // Assumes that the "upp" block is entirely above the external ground. // // Origin at SW corner of "mid" block, OP level. #local T = un4_exterior_paint_thk; #local lo_Y = un4_building_lo_Y; // Min Y of all three boxes. #local hi_Y = un4_building_hi_Y; // Max Y of all three boxes. #local mid_lo_X = un4_building_mid_lo_X; // Min X of middle block. #local mid_hi_X = un4_building_mid_hi_X; // Max X of middle block. #local mid_lo_Z = un4_building_mid_lo_Z; // Z of bottom of middle block rOP. #local mid_hi_Z = un4_building_mid_hi_Z; // Z of top of middle block (incl. roof lip) rOP. #local upp_lo_X = un4_building_upp_lo_X; // Min X of upper block. #local upp_hi_X = un4_building_upp_hi_X; // Max X of upper block. #local upp_lo_Z = un4_building_upp_lo_Z; // Z of bottom of upper block (incl. roof lip) rOP. #local upp_hi_Z = un4_building_upp_hi_Z; // Z of top of upper block (incl. roof lip) rOP. #local ruf_lo_X = upp_lo_X + un4_roof_storey_W_wall_thk; // Min X of roof floor. #local ruf_hi_X = upp_hi_X - un4_roof_storey_E_wall_thk; // Max X of roof floor. #local ruf_lo_Y = lo_Y + un4_roof_storey_S_wall_thk; // Min X of roof floor. #local ruf_hi_Y = hi_Y - un4_roof_storey_N_wall_thk; // Max X of orof floor. #local ruf_lo_Z = un4_roof_storey_lo_Z; // Z of roof floor rOP. #local ruf_hi_Z = upp_hi_Z; // Z of top of roof parapet rOP. #local mid_cavity = // Space taken by "mid" block, bloated by {2*eps}. box{ < mid_lo_X-2*eps, lo_Y-2*eps, mid_lo_Z-2*eps >, < mid_hi_X+2*eps, hi_Y+2*eps, mid_hi_Z+eps > } #local roof_cavity = // Cavity of roof terrace, bloated by {eps}. box{ < ruf_lo_X-eps, ruf_lo_Y-eps, ruf_lo_Z-1.000 >, < ruf_hi_X+eps, ruf_hi_Y+eps, ruf_hi_Z+5*eps > + <0,0,T> } difference{ // Solid paint block, shaved by {3*eps}: box{ < upp_lo_X+3*eps, lo_Y+3*eps, upp_lo_Z-2*eps > - , < upp_hi_X-3*eps, hi_Y-3*eps, upp_hi_Z-eps > + } // Remove "upp" block bloated by {3*eps}: box{ < upp_lo_X-3*eps, lo_Y-3*eps, upp_lo_Z-3*eps >, < upp_hi_X+3*eps, hi_Y+3*eps, upp_hi_Z+eps > } object{ mid_cavity } object{ roof_cavity } texture{ tx_exterior_paint } } #end #macro un4_containment_vessel_cavity() // The cavity in the concrete structute // that houses the containment vessel // (drywell+torus+shroud). // Origin at SW uilding corner, OP height. union{ object{ un4_shroud_cavity() } object{ un4_drywell_cavity() } object{ un4_surge_pipe_cavities() } object{ un4_torus_cavity() } translate un4_reactor_axis } #end #macro un4_torus_steel_wall() // The suppression chamber torus. // Orgin at OP on reactor axis. #local R = un4_torus_major_rad; #local r = un4_torus_minor_rad; #local T = un4_torus_thk; #local ctr_Z = un4_torus_ctr_Z; // Z of center of supression torus. difference{ difference{ torus{ R, r + eps } torus{ R, r - T + eps } rotate 90*x translate ctr_Z*z } object{ un4_surge_pipe_punchers() } texture{ tx_enamel_green } } #end #macro un4_inner_torus_steel_wall() // The inner torus inside the suppression chamber torus. // Orgin at OP on reactor axis. #local R = un4_inner_torus_major_rad; #local r = un4_inner_torus_minor_rad; #local T = un4_inner_torus_thk; #local ctr_Z = un4_surge_pipe_bot_ref_Z; // Z of center of discharge hole. difference{ difference{ torus{ R, r + eps } torus{ R, r - T + eps } rotate 90*x translate ctr_Z*z } object{ un4_surge_pipe_punchers() } texture{ tx_enamel_lemon } } #end #macro un4_torus_cavity() // Excavator for the cavity where the torus sits. // Origin at reactor axis, OP level. #local lo_Z = un4_storey_0_lo_Z; // Z of bottom of cavity. #local hi_Z = un4_storey_0_hi_Z; // Z of top of cavity. #local cv_o_R = un4_torus_cavity_ot_rad; // Outer radius of torus cavity. #local cv_i_R = un4_drywell_enclosure_cyl0_rad; // Inner radius of torus cavity. #local ch_ti_R = un4_torus_channel_top_in_radius; // Inner radius of torus channel top. #local ch_to_R = un4_torus_channel_top_ot_radius; // Outer radius of torus channel top. #local ch_bi_R = un4_torus_channel_bot_in_radius; // Inner radius of torus channel bottom. #local ch_bo_R = un4_torus_channel_bot_ot_radius; // Outer radius of torus channel bottom. #local ch_lo_Z = un4_torus_channel_lo_Z; // Z of bottom of torus channel. #local sh_r = un4_torus_cavity_shoulder_rad; #local sh_R = cv_i_R + sh_r; #local sh_Z = hi_Z - sh_r; #local ch_t_ctr = lo_Z*z; // Center of channel top. #local ch_b_ctr = ch_lo_Z*z; // Center of channel bottom. #local ch_b_ctr = ch_lo_Z*z; // Center of channel bottom. #local sh_ctr = sh_Z*z; // Center of shoulder. #local cv_t_ctr = hi_Z*z; // Center of top of cavity. union{ difference{ cone{ ch_b_ctr-eps*z, ch_bo_R+eps, ch_t_ctr+eps*z, ch_to_R+eps } cone{ ch_b_ctr-2*eps*z, ch_bi_R-eps, ch_t_ctr+2*eps*z, ch_ti_R-4*eps } } torus{ sh_R, sh_r rotate 90*x translate sh_ctr } difference{ cylinder{ ch_t_ctr - eps*z, sh_ctr + eps*z, cv_o_R + eps } cylinder{ ch_t_ctr - 2*eps*z, sh_ctr + 2*eps*z, cv_i_R - eps } } difference{ cylinder{ sh_ctr - eps*z, cv_t_ctr + eps*z, cv_o_R + eps } cylinder{ sh_ctr - 2*eps*z, cv_t_ctr + 2*eps*z, sh_R - eps } } bounded_by{ cylinder{ ch_b_ctr - 2*eps*z, cv_t_ctr + 2*eps*z, cv_o_R + 2*eps } } } #end #macro un4_surge_pipes() // Metal wall and trimmings for the eight pipes between drywell and torus. // Orgin at reactor axis, OP level. #local pipe = object{ un4_surge_pipe() } intersection{ object{ C texture { tx_steel } } union{ #local k = 0; #while (k < 8) #local turn = (k + 0.5)*45; object{ pipe rotate turn*z } #local k = k + 1; #end texture{ tx_enamel_lemon } } bounded_by{ object{ un4_pipes_bounder(pipe) } } } #end #macro un4_surge_pipe_punchers() // Excavator to make the holes in drywell and torus for the eight {un4_surge_pipes}. // Orgin at reactor axis, OP level. #local pipe_puncher = object{ un4_surge_pipe_puncher() } union{ #local k = 0; #while (k < 8) #local turn = (k + 0.5)*45; object{ pipe_puncher rotate turn*z } #local k = k + 1; #end bounded_by{ object{ un4_pipes_bounder(pipe_puncher) } } } #end #macro un4_surge_pipe_cavities() // Excavator for tunnels in concrete to accomodate the eight {un4_surge_pipes}. // Orgin at reactor axis, OP level. #local pipe_cav = object{ un4_surge_pipe_cavity() } union{ #local k = 0; #while (k < 8) #local turn = (k + 0.5)*45; object{ pipe_cav rotate turn*z } #local k = k + 1; #end bounded_by{ object{ un4_pipes_bounder(pipe_cav) } } } #end #macro un4_pipes_bounder(pipe) #local minv = min_extent(pipe); #local maxv = max_extent(pipe); #local R = 1.1*maxv.x; cylinder{ < 0, 0, minv.z - 10*eps >, < 0, 0, maxv.z + 10*eps >, R + 10*eps } #end #macro un4_surge_pipe() // Metal wall and trimmings for one pipe between drywell and torus. // Orgin at reactor axis, OP level. // Pipe axis is on the XZ plane. #local T = un4_surge_pipe_thk; // Thickness of surge pipe. #local dw_sph_ctr_Z = un4_drywell_sphere_ctr_Z; // Z of center of drywell sphere. #local dw_sph_R = un4_drywell_sphere_rad; // Outer radius of drywell sphere. #local dw_T = un4_drywell_thk; // Thickness of drywell wall. difference{ union{ object{ un4_surge_pipe_sleeve() } object{ un4_surge_pipe_shape(-eps,-eps,0) } } object{ un4_surge_pipe_shape(-T+eps,0.300,0) } } #end #macro un4_surge_pipe_sleeve() // A sleeve that fits on a surge pipe inside the drywell, // without the opening. #local dw_sph_ctr_Z = un4_drywell_sphere_ctr_Z; // Z of center of drywell sphere. #local dw_sph_R = un4_drywell_sphere_rad; // Outer radius of drywell sphere. #local sleeve_R = un4_surge_pipe_sleeve_rad; #local top_X = un4_surge_pipe_sleeve_top_X; #local top_Z = un4_surge_pipe_sleeve_top_Z; #local dX = top_X; #local dZ = dw_sph_ctr_Z - top_Z; #local top_D = sqrt(dX*dX + dZ*dZ); // Distance from sphere center to top of sleeve. #local tilt = degrees(atan2(dX,dZ)); debug_coord("sleeve tilt", tilt) #local lo_ctr = -dw_sph_R*z; #local hi_ctr = -top_D*z; intersection{ sphere{ <0,0,0>, dw_sph_R-2*eps } cylinder{ lo_ctr - eps*z, hi_ctr - eps*z, sleeve_R-eps } bounded_by{ cylinder{ lo_ctr - 2*eps*z, hi_ctr, sleeve_R } } rotate -tilt*y translate dw_sph_ctr_Z*z } #end #macro un4_surge_pipe_puncher() // Excavator to make a hole in drywell and torus for one {un4_surge_pipe}. // Orgin at reactor axis, OP level. // Assumes that the pipe axis is on the XZ plane. #local T = un4_surge_pipe_thk; // Thickness of surge pipe metal wall. object{ un4_surge_pipe_shape(-T+2*eps,0.400,0) } #end #macro un4_surge_pipe_cavity() // Excavator for tunnel to accomodate {un4_surge_pipe}. // Orgin at reactor axis, OP level. // Assumes that the pipe axis is on the XZ plane. object{ un4_surge_pipe_shape(+eps,0.500,1) } #end #macro un4_surge_pipe_shape(soff,eoff,niche) // A macro that gnerates the basic shape of a surge pipe, // with specified surface offset {soff} and open end offset {eoff}. // If {niche>0}, also adds a squarish niche (for concrete excavation). // Used to make punchers, holes in concrete and metal, // and the two surfaces of the pipe itself. // Orgin at reactor axis, OP level. // Assumes that the pipe axis is on the XZ plane. // Assuming pipe axis is Z axis: #local cap_Z = un4_surge_pipe_cap_Z; // Z of bottom cap center. #local cap_H = un4_surge_pipe_cap_H; // Height of bottom cap. #local cap_R = un4_surge_pipe_cap_rad; // Radius of bottom cap and cylinder. #local cone_lo_Z = un4_surge_pipe_cone_lo_Z; // Low Z of radius transition. #local cone_hi_Z = un4_surge_pipe_cone_hi_Z; // High Z of radius transition. #local top_Z = un4_surge_pipe_top_Z; // Nominal Z of top end of pipe. #local top_R = un4_surge_pipe_top_rad; // Radius of top cylinder. #local belw_lo_Z = un4_surge_pipe_bellows_lo_Z; // Low Z of bellows joint. #local belw_hi_Z = un4_surge_pipe_bellows_hi_Z; // High Z of bellows joint. #local belw_R = un4_surge_pipe_bellows_rad; // Outer radius of bellows joint. #local nich_lo_Z = belw_lo_Z - 0.500; // Z of start of bellows niche. #local nich_hi_Z = un4_surge_pipe_niche_back_Z; // Z of back wall of bellows niche. #local nich_R = un4_surge_pipe_niche_rad; // Z of back wall of bellows niche. // Assuming pipe is tilted, origin on reactor axis, OP height: #local bot_ref_X = un4_surge_pipe_bot_ref_X; // X of center of discharge hole. #local bot_ref_Z = un4_surge_pipe_bot_ref_Z; // Z of center of discharge hole. #local top_ref_X = un4_surge_pipe_top_ref_X; // X of center of mouth inside drywell. #local top_ref_Z = un4_surge_pipe_top_ref_Z; // Z of center of mouth inside drywell. #local cap_scZ = (cap_H + soff)/(cap_R + soff); // Z scale factor for cap. #local dX = top_ref_X - bot_ref_X; #local dZ = top_ref_Z - bot_ref_Z; #local tilt = degrees(atan2(dX,dZ)); // Tilt from vertical. #local max_R = max(top_R,belw_R); #if (niche > 0) #local max_R = max(max_R,1.5*nich_R); #end debug_coord("surge pipe tilt", tilt) union{ sphere{ <0,0,0>, cap_R+soff scale <1,1,cap_scZ> translate cap_Z*z } cylinder{ (cap_Z-eps)*z, (cone_lo_Z+eps)*z, cap_R+soff } cone{ cone_lo_Z*z, cap_R+soff, cone_hi_Z*z, top_R+soff } cylinder{ (cone_hi_Z-eps)*z, (top_Z+eoff)*z, top_R+soff } cylinder{ (belw_lo_Z-soff)*z, (belw_hi_Z+soff)*z, belw_R+soff } #if (niche > 0) // !!! Niche is actually squarish, fix. cylinder{ (nich_lo_Z-soff)*z, (nich_hi_Z+soff)*z, nich_R+soff } #end bounded_by{ cylinder{ (cap_Z-cap_H-soff-eps)*z, (top_Z+eoff+eps)*z, max_R+eps } } rotate tilt*y translate < bot_ref_X, 0, bot_ref_Z > } #end #macro un4_pressure_vessel_support(C) // The concrete sructure inside the drywell that supports // the rector pressure vessel. // Origin at OP on reactor axis. #local T = un4_drywell_thk; // Thickness of drywell wall. #local spZ = un4_drywell_sphere_ctr_Z; // Z of drywell sphere center. #local inR = un4_drywell_sphere_rad - T; // Inner radius of drywell sphere. #local ftZ = un4_drywell_floor_Z; // Z of concrete floor inside drywell. #local fcZ = spZ - ftZ; // Z dist from floor to sphere center. #local ftR = sqrt(spZ*spZ - fcZ*fcZ); // Radius of floor. #local sphere_ctr = < 0, 0, spZ >; // Center of drywell sphere. #local floor_ctr = <0,0,ftZ>; // Center of top of concrete floor inside drywell. #local base_ctr = sphere_ctr - inR*z; // Bottommost point of drywell. #local lo_in_rad = un4_rpv_supp_lo_in_rad; // Bottom inner radius of RPV support. #local lo_ot_rad = un4_rpv_supp_lo_ot_rad; // Bottom outer radius of RPV support. #local md1_in_Z = un4_rpv_supp_md1_in_Z; // Bottom Z of 1st inner radius transition. #local md2_in_Z = un4_rpv_supp_md2_in_Z; // Top Z of 1st inner radius transition. #local md3_in_Z = un4_rpv_supp_md3_in_Z; // Z of 2nd inner radius transition. #local md1_ot_Z = un4_rpv_supp_md1_ot_Z; // Bottom Z of outer radius transition. #local md2_ot_Z = un4_rpv_supp_md2_ot_Z; // Top Z of outer radius transition. #local md_in_rad = un4_rpv_supp_md_in_rad; // Inner radius of RPV support shoulder. #local hi_in_rad = un4_rpv_supp_hi_in_rad; // Top inner radius of RPV support. #local hi_ot_rad = un4_rpv_supp_hi_ot_rad; // Top outer radius of RPV support. #local hi_Z = un4_rpv_supp_hi_Z; // Top of RPV support. #local md1_in_ctr = < 0, 0, md1_in_Z >; #local md2_in_ctr = < 0, 0, md2_in_Z >; #local md3_in_ctr = < 0, 0, md3_in_Z >; #local md1_ot_ctr = < 0, 0, md1_ot_Z >; #local md2_ot_ctr = < 0, 0, md2_ot_Z >; #local hi_ctr = < 0, 0, hi_Z >; intersection{ object{ C } union{ // The floor inside the drywell: intersection{ cylinder{ base_ctr, floor_ctr - eps*z, ftR + eps } sphere{ sphere_ctr, inR - eps } } // The supporting tube: difference{ union{ cylinder{ floor_ctr - 3*eps*z, md1_ot_ctr + eps*z, lo_ot_rad - eps } cone{ md1_ot_ctr - eps*z, lo_ot_rad - eps, md2_ot_ctr + eps*z, hi_ot_rad - eps } cylinder{ md2_ot_ctr - eps*z, hi_ctr - eps*z, hi_ot_rad - eps } } union{ cylinder{ floor_ctr - 5*eps*z, md1_in_ctr + eps*z, lo_in_rad + eps } cone{ md1_in_ctr - eps*z, lo_in_rad + eps, md2_in_ctr + eps*z, md_in_rad + eps } cylinder{ md2_in_ctr - eps*z, md3_in_ctr + eps*z, md_in_rad + eps } cylinder{ md3_in_ctr - eps*z, hi_ctr + 5*eps*z, hi_in_rad + eps } } } } texture{ tx_concrete } bounded_by{ union{ cylinder{ base_ctr, floor_ctr, ftR + eps } cylinder{ floor_ctr, hi_ctr, hi_ot_rad + eps } } } } #end #macro un4_storey_0_basic_room() // Excavator for general space in storey 0. // Leaves only outer walls and the continuation of the // east and west walls of the "upp" block. // Origin at building SW corner of "mid" block and OP ref level. #local lo_W_X = un4_building_und_lo_X + un4_storey_0_W_wall_thk; #local hi_W_X = un4_building_mid_lo_X; #local lo_M_X = un4_building_mid_lo_X + un4_storey_0_MW_wall_thk; #local hi_M_X = un4_building_upp_hi_X + un4_storey_0_ME_wall_thk; #local lo_E_X = un4_building_upp_hi_X; #local hi_E_X = un4_building_und_hi_X - un4_storey_0_E_wall_thk; #local lo_Y = un4_building_lo_Y + un4_storey_0_S_wall_thk; #local hi_Y = un4_building_hi_Y - un4_storey_0_N_wall_thk; #local lo_Z = un4_storey_0_lo_Z; #local hi_Z = un4_storey_0_hi_Z; union{ box{ < lo_W_X, lo_Y, lo_Z > - epsv, < hi_W_X, hi_Y, hi_Z > + epsv } box{ < lo_M_X, lo_Y, lo_Z > - epsv, < hi_M_X, hi_Y, hi_Z > + epsv } box{ < lo_E_X, lo_Y, lo_Z > - epsv, < hi_E_X, hi_Y, hi_Z > + epsv } } #end #macro un4_storey_0_skinless_massive() // Storey 0 solid, not including its outer walls and // the ceiling slab, but including the floor slab // and the extension of the "upp" east and west walls. // The top surface and all lateral surfaces are // shaved by {eps}. All inferior faces are bloated // by {2*eps}. #local lo_X = un4_building_und_lo_X + un4_storey_0_W_wall_thk; // Min X of storey minus walls. #local hi_X = un4_building_und_hi_X - un4_storey_0_E_wall_thk; // Max X of storey minus walls. #local lo_Y = un4_building_lo_Y + un4_storey_0_S_wall_thk; // Max Y of storey minus walls. #local hi_Y = un4_building_hi_Y - un4_storey_0_N_wall_thk; // Max Y of storey minus walls. #local lo_Z = un4_building_lo_Z; // Min Z of storey including floor slab. #local hi_Z = un4_storey_0_hi_Z; // Max Z of storey minus ceiling slab. box{ < lo_X+eps, lo_Y+eps, lo_Z-2*eps >, < hi_X-eps, hi_Y-eps, hi_Z-eps > } #end #macro un4_storey_0_rooms() // Excavator for the rooms in storey 0, // excluding the drywell cavity but including the torus cavity. // Origin at building SW corner of "mid" block and OP ref level. #local lo_W_X = un4_building_und_lo_X + un4_storey_0_W_wall_thk; #local hi_W_X = un4_building_mid_lo_X; #local lo_M_X = un4_building_mid_lo_X + un4_storey_0_MW_wall_thk; #local hi_M_X = un4_building_upp_hi_X + un4_storey_0_ME_wall_thk; #local lo_E_X = un4_building_upp_hi_X; #local hi_E_X = un4_building_und_hi_X - un4_storey_0_E_wall_thk; #local lo_Y = un4_building_lo_Y + un4_storey_0_S_wall_thk; #local hi_Y = un4_building_hi_Y - un4_storey_0_N_wall_thk; #local lo_Z = un4_storey_0_lo_Z; #local hi_Z = un4_storey_0_hi_Z; union{ difference{ object{ un4_storey_0_basic_room() } object{ un4_storey_0_pillars_and_beams() } object{ un4_drywell_enclosure_massive() translate un4_reactor_axis } bounded_by{ box{ < lo_W_X, lo_Y, lo_Z > - 3*epsv, < hi_E_X, hi_Y, hi_Z > + 3*epsv } } } object{ un4_torus_cavity() } } #end #macro un4_storey_1_basic_room() // Excavator for general space in storey 1. // Leaves only outer walls and the continuation of the // east wall of the "upp" block. // Origin at building SW corner of "mid" block and OP ref level. #local lo_W_X = un4_building_mid_lo_X + un4_storey_1_W_wall_thk; #local hi_W_X = un4_building_upp_hi_X - un4_storey_1_M_wall_thk; #local lo_E_X = un4_building_upp_hi_X; #local hi_E_X = un4_building_mid_hi_X - un4_storey_1_E_wall_thk; #local lo_Y = un4_building_lo_Y + un4_storey_1_S_wall_thk; #local hi_Y = un4_building_hi_Y - un4_storey_1_N_wall_thk; #local lo_Z = un4_storey_1_lo_Z; #local hi_Z = un4_storey_1_hi_Z; union{ box{ < lo_W_X, lo_Y, lo_Z > - epsv, < hi_W_X, hi_Y, hi_Z > + epsv } box{ < lo_E_X, lo_Y, lo_Z > - epsv, < hi_E_X, hi_Y, hi_Z > + epsv } } #end #macro un4_storey_1_skinless_massive() // Storey 1 solid, not including its outer walls and // the ceiling slab, but including the floor slab // and the extension of the "upp" east wall. // The top surface and all lateral surfaces are // shaved by {eps}. All inferior faces are bloated // by {2*eps}. #local lo_X = un4_building_mid_lo_X + un4_storey_1_W_wall_thk; // Min X of storey minus walls. #local hi_X = un4_building_mid_hi_X - un4_storey_1_E_wall_thk; // Max X of storey minus walls. #local lo_Y = un4_building_lo_Y + un4_storey_1_S_wall_thk; // Max Y of storey minus walls. #local hi_Y = un4_building_hi_Y - un4_storey_1_N_wall_thk; // Max Y of storey minus walls. #local lo_Z = un4_storey_0_hi_Z; // Min Z of storey including floor slab. #local hi_Z = un4_storey_1_hi_Z; // Max Z of storey minus ceiling slab. box{ < lo_X+eps, lo_Y+eps, lo_Z-2*eps >, < hi_X-eps, hi_Y-eps, hi_Z-eps > } #end #macro un4_storey_1_rooms() // Origin at building SW corner of "mid" block and OP ref level. // Excavator for rooms in storey 1, excluding drywell cavity and // surge-pipe tunnels. #local lo_W_X = un4_building_mid_lo_X + un4_storey_1_W_wall_thk; #local hi_W_X = un4_building_upp_hi_X - un4_storey_1_M_wall_thk; #local lo_E_X = un4_building_upp_hi_X; #local hi_E_X = un4_building_mid_hi_X - un4_storey_1_E_wall_thk; #local lo_Y = un4_building_lo_Y + un4_storey_1_S_wall_thk; #local hi_Y = un4_building_hi_Y - un4_storey_1_N_wall_thk; #local lo_Z = un4_storey_1_lo_Z; #local hi_Z = un4_storey_1_hi_Z; difference{ object{ un4_storey_1_basic_room() } object{ un4_storey_1_pillars_and_beams() } object{ un4_drywell_enclosure_massive() translate un4_reactor_axis } bounded_by{ box{ < lo_W_X, lo_Y, lo_Z > - 3*epsv, < hi_E_X, hi_Y, hi_Z > + 3*epsv } } } #end #macro un4_storey_2_basic_room() // Excavator for general space in storey 2. // Leaves only outer walls and the continuation of the // east wall of the "upp" block. // Origin at building SW corner of "mid" block and OP ref level. #local lo_W_X = un4_building_mid_lo_X + un4_storey_2_W_wall_thk; #local hi_W_X = un4_building_upp_hi_X - un4_storey_2_M_wall_thk; #local lo_E_X = un4_building_upp_hi_X; #local hi_E_X = un4_building_mid_hi_X - un4_storey_2_E_wall_thk; #local lo_Y = un4_building_lo_Y + un4_storey_2_S_wall_thk; #local hi_Y = un4_building_hi_Y - un4_storey_2_N_wall_thk; #local lo_Z = un4_storey_2_lo_Z; // Nominal floor Z. #local hi_Z = un4_storey_2_hi_Z; // Nominal ceiling Z. union{ box{ < lo_W_X, lo_Y, lo_Z > - epsv, < hi_W_X, hi_Y, hi_Z > + epsv } box{ < lo_E_X, lo_Y, lo_Z > - epsv, < hi_E_X, hi_Y, hi_Z > + epsv } } #end #macro un4_storey_2_skinless_massive() // Storey 2 solid, not including its outer walls and // the ceiling slab, but including the floor slab // and the extension of the "upp" east wall. // The top surface and all lateral surfaces are // shaved by {eps}. All inferior faces are bloated // by {2*eps}. #local lo_X = un4_building_mid_lo_X + un4_storey_2_W_wall_thk; // Min X of storey minus walls. #local hi_X = un4_building_mid_hi_X - un4_storey_2_E_wall_thk; // Max X of storey minus walls. #local lo_Y = un4_building_lo_Y + un4_storey_2_S_wall_thk; // Max Y of storey minus walls. #local hi_Y = un4_building_hi_Y - un4_storey_2_N_wall_thk; // Max Y of storey minus walls. #local lo_Z = un4_storey_1_hi_Z; // Min Z of storey including floor slab. #local hi_Z = un4_storey_2_hi_Z; // Max Z of storey minus ceiling slab. box{ < lo_X+eps, lo_Y+eps, lo_Z-2*eps >, < hi_X-eps, hi_Y-eps, hi_Z-eps > } #end #macro un4_storey_2_rooms() // Excavator for rooms in storey 2, excluding drywell/torus cavity. // Origin at building SW corner of "mid" block and OP ref level. #local lo_W_X = un4_building_mid_lo_X + un4_storey_2_W_wall_thk; #local hi_W_X = un4_building_upp_hi_X - un4_storey_2_M_wall_thk; #local lo_E_X = un4_building_upp_hi_X; #local hi_E_X = un4_building_mid_hi_X - un4_storey_2_E_wall_thk; #local lo_Y = un4_building_lo_Y + un4_storey_2_S_wall_thk; #local hi_Y = un4_building_hi_Y - un4_storey_2_N_wall_thk; #local lo_Z = un4_storey_2_lo_Z; // Nominal floor Z. #local hi_Z = un4_storey_2_hi_Z; // Nominal ceiling Z. difference{ object{ un4_storey_2_basic_room() } object{ un4_storey_2_pillars_and_beams() } object{ un4_drywell_enclosure_massive() translate un4_reactor_axis } object{ un4_pools_massive() } bounded_by{ box{ < lo_W_X, lo_Y, lo_Z > - 3*epsv, < hi_E_X, hi_Y, hi_Z > + 3*epsv } } } #end #macro un4_storey_3_basic_room() // Excavator for general space in storey 3. // Leaves only outer walls. // Origin at building SW corner of "mid" block and OP ref level. #local lo_X = un4_building_upp_lo_X + un4_storey_3_W_wall_thk; #local hi_X = un4_building_upp_hi_X - un4_storey_3_E_wall_thk; #local lo_Y = un4_building_lo_Y + un4_storey_3_S_wall_thk; #local hi_Y = un4_building_hi_Y - un4_storey_3_N_wall_thk; #local lo_Z = un4_storey_3_lo_Z; // Nominal floor Z. #local hi_Z = un4_storey_3_hi_Z; // Nominal ceiling Z. box{ < lo_X, lo_Y, lo_Z > - epsv, < hi_X, hi_Y, hi_Z > + epsv } #end #macro un4_storey_3_skinless_massive() // Storey 3 solid, not including its outer walls // and the ceiling slab, but including the floor slab: // The top surface and all lateral surfaces are // shaved by {eps}. All inferior faces are bloated // by {2*eps}. #local lo_X = un4_building_upp_lo_X + un4_storey_3_W_wall_thk; // Min X of storey minus walls. #local hi_X = un4_building_upp_hi_X - un4_storey_3_E_wall_thk; // Max X of storey minus walls. #local lo_Y = un4_building_lo_Y + un4_storey_3_S_wall_thk; // Max Y of storey minus walls. #local hi_Y = un4_building_hi_Y - un4_storey_3_N_wall_thk; // Max Y of storey minus walls. #local lo_Z = un4_storey_2_hi_Z; // Min Z of storey including floor slab. #local hi_Z = un4_storey_3_hi_Z; // Max Z of storey minus ceiling slab. box{ < lo_X+eps, lo_Y+eps, lo_Z-2*eps >, < hi_X-eps, hi_Y-eps, hi_Z-eps > } #end #macro un4_storey_3_rooms() // Excavator for rooms in storey 3, excluding pool and reactor cavities. // Origin at building SW corner of "mid" block and OP ref level. #local lo_X = un4_building_upp_lo_X + un4_storey_3_W_wall_thk; #local hi_X = un4_building_upp_hi_X - un4_storey_3_E_wall_thk; #local lo_Y = un4_building_lo_Y + un4_storey_3_S_wall_thk; #local hi_Y = un4_building_hi_Y - un4_storey_3_N_wall_thk; #local lo_Z = un4_storey_3_lo_Z; // Nominal floor Z. #local hi_Z = un4_storey_3_hi_Z; // Nominal ceiling Z. difference{ object{ un4_storey_3_basic_room() } object{ un4_drywell_enclosure_massive() translate un4_reactor_axis } object{ un4_shroud_enclosure_massive() translate un4_reactor_axis } object{ un4_storey_3_pillars_and_beams() } object{ un4_pools_massive() } bounded_by{ box{ < lo_X, lo_Y, lo_Z > - 3*epsv, < hi_X, hi_Y, hi_Z > + 3*epsv } } } #end #macro un4_storey_4_basic_room() // Excavator for general space in storey 4. // Leaves only outer walls. // Origin at building SW corner of "mid" block and OP ref level. #local lo_X = un4_building_upp_lo_X + un4_storey_4_W_wall_thk; #local hi_X = un4_building_upp_hi_X - un4_storey_4_E_wall_thk; #local lo_Y = un4_building_lo_Y + un4_storey_4_S_wall_thk; #local hi_Y = un4_building_hi_Y - un4_storey_4_N_wall_thk; #local lo_Z = un4_storey_4_lo_Z; // Nominal floor Z. #local hi_Z = un4_storey_4_hi_Z; // Nominal ceiling Z. box{ < lo_X, lo_Y, lo_Z > - epsv, < hi_X, hi_Y, hi_Z > + epsv } #end #macro un4_storey_4_skinless_massive() // Storey 4 solid, not including its outer walls // and the ceiling slab, but including the floor slab: // The top surface and all lateral surfaces are // shaved by {eps}. All inferior faces are bloated // by {2*eps}. // // Origin at SW corner of "mid" block, OP level. #local lo_X = un4_building_upp_lo_X + un4_storey_4_W_wall_thk; // Min X of storey minus walls. #local hi_X = un4_building_upp_hi_X - un4_storey_4_E_wall_thk; // Max X of storey minus walls. #local lo_Y = un4_building_lo_Y + un4_storey_4_S_wall_thk; // Max Y of storey minus walls. #local hi_Y = un4_building_hi_Y - un4_storey_4_N_wall_thk; // Max Y of storey minus walls. #local lo_Z = un4_storey_3_hi_Z; // Min Z of storey including floor slab. #local hi_Z = un4_storey_4_hi_Z; // Max Z of storey minus ceiling slab. box{ < lo_X+eps, lo_Y+eps, lo_Z-2*eps >, < hi_X-eps, hi_Y-eps, hi_Z-eps > } #end #macro un4_storey_4_rooms() // Excavator for rooms in storey 4, except cavities of reactor and pools. // Origin at building SW corner of "mid" block and OP ref level. #local lo_X = un4_building_upp_lo_X + un4_storey_4_W_wall_thk; #local hi_X = un4_building_upp_hi_X - un4_storey_4_E_wall_thk; #local lo_Y = un4_building_lo_Y + un4_storey_4_S_wall_thk; #local hi_Y = un4_building_hi_Y - un4_storey_4_N_wall_thk; #local lo_Z = un4_storey_4_lo_Z; // Nominal floor Z. #local hi_Z = un4_storey_4_hi_Z; // Nominal ceiling Z. difference{ object{ un4_storey_4_basic_room() } object{ un4_storey_4_pillars_and_beams() } 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 #macro un4_storey_5_basic_room() // Excavator for the service floor space. // Leaves only the outer concrete shell, without pillars or beams. // Origin at building SW corner of "mid" block and OP ref level. #local lo_X = un4_building_upp_lo_X + un4_storey_5_W_wall_thk; #local hi_X = un4_building_upp_hi_X - un4_storey_5_E_wall_thk; #local lo_Y = un4_building_lo_Y + un4_storey_5_S_wall_thk; #local hi_Y = un4_building_hi_Y - un4_storey_5_N_wall_thk; #local lo_Z = un4_storey_5_lo_Z; // Nominal floor Z. #local hi_Z = un4_storey_5_hi_Z; // Nominal ceiling Z. // !!! Should apply the roof tilt box{ < lo_X, lo_Y, lo_Z > - epsv, < hi_X, hi_Y, hi_Z > + epsv } #end #macro un4_storey_5_skinless_massive() // Storey 5 solid, not including its outer walls // and the ceiling slab, but including the floor slab: // The top surface and all lateral surfaces are // shaved by {eps}. All inferior faces are bloated // by {2*eps}. // // Origin at SW corner of "mid" block, OP level. #local lo_X = un4_building_upp_lo_X + un4_storey_5_W_wall_thk; // Min X of storey minus walls. #local hi_X = un4_building_upp_hi_X - un4_storey_5_E_wall_thk; // Max X of storey minus walls. #local lo_Y = un4_building_lo_Y + un4_storey_5_S_wall_thk; // Max Y of storey minus walls. #local hi_Y = un4_building_hi_Y - un4_storey_5_N_wall_thk; // Max Y of storey minus walls. #local lo_Z = un4_storey_4_hi_Z; // Min Z of storey including floor slab. #local hi_Z = un4_storey_5_hi_Z; // Max Z of storey minus ceiling slab. box{ < lo_X+eps, lo_Y+eps, lo_Z-2*eps >, < hi_X-eps, hi_Y-eps, hi_Z-eps > } #end #macro un4_storey_5_rooms() // Excavator for the service floor space. // Leaves only the outer concrete shell, pillars and beams. // Origin at building SW corner of "mid" block and OP ref level. #local lo_X = un4_building_upp_lo_X + un4_storey_5_W_wall_thk; #local hi_X = un4_building_upp_hi_X - un4_storey_5_E_wall_thk; #local lo_Y = un4_building_lo_Y + un4_storey_5_S_wall_thk; #local hi_Y = un4_building_hi_Y - un4_storey_5_N_wall_thk; #local lo_Z = un4_storey_5_lo_Z; // Nominal floor Z. #local hi_Z = un4_storey_5_hi_Z; // Nominal ceiling Z. // !!! Should apply the roof tilt difference{ object{ un4_storey_5_basic_room() } object{ un4_storey_5_pillars_and_beams() } } #end #macro un4_storey_5_ceiling_lights(lux) #local NX = 2; #local NY = 3; #local lo_X = un4_building_upp_lo_X; #local hi_X = un4_building_upp_hi_X; #local lo_Y = un4_building_lo_Y; #local hi_Y = un4_building_hi_Y; #local md_Z = un4_storey_5_lights_Z; #local lo_Z = un4_storey_5_lo_Z; #local dX = (hi_X - lo_X)/NX; #local dY = (hi_Y - lo_Y)/NY; union{ #local kX = 0; #while (kX < NX) #local kY = 0; #while (kY < NY) #local lamp_pos = < lo_X + (kX+0.5)*dX, lo_Y + (kY+0.5)*dY, md_Z >; light_source{ lamp_pos color rgb lux/(NX*NY)*< 1.000, 0.980, 0.950 > // fade_distance (md_Z - lo_Z) // fade_power 2 } debug_point("lamp_pos", lamp_pos) #local kY = kY + 1; #end #local kX = kX + 1; #end } #end #macro un4_hvac_storey_rooms() // Origin at building SW corner of "mid" block and OP ref level. #local lo_X = un4_building_upp_hi_X + un4_hvac_storey_W_wall_thk; #local hi_X = un4_building_base_size.x - un4_hvac_storey_E_wall_thk; #local lo_Y = un4_building_lo_Y + un4_hvac_storey_S_wall_thk; #local hi_Y = un4_building_base_size.y - un4_hvac_storey_N_wall_thk; #local lo_Z = un4_hvac_storey_lo_Z; #local hi_Z = un4_hvac_storey_hi_Z; box{ < lo_X, lo_Y, lo_Z > - epsv, < hi_X, hi_Y, hi_Z > + epsv } #end #macro un4_mystery_hole_frame() // Two neon circles showing location of mysterious // pre-explosion "hole" on #4 east wall. // The circles show the position and outline of the // "Mickey Mouse ears". #local aX = un4_building_upp_hi_X + 0.050; #local aY = un4_building_lo_Y + 2.750; #local aZ = un4_building_mid_hi_Z + 7.000; #local bX = un4_building_upp_hi_X + 0.050; #local bY = un4_building_lo_Y + 6.000; #local bZ = un4_building_mid_hi_Z + 6.000; #local R = 0.800; #local r = 0.075; union{ torus{ R,r rotate 90*z translate < aX, aY, aZ > } torus{ R,r rotate 90*z translate < bX, bY, bZ > } texture{ tx_phosphor_orange } } #end #macro un4_roof_storey_rooms() // Roof terrace excavator. // Leaves only the outer concrete shell. // Origin at building SW corner of "mid" block and OP ref level. #local lo_X = un4_building_upp_lo_X + un4_roof_storey_W_wall_thk; #local hi_X = un4_building_upp_hi_X - un4_roof_storey_E_wall_thk; #local lo_Y = un4_building_lo_Y + un4_roof_storey_S_wall_thk; #local hi_Y = un4_building_hi_Y - un4_roof_storey_N_wall_thk; #local lo_Z = un4_roof_storey_lo_Z; // Nominal floor Z. #local hi_Z = lo_Z + 5.000; // Should be enough. // !!! Should apply the roof tilt box{ < lo_X, lo_Y, lo_Z > - epsv, < hi_X, hi_Y, hi_Z > + epsv } #end #macro un4_midroof_storey_rooms() // Midblock roof terrace excavator. // Leaves only the outer concrete shell. // Origin at building SW corner of "mid" block and OP ref level. #local lo_X = un4_building_upp_hi_X + un4_midroof_storey_W_wall_thk; #local hi_X = un4_building_mid_hi_X - un4_midroof_storey_E_wall_thk; #local lo_Y = un4_building_lo_Y + un4_midroof_storey_S_wall_thk; #local hi_Y = un4_building_hi_Y - un4_midroof_storey_N_wall_thk; #local lo_Z = un4_midroof_storey_lo_Z; // Nominal floor Z. #local hi_Z = lo_Z + 5.000; // Should be enough. // !!! Should apply the roof tilt box{ < lo_X, lo_Y, lo_Z > - epsv, < hi_X, hi_Y, hi_Z > + epsv } #end // LANDSCAPE #macro un4_ground(C) #local und_lo_Y = un4_building_lo_Y; // Min Y of all three boxes. #local und_hi_Y = un4_building_hi_Y; // Max Y of all three boxes. #local und_lo_X = un4_building_und_lo_X; // Min X of lower block. #local und_hi_X = un4_building_und_hi_X; // Max X of lower block. #local und_lo_Z = un4_building_lo_Z; // Z of bottom of basement concrete floor rOP. #local und_hi_Z = un4_building_hi_Z; // Z of top of basement concrete floor rOP. #local ground_Z = un4_ground_Z; // Z of external ground rOP. #local W = 10.000; // Amount of ground around building. #local D = 4.000; // Depth of ground below building. #local bs_lo_corner = < und_lo_X, und_lo_Y, und_lo_Z >; #local bs_hi_corner = < und_hi_X, und_hi_Y, und_hi_Z >; #local gr_lo_corner = bs_lo_corner - ; #local gr_hi_corner = < bs_hi_corner.x + W, bs_hi_corner.y + W, un4_ground_Z > ; intersection{ object{ C } difference{ box{ gr_lo_corner + epsv, gr_hi_corner - epsv } box{ bs_lo_corner - epsv, bs_hi_corner + epsv } } texture{ tx_dirt } } #end // STANDARD CUTTERS #macro un4_standard_cutter(cut,cpos) // Cutter of type {cut} at position {cpos} relative to origin. #if (cut = 0) #local CR = object{ cutter_keep_all() } #end #if (cut = 1) #local CR = object{ cutter_EW_slice() } #end #if (cut = 2) #local CR = object{ cutter_NS_slice() } #end #if (cut = 3) #local CR = object{ cutter_not_SE() } #end #if (cut = 4) #local CR = object{ cutter_not_Z() } #end #if (cut = 5) #local CR = object{ cutter_hor_slice() } #end #if (cut = 6) #local CR = object{ cutter_not_SEZ() } #end object{ CR translate cpos } #end #macro un4_standard_building_cutter(cut,cpos) // Cutter of type {cut} displaced by position {cpos}, // suitable for the {CB} argument of {un4_whole}. // Positioned relative to building's core axis, OP level. #local C = object{ un4_standard_cutter(cut,cpos) } object{ C translate un4_reactor_axis } #end #macro un4_standard_drywell_cutter(cut,cpos) // Cutter of type {cut} displaced by position {cpos}, // suitable for the {CD} argument of {un4_whole}. // Positioned relative to X=0, Y=0, Z=(RVP height/2). #local C = object{ un4_standard_cutter(cut,cpos) } object{ C translate un4_drywell_sphere_ctr_Z*z } #end #macro un4_standard_reactor_cutter(cut,cpos) // Cutter of type {cut} displaced by position {cpos}, // suitable for the {CR} argument of {un4_whole}. // Positioned relative to to X=0, Y=0, Z=(RVP height/2). #local C = object{ un4_standard_cutter(cut,cpos) } object{ C translate 0.5*un4_rpv_body_height*z } #end