public void SetUpBeam() { var material = new Steel(); var section = new IBeamSection( width: 91, height: 180, flangeWidth: 8, webWidth: 5.3, radius: 9); 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: true ); var spans = new Span[] { span1 }; _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 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 }; node1.ConcentratedForces.Add(new RotationDisplacement(value: 30)); _beam = new Beam(spans, nodes, includeSelfWeight: false); _beam.CalculationEngine.Calculate(); }
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(); }
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 pointLoad = new ShearLoad(value: -100, position: 3); span1.PointLoads.Add(pointLoad); _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 FixedNode(); var node2 = new SupportedNode(); 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 ); var span2 = new Span( leftNode: node2, length: 10, rightNode: node3, material: material, section: section ); var spans = new Span[] { span1, span2 }; node2.ConcentratedForces.Add(new HorizontalDisplacement(value: 10)); _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 FixedNode(); var node2 = new Hinge(); 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 ); var span2 = new Span( leftNode: node2, length: 5, rightNode: node3, material: material, section: section ); var spans = new Span[] { span1, span2 }; span1.PointLoads.Add(new ShearLoad(value: -100, position: 3)); _beam = new Beam(spans, nodes); _beam.Calculate(); }
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 }; span1.ContinousLoads.Add(ContinousBendingMomentLoad.Create(span1, value: 50)); _beam = new Beam(spans, nodes, includeSelfWeight: false); _beam.CalculationEngine.Calculate(); }
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(); }
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(); }
public void SetUpBeam() { var material = new Concrete(youngModulus: 30); 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 ); var spans = new Span[] { span1 }; var startLoad = new LoadData(value: 50, position: 1); var endLoad = new LoadData(value: 150, position: 7); span1.ContinousLoads.Add(ContinousNormalLoad.Create(startLoad, endLoad)); _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 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 ); var spans = new Span[] { span1 }; var pointLoad3 = new BendingMoment(value: 100, position: 8); span1.PointLoads.Add(pointLoad3); _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 FixedNode(); var node2 = new FreeNode(); 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 pointLoad1 = new NormalLoad(value: 100, position: 3); span1.PointLoads.Add(pointLoad1); var pointLoad2 = new ShearLoad(value: -100, position: 5); span1.PointLoads.Add(pointLoad2); node2.ConcentratedForces.Add(new NormalLoad(value: 150)); _beam = new Beam(spans, nodes); _beam.Calculate(); }
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 material = new Concrete(youngModulus: 30, withReinforcement: false); var section1 = new RectangleSection(width: 300, height: 500); var section2 = new RectangleSection(width: 200, height: 300); var node1 = new FixedNode(); var node2 = new FreeNode(); var node3 = new SupportedNode(); var node4 = new SupportedNode(); var nodes = new Node[] { node1, node2, node3, node4 }; var span1 = new Span( leftNode: node1, length: 6, rightNode: node2, material: material, section: section1, includeSelfWeight: false ); var span2 = new Span( leftNode: node2, length: 4, rightNode: node3, material: material, section: section2, includeSelfWeight: false ); var span3 = new Span( leftNode: node3, length: 10, rightNode: node4, material: material, section: section2, includeSelfWeight: false ); var spans = new Span[] { span1, span2, span3 }; node2.ConcentratedForces.Add(new ShearLoad(value: -200)); node3.ConcentratedForces.Add(new BendingMoment(value: 90)); var startLoad = new LoadData(value: -30, position: 0); var endLoad = new LoadData(value: 0, position: 6); span1.ContinousLoads.Add(ContinousShearLoad.Create(startLoad, endLoad)); var pointLoad = new ShearLoad(value: -150, position: 5); span3.PointLoads.Add(pointLoad); _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 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 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, withReinforcement: false); var section = new RectangleSection(width: 300, height: 500); var node1 = new FixedNode(); var node2 = new Hinge(); 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(); }
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(); }
public void SetUpBeam() { var material1 = new Concrete(youngModulus: 27, withReinforcement: false); var material2 = new Concrete(youngModulus: 37, withReinforcement: false); var section = new RectangleSection(width: 300, height: 500); var node1 = new FixedNode(); var node2 = new Hinge(); var node3 = new FixedNode(); var nodes = new Node[] { node1, node2, node3 }; var span1 = new Span( leftNode: node1, length: 4, rightNode: node2, material: material1, section: section, includeSelfWeight: false ); var span2 = new Span( leftNode: node2, length: 4, rightNode: node3, material: material2, section: section, includeSelfWeight: false ); var spans = new Span[] { span1, span2 }; node2.ConcentratedForces.Add(new ShearLoad(value: -20)); span1.ContinousLoads.Add(ContinousShearLoad.Create( new LoadData(value: -9, position: 0), new LoadData(value: -9, position: 4))); _beam = new Beam(spans, nodes, includeSelfWeight: false); _beam.CalculationEngine.Calculate(); }
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(); }
public void SetUpBeam() { var material = new Concrete(youngModulus: 30); var section = new RectangleSection(width: 300, height: 500); var node1 = new FixedNode(); var node2 = new Hinge(); var node3 = new SupportedNode(); 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 }; var startLoad1 = new LoadData(value: -10, position: 0); var endLoad1 = new LoadData(value: -10, position: 3); span1.ContinousLoads.Add(ContinousShearLoad.Create(startLoad1, endLoad1)); var startLoad2 = new LoadData(value: -10, position: 0); var endLoad2 = new LoadData(value: -10, position: 7); span2.ContinousLoads.Add(ContinousShearLoad.Create(startLoad2, endLoad2)); var startLoad3 = new LoadData(value: -10, position: 0); var endLoad3 = new LoadData(value: -10, position: 5); span3.ContinousLoads.Add(ContinousShearLoad.Create(startLoad3, endLoad3)); var pointLoad = new ShearLoad(value: -100, position: 2.5); span3.PointLoads.Add(pointLoad); _beam = new Beam(spans, nodes); _beam.Calculate(); }
public void SetUpBeam() { var material = new Concrete(youngModulus: 30); var section1 = new RectangleSection(width: 300, height: 500); var section2 = new RectangleSection(width: 200, height: 300); var node1 = new FixedNode(); var node2 = new FreeNode(); var node3 = new SupportedNode(); var node4 = new FixedNode(); var nodes = new Node[] { node1, node2, node3, node4 }; var span1 = new Span( leftNode: node1, length: 6, rightNode: node2, material: material, section: section1 ); var span2 = new Span( leftNode: node2, length: 4, rightNode: node3, material: material, section: section2 ); var span3 = new Span( leftNode: node3, length: 10, rightNode: node4, material: material, section: section2 ); var spans = new Span[] { span1, span2, span3 }; node2.ConcentratedForces.Add(new ShearLoad(value: -200)); node2.ConcentratedForces.Add(new BendingMoment(value: 150)); var startLoad1 = new LoadData(value: 0, position: 0); var endLoad1 = new LoadData(value: -30, position: 2.5); var startLoad2 = new LoadData(value: -30, position: 2.5); var endLoad2 = new LoadData(value: -30, position: 7.5); var startLoad3 = new LoadData(value: -30, position: 7.5); var endLoad3 = new LoadData(value: 0, position: 10); span3.ContinousLoads.Add(ContinousShearLoad.Create(startLoad1, endLoad1)); span3.ContinousLoads.Add(ContinousShearLoad.Create(startLoad2, endLoad2)); span3.ContinousLoads.Add(ContinousShearLoad.Create(startLoad3, endLoad3)); var pointLoad = new ShearLoad(value: -150, position: 3); span1.PointLoads.Add(pointLoad); _beam = new Beam(spans, nodes); _beam.Calculate(); }
public void SetUpBeam() { var material = new Material() { YoungModulus = 33 }; var section = new RectangleSection(width: 300, height: 500); var node1 = new FixedNode(); var node2 = new Hinge(); var node3 = new Hinge(); var node4 = new SupportedNode(); var node5 = new SupportedNode(); var nodes = new Node[] { node1, node2, node3, node4, node5 }; var span1 = new Span( leftNode: node1, length: 5, 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 span4 = new Span( leftNode: node4, length: 3, rightNode: node5, material: material, section: section ); var spans = new Span[] { span1, span2, span3, span4 }; node2.ConcentratedForces.Add(new BendingMoment(value: 56)); node3.ConcentratedForces.Add(new ShearLoad(value: 100)); var startLoad1 = new ShearLoad(value: -15, position: 1); var endLoad1 = new ShearLoad(value: -25, position: 5); span1.ContinousLoads.Add(new ContinousLoad(startLoad1, endLoad1)); var startLoad2 = new ShearLoad(value: -25, position: 0); var endLoad2 = new ShearLoad(value: 25, position: 4); span3.ContinousLoads.Add(new ContinousLoad(startLoad2, endLoad2)); var pointLoad1 = new ShearLoad(value: -150, position: 3.4); span2.PointLoads.Add(pointLoad1); var pointLoad2 = new ShearLoad(value: -50, position: 1.5); span4.PointLoads.Add(pointLoad2); _beam = new Beam(spans, nodes); _beam.Calculate(); }
public void SetUp() { _fixedNode = new FixedNode(); }
public void FullBeamCalculationsTest_TimeoutPerformanceChecking_Success( [Random(27.0, 37.0, 1)] double youngModulus, [Random(150.0, 500.0, 1)] double width, [Random(240.0, 1000.0, 1)] double height, [Random(1.0, 10.0, 2)] double length1, [Random(1.0, 10.0, 1)] double length2, [Random(1.0, 10.0, 2)] double length3, [Random(1.0, 10.0, 2)] double length4, [Random(-1000.0, -1.0, 2)] double nodeForce, [Random(-100.0, -1.0, 2)] double shearForce, [Random(0.0, 1.0, 1)] double minPosition, [Random(-300.0, -10.0, 2)] double pointLoad, [Random(1.1, 3.0, 2)] double divider ) { var material = new Concrete(youngModulus: youngModulus); var section = new RectangleSection(width: width, height: height); var node1 = new FixedNode(); var node2 = new Hinge(); var node3 = new Hinge(); var node4 = new SupportedNode(); var node5 = new SupportedNode(); var nodes = new Node[] { node1, node2, node3, node4, node5 }; var span1 = new Span( leftNode: node1, length: length1, rightNode: node2, material: material, section: section ); var span2 = new Span( leftNode: node2, length: length2, rightNode: node3, material: material, section: section ); var span3 = new Span( leftNode: node3, length: length3, rightNode: node4, material: material, section: section ); var span4 = new Span( leftNode: node4, length: length4, rightNode: node5, material: material, section: section ); var spans = new Span[] { span1, span2, span3, span4 }; node3.ConcentratedForces.Add(new ShearLoad(value: nodeForce)); var startLoad1 = new LoadData(value: shearForce, position: minPosition); var endLoad1 = new LoadData(value: shearForce, position: length1); span1.ContinousLoads.Add(ContinousShearLoad.Create(startLoad1, endLoad1)); var pointLoad1 = new ShearLoad(value: pointLoad, position: length2 / divider); span2.PointLoads.Add(pointLoad1); _beam = new Beam(spans, nodes); _beam.Calculate(); for (int i = 0; i < _beam.Length * 100; i++) { _beam.ShearResult.GetValue(i); _beam.BendingMomentResult.GetValue(i); _beam.VerticalDeflectionResult.GetValue(i); _beam.RotationResult.GetValue(i); } Assert.That(_beam.Spans[0].LeftNode.NormalForce?.Value, Is.Not.Null); Assert.That(_beam.Spans[0].LeftNode.ShearForce?.Value, Is.Not.Null); Assert.That(_beam.Spans[0].LeftNode.BendingMoment?.Value, Is.Not.Null); Assert.That(_beam.Spans[1].LeftNode.NormalForce, Is.Null); Assert.That(_beam.Spans[1].LeftNode.ShearForce, Is.Null); Assert.That(_beam.Spans[1].LeftNode.BendingMoment, Is.Null); Assert.That(_beam.Spans[2].LeftNode.NormalForce, Is.Null); Assert.That(_beam.Spans[2].LeftNode.ShearForce, Is.Null); Assert.That(_beam.Spans[2].LeftNode.BendingMoment, Is.Null); Assert.That(_beam.Spans[3].LeftNode.NormalForce?.Value, Is.Not.Null); Assert.That(_beam.Spans[3].LeftNode.ShearForce?.Value, Is.Not.Null); Assert.That(_beam.Spans[3].LeftNode.BendingMoment, Is.Null); Assert.That(_beam.Spans[3].RightNode.NormalForce?.Value, Is.Not.Null); Assert.That(_beam.Spans[3].RightNode.ShearForce?.Value, Is.Not.Null); Assert.That(_beam.Spans[3].RightNode.BendingMoment, Is.Null); }
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 FreeNode(); var node3 = new FreeNode(); var node4 = new SupportedNode(); var node5 = new SupportedNode(); var nodes = new Node[] { node1, node2, node3, node4, node5 }; var span1 = new Span( leftNode: node1, length: 5, rightNode: node2, material: material, section: section, includeSelfWeight: false ); var span2 = new Span( leftNode: node2, length: 7, rightNode: node3, material: material, section: section, includeSelfWeight: false ); var span3 = new Span( leftNode: node3, length: 5, rightNode: node4, material: material, section: section, includeSelfWeight: false ); var span4 = new Span( leftNode: node4, length: 3, rightNode: node5, material: material, section: section, includeSelfWeight: false ); var spans = new Span[] { span1, span2, span3, span4 }; node2.ConcentratedForces.Add(new BendingMoment(value: 56)); node3.ConcentratedForces.Add(new ShearLoad(value: 100)); var startLoad1 = new LoadData(value: -15, position: 1); var endLoad1 = new LoadData(value: -25, position: 5); span1.ContinousLoads.Add(ContinousShearLoad.Create(startLoad1, endLoad1)); var startLoad2 = new LoadData(value: -25, position: 0); var endLoad2 = new LoadData(value: 25, position: 4); span3.ContinousLoads.Add(ContinousShearLoad.Create(startLoad2, endLoad2)); var pointLoad1 = new ShearLoad(value: -150, position: 3.4); span2.PointLoads.Add(pointLoad1); var pointLoad2 = new ShearLoad(value: -50, position: 1.5); span4.PointLoads.Add(pointLoad2); _beam = new Beam(spans, nodes, includeSelfWeight: false); _beam.CalculationEngine.Calculate(); }
public override void Init() { clock = new Timer() { Interval = 1000 }; stopwatch = new Stopwatch(); clock.Elapsed += delegate { lCountDown.Content = (--countdown).ToString(); if (countdown == 0) { BoxRenderer boxR = new BoxRenderer(Game.Context); Global.Window.Dispatcher.BeginInvoke(new Action(delegate { Game.ChangeRenderer(boxR);boxR.StartNew(); })); clock.Stop(); } }; //Camera.LookAt(new Vector3(3,0f, 3), new Vector3(-6.5f, 5.55f, -6.5f)); int[] condition = conditions[Test.BoxIndex % conditions.Count]; bool[] arrowCondition = arrowConditions[condition[1]]; boxSize = new float[] { arrowCondition[0] ? 1.5f : 4.5f, arrowCondition[1] ? 1.5f : 4.5f, arrowCondition[2] ? 1.5f : 4.5f }; box = new Box(1, 1, 1); box.ScalingValues = new Vector3(boxSize[0], boxSize[1], boxSize[2]); sWidget = new ScalingWidget(box); RenderableNode rNodeBox = new RenderableNode(box) { Label = "RBox" }; float[] axis = axes[condition[2]]; FixedNode fNodeFrame = new FixedNode { Label = "fGrid", Position = Vector3.Zero, Rotation = Quaternion.RotationYawPitchRoll(MathHelper.DegreesToRadians(axis[0]), MathHelper.DegreesToRadians(axis[1]), MathHelper.DegreesToRadians(axis[2])) }; fNodeBox = new FixedNode { Label = "fBox", }; NewSession(); CameraAnchorNode coNode = new CameraAnchorNode(); Scene.Tree.RootNode.AppendChild(fNodeFrame); Scene.Tree.RootNode.AppendChild(coNode); fNodeBox.AppendChild(rNodeBox); fNodeFrame.AppendChild(bbox.ToBranch()); fNodeFrame.AppendChild(fNodeBox); FixedNode nWidget = sWidget.ToBranch(); fNodeBox.AppendChild(nWidget); DeviceContext.Immediate.InputAssembler.PrimitiveTopology = PrimitiveTopology.TriangleList; Hud = Hud.FromDescription(Game.Context.Device, new HudDescription( width: Game.Context.Settings.ScreenWidth, height: Game.Context.Settings.ScreenHeight, zNear: Game.CurrentRenderer.Camera.NearClip, zFar: Game.CurrentRenderer.Camera.FarClip, cameraEnabled: true, multithreaded: true )); OdysseyUI.CurrentHud = Hud; Hud.BeginDesign(); bNew = new Button() { Size = new System.Drawing.Size(120, 60), Content = "New Session", Position = new Vector2(1760, 0) }; Button bSession = new Button() { Size = new System.Drawing.Size(120, 30), Content = "Next", Position = new Vector2(1760, 40) }; bSession.MouseClick += (sender, e) => { //Test.BoxIndex++; Test.Count= (Test.Count + 1) % conditions.Count; BoxRenderer boxR = new BoxRenderer(Game.Context); Global.Window.Dispatcher.BeginInvoke(new Action(delegate { Game.ChangeRenderer(boxR); boxR.StartNew(); })); }; Button bStop = new Button { Size = new System.Drawing.Size(120, 60), Content = "Stop", Position = new Vector2(0, 1020) }; bStop.TouchUp += (sender, e) => { stopwatch.Stop(); Stop(new BoxEventArgs(startTime,DateTime.Now, true)); }; lCountDown = new Label() { Content = "3", Position = new Vector2(800, 300), IsVisible = false, TextDescriptionClass = "Huge" }; rp = new TouchRayPanel { Size = Hud.Size, };//Camera = this.Camera }; rp.SetScalingWidget(sWidget); rp.SetBox(box); rp.SetFrame((IBox)bbox); rp.SetArrowConditions(arrowCondition); rp.SetAxis(axis); Hud.Add(rp); //rp.Add(bSession); //rp.Add(bConnect); //rp.Add(bTracking); // rp.Add(bStop); rp.Add(bNew); rp.Completed += (sender, e) => ((BoxRenderer)Game.CurrentRenderer).Stop(e); bNew.MouseUp += delegate { if (startingNewSession) return; startingNewSession = true; Hud.BeginDesign(); lCountDown.IsVisible = true; Hud.Controls.Add(lCountDown); Hud.EndDesign(); clock.Start(); }; Hud.Init(); Hud.EndDesign(); Scene.BuildRenderScene(); Hud.AddToScene(this, Scene); IsInited = true; }