public double GetBeamEffectiveSlabWidth(IFrameSet ifs) { sSteelFrameSet fs = ifs as sSteelFrameSet; CompositeBeamSection cs = new CompositeBeamSection(); double L = fs.parentCrv.length * 39.3701;//m to in return(cs.GetEffectiveSlabWidth(L, fs.effectiveSlabEdges.L_centerLeft_in, fs.effectiveSlabEdges.L_centerRight_in, fs.effectiveSlabEdges.L_edgeLeft_in, fs.effectiveSlabEdges.L_edgeRight_in)); }
public void DesignSteelBeams_Gravity(bool isComposite, eSteelFrameSetType beamType, ISystem sysLRFD_Full, ref ISystem sysLRFD_BeamMinute, ISystem sysLIVE, out double maxDepth_Designed, int count = 3, double depthLimitMax_in = -1.0, double depthLimitMin_in = -1.0) { List <sCrossSection> wShapes = sCrossSection.GetAllWShapes().OrderBy(c => c.weight).ThenBy(c => c.depth).ToList(); IKodeBeamDesigner beamDesign = null; if (isComposite) { beamDesign = new sKodeSteelCompositeBeamDesigner(); } else { beamDesign = new sKodeSteelBeamDesigner(); } try { var beamDesignGroup = sysLRFD_BeamMinute.frameSets.Cast <sSteelFrameSet>().Where(f => f.frameStructureType == beamType).GroupBy(f => f.GetFrameSetDemand(eColorMode.Moment_Y, 0)); // //this should be per bay??????????????????? double maxDepth = 0.0; // // foreach (var bg in beamDesignGroup) { sSteelFrameSet f_LRFD_beamMinute = bg.ElementAt(0); sSteelFrameSet f_LRFD_Full = sysLRFD_Full.GetsFrameSetByGUID(f_LRFD_beamMinute.objectGUID) as sSteelFrameSet; sSteelFrameSet f_Live = sysLIVE.GetsFrameSetByGUID(f_LRFD_beamMinute.objectGUID) as sSteelFrameSet; List <sCrossSection> designedSections = beamDesign.Design_Beams_Gravity(f_LRFD_Full, f_LRFD_beamMinute, f_Live, wShapes, count, depthLimitMax_in, depthLimitMin_in); if (designedSections != null && designedSections.Count > 0) { foreach (sSteelFrameSet b in bg) { b.designedCrossSections = new List <sCrossSection>(); foreach (sCrossSection cs in designedSections) { b.designedCrossSections.Add(cs.DuplicatesCrosssection()); } } foreach (sCrossSection cs in designedSections) { if (cs.depth > maxDepth) { maxDepth = cs.depth; } } } } maxDepth_Designed = maxDepth; } catch { throw new NotImplementedException("Use Steel System"); } }
public List <sCrossSection> Design_Beams_Gravity(IFrameSet fs_Full, IFrameSet fs_Minute, IFrameSet fs_Live, List <sCrossSection> sortedShapes, int count = 3, double depthLimitMax_in = -1, double depthLimitMin_in = -1) { List <sCrossSection> selected = new List <sCrossSection>(); int selectedCount = 0; foreach (sCrossSection c in sortedShapes) { //depth check if (depthLimitMax_in > 0.0 && c.depth > depthLimitMax_in) { continue; } if (depthLimitMin_in > 0.0 && c.depth < depthLimitMin_in) { continue; } //strength check double momentY_adjusted = this.GetDemand_Flexural_Vertical(c, fs_Full, fs_Minute); //?? put minute frame??? double momentY_capacity = this.GetFlexuralStrength_Vertical(c, eColorMode.Moment_Y, fs_Minute); double momentY_DCR = (momentY_adjusted / momentY_capacity); //stiffness check //units?? double I_LB = this.GetLowerBoundMomentOfInertia(c, fs_Live); double def_adjusted = this.GetDemand_LocalDeflection_Vertical(I_LB, fs_Live); double def_capacity = (fs_Live.parentCrv.length / 360.0); sSteelFrameSet sfs_Live = fs_Live as sSteelFrameSet; if (sfs_Live.AsCantilever) { def_capacity *= 2; } def_capacity *= 39.3701;//m to in double def_DCR = (def_adjusted / def_capacity); //select if (momentY_DCR > 0 && momentY_DCR < 0.9999 && def_DCR > 0 && def_DCR < 0.9999) { selected.Add(c); selectedCount++; } if (selectedCount == count) { break; } } return(selected); }
protected override void SolveInstance(IGH_DataAccess DA) { string beamSetName = ""; List <Curve> beamSetCurves = new List <Curve>(); List <sCrossSection> crossSections = new List <sCrossSection>(); List <object> lineLoadObjs = new List <object>(); int type = 0; if (!DA.GetData(0, ref beamSetName)) { return; } if (!DA.GetDataList(1, beamSetCurves)) { return; } if (!DA.GetDataList(2, crossSections)) { return; } DA.GetDataList(3, lineLoadObjs); DA.GetData(4, ref type); List <IFrameSet> sets = new List <IFrameSet>(); string modelUnit = Rhino.RhinoDoc.ActiveDoc.ModelUnitSystem.ToString(); sRhinoConverter rhcon = new sRhinoConverter(modelUnit, "Meters"); int minuteCount = 0; for (int i = 0; i < beamSetCurves.Count; ++i) { if (beamSetCurves[i].GetLength() > 0.005) { Curve rc = rhcon.EnsureUnit(beamSetCurves[i]); sCurve setCrv = rhcon.TosCurve(rc); sSteelFrameSet bset = new sSteelFrameSet(setCrv); bset.frameSetName = beamSetName; bset.setId = i; bset.frameStructureType = (eSteelFrameSetType)type; if (crossSections.Count == 1) { bset.crossSection = crossSections[0] as sCrossSection; } else if (crossSections.Count == beamSetCurves.Count) { bset.crossSection = crossSections[i] as sCrossSection; } if (lineLoadObjs.Count > 0) { foreach (object lo in lineLoadObjs) { GH_ObjectWrapper wap = new GH_ObjectWrapper(lo); sLineLoad sl = wap.Value as sLineLoad; if (sl != null) { bset.UpdateLineLoad(sl); } sLineLoadGroup sg = wap.Value as sLineLoadGroup; if (sg != null) { if (sg.loads.Count == beamSetCurves.Count) { bset.UpdateLineLoad(sg.loads[i]); } else { return; } } } } sets.Add(bset as IFrameSet); } else { minuteCount++; } } if (minuteCount > 0) { AddRuntimeMessage(GH_RuntimeMessageLevel.Warning, minuteCount + "Beams are too short"); } DA.SetDataList(0, sets); }