Size Rebar |
Copy Code
|
---|---|
//Use a loop to to pick a reinforcement size that satisfies design checks SetUnits("Kips & Inches"); DeleteAll(); //Build the model var h = 20*12; var w = 5*12; var v1 = AddVertex(0, 0); var v2 = AddVertex(w, 0); var v3 = AddVertex(w, h); var v4 = AddVertex(0, h); var area = AddArea(v1, v2, v3, v4); var mat = "Concrete (F'c = 4 ksi)"; //Apply a lateral load to the top of the wall var top = FindSide(w/2, h, 0); SideForce("D", top, 0, 0, 1.0); //Fix the bottom of the wall var bottom = FindSide(w/2, 0, 0); SupportSide(bottom, true, true, true, true, true, true); //set the mesh size //(mesh refinement not shown for example simplicity, see the RefineMesh example) Mesh(area, 8, mat, 24.0); //find the name of the design mesh (there is only one) await DesignMeshing(); var mesh = DesignMeshes()[0]; //turn off minimum steel limits for now and just consider strength ModifyDesignMesh(mesh, "Min. Steel Ratio", "None"); ModifyDesignMesh(mesh, "ACI 8.6.1.1 Min Steel", "No"); //set the bar spacing to 12 inches ModifyDesignMesh(mesh, "Reinforcement (Single Mat)", "Y Spacing", "12"); //loop over several rebar sizes, stopping when design checks pass var bars = new string[] { "#3", "#4", "#5", "#6", "#7", "#8", "#9", "#10" }; foreach(var bar in bars) { ModifyDesignMesh(mesh, "Reinforcement (Single Mat)", "Y Size", bar); await Design(); var unity = Unity(mesh); if(unity <= 1.0) { return $"{bar} bars leads to a unity value of {unity}"; } } return "No bar size satisfied the design checks."; |