public void SetUpBeam()
        {
            var material = new Material(youngModulus: 200, density: 0, thermalExpansionCoefficient: 0);
            var section  = new SectionProperties(area: 60, momentOfInteria: 20000);

            var node1 = new FixedNode();
            var node2 = new PinNode(angle: 22.02);

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

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

            var spans = new Span[] { span1 };

            var pointLoad = new ShearLoad(value: -40, position: 4);

            span1.PointLoads.Add(pointLoad);

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

            _beam.CalculationEngine.Calculate();
        }
Ejemplo n.º 2
0
            public void SetUpBeam()
            {
                var material = new Concrete(youngModulus: 30, withReinforcement: false);
                var section  = new RectangleSection(width: 300, height: 500);

                var node1 = new FreeNode();
                var node2 = new PinNode();

                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 pointLoad1 = new ShearLoad(value: -200, position: 5);

                span1.PointLoads.Add(pointLoad1);

                _beam = new Beam(spans, nodes, includeSelfWeight: false);
            }
Ejemplo n.º 3
0
        public void SetUpBeam()
        {
            var material = new Material(youngModulus: 200, density: 1, thermalExpansionCoefficient: 0);
            var section  = new SectionProperties(area: 60, momentOfInteria: 20000);

            var node1 = new PinNode(angle: 90);
            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 shearLoad = ContinousAngledLoad.Create(
                startPosition: 1, startValue: -20,
                endPosition: 6, endValue: -100, angle: 35);

            span1.ContinousLoads.Add(shearLoad);

            var pointLoad = new ShearLoad(value: 200, position: 9);

            span1.PointLoads.Add(pointLoad);

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

            _beam.CalculationEngine.Calculate();
        }
Ejemplo n.º 4
0
 public ExerciseStep(PinNode fromNode, PinNode toNode, RingNode ringNode, int stepIndex)
 {
     from  = fromNode;
     to    = toNode;
     ring  = ringNode;
     index = stepIndex;
 }
Ejemplo n.º 5
0
        public void SetUpBeam()
        {
            var material = new Concrete(youngModulus: 30);
            var section  = new RectangleSection(width: 300, height: 500);

            var node1 = new FixedNode();
            var node2 = new PinNode(angle: 30);

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

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

            var spans = new Span[] { span1 };

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

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

            _beam = new Beam(spans, nodes);

            _beam.Calculate();
        }
Ejemplo n.º 6
0
        public void SetUpFrame()
        {
            var material = new Material(youngModulus: 200, density: 0, thermalExpansionCoefficient: 0);
            var section  = new SectionProperties(area: 600, momentOfInteria: 6000);

            var node1 = new PinNode(new Point(0, 0));
            var node2 = new FreeNode(new Point(6, 0));
            var node3 = new FixedNode(new Point(6, -6));

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

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

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

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

            node2.ConcentratedForces.Add(new NormalLoad(value: 5));

            _frame = new Frame(spans, nodes);

            _frame.CalculationEngine.Calculate();
        }
Ejemplo n.º 7
0
        public void SetUpBeam()
        {
            var material1 = new Concrete(youngModulus: 30, withReinforcement: false);
            var material2 = new Concrete(youngModulus: 33, withReinforcement: false);
            var section1  = new RectangleSection(width: 300, height: 700);
            var section2  = new RectangleSection(width: 300, height: 500);

            var node1 = new SleeveNode();
            var node2 = new PinNode();
            var node3 = new PinNode();
            var node4 = new FixedNode();

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

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

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

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

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

            node2.ConcentratedForces.Add(new NormalLoad(value: 200));
            node3.ConcentratedForces.Add(new VerticalDisplacement(value: -10));

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

            span3.PointLoads.Add(pointLoad);

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

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

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

            _beam.CalculationEngine.Calculate();
        }
        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 PinNode();

            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, withReinforcement: false);
            var section  = new RectangleSection(width: 300, height: 500);

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

            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: 10,
                rightNode: node3,
                material: material,
                section: section,
                includeSelfWeight: false
                );


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

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

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

            span1.PointLoads.Add(pointLoad1);

            var pointLoad2 = new AngledLoad(value: -200, position: 5, angle: -60);

            span2.PointLoads.Add(pointLoad2);

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

            _beam.CalculationEngine.Calculate();
        }
Ejemplo n.º 10
0
        public void SetUpBeam()
        {
            var material = new Concrete(youngModulus: 30);
            var section1 = new RectangleSection(width: 300, height: 500);
            var section2 = new RectangleSection(width: 600, height: 500);

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

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

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

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

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

            node2.ConcentratedForces.Add(new VerticalDisplacement(value: -10));

            var pointLoad = new ShearLoad(value: -40, position: 4);

            span2.PointLoads.Add(pointLoad);

            var startLoad = new LoadData(value: -6, position: 0);
            var endLoad   = new LoadData(value: -6, position: 8);

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

            _beam = new Beam(spans, nodes);

            _beam.Calculate();
        }
Ejemplo n.º 11
0
        public UIPinNode(Node n, UIGraph graph, double ox, double oy, double xs, double xy, double sc = 1)
        {
            InitializeComponent();
            Graph   = graph;
            Node    = n;
            xShift  = xs;
            yShift  = xy;
            originX = ox;
            originY = oy;
            scale   = sc;

            Id = n.Id;

            Margin = new Thickness(0);

            pinNode = n as PinNode;

            Color = pinNode.GetColor();
            PinColorBrush.Color = Color;
        }
Ejemplo n.º 12
0
    private void InitNodes()
    {
        nodes = new PinNode[PinsNumber];
        float delta_angle = 2 * 3.1415f / PinsNumber;
        float radius      = TexResolution * 0.5f;

        for (int i = 0; i < PinsNumber; i++)
        {
            float x = radius + radius * Mathf.Sin(i * delta_angle);
            float y = radius + radius * Mathf.Cos(i * delta_angle);
            nodes[i]   = new PinNode();
            nodes[i].x = (int)x;
            nodes[i].y = (int)y;
        }
        int NodeSize = System.Runtime.InteropServices.Marshal.SizeOf(typeof(PinNode));

        //  int NodeSize = sizeof(Node);

        Debug.Log("NodeSize:" + NodeSize);
        pinsBuffer = new ComputeBuffer(PinsNumber, NodeSize, ComputeBufferType.Default);
        pinsBuffer.SetData(nodes);
    }
Ejemplo n.º 13
0
        public void SetUpBeam()
        {
            var material = new Concrete(youngModulus: 30, withReinforcement: false);
            var section1 = new RectangleSection(width: 300, height: 500);
            var section2 = new RectangleSection(width: 600, height: 500);

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

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

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

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

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

            node2.ConcentratedForces.Add(new VerticalDisplacement(value: -10));

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

            _beam.CalculationEngine.Calculate();
        }
Ejemplo n.º 14
0
 public static Color GetColor(this PinNode n)
 {
     System.Drawing.Color c = n.GetSystemColor();
     return(Color.FromArgb(c.A, c.R, c.G, c.B));
 }
        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();
        }
Ejemplo n.º 17
0
 public ExercisePath(int pathWeight, PinNode destinationPin, RingNode fromRing)
 {
     weight      = pathWeight;
     destination = destinationPin;
     from        = fromRing;
 }
Ejemplo n.º 18
0
 public void SetUp()
 {
     _pinNode = new PinNode();
 }