public NodalDisplacement DetermineRigidbodyPointDisplacement(Point2D coordinate, LoadPattern loadPattern) { LateralLevelForce forceAtLoadPattern = Forces.First(f => f.LoadPattern == loadPattern); var alpha = new Unitless((coordinate - LateralLevel.CenterOfRigidity).SignedAngleTo(Vector2D.XAxis)); var d = new Length(coordinate.DistanceTo(LateralLevel.CenterOfRigidity), LengthUnit.Inch); Moment M = forceAtLoadPattern.TotalT(LateralLevel.CenterOfRigidity); var rotation = (Unitless)(M / LevelStiffness.J); Length displacementX = (Length)(forceAtLoadPattern.DirectX / LevelStiffness.X + d * rotation * Result.Sin(alpha)); Length displacementY = (Length)(forceAtLoadPattern.DirectY / LevelStiffness.Y + d * rotation * Result.Cos(alpha)); if (LoadPatternTypeConverter.Convert(loadPattern) == LoadPatternType.Earthquake) { displacementX = (Length)(displacementX * Cd); displacementY = (Length)(displacementY * Cd); } return(new NodalDisplacement { LoadPattern = loadPattern, Ux = displacementX.ConvertTo(LengthUnit.Inch), Uy = displacementY.ConvertTo(LengthUnit.Inch), Rz = 0 }); }
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); }