Beispiel #1
0
        public StrainTensor GetBendingInternalStrain(double localX, double localY, LoadCombination cmb)
        {
            //step 1 : get transformation matrix
            //step 2 : convert globals points to locals
            //step 3 : convert global displacements to locals
            //step 4 : calculate B matrix
            //step 5 : e=B*U
            //Note : Steps changed...

            var trans = this.GetTransformationMatrix();

            var lp = GetLocalPoints();

            var g2l = new Func <Vector, Vector>(glob => (trans.Transpose() * glob.ToMatrix()).ToVector());
            //var l2g = new Func<Vector, Vector>(local => (trans*local.ToMatrix()).ToPoint());


            var d1g = this.nodes[0].GetNodalDisplacement(cmb);
            var d2g = this.nodes[1].GetNodalDisplacement(cmb);
            var d3g = this.nodes[2].GetNodalDisplacement(cmb);

            //step 3
            var d1l = new Displacement(g2l(d1g.Displacements), g2l(d1g.Rotations));
            var d2l = new Displacement(g2l(d2g.Displacements), g2l(d2g.Rotations));
            var d3l = new Displacement(g2l(d3g.Displacements), g2l(d3g.Rotations));

            var uDkt =
                new Matrix(new[]
                           { d1l.DZ, d1l.RX, d1l.RY, /**/ d2l.DZ, d2l.RX, d2l.RY, /**/ d3l.DZ, d3l.RX, d3l.RY });



            var b = DktElement.GetBMatrix(localX, localY,
                                          lp.Select(i => i.X).ToArray(),
                                          lp.Select(i => i.Y).ToArray());

            var mDkt = b * uDkt;

            var buf = new StrainTensor();

            buf.S11 = mDkt[0, 0];
            buf.S22 = mDkt[1, 0];
            buf.S12 = mDkt[2, 0];

            return(buf);
        }
Beispiel #2
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 double[] { ls[0].X, ls[1].X, ls[2].X };
            var ys = new double[] { ls[0].Y, ls[1].Y, ls[2].Y };

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

            //step 3
            var currentOrder = new FluentElementPermuteManager.ElementLocalDof[]
            {
                new FluentElementPermuteManager.ElementLocalDof(0, DoF.Dz),
                new FluentElementPermuteManager.ElementLocalDof(0, DoF.Rx),
                new FluentElementPermuteManager.ElementLocalDof(0, DoF.Ry),

                new FluentElementPermuteManager.ElementLocalDof(1, DoF.Dz),
                new FluentElementPermuteManager.ElementLocalDof(1, DoF.Rx),
                new FluentElementPermuteManager.ElementLocalDof(1, DoF.Ry),

                new FluentElementPermuteManager.ElementLocalDof(2, DoF.Dz),
                new FluentElementPermuteManager.ElementLocalDof(2, DoF.Rx),
                new FluentElementPermuteManager.ElementLocalDof(2, DoF.Ry),
            };

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

            var lambda = GetTransformationMatrix();

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

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

            return(buf);
        }
        public Matrix GetLocalPlateBendingStiffnessMatrix()
        {
            //dkt

            //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 double[] { ls[0].X, ls[1].X, ls[2].X };
            var ys = new double[] { ls[0].Y, ls[1].Y, ls[2].Y };

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

            //step 3
            var currentOrder = new ElementPermuteHelper.ElementLocalDof[]
            {
                new ElementPermuteHelper.ElementLocalDof(0, DoF.Dz),
                new ElementPermuteHelper.ElementLocalDof(0, DoF.Rx),
                new ElementPermuteHelper.ElementLocalDof(0, DoF.Ry),

                new ElementPermuteHelper.ElementLocalDof(1, DoF.Dz),
                new ElementPermuteHelper.ElementLocalDof(1, DoF.Rx),
                new ElementPermuteHelper.ElementLocalDof(1, DoF.Ry),

                new ElementPermuteHelper.ElementLocalDof(2, DoF.Dz),
                new ElementPermuteHelper.ElementLocalDof(2, DoF.Rx),
                new ElementPermuteHelper.ElementLocalDof(2, DoF.Ry),
            };

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


            return(kle);
        }
Beispiel #4
0
 /// <summary>
 /// Gets the 3x3 transformation matrix which converts local and global coordinates to each other.
 /// </summary>
 /// <returns>Transformation matrix.</returns>
 /// <remarks>
 /// GC = T * LC
 /// where
 ///  GC: Global Coordinates [X;Y;Z] (3x1) (same as lambda in "Development of Membrane, Plate and Flat Shell Elements in Java" thesis by Kaushalkumar Kansara available on the web).
 ///  LC: Local Coordinates [x;y;z] (3x1) (same as xyz in "Development of Membrane, Plate and Flat Shell Elements in Java" thesis by Kaushalkumar Kansara available on the web).
 ///  T: Transformation Matrix (from this method) (3x3) (same as XYZ in "Development of Membrane, Plate and Flat Shell Elements in Java" thesis by Kaushalkumar Kansara available on the web).
 /// </remarks>
 private Matrix GetTransformationMatrix()
 {
     return(DktElement.GetTransformationMatrix(nodes[0].Location, nodes[1].Location, nodes[2].Location));
 }
        private MembraneStressTensor GetMembraneInternalForce(LoadCombination combination)
        {
            //Note: membrane internal force is constant

            //step 1 : get transformation matrix
            //step 2 : convert globals points to locals
            //step 3 : convert global displacements to locals
            //step 4 : calculate B matrix and D matrix
            //step 5 : M=D*B*U
            //Note : Steps changed...

            var trans = this.GetTransformationMatrix();

            var lp = GetLocalPoints();

            var g2l = new Func <Vector, Vector>(glob => (trans.Transpose() * glob.ToMatrix()).ToVector());
            //var l2g = new Func<Vector, Vector>(local => (trans*local.ToMatrix()).ToPoint());


            var d1g = this.nodes[0].GetNodalDisplacement(combination);
            var d2g = this.nodes[1].GetNodalDisplacement(combination);
            var d3g = this.nodes[2].GetNodalDisplacement(combination);

            //step 3
            var d1l = new Displacement(g2l(d1g.Displacements), g2l(d1g.Rotations));
            var d2l = new Displacement(g2l(d2g.Displacements), g2l(d2g.Rotations));
            var d3l = new Displacement(g2l(d3g.Displacements), g2l(d3g.Rotations));

            var uCst =
                new Matrix(new[]
                           { d1l.DX, d1l.DY, d2l.DX, d2l.DY, /**/ d3l.DX, d3l.DY });

            var dbCst = CstElement.GetDMatrix(_elasticModulus, _poissonRatio, _formulationType);

            var bCst = CstElement.GetBMatrix(lp.Select(i => i.X).ToArray(),
                                             lp.Select(i => i.Y).ToArray());

            var sCst = dbCst * bCst * uCst;

            var buf = new MembraneStressTensor();

            buf.Sx  = sCst[0, 0];
            buf.Sy  = sCst[1, 0];
            buf.Txy = sCst[2, 0];

            return(buf);
        }

        private PlateBendingStressTensor GetBendingInternalForce(double localX, double localY, LoadCombination cmb)
        {
            //step 1 : get transformation matrix
            //step 2 : convert globals points to locals
            //step 3 : convert global displacements to locals
            //step 4 : calculate B matrix and D matrix
            //step 5 : M=D*B*U
            //Note : Steps changed...

            var trans = this.GetTransformationMatrix();

            var lp = GetLocalPoints();

            var g2l = new Func <Vector, Vector>(glob => (trans.Transpose() * glob.ToMatrix()).ToVector());
            //var l2g = new Func<Vector, Vector>(local => (trans*local.ToMatrix()).ToPoint());


            var d1g = this.nodes[0].GetNodalDisplacement(cmb);
            var d2g = this.nodes[1].GetNodalDisplacement(cmb);
            var d3g = this.nodes[2].GetNodalDisplacement(cmb);

            //step 3
            var d1l = new Displacement(g2l(d1g.Displacements), g2l(d1g.Rotations));
            var d2l = new Displacement(g2l(d2g.Displacements), g2l(d2g.Rotations));
            var d3l = new Displacement(g2l(d3g.Displacements), g2l(d3g.Rotations));

            var uDkt =
                new Matrix(new[]
                           { d1l.DZ, d1l.RX, d1l.RY, /**/ d2l.DZ, d2l.RX, d2l.RY, /**/ d3l.DZ, d3l.RX, d3l.RY });


            var dbDkt = DktElement.GetDMatrix(this._thickness, this._elasticModulus, this._poissonRatio);



            var b = DktElement.GetBMatrix(localX, localY,
                                          lp.Select(i => i.X).ToArray(),
                                          lp.Select(i => i.Y).ToArray());

            var mDkt = dbDkt * b * uDkt; //eq. 32, batoz article

            var buf = new PlateBendingStressTensor();

            buf.Mx  = mDkt[0, 0];
            buf.My  = mDkt[1, 0];
            buf.Mxy = mDkt[2, 0];

            return(buf);
        }