Пример #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);
        }
Пример #2
0
        public StrainTensor GetMembraneInternalStrain(Element targetElement, LoadCase loadCase, params double[] isoCoords)
        {
            //dkt have no membrane


            //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
            //step 5 : e=B*U
            //Note : Steps changed...
            var lds = new Displacement[targetElement.Nodes.Length];
            var tr  = targetElement.GetTransformationManager();

            for (var i = 0; i < targetElement.Nodes.Length; i++)
            {
                var globalD = targetElement.Nodes[i].GetNodalDisplacement(loadCase);
                var local   = tr.TransformGlobalToLocal(globalD);
                lds[i] = local;
            }

            // var locals = tr.TransformGlobalToLocal(globalDisplacements);

            var b = GetBMatrixAt(targetElement, isoCoords);

            var u1l = lds[0];
            var u2l = lds[1];
            var u3l = lds[2];

            var uDkt =
                targetElement.MatrixPool.Allocate(new[]
                                                  { u1l.DZ, u1l.RX, u1l.RY, /**/ u2l.DZ, u2l.RX, u2l.RY, /**/ u3l.DZ, u3l.RX, u3l.RY });

            var ECst = b * uDkt;

            var buf = new StrainTensor();

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

            return(buf);
        }
        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 = Matrix.OfVector(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 = Matrix.OfVector(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);
        }

        #endregion

        #region stresses
        /// <summary>
        /// Gets the internal stress at defined location.
        /// tensor is in local coordinate system.
        /// </summary>
        /// <param name="localX">The X in local coordinate system (see remarks).</param>
        /// <param name="localY">The Y in local coordinate system (see remarks).</param>
        /// <param name="combination">The load combination.</param>
        /// <param name="probeLocation">The probe location for the stress.</param>
        /// <param name="thickness">The location for the bending stress. Maximum at the shell thickness</param>
        /// <returns>Stress tensor of flat shell, in local coordination system</returns>
        /// <remarks>
        /// for more info about local coordinate of flat shell see page [72 of 166] (page 81 of pdf) of "Development of Membrane, Plate and Flat Shell Elements in Java" thesis by Kaushalkumar Kansara freely available on the web
        /// </remarks>
        public FlatShellStressTensor GetInternalStress(double localX, double localY, LoadCombination combination, double thickness, SectionPoints probeLocation)
        {
            var buf = new FlatShellStressTensor();

            if ((this._behaviour & PlaneElementBehaviour.ThinPlate) != 0)
            {
                buf.MembraneTensor = GetMembraneInternalForce(combination);
            }

            if ((this._behaviour & PlaneElementBehaviour.Membrane) != 0)
            {
                buf.BendingTensor = GetBendingInternalForce(localX, localY, combination);
            }

            buf.UpdateTotalStress(thickness, probeLocation);
            return(buf);
        }

        #endregion

        #region strains
        public StrainTensor GetMembraneInternalStrain(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
            //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(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 = Matrix.OfVector(new[]
                                       { d1l.DX, d1l.DY, d2l.DX, d2l.DY, /**/ d3l.DX, d3l.DY });

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

            var ECst = bCst * uCst;

            var buf = new StrainTensor();

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

            return(buf);
        }