public void ShearWallCalculatesPMMDiagram() { double f_c_prime = 6; double f_c_prime_psi = f_c_prime * 1000; RebarMaterialFactory factory = new RebarMaterialFactory(); string RebarSpecificationId = "A615Grade60"; IRebarMaterial LongitudinalRebarMaterial = factory.GetMaterial(RebarSpecificationId); double h_total = 20 * 12; double t_w = 12; double N_curtains = 2; double s = 12; double c_edge = 0; BoundaryZone BoundaryZoneTop = new BoundaryZone(3, 3, "No8", 6, 3, 3); BoundaryZone BoundaryZoneBottom = new BoundaryZone(3, 3, "No8", 6, 3, 3); string WallRebarSizeId = "No4"; FlexuralCompressionFiberPosition p = FlexuralCompressionFiberPosition.Top; ConcreteMaterial Concrete = new ConcreteMaterial(f_c_prime_psi, ConcreteTypeByWeight.Normalweight, null); ConfinementReinforcementType ConfinementReinforcementType = KodestructAci.ConfinementReinforcementType.Ties; CrossSectionRectangularShape shape = new CrossSectionRectangularShape(Concrete, null, t_w, h_total); List <KodestructAci.RebarPoint> LongitudinalBars = GetLongitudinalBars(shape.SliceableShape as ISectionRectangular, h_total, t_w, WallRebarSizeId, N_curtains, s, c_edge, BoundaryZoneTop, BoundaryZoneBottom, LongitudinalRebarMaterial); KodestructAci.IConcreteFlexuralMember fs = new KodestructAci14.ConcreteSectionFlexure(shape, LongitudinalBars, null, ConfinementReinforcementType); IConcreteSectionWithLongitudinalRebar Section = fs as IConcreteSectionWithLongitudinalRebar; ConcreteSectionCompression column = new ConcreteSectionCompression(Section, ConfinementReinforcementType, null); //Convert axial force to pounds List <PMPair> Pairs = column.GetPMPairs(p); var PairsAdjusted = Pairs.Select(pair => new PMPair(pair.P / 1000.0, pair.M / 1000.0 / 12.0)); string Filename = Path.Combine(Path.GetTempPath(), "PMInteractionShearWall.csv"); using (CsvFileWriter writer = new CsvFileWriter(Filename)) { foreach (var pair in PairsAdjusted) { CsvRow row = new CsvRow(); row.Add(pair.M.ToString()); row.Add(pair.P.ToString()); writer.WriteRow(row); } } }
public void ColumnReturnsNegativeNominalInteractionDiagram() { ConcreteSectionCompression col = GetConcreteExampleColumn(); List <PMPair> Pairs = col.GetPMPairs(FlexuralCompressionFiberPosition.Bottom, 50, false); var PairsAdjusted = Pairs.Select(pair => new PMPair(pair.P / 1000.0, pair.M / 1000.0 / 12.0)); string Filename = Path.Combine(Path.GetTempPath(), "PMInteractionMacGregorNegative.csv"); using (CsvFileWriter writer = new CsvFileWriter(Filename)) { foreach (var pair in PairsAdjusted) { CsvRow row = new CsvRow(); row.Add(pair.M.ToString()); row.Add(pair.P.ToString()); writer.WriteRow(row); } } }
public void ShearWallCalculatesPMMDiagramMaxIteration() { double f_c_prime = 6; double f_c_prime_psi = f_c_prime * 1000; IRebarMaterial LongitudinalRebarMaterial = new RebarMaterialGeneral(60000); double l_w = 20 * 12; double h = 12; FlexuralCompressionFiberPosition p = FlexuralCompressionFiberPosition.Top; ConcreteMaterial Concrete = new ConcreteMaterial(f_c_prime_psi, ConcreteTypeByWeight.Normalweight, null); ConfinementReinforcementType ConfinementReinforcementType = KodestructAci.ConfinementReinforcementType.Ties; CrossSectionRectangularShape shape = new CrossSectionRectangularShape(Concrete, null, h, l_w); List <RebarPoint> LongitudinalBars = GetLongitudinalBarsFromCoordinates(LongitudinalRebarMaterial); KodestructAci.IConcreteFlexuralMember fs = new KodestructAci14.ConcreteSectionFlexure(shape, LongitudinalBars, null, ConfinementReinforcementType); IConcreteSectionWithLongitudinalRebar Section = fs as IConcreteSectionWithLongitudinalRebar; ConcreteSectionCompression column = new ConcreteSectionCompression(Section, ConfinementReinforcementType, null); //Convert axial force to pounds List <PMPair> Pairs = column.GetPMPairs(p, 50, true); var PairsAdjusted = Pairs.Select(pair => new PMPair(pair.P / 1000.0, pair.M / 1000.0 / 12.0)); string Filename = Path.Combine(Path.GetTempPath(), "PMInteractionShearWallMaxIteration.csv"); using (CsvFileWriter writer = new CsvFileWriter(Filename)) { foreach (var pair in PairsAdjusted) { CsvRow row = new CsvRow(); row.Add(pair.M.ToString()); row.Add(pair.P.ToString()); writer.WriteRow(row); } } }