private Length DetermineSignedOffset(AnalyticalWallLateral wall) { var wallSegment = wall.WallLine; Point2D closestPointAlongExtensionToCenterOfRigidity = wallSegment.ClosestPointToExtension(LateralLevel.CenterOfRigidity); double distanceFromCenterOfRigidity = closestPointAlongExtensionToCenterOfRigidity.DistanceTo(LateralLevel.CenterOfRigidity); double signedDistanceFromCenterOfRigidity; switch (wallSegment.WhichSide(LateralLevel.CenterOfRigidity)) { case Side.Right: signedDistanceFromCenterOfRigidity = -distanceFromCenterOfRigidity; break; case Side.Left: signedDistanceFromCenterOfRigidity = distanceFromCenterOfRigidity; break; case Side.Colinear: signedDistanceFromCenterOfRigidity = 0; break; default: throw new InvalidEnumArgumentException(); } return(new Length(signedDistanceFromCenterOfRigidity, LengthUnit.Inch)); }
private ShearWallPanelResponseCollection DetermineWallLoadCaseResponses(AnalyticalWallLateral wall) { ShearWallPanelResponseCollection loadPatternResults = Responses.WallLoadPatternResults[wall.UniqueId]; IEnumerable <ShearWallPanelResponse> loadCaseResults = loadPatternResults.GetSuperimposedResponsesAtLoadCases(LoadCases); return(new ShearWallPanelResponseCollection(loadCaseResults)); }
private ShearWallPanelResponseCollection DetermineWallLoadPatternResponses(AnalyticalWallLateral wall) { ShearWallPanelRigidAnalysisParameters wallStiffness = WallStiffnesses[wall.UniqueId]; var responses = new ShearWallPanelResponseCollection(wall.UniqueId, wall.WallLine); foreach (LateralLevelForce force in Forces) { responses.Add(DetermineWallResponse(wall, wallStiffness, force)); } return(responses); }
private ShearWallPanelResponse DetermineWallResponse(AnalyticalWallLateral wall, ShearWallPanelRigidAnalysisParameters wallStiffness, LateralLevelForce force) { Force directXShear = (Force)(wallStiffness.Kx * force.DirectX / LevelStiffness.X); Force directYShear = (Force)(wallStiffness.Ky * force.DirectY / LevelStiffness.Y); Vector2D directVector = new Vector2D(directXShear.Value, directYShear.Value); var wallUnitVector = wall.WallLine.ToVector2D().Normalize(); var response = new ShearWallPanelResponse(wall.UniqueId, force.LoadPattern, wall.WallLine); response.DirectShear = directVector.AngleTo(wallUnitVector).Degrees < 90 ? new Force(directVector.Length, ForceUnit.Kip) : new Force(-directVector.Length, ForceUnit.Kip); response.TorsionalShear = (Force)(wallStiffness.K * wallStiffness.SignedOffsetFromCenterOfRigidity * force.TotalT(LateralLevel.CenterOfRigidity) / LevelStiffness.J); return(response); }
private ShearWallPanelRigidAnalysisParameters DetermineWallStiffnessParametersSansOffset(AnalyticalWallLateral wall) { var wallVector = wall.WallLine.ToVector2D(); var wallAngleToXAxis = new Unitless(wallVector.SignedAngleTo(Vector2D.XAxis).Radians, UnitlessUnit.Radian); var k = new ForcePerLength(wall.Stiffness.ConvertTo(ForcePerLengthUnit.KipPerInch), ForcePerLengthUnit.KipPerInch); return(new ShearWallPanelRigidAnalysisParameters { K = k, AngleFromWallAxisToGlobalXAxis = wallAngleToXAxis }); }