public static void TestMembrane()
        {
            //small testing main diagonal of membrane local stiffness matrix
            //there should not be zny zero on main diagonal of either local or global stiffness matrix,
            //otherwise we get not positive definite exception error

            var elm = new QuadrilaturalElement();

            var arr = new[]
            {
                new Node(1, 1, 0),
                new Node(4, 1, 0),
                new Node(4, 4, 0),
                new Node(1, 4, 0),
            };

            arr.CopyTo(elm.Nodes, 0);

            var dkq = new Q4MembraneHelper();

            elm.Material = new UniformIsotropicMaterial(2100, 0.3);
            elm.Section  = new UniformParametric2DSection(0.2);

            var k = dkq.CalcLocalStiffnessMatrix(elm);

            var n = k.RowCount;

            for (var i = 0; i < n; i++)
            {
                if (k[i, i] <= 0)
                {
                    Console.WriteLine("non positive entry on diagonal of Q4MembraneHelper stiffness");
                }
            }
        }
Exemple #2
0
        public void Q4Membrane_GetBMatrix()
        {
            var elm = new QuadrilaturalElement();

            elm.Nodes[0] = new Node(0, 0, 0);
            elm.Nodes[1] = new Node(1, 10, 0);
            elm.Nodes[2] = new Node(11, 12, 0);
            elm.Nodes[3] = new Node(9, 2, 0);

            var hlp = new Q4MembraneHelper()
            {
                TargetElement = elm
            };

            var test  = hlp.GetBMatrixAt(elm, 0.1, 0.2);
            var exact = new Matrix(3, 8);

            //todo: fill the exact
        }