A level set method for structural topology optimization
- 格式:pdf
- 大小:320.59 KB
- 文档页数:20
点云数据转换成实体模型通过基于点的立体像素化立体像素PointCloudDataConversionintoSolidModelsviaPoint-BasedVoxelization1 2 3 4Tommy Hinks ; Hamish Carr ; Linh Truong-Hong ; and Debra F. Laefer, M.ASCEAbstract:Automatedconversionofpointclouddatafromlaserscanninginto formatsappropriateforstructuralengineeringholdsgreatprom- iseforexploitingincreasinglyavailableaeriallyandterrestriallybase dpixelizeddataforawiderangeofsurveying-relatedapplicationsfrom environmental modeling to disaster management. This paper introduces a point-based voxelization method to automatically transform pointclouddataintosolidmodelsforcomputationalmodeling.Thefundamentalvi abilityofthetechniqueisvisuallydemonstratedforbothaerial andterrestrialdata.Foraerialandterrestrialdata,thiswasachievedinl essthan30sfordatasetsupto650,000points.Inallcases,thesolid models converged without any user intervention when processed in a commercial ?nite-element method program. DOI: 10.1061/ASCESU.1943-5428.0000097 2013 American Society of Civil Engineers.CE Database subject headings: Data processing; Surveys; Finite element method; Information management.Author keywords: Terrestrial; Aerial; Laser scanning; LiDAR; Voxelization; Computational modeling; Solid models; Finite element.Introductionexist.Thispaperlaysthegroundworkforkeyadvancementinsucha pipeline. The procedure proposed herein to reconstruct buildingLaser scanning has achieved great prominence within the civil en- facadesfrompointcloud,whichisafundamentalstepforgenerating gineering community in recent years for topics as divergent as city-scale computational models.coastline monitoring Olsen et al. 2009, 2011, airport layout op- timization Parrish and Nowak 2009, and ground-displacementidenti?cation for water-system risk assessment Stewart et al.FacadeReconstruction2009. Additionally, there has been strong motivation to obtainfurther functionality from laser scanning and other remote-sensing Inrecentyears,developmentsinlaser-scanningtechnologyand?ight-data, including three-dimensional 3D volume estimation forpath planning have allowed aerial laser scanning ALS to acquire mining Mukherji 2012, road documentation Dong et al. 2007,pointclouddataquicklyandaccuratelyatacityscale,therebyhaving structuralidenti?cationShanandLee2005;Zhangetal.2012,and thepotentialforreconstructing3Dbuildingsurfacesacrossanentire emergency planning Laefer and Pradhan 2006. Furthermore,city in nearly real time. A number of approaches based on semi- computational responses of city-scale building groups are increas- automaticLangandForstner1996andautomaticHenricssonetal. inglyindemandforheightenedurbanization,disastermanagement,1996techniqueshavebeenproposedtoreconstructbuildingmodelsand microclimate modeling, but input data are typically too ex- from such data sets, but automatically extracting highly detailed, pensive as a result of the need for manual surveying. Additionally, accurate,andcomplexbuildingsstillremainsachallengeHaalaandcurrent software tools for transforming remote-sensing data into Kada 2010. The semiautomatic procedures need human operator computationalmodelshaveoneormoreofthefollowingproblems: intelligence.TheautomaticvisualmodelingofurbanareasfromALS alowdegreeofreliability,aninabilitytocapturepotentiallycritical data tends to extract sample points for an individual building by details,and/oraneedforahighdegreeofhumaninteraction.Todate, applying segmentation techniques and then reconstructing eacha seamless, automated, and robust transformation pipeline frombuilding individually. In such cases, vertical facade surfaces are notremote-sensing data into city-scale computational models does not portrayed in detail, and outlines may be of relatively low accuracy unless ground planes are integrated, which requires either a priori1 informationormanualintervention.Unfortunately,theeffectivenessDoctoralRecipient,SchoolofComputerScienceandInformatics,Univ.of engineering modeling often depends largely on the geometricCollege Dublin, Bel?eld, Dublin 4, Ireland. E-mail: ******************2accuracy and details of the building models?thus the currentSeniorLecturer,SchoolofComputing,FacultyofEngineering,Univ.ofmismatch.Leeds, Leeds LS2 9JT, U.K. E-mail: h.carr@//0>.3Post-doctoral Researcher, Urban Modelling Group, School of Civil, Presently, commercial products are generally semiautomatic StructuralandEnvironmentalEngineering,Univ.CollegeDublin,Bel?eld, Laefer et al. 2011, whereas in the computer graphics and photo- Dublin 4, Ireland. E-mail: linh.truonghong@gmailgrammetry communities, researchers have focused on automated4AssociateProfessor,LeadPI,UrbanModellingGroup,SchoolofCivil,surfacereconstructionfromdenseandregularsamplepointsHoppeStructuralandEnvironmentalEngineering,Univ.CollegeDublin,Bel?eld, 1994; Kazhdan et al. 2006. Unfortunately, ALS data are oftenDublin 4, Ireland corresponding author. E-mail: ******************* sparse and irregular, and may contain major occlusions on vertical Note.ThismanuscriptwassubmittedonNovember16,2011; approvedsurfaces owing to street- and self-shadowing Hinks et al. 2009.on September 10, 2012; published online on September 13, 2012. Discus- Dedicated urban modeling surface-reconstruction approachession period open until October 1, 2013; separate discussions must be generallyusethemajorbuildingplanesChenandChen2007andsubmitted for individual papers. This paper is part of the Journal ofcan be described as either model-driven or data-driven. Model-Surveying Engineering, Vol. 139, No. 2, May 1, 2013ASCE, ISSN0733-9453/2013/2-72?83/$25.00. driven techniques use a ?xed set of geometric primitives that are72 / JOURNALOFSURVEYINGENGINEERING?ASCE / MAY2013J. Surv. Eng. 2013.139:72-83.Downloaded from by East China Inst of Tech on 04/13/13.Copyright ASCE. For personal use only; all rights reserved.Fig. 1. Work?ow of the proposed approach: *Collection and preparation of LiDAR data involve multiple steps outside the scope of this paper’s scienti?ccontribution;thesegenerallyincludeplanning,collection,re gistration,and?ltering;seeTruong-Hong2011andHinks2011forfurther detailsttedtothepointdata.Suchtechniquescanbeeffectivewhenadataset is sparse because the ?tting of geometric primitives does not require complete data. In contrast, data-driven techniques derive surfaces directly from the point data and are capable of modeling arbitrarilyshapedbuildings.Generally,data-drivenapproachesaremore?exiblethanmodel-drivenapproaches,butareoftensensitiveto noise in the input data.For strictly visual representation, model-driven approachescanbeeffective.Forexample,Haalaetal.1998 proposed four dif-ferent primitives and their combinations to automatically derive 3D building geometry of houses from ALS and existing ground planes.Similarly, Maas and Vosselman 1999 introduced an invariantmoment-basedalgorithmfortheparametersofastandardgabled-roofhouse type that allowed for modeling asymmetric elements such as dormers. However, these efforts assume homogeneous point dis-Fig. 2. Octree representationtributions, which is unrealistic. You et al. 2003 also adapted a set of geometric primitives and ?tting strategies to model complex buildings with irregular shapes, but the approach required user interventionandgeneratedonlylimitedwalldetails.Huetal.2004used a combination of linear and nonlinear ?tting primitives to SolidModelingreconstructacomplexbuilding,inwhichaerialimagerywasusedtore?ne the models. To generate building models directly from point cloud data forIncontrast,manydata-driventechniquesoperatingonALSdata engineering simulations [e.g., FEM], there are three dominant reconstruct roof shapes directly from sample points of roof planes. methods:1constructivesolidgeometryCSG,whereobjectsareSubsequently, the remainder of the building is simply extruded represented using Boolean combinations of simpler objects; 2 to the ground level from the roof-shape outlines. Vosselman and boundary representations B-reps, where object surfaces are rep- Dijkman2001usedaHoughtransformforextractionofplanefaces resentedeitherexplicitly orimplicitly;and3spatialsubdivision roofplanesfromtheALSdata,andthen3Dbuildingmodelswere representations,wherean objectdomain is decomposed intocells reconstructed by combining ground planes and the detected roof withsimple topologic and geometric structure, such as regular planes.Hofmannetal.2003introducedamethodtoextractplanar gridsandoctreesGoldman2009;HoffmannandRossignac1996;roof faces by analyzing triangle mesh slopes and orientations from there are many extensive treatises available for in-depth consid-a triangular irregular network structure generated from ALS data. eration of this topic B?hm et al. 1984; Rossignac and Requicha More recently, Dorninger and Pfeifer 2008 used an a-shape ap- 1984, 1999.proach to determine a roof outline from point clouds of the roof Generating solid models automatically from point cloud data projectedontoahorizontalplane.Also,ZhouandNeumann2010 is particularly important because the cost of manually creating created impressive buildings for a large urban area by using a vol- solid models of existing objects is far greater than the associated umetric modeling approach in which roof planes were determined hardware,software,andtrainingcosts.Assuch,spatialsubdivision based on a normal vector obtained from analysis of grid cells be- representations are used extensively for creating solid models of longingtorooflayers.However,thesemodelsarealsoextrudedand buildings in which regular grids or octrees are employed to de- lack vertical-wall details. compose an entire object intononoverlapping 3D regions, com-Therefore, this paper presents an automated approach to con- monly referred to as voxels. Voxels are usually connected andverting point clouds of individual buildings into solid models for described a simple topologic and geometric structure. In grids, structural analysis by means of computational analysis in which avolumeissubdividedintosmallerregionsbyappropriateplanes thepointcloudthatweresemiautomaticallysegmentedfromLight parallel to the coordinate system axes,typically using aCartesian Detection and Ranging LiDAR data become the input Fig. 1. coordinate system. An initial voxel bounding all point data re-Notably, this proposed approach focuses on reconstructing solid cursively divides a volume into eight subvoxels, organized in modelsbyusingvoxelgridswiththecriticalparameteraseitherthe a hierarchical structure Samet 1989. Voxels may be labeled voxel size or the number of voxel grids; for more details on col- white,black,orgraybasedontheirpositionsFig.2.Blackvoxels lecting ALS and terrestrial laser scanning TLS data and on are completely inside the solid, whereas white voxels are com- segmenting point clouds, see Truong-Hong 2011andHinks pletelyoutside.Voxelswithbothblackandwhitechildrenaregray 2011. Hoffmann and Rossignac 1996.JOURNALOFSURVEYINGENGINEERING?ASCE / MAY2013 / 73J. Surv. Eng. 2013.139:72-83.Downloaded from by East China Inst of Tech on 04/13/13. Copyright ASCE. For personal use only; all rights reserved.Fig.3.Voxelgridspanningavolumeina3Dspaceboundedbyx ,x ,y ,y ,andz ,z ,whe reDx,Dy,andDzarevoxelsizes andmin min minN , N , and N are the number of voxels in each directionx y zIn an application of spatial subdivision for surface recon-struction,CurlessandLevoy1996presentedavolumetricmethodforintegratingrangeimagestoreconstruc tanobject’ssurfacebasedon acumulative weighted signed-distancefunction. Unfortunately,the approach is not suited for arbitrary objects. In related work, GuarnieriandPontin2005builtatriangulatedmeshofanobject’ssurfacebycombiningaconsensussurface[asproposedbyWheeleret al. 1998], an octree representation, and the marching-cubesalgorithm Lorensen and Cline 1987. This multifaceted algorithmFig. 4. Point-based voxelization avoids surface reconstruction and canreducetheeffectofthenoiseowingtosurfacesampling,sensoroperates directly on point datameasurements,andregistrationerrors.However,foroptimalresults,themethodrequiresmodi?cationofparametersthatdependheavilyon input-data characteristics such as the voxel size, the threshold value for the angle, and the distance between two consecutive neighbor-range viewpoints. z 2zminN? 1 ?3?zDzThevoxelhaseightlatticeverticesassociatedwithsixrectangular VoxelizationfacesFig.3.Eachinteriorvoxelhas26neighboringvoxels,witheight sharing a vertex,12 sharing an edge,and six sharing a face. Critical to octree/quadree representations for further processing is Conversely,anexteriororinteriorvoxelonahole’sboundaryoften voxelization. This term describes the conversion of any type of has only 17 neighboring voxels four sharing a vertex, eight geometric or volumetric object such as a curve, surface, solid, or sharinganedge,and?vesharingaface.Moreover,mostexisting computedtomographicdataintovolumetricdatastoredina3Darray voxelization techniques operate on surface representations ofof voxels Karabassi et al. 1999. Initially, a voxel grid divides objects, where a signi?cant part of the problem is to identifya bounded 3D region into a set of cells, which are referred to as throughwhichvoxelsthesurfacespass.Suchmethodsarereferredvoxels. The division is typically conducted in the axial directions to as surface-based voxelization Cohen-Or and Kaufman 1995of a Cartesian coordinate system. Before voxelization, three pairs [Fig.4a?c].Incontrast,thepoint-basedvoxelizationinthispaper ofcoordinatevalues??x , x , ?y , y , and ?z , z ? aremin min minoperates directly on the point data and does not require a derived createdalongthethreeaxesX, Y, and Zde?ningaglobalsystemsurface [Fig. 4a?c]. Point-based voxelization is conceptually Fig. 3. The basic idea of a voxelization algorithm is to examine much simpler than surface-based voxelization algorithms, and whethervoxelsbelongtotheobjectofinterestandtoassignavalue whereas the mechanisms are well known, they have not beenof 1 or 0,respectively Karabassi et al. 1999; a further description applied to generating solid modeling of buildings from LiDARof voxel grids is available in Cohen and Kaufman 1990.data.An initial voxel bounding all point cloud data in 3D Euclidean3Asmentionedearlier,eachvoxelisclassi?edasactiveorinactivespaceR is subdivided into subset voxels by grids along the x-, y-, corresponding to binary values based on the sample points within andz-coordinatesinaCartesiancoordinatesystem.Eachvoxelinthethat voxel [Eq. 4]subset is represented by an index v?i, j, k?, where i2?0; N 21 , xj2?0; N 21 , and k2?0; N 21 Fig. 3. With the dimensionsy zactive ifn$TnofindividualvoxelsDx, Dy, Dz,anumberofvoxelsN , N , Nx y zf n?4?valong each direction are given in Eqs. 1?3 inactive ifn,Tnwheretheargumentn5numberofpointsmapping to avoxel,andx 2xmin T 5user-speci?edthresholdvalue.Typically,T 51,whichmeansn nN? 1 ?1?xDxthat voxels containing at least one mapping point are classi?edasactiveandallothersasinactive.Moresophisticateddensity-basedy 2yminclassi?cation functions can be designed. An example is shown inN? 1 ?2?yDyFig. 5.74 / JOURNALOFSURVEYINGENGINEERING?ASCE / MAY2013J. Surv. Eng. 2013.139:72-83.Downloaded from by East China Inst of Tech on 04/13/13. Copyright ASCE. For personal use only; all rights reserved.Fig. 5. Voxelization model of front building of Trinity College, Dublin, Ireland, created by a voxel grid: a input data set of 245,000 ALS points;bvoxelizationmodelwithvoxelsizeDx5Dy5Dz50:25m;cvoxelclassi?cationwiththethresholdT51andvoxelizationmodelwithaboutn5,000 active voxels n is the largest number of points mapping to asingle voxelFig. 6. Solid model componentsProposedConversionofVoxelizedModelsintoSolidModelsTo reconstruct vertical surfaces of building models, a voxel grid is used to divide data points in a bounded 3D region into smallervoxels. Important facade features such as windows and doors are subsequently detected basedon a voxel’s characteristics, where an inactive voxel represents the inside of an opening. Consequently, building models are converted into an appropriate format for com- putational processing.Anobjectisde?nedbyitssurfaceboundary,whichthenmustbeFig. 7. Face orientation as dictated by the right-hand ruleconvertedintoanappropriatesolidrepresentationcompatiblewithcommercialcomputationalpackages.Althoughmanyschemesareavailable,B-repsarehereinadoptedbecauseoftheircompatibilitywith commercial structural-analysis software e.g., ANSYS soft- Keypointsarerepresentedbya3Dcoordinateofasingularpoint.ware Laefer et al. 2011. The proposed method de?nes both the An edge is de?ned as the connection between exactly two keygeometry and topology of an object by a set of nonoverlappingpoints;forexample,theedgee 5fP, Pgistheedgewithstartingij i jandendingpointP.Notably,edgeshaveanorientation;asfaces approximate the boundary of the solid model. This section pointPi jsuch, e 52eThus, the edges e and e would be ?ipped. EdgepresentsabriefdescriptionoftheB-repschemeimplementedintheij ji ij jiproposed approach; for more details, see Goldman 2009. Ge- ?ipping is important when de?ning an orientable face for dis-ometry is de?ned by key singular points, with each point rep- tinguishing the inside from the outside.resenting a speci?c location in space. Topology is de?ned by Similarly, faces represent surfaces of a solid model that areconnections between key points. When used together, they can connections between edges. The faces are further connected de?neasolidmodelFig.6.DatastructuresfordescribingB-reps to form volumes. A face is de?ned as a list of edgesoften capture the incidence relations between a face and its f5fe ,e ,.,e g that involve closed paths. A face01 12 ?n22??n21?bounding edges and an edge and its bounding vertices, whichconsistingofthreekeypointsisatriangle,whereasqu。
基于ANSYS的结构拓扑优化林丹益;李芳【摘要】针对拓扑优化技术在现实中的应用问题,将拓扑优化技术应用到自行车车架和多拱拱桥的最优化设计中.开展了各种拓扑优化方法的分析研究,建立了“以单元材料密度为设计变量,以结构的柔顺度最小化为目标函数,体积减少百分比为约束函数”的数学模型;通过采用商用有限元软件ANSYS中的拓扑优化设计模块对自行车车架和多拱拱桥进行了拓扑优化设计,优化结果表明所得拓扑结构清晰,并与实际的自行车车架和多拱拱桥非常相似.研究结果表明,该结构拓扑优化方法正确而有效,具有一定的工程应用前景.%In order to solve the application problems of topological optimization technology in reality, the bicycle frames and multiple arch bridge was investigated.After the analysis of all kinds of methods of topological optimizaiton, the mathematical model that unit material density as design variables, the minimum of structural compliance as the objective function, the volume reduction percentage as the constraint function was established. The topology optimization design module of the commercial finite element software ANSYS was used to the bicycle frame and multiple arch bridge for the topology optimization design.The topological structure is clear and they are very likely to the bicycle frame and multiple arch bridge in reality. The results indicate that the method is correct and effective, it has a certain engineering application prospect.【期刊名称】《机电工程》【年(卷),期】2012(029)008【总页数】5页(P898-901,915)【关键词】拓扑优化;ANSYS;自行车车架;多拱拱桥【作者】林丹益;李芳【作者单位】浙江工业大学机械工程学院,浙江杭州310014;浙江工业大学机械工程学院,浙江杭州310014【正文语种】中文【中图分类】TH112;U4840 引言连续体结构优化按照设计变量的类型和求解问题的难易程度可分为尺寸优化、形状优化和拓扑优化3个层次,分别对应于3个不同的产品设计阶段,即详细设计、基本设计和概念设计3个阶段。
基于BESO的多相材料拓扑优化摘要:多相材料拓扑优化是结构优化设计的一个研究热点。
相对于单一材料的拓扑,多材料拓扑可以在结构的性能带来非常可观的改进。
由此,本文在BESO法的基础上引入SIMP的多材料模型进行优化,并且讨论了在多相材料拓扑优化中结构优化和材料分布优化的先后顺序对结构的拓扑构型带来的影响。
关键词:BESO;多相材料;材料分布优化;结构优化中图分类号:TU12BESO-based topology optimization of multiphase materialsAbstract:Multi-phase material topology optimization is a hot research topic in optimal structural design. Compared with single material topology, multi-material topology can bring very considerable improvement in the performance of the structure. Thus, this paper introduces the SIMP multi-material model for optimization based on the BESO method, and discusses the influence of the sequence of structural optimization and material distribution optimization on the topological configuration of the structure in multiphase material topology optimization.Key words:BESO;Multiphase materials;Material distribution optimization;Structure optimization1引言拓扑优化作为一种有效而强大的优化设计方法,是通过在某一设计领域内满足规定的约束和边界条件最小化或最大化目标函数,得到最优拓扑构型的优化方法[1]。
Object and Types对象和类型WHAT'S IN THIS CHAPTER?本章内容:The differences between classes and structs 类和结构的区别Class members 类成员Passing values by value and by reference 按值和按引用传送参数Method overloading 方法重载Constructors and static constructors 构造函数和静态构造函数Read-only fields 只读字段Partial classes 部分类Static classes 静态类The object class, from which all other types and derived Object类,其他类型都从该类派生而来So far, you've been introduced to some of the building blocks of the C# language, including variables,data types, and program flow statements, and you have seen a few very short complete programs containing little more than the Main() method. What you haven't really seen yet is how to put all these together to form a longer, complete program. The key to this lies in working with classes ----- the subject of this chapter.Note that we cover inheritance and features related to inheritance in Chapter 4, "Inheritance."到目前为止,我们介绍了组成C#语言的主要模块,包括变量、数据类型和程序流语句,并简要介绍了一个只包含Main()方法的完整小例子。
FM GlobalProperty Loss Prevention Data Sheets2-2September2002Supersedes May1998Page1of20 INSTALLATION RULES FOR SUPPRESSION MODE AUTOMATIC SPRINKLERSTable of ContentsPage 1.0SCOPE (3)1.1Changes (3)2.0LOSS PREVENTION RECOMMENDATIONS (3)2.1Introduction (3)2.2Construction and Location (4)2.2.1Roof Construction (4)2.2.2Ceiling Slope (5)2.2.3Steel Protection (5)2.2.4Heat and Smoke Venting (5)2.2.5Suspended Ceilings (5)2.2.6Roof and Ceiling-Level Ventilation (5)2.2.7Draft Curtains (6)2.3Occupancy (7)2.3.1Storage Clearance (7)2.3.2Mezzanines,Walkways and Conveyors (7)2.3.2.1Solid Mezzanines (7)2.3.2.2Grated Mezzanines (7)2.3.2.3Walkways (7)2.3.2.4Conveyors (8)2.3.2.5Flue Spaces in Racks (8)2.4.Protection (9)2.4.1Sprinklers (9)2.4.2Temperature Rating (9)2.4.3Sprinkler System Types (9)2.4.4Clearance From Sprinklers to Ceiling (9)2.4.5Obstructions (10)2.4.5.1Solid Obstructions at Ceiling Level (10)2.4.5.2Open-Web Structural Members at Ceiling Level (11)2.4.5.3Obstructions Below Sprinklers (12)2.4.6Water Demand and Duration (13)2.4.7Sprinkler Spacing (14)2.4.8System Hydraulic Design (15)2.4.9Hose Connections (16)3.0SUPPORT FOR RECOMMENDATIONS (19)3.1Loss History (19)4.0REFERENCES (19)4.1FM Global (19)APPENDIX A GLOSSARY OF TERMS (19)APPENDIX B DOCUMENT REVISION HISTORY (20)List of FiguresFigure2.4.5.1.1Area where obstructions are not permitted (10)Figure2.4.5.1.2Alternative arrangement for obstructions no more than12in.(305mm)wide atceilings (11)Figure2.4.5.2Minimum allowable clearance for bar joists (12)©2002Factory Mutual Insurance Company.All rights reserved.No part of this document may be reproduced,stored in a retrieval system,or transmitted,in whole or in part,in any form or by any means,electronic,mechanical,photocopying,recording,or otherwise,without written permission of Factory Mutual Insurance Company.Figure2.4.5.3.1Obstructions below sprinklers no wider than2.0in.(51mm) (14)Figure2.4.5.3.2Obstructions below sprinklers no wider than1ft(305mm) (15)Figure2.4.5.3.3Obstructions below sprinklers wider than1ft(305mm)and no wider than2ft(610mm) (16)Figure2.4.5.3.4Flat,horizontal solid obstructions below sprinklers wider than2ft(610mm) (17)Figure2.4.5.3.5Obstructions below sprinklers wider than2ft(610mm)not flat or not solid (17)Figure2.4.5.3.6Round or rectangular obstructions below sprinklers<24.0in.(305mm)wide (18)Figure2.4.7.1Permissible sprinkler spacing extension (18)List of TablesTable1.Summary of Suppression Mode Sprinkler Installation Requirements (4)1.0SCOPEThis standard contains the installation requirements for suppression mode sprinklers,which include:•K14.0(K200),K16.8(K240),K22.4(K314)and K25.2(K360)pendent suppression mode sprinklers•K14.0(K200)upright suppression mode sprinklersThese sprinklers are intended for use in protecting solid-piled,palletized,and open-frame rack storage,as well as other storage configurations for which they have been specifically evaluated.They are not intended for use in protection of manufacturing or other non-storage occupancies.It is easy to assume that suppression mode sprinklers which can suppress a high-challenge storage fire will have no problem with‘‘less hazardous’’occupancies.But such a conclusion ignores the fact that sup-pression mode sprinklers were designed to achieve suppression of a very specific and limited range of fire scenarios,and have only been tested in those scenarios.Not only are suppression mode sprinklers not an economically practical means of protection for non-storage occupancies,there are many occupancies which do not lend themselves to suppression mode protection and simply cannot be properly protected by suppression mode sprinklers.Specific examples include flammable liquid operations,occupancies with shielded combustibles,etc.Suppression mode sprinkler technology offers a number of attractive advantages over the older control-mode sprinkler technology.Chief among these is the possible elimination of the requirement for in-rack sprin-klers in rack storage areas.Achieving these advantages requires a sprinkler technology vastly different from previous technologies,a technology,however,which has much less tolerance for deficiencies in design and installation than older technologies.If suppression mode sprinklers fail to suppress a fire,the consequences can be severe.Thus,this new technology demands a far higher level of attention to detail in sprinkler design, and–perhaps even more importantly–installation.Properly functional suppression mode sprinkler installations require that the unique requirements of this tech-nology be compatible with the facility they will protect.As a result,retrofitting of suppression mode sprin-klers in existing facilities,if possible at all,can be a costly and frustrating exercise.For new facilities,suppression mode sprinkler requirements must be incorporated into the design process from the earliest stages of planning.If the building design is completed before sprinkler design is begun,it can result in costly changes and delays.If construction starts before the sprinkler design is done,it is entirely possible that use of suppression mode sprinklers will be impossible.1.1ChangesIn addition to major organizational changes,this standard includes the following technical changes:•Discussion of suppression mode sprinklers other than K14.0(K200)pendent suppression mode sprinklers is incorporated.(K16.8(K240),K22.4(K314)and K25.2(K360)pendent suppression mode and K14.0 (K200)upright suppression mode).•Individual isolated obstructions are no longer permitted.•Discussion of obstructions has been significantly expanded.•Construction types are addressed in terms of performance requirements,not definitions.2.0LOSS PREVENTION RECOMMENDATIONS2.1IntroductionThe words requirements,must and shall in this data sheet mean that no deviation from installation require-ments is permitted.Table1summarizes the basic suppression mode sprinkler installation requirements.Table1.Summary of Suppression Mode Sprinkler Installation RequirementsType of storage Refer to occupancy data sheets for storage arrangements that can be protected. Commodity Refer to occupancy data sheets for commodities that can be protected. Maximum storage height,ft(m)Refer to occupancy data sheets.Maximum height of building,ft(m)Refer to occupancy data sheets.Roof construction Install suppression mode sprinklers in every bay or channel formed by solidstructural members at the ceiling,except when the solid structural membersextend no more than12in.(305mm)below the ceiling,and sprinklers arelocated below the bottom of the members.•Automatic roof vents require high-temperature rated,standard responseoperating mechanism.Melt-out roof vents not permitted.(See section2.2.4).•No exposed expanded plastic construction.Sprinklers Type:FM Approved(see Appendix A for definition)K14.0(K200),K16.8(K240),K22.4(K314),K25.2(K360)pendent and K14.0(K200)upright suppressionmode sprinklers with ordinary and intermediate temperature.Location:•K14.0(K200)upright and pendent,and K16.8(K240)Pendent:Centerline of thermal sensing element maximum of13in.(330mm)and minimum of4in.(102mm)below the ceiling,or from the deflector to theceiling a maximum of14in.(356mm)and a minimum of5in.(121mm).•K22.4(K314)and K25.2(K360)Pendent:Centerline of thermal sensing element maximum of18in.(457mm)and minimum of4in.(102mm)below the ceiling.Sprinkler System Type:Wet onlyHydraulic Design:Most remote12sprinklers flowing4sprinklers on3branchlines,with design discharge pressure as specified by occupancy data sheets.Spacing:Minimum8ft(2.4m)and maximum12ft(3.7m)between sprinklersor branch lines for buildings up to30ft(9.14m)high.For buildings higher than30ft(9.14m)up to45ft(12.2m),the maximum allowable spacing is10ft(3.05m).The maximum area to be covered by a sprinkler is100ft2(9.3m2)and theminimum is64ft2(5.8m2)(see section2.4.7)Hose streams Refer to occupancy data sheets.Water supply duration Refer to occupancy data sheets.2.2Construction and LocationPrompt sprinkler operation and unobstructed sprinkler discharge are critical to effective suppression mode sprinkler protection.Construction features have a significant effect on both of these critical factors.In all cases,the installation must meet the minimum distance requirements between the sprinkler and the ceiling above as specified in section2.4.4and the obstruction requirements of section2.4.5.2.2.1Roof Construction2.2.1.1Install suppression mode sprinklers in every bay or channel formed by solid structural members at the roof or ceiling.•Examples of construction types in which this is typically practical include smooth roof or floor decks sup-ported directly on beams,girders or trusses,or continuous smooth bays formed by wood,concrete or steel beams.•Examples of construction types in which this is typically not practical due to the requirement for sprin-klers in every bay or channel,and/or obstruction requirements include concrete tees,wood truss-joists,and closely spaced concrete beams.Exception:Sprinklers are not required in every bay or channel and spacing may be based on the maxi-mum allowable spacing as determined by the building height when the solid structural members extend no more than12in.(305mm)below the ceiling and sprinklers are located below the bottom of the members. Examples include metal buildings with z-purlins less than12in.(305mm)deep and concrete tee construction less than12in.(305mm)deep.Install suppression mode sprinklers based on the maximum allowable spacing as determined by the build-ing height where roofs or ceilings are supported by members whose webs are a minimum of70%open,or where there is a smooth monolithic ceiling having suitable uplift resistance as described in section2.2.5. Examples include roofs/ceilings supported by bar joists and open-web steel trusses and continuous suspended ceilings.2.2.2Ceiling Slope2.2.2.1Do not install suppression mode sprinklers beneath roofs or ceilings where the slope exceeds2in./ft (167mm/m,9.5°).Where roof/ceiling slope is in excess of2in./ft(167mm/m,9.5°),a sub-ceiling with proper slope may be installed above the storage with sprinklers installed below.Provide sprinkler protection in the concealed space if the contents or the construction in the concealed space or ceiling is combustible.(Refer to Data Sheet1-12,Ceilings.)2.2.3Steel ProtectionWhen suppression mode sprinkler systems are installed in accordance with this data sheet,fire protection is not needed for roof and column steel.2.2.4Heat and Smoke VentingIf a fire starts beneath an automatic heat/smoke vent and that vent operates before sprinklers do,the venting could result in a critical delay in sprinkler operation.Plastic skylights that are not designed as heat/smoke vents do not create this problem.2.2.4.1Do not install suppression mode sprinklers in buildings with automatic heat/smoke vents unless the vents use a high temperature-rated standard response operating mechanism.2.2.4.2Do not install suppression mode sprinklers in buildings with melt-out(drop-out)type vents.2.2.5Suspended CeilingsWhen the ceiling height is higher than that permitted in the applicable occupancy standard,suppression mode sprinklers can be installed beneath a suspended ceiling to reduce the ceiling height to an acceptable level. Suspended ceilings should extend to vertical floor-to-ceiling walls or partitions.If not,eliminate storage between the edge of the ceiling and the nearest sprinklers.Design suspended ceilings to withstand fire plume uplift velocity pressures of at least3lb/ft2(14.4kg/m2).Suit-able ceiling materials include3⁄8in.(10mm)plywood or gypsum board,corrugated or sheet steel,and fiber-glass or mineral tile.Fasten tiles securely to the supporting framework.Hold-down clips used to anchor ceiling tiles will suffice for securing the mineral tile.If the ceiling is hung from the existing roof framework, ensure the roof can withstand the additional dead load.2.2.6Roof and Ceiling-Level VentilationVentilation(both natural and powered)at the ceiling level can create problems similar to those caused by automatic heat and smoke vents.If a fire starts beneath a natural-draft vent,the vent can capture the fire plume,significantly delaying sprinkler operation.If air velocity at a sprinkler caused by a powered vent or air supply is too high,it can also result in a critical delay in sprinkler.•Examples of powered ventilation include exhaust fans,air conditioning/refrigeration supply and return vents, and grated return air inlets to roof-mounted mechanical equipment penthouses.•Examples of natural ventilation include turbine vents,vent stacks,and ridge vents.2.2.6.1Coordinate the location of sprinklers and the design of powered heating,ventilation and air condition-ing for buildings protected by suppression mode sprinklers so that the air velocity at sprinklers does not exceed5ft/sec(1.52m/sec).2.2.6.2If it is not possible to meet2.2.6.1,chose one of the following options to ensure proper operationof suppression mode sprinklers in buildings with ceiling-level ventilation:a)Sprinklers Beneath Vent OpeningsInstall suppression mode sprinklers of the same type used elsewhere in the building centered in vent open-ings having a maximum dimension of4.5ft(1.37m).This option does not apply to storage of commodi-ties greater in hazard than cartoned unexpanded plastic,such as uncartoned plastic,aerosols or rolled tissue in buildings higher than30ft(9.14m).b)SubceilingInstall a subceiling under the vent and install suppression mode sprinklers below the ceiling.Locate and size the subceiling so that the air velocity at sprinklers around the subceiling does not exceed5ft/sec(1.52m/sec).Maintaining air velocities at the required level may result in a large subceiling and the requiredvertical distances from the ceiling to the subceiling may be large.Design the subceiling to meet the requirements of section2.2.5.c)Heat/Flame DetectionInstall FM Approved line-type detection or flame detection designed to shut fans down in powered venti-lation systems or to close dampers in natural ventilation systems upon actuation.As the goal is to shut down fans before they can delay operation of the first sprinklers,shutting down fans or closing dampers by sensing water flow is not an option.Ordinary smoke detectors installed in ducts also respond too slowly to be effective for this application.Line-type detection will typically be the most cost-effective choice in most cases.The detector array should consist of parallel lines located under the vent opening within6in.(152mm)of the ceiling or vent plane.Space the parallel lines no more than15in.(381mm)apart to ensure that the hot gases are intercepted.The temperature set point should be165°F(74°C).Flame detection to stop fans or close dampers may be provided by four FM Approved flame detectors equally spaced on a10ft(3.05m)diameter circle around the vent opening.Install the detectors a minimum of5ft(1.52m)above the top of the storage.A FM Approved detector having an effective viewing cone of90°or greater is recommended.Follow the manufacturer’s installation guidelines.2.2.6.3Ridge Vents.The only practical way to protect ridge vents and other similar vents that remain open to the atmosphere is by providing sprinklers beneath them at roof level for vents no wider than4.5ft(1.37m), or by installing a subceiling with suppression mode sprinklers below as described above for wider vents. 2.2.7Draft CurtainsDraft curtains are often required by local codes,but if not properly arranged,these curtains can interfere with the proper distribution of sprinkler discharge.Draft curtains also are needed in some cases to separate areas protected by suppression mode sprinklers from areas protected by control-mode sprinklers.If a fire occurs in an area protected by control-mode sprin-klers near the boundary with suppression mode sprinklers,this can result in operation of suppression mode sprinklers away from the fire.Because suppression mode sprinklers discharge a relatively large amount of water,they may divert water from the control-mode sprinklers.2.2.7.1When draft curtains are required,center them between sprinklers or sprinkler branch lines.If they are not centered,provide additional sprinklers such that sprinklers on either side of the draft curtain are no far-ther from the curtain than one-half the allowable maximum sprinkler spacing for the building height.If sup-pression mode sprinklers protect the areas on both sides of the draft curtain,there is no need to maintain a clear aisle beneath the draft curtain.2.2.7.2Install draft curtains to separate areas protected by suppression mode sprinklers from areas pro-tected by control-mode sprinklers when the two areas have the same ceiling height or when they have dif-ferent heights and the suppression mode sprinklers are at the higher elevation.Extend the draft curtain at least2ft(0.61m)below the ceiling.Ensure the draft curtain is noncombustible and fits tightly against the underside of the roof.(Openings created by ribs in metal roof deck are not a con-cern,but openings created by channels between Z-purlins or other structural members should be filled.) Solid beams,girders or other structural features which meet the above criteria are equivalent to draft curtains. Draft curtains must be centered over clear aisles at least4ft(1.2m)wide.2.3Occupancy2.3.1Storage ClearanceMaintain storage a minimum of36in.(915mm)below sprinkler deflectors.2.3.2Mezzanines,Walkways and ConveyorsMezzanines,walkways and conveyors are often installed in warehouses protected by suppression mode sprinklers at the roof.Depending on the type,configuration and use,they can prevent water discharge from sprinklers reaching and suppressing a fire and may require installing additional sprinklers.2.3.2.1Solid MezzaninesTo prevent simultaneous operation of suppression mode sprinklers beneath and above solid mezzanines and to allow the water demand for sprinklers under the mezzanine to be independent of the water demand for sprinklers above,either provide a draft curtain around the perimeter of the mezzanine or keep all storage underneath the mezzanine inside the sprinklers located nearest the perimeter of the mezzanine.For mezzanines extending no more than15ft(4.6m)above floor level,install suppression mode sprinklers designed to supply four sprinklers at the pressure required for the type of sprinkler used,or quick response sprinklers designed for the hazard involved.For solid mezzanines extending more than15ft(4.6m)above floor level,install suppression mode sprinklers using the design criteria required for the storage height and type of sprinkler used.Control-mode sprinklers designed for the hazard involved may be used below a mezzanine more than15ft (4.6m)high only if a draft curtain is provided at the perimeter.2.3.2.2Grated MezzaninesIn order to be considered grated,the grating of a mezzanine must be least70%open.If the grating is less than70%open,then make the mezzanine solid(in order to allow sprinklers underneath it to operate promptly)and protect it as a solid mezzanine according to section2.3.2.1.If storage exists either above or below a grated mezzanine,but not both above and below,no additional sprinklers are needed under the mezzanine.If storage or storage structures above and below grated mezzanines are arranged to provide aisles that are vertically aligned above and below,treat the aisle portions of the mezzanines the same as walkways.(See section2.3.2.3)If storage or storage structures are not vertically aligned above and below the mezzanine,regardless of openings in the grating,make mezzanine solid and protect it as a solid mezzanine according to section 2.3.2.1.2.3.2.3WalkwaysWalkways are located between storage structures for material-handling purposes.In order to be consid-ered grated,the grating of a walkway must be least70%open.Treat grated walkways wider than10ft(3m) as grated mezzanines.No additional sprinklers are required under single-level grated walkways that are no more than10ft(3m) wide.For multi-level grated walkways no wider than10ft(3m),provide one line of suppression mode or quick response control-mode sprinklers(K of8or greater,ordinary temperature rating).For two-level walkways, install them beneath the lower walkway.For three-level walkways,install them beneath the mid-level walk-way.Locate the sprinklers at the center of the walkway,at a maximum horizontal spacing of10ft(3m).Include two of these sprinklers when calculating the ceiling sprinkler water demand.For suppression mode sprin-klers,supply these two additional sprinklers at the minimum pressure approved for the type of sprinkler used. For control-mode sprinklers,design the two sprinklers to discharge a minimum of60gpm(240l/min)each.For solid walkways or walkways less than70%open,install suppression mode or quick response control-mode sprinklers(K of8or greater,ordinary temperature rating)beneath each level of walkway on a maxi-mum horizontal spacing of10ft(3m).For walkways6.0ft(1.83m)wide or less,install one line of sprinklers located at the center of the walk-way.For walkways6.0ft(1.83m)to10ft(3.1m)wide,install two lines of sprinklers located at the faces of the aisles.Include two sprinklers from each line of sprinklers at the hydraulically most remote level in the ceiling sprinkler water demand,regardless of the number of levels installed.(Use two sprinklers for walkways 6.0ft(1.83m)wide or less,and four for walkways6.0ft(1.83m)to10.0ft(3.05m)wide.)Supply additional suppression mode sprinklers at the minimum pressure approved for the type of sprinkler used.For control-mode sprinklers,design the sprinklers to discharge a minimum of60gpm(240l/min)each.2.3.2.4ConveyorsSingle conveyors are typically located on walkways or mezzanines between storage structures to ease inven-tory picking.Multiple conveyors are located side-by-side to convey product between storage areas and shipping/receiving areas.In either case,they can obstruct sprinkler discharge and create shielded areas that can prevent fire suppression.When sprinklers are installed below solid walkways and mezzanines in accordance with this standard,the addition of conveyors on the mezzanines and walkways does not require additional sprinklers.For grated mezzanines and walkways with belt-type conveyers(or roller-type conveyers less than50%open), individual conveyers or groups of conveyers wider than2ft(0.61m),sprinklers in addition to those required for the mezzanines or walkways themselves will be required.The only exception to this requirement is where there is no possibility of combustibles being present beneath the conveyers.Install suppression mode or quick response control-mode sprinklers(K of8or greater,ordinary tempera-ture rating)beneath the conveyers on a maximum horizontal spacing of10ft(3m).Include two of these sprin-klers in the ceiling sprinkler water demand.•For suppression mode sprinklers,supply these two additional sprinklers at the minimum pressure approved for the type of sprinkler used.•For control-mode sprinklers,design the two sprinklers to discharge a minimum of60gpm(240l/min)each. If sprinklers are installed under both the grated mezzanine and walkways and conveyors,it is only necessary to add a total of two sprinklers to the ceiling demand.When there are multiple,vertically aligned levels of conveyors that are50%open or more,add a line of sup-pression mode sprinklers under the lower conveyor for two levels;add a line under the middle conveyor for three levels.2.3.2.5Flue Spaces in RacksTransverse flues between pallet loads are critical to successful fire suppression by suppression mode sprin-klers and must be maintained,regardless of building and storage height.For rack storage higher than25ft (7.6m)Both longitudinal and transverse flues are needed.In multiple-row rack storage,where pallet loads are butted together in one direction,but there are flues between each row of pallets,a lack of longitudinal flues does not necessarily create a problem for suppres-sion mode protection.The only place where fire can develop vertically is in the flues between rows,and those flues are close together.So long as they are open for the full height of storage,water from properly designed ceiling and/or in-rack sprinklers can reach the fireThe situation where there are open flues at lower levels in racks,that are blocked at higher level does cre-ate a severe fire protection challenge as there is a place for fire growth and spread that is shielded from sprin-kler discharge.If there are longitudinal flues at any level in the rack,they must be open and clear for the full height of the rack.A common example of this is high rack storage where lift operators cannot see pre-cisely where the pallet loads at the top level,and the longitudinal flue can easily be blocked at that level but remain open at lower levels.2.4.Protection2.4.1SprinklersSuppression mode sprinklers are available in a range of orifice sizes and are identified by their K-factor. FM Approved suppression mode sprinklers can have K-factors ranging from a nominal14(200)to25(360) and may be available in pendent as well as upright orientations.Each K-factor and orientation has its own specific design criteria and permissible application.The K14.0(K200)pendent,being the original suppression mode sprinkler,has the widest array of applica-tions.Do not assume that other suppression mode sprinklers can be used for applications where the K14.0 (K200)pendent sprinkler is permitted.Refer to the appropriate occupancy standard to determine applicability and design criteria.2.4.2Temperature RatingFM Approved suppression mode sprinklers are available in ordinary and intermediate temperature ratings, and are no more susceptible to premature operation due to high ambient temperatures than other types of sprinklers.Use ordinary temperature rated suppression mode sprinklers for all applications except those where the temperature at sprinklers can exceed100°F(38°C).Select the temperature rating of sprinklers near unit heaters in accordance with Data Sheet2-8N,Installation of Sprinkler Systems(NFPA).If the ambient ceiling temperature is continuously or intermittently higher than100°F(38°C)(as might be the case in a hot climate)use intermediate temperature-rated sprinklers(175°F-225°F,79°C-107°C).Do not use suppression mode sprinklers where ambient temperatures can exceed150°F(66°C).2.4.3Sprinkler System TypesInstall suppression mode sprinklers in wet systems only.Do not use dry systems or preaction systems,or any system where there can be any delay between operation of the sprinkler and discharge of water.Such delays,even if only a few seconds,can result in a failure to suppress.Antifreeze systems may be used if the antifreeze solution is approved by FM Approvals.Do not use anti-freeze mixtures containing combustible fluids,such as ethylene glycol,propylene glycol,glycerin or alco-hol,as testing has shown that they can increase heat release rate at the critical early stage of a fire and prevent suppression.Do not use brine solutions such as calcium chloride,as they can cause accelerated corrosion that will result in reduced sprinkler system life and potential leakage.2.4.4Clearance From Sprinklers to CeilingThe location of sprinklers relative to the ceiling above has a major impact on the speed of sprinkler opera-tion.The ideal location of the fusible element is between6and10in.(152and254mm)below the ceiling.If the fusible element is too close to the ceiling,the hot gas flow from a fire can initially flow beneath the sprin-kler,delaying operation.If the fusible element is too far below the ceiling,the hot gas will initially flow above the sprinklers,again delaying sprinkler operation at the critical early stage of a fire.Install suppression mode sprinklers with the center line of the thermal sensing element located a maximum of13in.(330mm)and a minimum of4in.(102mm)below the ceiling.An acceptable alternative is to install the sprinkler so that the deflector is a maximum of14in.(356mm)and a minimum of5in.(127mm)below the ceiling.Full-scale fire tests showed that the K22.4(K314)and the K25.2(K360)pendent suppression mode sprinkler performs satisfactorily when the deflector is located no more than18in.(457mm)below the ceiling.For corrugated metal deck roofs up to3in.(76mm)deep,measure the distance to the sprinkler from the bottom of the deck.For deeper decks,measure the distance to the highest point of the deck.。
15-122:Principles of Imperative ComputationStyle Guide Nivedita Chopra0.Making your code look prettyYou want your code to look nice.Not only so that your TA enjoys grading it,but also for yourself,when you look back on your code later,long after completing the assignment.Here’s how to make the document itself look nice:•Indentation-Though not required in C0and C(as it is in Python),proper indentation makes code look nice.You should indent every time you open a block of code like an if statement or a for or while loop.Avoid using tabs to indent your code.They render differently on different systems(and especially badly on Autolab).Instead use either2or4spaces,depending on your preferences.Choose one and stick to it!You should set your tabs to2or4spaces in your.emacs or.vimrcfile.•Whitespace-Don’t make your code terribly cramped up so that it’s hard to e blank lines to separate unrelated blocks of code and to give your program a structure.Within a line use spaces to to separate characters but stay consistent.Use the same amount of space on either side of an infix operator(either0or1spaces),do 2+3or2+3,not2+e spaces around parentheses:(2+3)*(4+5)is better than (2+3)*(4+5).Avoid trailing whitespace at the end of lines.•Line Length-Limit your lines of code to a maximum of80characters in length.This is a very well-known convention.Higher level CS classes enforce it very strictly,so it is in your best interest to follow this strictly in this class as well.You can use the unix command wc-L mycode.c0to see the max line length in afile mycode.c0After submitting your code,always open up your handin on Autolab to make sure it looks all right.There may be some subtle formatting errors in your code,which will become pretty obvious on Autolab.1.Making your code easier to understandOkay,so you have pretty-looking code because you followed the steps above.But what does this pretty-looking code do?You want to make sure that other people(and yourself,at a later date)are able to understand your approach to a problem by looking at your code for solving it.Here’s how to make your code easier to understand:•Commenting-Comment your code well,so that a person glancing at it can understand most of what you’re trying to do.This means you shouldn’t be writing large paragraphs as comments,but rather a couple of lines to explain the purpose of a helper function or a tricky bit of code.To decide when to explain what you’re doing-think of it as:“Was I able to come up with this easily?And now that I’ve come up with it,can I explain it after a week?"If the answer to both of these questions is“No",definitely comment your code(but feel free to comment in other cases too!)•Dead Code-Dead code is anything that does not contribute to your solution to the task at hand.This includes print statements for debugging and code that is never executed when your program is run.To prevent confusion to a reader,completely delete all dead code.Simply commenting it out is bad style,as it reduces the value of your more useful comments.•Meaningful Names-You should provide meaningful names for all your variables and functions.Avoid generic variable names like i,j,x,x1,x’.Restrict them to variables like the counters within loops, variables in a manner that relates to the value that is stored in them during the program and functions in a manner that reflects the task that they perform.To name variables with multiple words,use either underscores(foo_bar_foo)or camel case (fooBarFoo).Don’t mix them up like foo_barFoo and once you pick one style,follow it for all names throughout you program.•Use Helper Functions-If youfind yourself writing similar code with a few changes at multiple places in your program,consider putting that block of code into a helper function and calling it in the function that you are writing.This makes it easier for someone to read your helper function and understand what it’s doing,independently of the remaining program.Always include a comment just above a helper function describing its purpose.2.Making your logic clearerSometimes,things that you do in a convoluted manner can be expressed much more easily in a simple statement.Here are some examples:Rather than Simply doif(condition){return true;}else{return false;}return condition;if(condition){}else{do_something(); }if(!condition){do_something(); }if(some_boolean_statement==true){ do_something();}if(some_boolean_statement){ do_something();}if(condition_1){if(condition_2){do_something();}}if(condition_1&&condition_2){ do_something();}if(i>=0&&i<=n){ do_something();}if(0<=i&&i<=n){ do_something();}And always remember:“Programs must be written for people to read,and only incidentally for machines to execute."H.Abelson and G.Sussman(in‘The Structure and Interpretation of Computer Programs’)。