Пример #1
0
        public void BendingMomentLoadResults_GetValueForVerticalDeflectionTest_Success()
        {
            var span = new Mock <ISpan>();

            span.Setup(s => s.Material.YoungModulus).Returns(2);
            span.Setup(s => s.Section.MomentOfInteria).Returns(4);

            var continousLoad = new Mock <IContinousLoad>();

            continousLoad.Setup(cl => cl.StartPosition.Value).Returns(5);

            var verticalDeflectionResult = new VerticalDeflectionResult(continousLoad.Object);

            var result = verticalDeflectionResult.GetValue(span.Object, distanceFromLeftSide: 7, currentLength:  1);

            Assert.That(result, Is.EqualTo(22.5));
        }
Пример #2
0
        public void UpDownTemperatureDifferenceResults_GetValueForVerticalDeflectionTest_Success()
        {
            var span = new Mock <ISpan>();

            span.Setup(s => s.Section.SolidHeight).Returns(4);

            var continousLoad = new Mock <IContinousLoad>();

            continousLoad.Setup(cl => cl.StartPosition.Value).Returns(5);
            continousLoad.Setup(cl => cl.EndPosition.Value).Returns(1);

            var verticalDeflectionResult = new VerticalDeflectionResult(continousLoad.Object);

            var result = verticalDeflectionResult.GetValue(span.Object, distanceFromLeftSide: 7, currentLength:  1);

            Assert.That(result, Is.EqualTo(0.0018));
        }
Пример #3
0
 public virtual double CalculateVerticalDeflection(ISpan span, double distanceFromLeftSide, double currentLength)
 => VerticalDeflectionResult?.GetValue(span, distanceFromLeftSide, currentLength) ?? 0;
        public void ShearLoadResults_GetValueForVerticalDeflectionTest_InsideLoadLength_Success()
        {
            var result = _verticalDeflectionResult.GetValue(_span, distanceFromLeftSide: 3, currentLength: 1);

            Assert.That(result, Is.EqualTo(0.005555556).Within(0.000000001));
        }