Esempio n. 1
0
        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
            });
        }