// Last edited on 2011-04-23 03:44:53 by stolfi // Pressure vessel of Fukushima Daiichi Unit 1 #macro un1_pressure_vessel(CV,CF,cw,fu,hd,bd) // Reactor pressure vessel. // Center of bottom cap is at origin. // {CV} is cutter for vessel (rel vessel center). // {CF} is cutter for core (rel fuel center). // {cw} is the core water level. // If {fu=0}, the fuel is omitted. // If {hd=0}, the head is omitted. // If {bd=0}, the body and bottom cap are omitted. #local H = un1_rpv_body_height; // Length of cylindrical part of RPV. union{ intersection{ object{ CV translate 0.5*H*z } union{ #if (hd > 0) object{ un1_pressure_vessel_cap() translate H*z } #end #if (bd > 0) object{ un1_pressure_vessel_body() } #end } texture{ tx_steel } } #if (fu > 0) object{ un1_reactor_fuel(CF) translate un1_reactor_fuel_Z*z } #end } #end #macro un1_pressure_vessel_body() // Cylindrical part of RPV, with flanges. // Bottom center at origin. #local T = un1_rpv_thk; // Thickness of RPV wall. #local CH = un1_rpv_body_height; // Length of cylindrical part of RPV. #local CR = un1_rpv_body_rad; // Outer radius of RPV cylinder. #local FT = un1_rpv_flange_thk; // Thickness of RPV flanges. #local FR = un1_rpv_flange_rad; // Extra radius of RPV flanges. object{ generic_flanged_capped_cylinder(CH,CR,CR,T,FR,FT,1,0) } #end #macro un1_pressure_vessel_cap() // Spherical part on top of RPV, with flanges. // Center is at origin, cap above it. #local R = un1_rpv_body_rad; // Outer radius of RPV. #local T = un1_rpv_thk; // Thickness of RPV wall. #local FT = un1_rpv_flange_thk; // Thickness of RPV flanges. #local FR = un1_rpv_flange_rad; // Extra radius of RPV flanges. #local cap_ctr = < 0, 0, 0 >; #local f_bot_ctr = cap_ctr; #local f_top_ctr = cap_ctr + FT*z; intersection{ difference{ union{ cylinder{ f_bot_ctr, f_top_ctr - eps*z, R + FR - eps } sphere{ cap_ctr, R - eps } } sphere{ cap_ctr, R - T + eps } } cylinder{ cap_ctr + eps*z, cap_ctr + R*z, R + FR } bounded_by{ cylinder{ cap_ctr, cap_ctr + R*z, R + FR } } texture{ tx_steel } } #end #macro un1_reactor_fuel(C) // The fuel pack inside the reactor. // Centered on Z axis with origin at bottom. #local H = un1_reactor_fuel_height; #local R = un1_reactor_fuel_rad; intersection{ object{ C translate 0.5*H*z } cylinder{ (0+eps)*z, (H-eps)*z, R-eps } texture{ tx_radio_blue } } #end