Ejemplo n.º 1
0
        public void YZProfileFromHeightFlowStorageExceptionNonAscendingYZProfile()
        {
            //       [---------------] width 15
            //
            //
            //
            // [---------------------------] width 20
            IList <HeightFlowStorageWidth> tabulatedData = new List <HeightFlowStorageWidth>
            {
                new HeightFlowStorageWidth(0.0, 25, 15),
                new HeightFlowStorageWidth(-10.0, 30, 20)
            };
            IList <ICoordinate> yZValues = new List <ICoordinate>();

            CrossSectionHelper.CalculateYZProfileFromTabulatedCrossSection(yZValues, tabulatedData, "kees", true);
        }
Ejemplo n.º 2
0
        public void YZProfileFromHeightFlowStorageWidthWithVerticalSide()
        {
            // [---------------------------] width 15
            //
            //
            //
            // [---------------------------] width 15
            IList <HeightFlowStorageWidth> tabulatedData = new List <HeightFlowStorageWidth>
            {
                new HeightFlowStorageWidth(-10.0, 25, 15),
                new HeightFlowStorageWidth(0.0, 25, 15)
            };
            IList <ICoordinate> yZValues = new List <ICoordinate>();

            CrossSectionHelper.CalculateYZProfileFromTabulatedCrossSection(yZValues, tabulatedData, "", true);
            Assert.AreEqual(4, yZValues.Count);
            // left part:
            // 0 (-7.5001, 0)
            //  \
            //   \
            //    1
            // (-7.5, -10)
            Assert.AreEqual(-7.501, yZValues[0].X, 1.0e-6);
            Assert.AreEqual(0.0, yZValues[0].Y, 1.0e-6);
            Assert.AreEqual(-7.5, yZValues[1].X, 1.0e-6);
            Assert.AreEqual(-10.0, yZValues[1].Y, 1.0e-6);

            // left part:
            //               3 (7.5001, 0)
            //              /
            //             /
            //   ---------2
            //       (7.5, -10)
            Assert.AreEqual(7.5, yZValues[2].X, 1.0e-6);
            Assert.AreEqual(-10.0, yZValues[2].Y, 1.0e-6);
            Assert.AreEqual(7.501, yZValues[3].X, 1.0e-6);
            Assert.AreEqual(0.0, yZValues[3].Y, 1.0e-6);
        }