Ejemplo n.º 1
0
        /// <inheritdoc />
        public override Matrix GetGlobalStifnessMatrix()
        {
            //step 1 : get points in local system
            //step 2 : get local stiffness matrix
            //step 3 : expand local stiffness matrix
            //step 4 : get global stiffness matrix

            //step 1
            var ls = GetLocalPoints();

            var xs = new [] { ls[0].X, ls[1].X, ls[2].X };
            var ys = new [] { ls[0].Y, ls[1].Y, ls[2].Y };

            //step 2
            var kl = CstElement.GetStiffnessMatrix(xs, ys, this._thickness, this.ElasticModulus, this.PoissonRatio,
                                                   this._formulationType);

            //step 3
            var currentOrder = new []
            {
                new FluentElementPermuteManager.ElementLocalDof(0, DoF.Dx),
                new FluentElementPermuteManager.ElementLocalDof(0, DoF.Dy),

                new FluentElementPermuteManager.ElementLocalDof(1, DoF.Dx),
                new FluentElementPermuteManager.ElementLocalDof(1, DoF.Dy),

                new FluentElementPermuteManager.ElementLocalDof(2, DoF.Dx),
                new FluentElementPermuteManager.ElementLocalDof(2, DoF.Dy),
            };

            var kle = FluentElementPermuteManager.FullyExpand(kl, currentOrder, 3);

            var lambda = GetTransformationMatrix();

            var tr = Matrix.DiagonallyRepeat(lambda.Transpose(), 6); // eq. 5-16 page 78 (87 of file)

            //step 4 : get global stiffness matrix
            var buf = tr.Transpose() * kle * tr; //eq. 5-15 p77

            return(buf);
        }
        private Matrix GetLocalMembraneStiffnessMatrix()
        {
            //cst

            //step 1 : get points in local system
            //step 2 : get local stiffness matrix
            //step 3 : expand local stiffness matrix
            //step 4 : get global stiffness matrix

            //step 1
            var ls = GetLocalPoints();

            var xs = new[] { ls[0].X, ls[1].X, ls[2].X };
            var ys = new[] { ls[0].Y, ls[1].Y, ls[2].Y };

            //step 2
            var kl = CstElement.GetStiffnessMatrix(xs, ys, this._thickness, this.ElasticModulus, this.PoissonRatio,
                                                   this._formulationType);

            //step 3
            var currentOrder = new[]
            {
                new ElementPermuteHelper.ElementLocalDof(0, DoF.Dx),
                new ElementPermuteHelper.ElementLocalDof(0, DoF.Dy),

                new ElementPermuteHelper.ElementLocalDof(1, DoF.Dx),
                new ElementPermuteHelper.ElementLocalDof(1, DoF.Dy),

                new ElementPermuteHelper.ElementLocalDof(2, DoF.Dx),
                new ElementPermuteHelper.ElementLocalDof(2, DoF.Dy),
            };

            var kle = ElementPermuteHelper.FullyExpand(kl, currentOrder, 3);

            return(kle);
        }