Example #1
0
        public void SetUpBeam()
        {
            var material = new Concrete(youngModulus: 30, withReinforcement: false);
            var section  = new RectangleSection(width: 300, height: 500);

            var node1 = new FixedNode();
            var node2 = new FixedNode();
            var nodes = new Node[] { node1, node2 };

            var span1 = new Span(
                leftNode: node1,
                length: 10,
                rightNode: node2,
                material: material,
                section: section,
                includeSelfWeight: false
                );

            var spans = new Span[] { span1 };

            var pointLoad3 = new BendingMoment(value: 100, position: 8);

            span1.PointLoads.Add(pointLoad3);

            _beam = new Beam(spans, nodes, includeSelfWeight: false);

            _beam.CalculationEngine.Calculate();
        }
        public void BendingMomentTest_ToString_Success()
        {
            var bendingMoment = new BendingMoment();

            bendingMoment.Value = 5;

            Assert.That(bendingMoment.Value.ToString(), Is.EqualTo("5"));
        }
        public void BendingMomentTest_SetValue_Success()
        {
            var bendingMoment = new BendingMoment();

            bendingMoment.Value = 5;

            Assert.That(bendingMoment.Value, Is.EqualTo(5));
        }
        public void SetUpBeam()
        {
            var material = new Concrete(youngModulus: 30, withReinforcement: false);
            var section  = new RectangleSection(width: 300, height: 500);

            var node1 = new FixedNode();
            var node2 = new SupportedNodeWithHinge();
            var node3 = new SupportedNode();

            var nodes = new Node[] { node1, node2, node3 };

            var span1 = new Span(
                leftNode: node1,
                length: 10,
                rightNode: node2,
                material: material,
                section: section,
                includeSelfWeight: false
                );

            var span2 = new Span(
                leftNode: node2,
                length: 5,
                rightNode: node3,
                material: material,
                section: section,
                includeSelfWeight: false
                );

            var spans = new Span[] { span1, span2 };

            var pointLoad1 = new NormalLoad(value: 150, position: 4);

            span1.PointLoads.Add(pointLoad1);
            var pointLoad2 = new NormalLoad(value: -100, position: 4);

            span2.PointLoads.Add(pointLoad2);
            var pointLoad3 = new BendingMoment(value: 100, position: 8);

            span1.PointLoads.Add(pointLoad3);

            var startLoad1 = new LoadData(value: -10, position: 0);
            var endLoad1   = new LoadData(value: -10, position: 10);

            span1.ContinousLoads.Add(ContinousShearLoad.Create(startLoad1, endLoad1));

            _beam = new Beam(spans, nodes, includeSelfWeight: false);

            _beam.CalculationEngine.Calculate();
        }
        public void BendingMomentTest_ConstructionWithNullPosition_Success()
        {
            var bendingMoment = new BendingMoment();

            Assert.That(bendingMoment.Position, Is.Null);
        }
        public void BendingMomentTest_Construction_Success()
        {
            var bendingMoment = new BendingMoment(15);

            Assert.That(bendingMoment.Position, Is.EqualTo(15));
        }