private static void TestTriangle() { var t = 0.01; var e = 210e9; var nu = 0.2; var n1 = new Node(new Point(0, 0, 0)); var n2 = new Node(new Point(3, 5, 7)); var n3 = new Node(new Point(1, -5, 4)); var dkt = new TriangleFlatShell() { Behavior = PlaneElementBehaviour.ThinPlate, PoissonRatio = nu, ElasticModulus = e, Thickness = t }; dkt.Nodes[0] = n1; dkt.Nodes[1] = n2; dkt.Nodes[2] = n3; var tri = new TriangleElement(); tri.Behavior = PlateElementBehaviours.Shell; tri.Section = new UniformParametric2DSection() { T = t }; tri.Material = new UniformIsotropicMaterial(e, nu);// {E = e, Nu = nu}; tri.Nodes[0] = n1; tri.Nodes[1] = n2; tri.Nodes[2] = n3; var kTri = tri.GetLocalStifnessMatrix(); var kDkt = dkt.GetLocalPlateBendingStiffnessMatrix(); var d = kTri - kDkt; var xi = 0.162598494; var eta = 0.284984989; var b1 = new DktHelper().GetBMatrixAt(tri, xi, eta); var lpts = dkt.GetLocalPoints(); var b2 = DktElement.GetBMatrix(xi, eta, new[] { lpts[0].X, lpts[1].X, lpts[2].X }, new[] { lpts[0].Y, lpts[1].Y, lpts[2].Y }); // new DktHelper().GetBMatrixAt(tri, tri.GetTransformationMatrix(), xi, eta); tri.GetLocalStifnessMatrix(); //GC.Collect(); var db = b1 - b2; }
public void Dkt_GetBMatrix() { var element = new TriangleElement(); element.Nodes[0] = new Node(1, 2, 3); element.Nodes[1] = new Node(4, 5, 6); element.Nodes[2] = new Node(7, 8, 9); var helper = new DktHelper(); var b = helper.GetBMatrixAt(element, 0, 0, 0); var exact = new Matrix(3, 6); }