public static void TestPlateBending() { //small testing plate bending 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 DkqHelper(); 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 DkqHelper stiffness"); } } }
public void Dkq_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 DkqHelper() { TargetElement = elm }; var test = hlp.GetBMatrixAt(elm, 0.1, 0.2); var exact = new Matrix(3, 12); //todo: fill the exact }