public void SetUpData()
        {
            var span = new Mock <ISpan>();

            span.Setup(s => s.Length).Returns(10);
            span.Setup(s => s.Section.SolidHeight).Returns(5);
            span.Setup(s => s.Section.MomentOfInteria).Returns(2);
            span.Setup(s => s.Material.ThermalExpansionCoefficient).Returns(2);
            span.Setup(s => s.Material.YoungModulus).Returns(3);
            _span = span.Object;

            _upDownTemperatureDifferenceLoad = UpDownTemperatureDifferenceLoad.Create(
                _span, upperTemperature: 10, lowerTemperature: 5);
        }
Пример #2
0
        public void SetUpBeam()
        {
            var material1 = new Concrete(youngModulus: 30, withReinforcement: false);
            var material2 = new Concrete(youngModulus: 33, withReinforcement: false);
            var section   = new RectangleSection(width: 300, height: 500);

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

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

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

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

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

            var upDownTemperatureLoad = UpDownTemperatureDifferenceLoad.Create(
                span1, upperTemperature: 20, lowerTemperature: 0);

            span1.ContinousLoads.Add(upDownTemperatureLoad);

            var alongTemperatureLoad = AlongTemperatureDifferenceLoad.Create(
                span1, temperatureDifference: 10);

            span1.ContinousLoads.Add(alongTemperatureLoad);

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

            _beam.CalculationEngine.Calculate();
        }
        public void SetUpBeam()
        {
            var material = new Concrete(youngModulus: 30);
            var section  = new RectangleSection(width: 300, height: 500);

            var node1 = new FreeNode();
            var node2 = new PinNode();
            var node3 = new PinNode();
            var node4 = new SupportedNode();

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

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

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

            var span3 = new Span(
                leftNode: node3,
                length: 5,
                rightNode: node4,
                material: material,
                section: section
                );

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

            var upDownTemperatureLoad = UpDownTemperatureDifferenceLoad.Create(
                span3, upperTemperature: -20, lowerTemperature: 5);

            span3.ContinousLoads.Add(upDownTemperatureLoad);

            var alongTemperatureLoad1 = AlongTemperatureDifferenceLoad.Create(
                span1, temperatureDifference: -50);

            span1.ContinousLoads.Add(alongTemperatureLoad1);

            var alongTemperatureLoad2 = AlongTemperatureDifferenceLoad.Create(
                span2, temperatureDifference: 10);

            span2.ContinousLoads.Add(alongTemperatureLoad2);

            var startLoad = new LoadData(value: -50, position: 0);
            var endLoad   = new LoadData(value: -50, position: 10);

            span2.ContinousLoads.Add(ContinousShearLoad.Create(startLoad, endLoad));

            var pointLoad = new ShearLoad(value: -100, position: 2);

            span3.PointLoads.Add(pointLoad);

            _beam = new Beam(spans, nodes);

            _beam.Calculate();
        }
        public void SetUpBeam()
        {
            var material = new Concrete(youngModulus: 30);
            var section  = new RectangleSection(width: 300, height: 500);

            var node1 = new TelescopeNode();
            var node2 = new PinNode();
            var node3 = new Hinge();
            var node4 = new SupportedNode();

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

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

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

            var span3 = new Span(
                leftNode: node3,
                length: 5,
                rightNode: node4,
                material: material,
                section: section
                );

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

            node3.ConcentratedForces.Add(new AngledLoad(value: -100, angle: 30));
            node2.ConcentratedForces.Add(new VerticalDisplacement(value: -10));

            var pointLoad1 = new AngledLoad(value: -200, position: 1.5, angle: -45);

            span1.PointLoads.Add(pointLoad1);

            var startLoad = new LoadData(value: -20, position: 0);
            var endLoad   = new LoadData(value: -20, position: 7);

            span2.ContinousLoads.Add(ContinousShearLoad.Create(startLoad, endLoad));

            var upDownTemperatureLoad = UpDownTemperatureDifferenceLoad.Create( // TODO: Check Hinge - something wrong
                span3, upperTemperature: 5, lowerTemperature: 0);

            span3.ContinousLoads.Add(upDownTemperatureLoad);

            var alongTemperatureLoad = AlongTemperatureDifferenceLoad.Create(
                span3, temperatureDifference: 10);

            span3.ContinousLoads.Add(alongTemperatureLoad);

            _beam = new Beam(spans, nodes);

            _beam.Calculate();
        }