Esempio n. 1
0
 public DoubleCantileverBeam()
 {
     this.material    = HomogeneousElasticMaterial2D.CreateMaterialForPlaneStrain(E, v);
     this.integration = new IntegrationForCrackPropagation2D(
         new RectangularSubgridIntegration2D <XContinuumElement2D>(8, GaussLegendre2D.GetQuadratureWithOrder(2, 2)),
         new RectangularSubgridIntegration2D <XContinuumElement2D>(8, GaussLegendre2D.GetQuadratureWithOrder(2, 2)));
     this.jIntegration =
         new RectangularSubgridIntegration2D <XContinuumElement2D>(8, GaussLegendre2D.GetQuadratureWithOrder(4, 4));
     this.beamBoundary = new Rectangular2DBoundary(0, beamLength, 0, beamHeight);
 }
        static ContinuumElement2DFactory()
        {
            // Mass integrations require as many Gauss points as there are nodes, in order for the consistent mass matrix to be
            // of full rank (and symmetric positive definite)

            // Collections' declarations
            var interpolations           = new Dictionary <CellType, IIsoparametricInterpolation2D>();
            var integrationsForStiffness = new Dictionary <CellType, IQuadrature2D>();
            var integrationsForMass      = new Dictionary <CellType, IQuadrature2D>();
            var extrapolations           = new Dictionary <CellType, IGaussPointExtrapolation2D>();

            // Quad4
            interpolations.Add(CellType.Quad4, InterpolationQuad4.UniqueInstance);
            integrationsForStiffness.Add(CellType.Quad4, GaussLegendre2D.GetQuadratureWithOrder(2, 2));
            integrationsForMass.Add(CellType.Quad4, GaussLegendre2D.GetQuadratureWithOrder(2, 2));
            extrapolations.Add(CellType.Quad4, ExtrapolationGaussLegendre2x2.UniqueInstance);

            // Quad8
            interpolations.Add(CellType.Quad8, InterpolationQuad8.UniqueInstance);
            integrationsForStiffness.Add(CellType.Quad8, GaussLegendre2D.GetQuadratureWithOrder(3, 3));
            integrationsForMass.Add(CellType.Quad8, GaussLegendre2D.GetQuadratureWithOrder(3, 3));
            extrapolations.Add(CellType.Quad8, ExtrapolationGaussLegendre3x3.UniqueInstance);

            // Quad9
            interpolations.Add(CellType.Quad9, InterpolationQuad9.UniqueInstance);
            integrationsForStiffness.Add(CellType.Quad9, GaussLegendre2D.GetQuadratureWithOrder(3, 3));
            integrationsForMass.Add(CellType.Quad9, GaussLegendre2D.GetQuadratureWithOrder(3, 3));
            extrapolations.Add(CellType.Quad9, ExtrapolationGaussLegendre3x3.UniqueInstance);

            // Tri3
            interpolations.Add(CellType.Tri3, InterpolationTri3.UniqueInstance);
            integrationsForStiffness.Add(CellType.Tri3, TriangleQuadratureSymmetricGaussian.Order1Point1);
            integrationsForMass.Add(CellType.Tri3, TriangleQuadratureSymmetricGaussian.Order2Points3);
            extrapolations.Add(CellType.Tri3, ExtrapolationGaussTriangular1Point.UniqueInstance);

            // Tri 6
            interpolations.Add(CellType.Tri6, InterpolationTri6.UniqueInstance);
            // see https://www.colorado.edu/engineering/CAS/courses.d/IFEM.d/IFEM.Ch24.d/IFEM.Ch24.pdf, p. 24-13, paragraph "options"
            integrationsForStiffness.Add(CellType.Tri6, TriangleQuadratureSymmetricGaussian.Order2Points3);
            integrationsForMass.Add(CellType.Tri6, TriangleQuadratureSymmetricGaussian.Order4Points6);
            extrapolations.Add(CellType.Tri6, ExtrapolationGaussTriangular3Points.UniqueInstance);

            // Static field assignments
            ContinuumElement2DFactory.interpolations           = interpolations;
            ContinuumElement2DFactory.integrationsForStiffness = integrationsForStiffness;
            ContinuumElement2DFactory.integrationsForMass      = integrationsForMass;
            ContinuumElement2DFactory.extrapolations           = extrapolations;
        }
        private static XContinuumElement2D CreateCrackBodyElement()
        {
            XNode[] nodes = new XNode[]
            {
                new XNode(0, 20.0, 0.0),
                new XNode(1, 40.0, 0.0),
                new XNode(2, 40.0, 20.0),
                new XNode(3, 20.0, 20.0),

                new XNode(4, 20.0, -40.0),
                new XNode(5, 40.0, -40.0),
                new XNode(6, 40.0, -20.0),
                new XNode(7, 20.0, -20.0)
            };

            double E        = 2e6;
            double v        = 0.3;
            var    material = HomogeneousElasticMaterial2D.CreateMaterialForPlaneStrain(E, v);

            var integrationStrategy = new IntegrationForCrackPropagation2D(
                new RectangularSubgridIntegration2D <XContinuumElement2D>(2, GaussLegendre2D.GetQuadratureWithOrder(2, 2)),
                new SimpleIntegration2D());
            //var integrationStrategy = new IntegrationForCrackPropagation2D(GaussLegendre2D.GetQuadratureWithOrder(2, 2),
            //  new RectangularSubgridIntegration2D<XContinuumElement2D>(2, GaussLegendre2D.GetQuadratureWithOrder(2, 2)));
            var factory         = new XContinuumElement2DFactory(integrationStrategy, integrationStrategy, material);
            var bodyElement     = factory.CreateElement(0, CellType.Quad4, new XNode[] { nodes[0], nodes[1], nodes[2], nodes[3] });
            var blendingElement = factory.CreateElement(1, CellType.Quad4, new XNode[] { nodes[7], nodes[6], nodes[1], nodes[0] });
            var tipElement      = factory.CreateElement(2, CellType.Quad4, new XNode[] { nodes[4], nodes[5], nodes[6], nodes[7] });
            var boundary        = new Rectangular2DBoundary(20.0, 40.0, -40.0, 20.0);
            var mesh            = new SimpleMesh2D <XNode, XContinuumElement2D>(nodes,
                                                                                new XContinuumElement2D[] { bodyElement, blendingElement, tipElement }, boundary);

            var crack = new BasicExplicitCrack2D();

            crack.Mesh = mesh;
            crack.CrackBodyEnrichment = new CrackBodyEnrichment2D(crack);
            crack.CrackTipEnrichments = new CrackTipEnrichments2D(crack, CrackTipPosition.Single);

            var point1 = new CartesianPoint(30.0, 20.0);
            var point2 = new CartesianPoint(30.0, -30.0);

            crack.InitializeGeometry(point1, point2);
            crack.UpdateEnrichments();

            return(bodyElement);
        }
Esempio n. 4
0
        private static (XModel model, IMesh2D <XNode, XContinuumElement2D> mesh) CreateModel(string meshPath)
        {
            // Mesh generation
            var reader = new GmshReader <XNode>(meshPath);

            (IReadOnlyList <XNode> nodes, IReadOnlyList <CellConnectivity <XNode> > elementConnectivities) = reader.CreateMesh(
                (id, x, y, z) => new XNode(id, x, y, z));

            // Nodes
            var model = new XModel();

            foreach (XNode node in nodes)
            {
                model.Nodes.Add(node);
            }

            // Integration rules
            var integration = new IntegrationForCrackPropagation2D(
                new RectangularSubgridIntegration2D <XContinuumElement2D>(8, GaussLegendre2D.GetQuadratureWithOrder(2, 2)),
                new RectangularSubgridIntegration2D <XContinuumElement2D>(8, GaussLegendre2D.GetQuadratureWithOrder(2, 2)));
            var jIntegration =
                new RectangularSubgridIntegration2D <XContinuumElement2D>(8, GaussLegendre2D.GetQuadratureWithOrder(4, 4));

            // Elements
            var material = HomogeneousElasticMaterial2D.CreateMaterialForPlaneStrain(2.1E7, 0.3);
            var factory  = new XContinuumElement2DFactory(integration, jIntegration, material);
            var cells    = new XContinuumElement2D[elementConnectivities.Count];

            for (int e = 0; e < cells.Length; ++e)
            {
                XContinuumElement2D element = factory.CreateElement(e, CellType.Quad4, elementConnectivities[e].Vertices);
                cells[e] = element;
                model.Elements.Add(element);
            }

            // Mesh usable for crack-mesh interaction
            //var boundary = new FilletBoundary();
            IDomain2DBoundary boundary = null;

            model.Boundary = boundary;
            var mesh = new BidirectionalMesh2D <XNode, XContinuumElement2D>(model.Nodes, cells, boundary);

            return(model, mesh);
        }
        private void CreateMesh()
        {
            Model.Subdomains.Add(subdomainID, new XSubdomain(subdomainID));

            // Mesh generation
            var reader = new GmshReader <XNode>(meshPath);

            (IReadOnlyList <XNode> nodes, IReadOnlyList <CellConnectivity <XNode> > elementConnectivities) = reader.CreateMesh(
                (id, x, y, z) => new XNode(id, x, y, z));

            // Nodes
            foreach (XNode node in nodes)
            {
                Model.Nodes.Add(node);
            }

            // Integration rules
            var integration = new IntegrationForCrackPropagation2D(
                new RectangularSubgridIntegration2D <XContinuumElement2D>(8, GaussLegendre2D.GetQuadratureWithOrder(2, 2)),
                new RectangularSubgridIntegration2D <XContinuumElement2D>(8, GaussLegendre2D.GetQuadratureWithOrder(2, 2)));
            var jIntegration =
                new RectangularSubgridIntegration2D <XContinuumElement2D>(8, GaussLegendre2D.GetQuadratureWithOrder(4, 4));

            // Elements
            var material = HomogeneousElasticMaterial2D.CreateMaterialForPlaneStrain(E, v);
            var factory  = new XContinuumElement2DFactory(integration, jIntegration, material);
            var cells    = new XContinuumElement2D[elementConnectivities.Count];

            for (int e = 0; e < cells.Length; ++e)
            {
                XContinuumElement2D element = factory.CreateElement(e, CellType.Quad4, elementConnectivities[e].Vertices);
                cells[e] = element;
                Model.Elements.Add(element);
                Model.Subdomains[subdomainID].Elements.Add(Model.Elements[e]);
            }

            // Mesh usable for crack-mesh interaction
            var boundary = new HolesBoundary();

            Model.Boundary = boundary;
            Mesh           = new BidirectionalMesh2D <XNode, XContinuumElement2D>(Model.Nodes, cells, boundary);
        }
        static SurfaceLoadElementFactory()
        {
            var interpolations     = new Dictionary <CellType, IIsoparametricInterpolation2D>();
            var integrationForLoad = new Dictionary <CellType, IQuadrature2D>();

            interpolations.Add(CellType.Quad4, InterpolationQuad4.UniqueInstance);
            integrationForLoad.Add(CellType.Quad4, GaussLegendre2D.GetQuadratureWithOrder(2, 2));

            interpolations.Add(CellType.Quad8, InterpolationQuad8.UniqueInstance);
            integrationForLoad.Add(CellType.Quad8, GaussLegendre2D.GetQuadratureWithOrder(3, 3));

            interpolations.Add(CellType.Tri3, InterpolationTri3.UniqueInstance);
            integrationForLoad.Add(CellType.Tri3, TriangleQuadratureSymmetricGaussian.Order1Point1);

            interpolations.Add(CellType.Tri6, InterpolationTri6.UniqueInstance);
            integrationForLoad.Add(CellType.Tri6, TriangleQuadratureSymmetricGaussian.Order2Points3);

            SurfaceLoadElementFactory.integrationForLoad = integrationForLoad;
            SurfaceLoadElementFactory.interpolations     = interpolations;
        }
        private static XContinuumElement2D CreateMaterialInterfaceElement()
        {
            XNode[] nodes = new XNode[]
            {
                new XNode(0, 20.0, 0.0),
                new XNode(1, 40.0, 0.0),
                new XNode(2, 40.0, 20.0),
                new XNode(3, 20.0, 20.0),
            };

            var                 point1         = new CartesianPoint(30.0, 0.0);
            var                 point2         = new CartesianPoint(30.0, 20.0);
            PolyLine2D          discontinuity  = new PolyLine2D(point1, point2);
            MaterialInterface2D enrichmentItem = new MaterialInterface2D(discontinuity);

            double E1       = 2E6;
            double E2       = 0.5 * E1;
            double v        = 0.3;
            var    material = BiElasticMaterial2D.CreateMaterialForPlainStrain(E1, v, E2, v, enrichmentItem);

            var integrationStrategy = new RectangularSubgridIntegration2D <XContinuumElement2D>(
                2, GaussLegendre2D.GetQuadratureWithOrder(2, 2));

            //var integrationStrategy = new IntegrationForCrackPropagation2D(GaussLegendre2D.Order2x2,
            //    new RectangularSubgridIntegration2D<XContinuumElement2D>(2, GaussLegendre2D.Order2x2));
            var factory = new XContinuumElement2DFactory(integrationStrategy, integrationStrategy, material);
            var element = factory.CreateElement(0, CellType.Quad4, nodes);

            //discontinuity.ElementIntersections.Add(element, new CartesianPoint2D[] { point1, point2 });

            //OBSOLETE: Elements access their enrichments from nodes now.
            //enrichmentItem.EnrichElement(element);
            enrichmentItem.EnrichNode(nodes[0]);
            enrichmentItem.EnrichNode(nodes[1]);
            enrichmentItem.EnrichNode(nodes[2]);
            enrichmentItem.EnrichNode(nodes[3]);

            return(element);
        }
Esempio n. 8
0
        private static void TestConsistentMass0()
        {
            IQuadrature2D quadratureForMass = GaussLegendre2D.GetQuadratureWithOrder(3, 3);

            var materialsAtGaussPoints = new List <ElasticMaterial2D>();

            foreach (GaussPoint gaussPoint in quadratureForMass.IntegrationPoints)
            {
                materialsAtGaussPoints.Add(material0.Clone());
            }
            var quad8 = new ContinuumElement2D(thickness, nodeSet0, InterpolationQuad8.UniqueInstance,
                                               GaussLegendre2D.GetQuadratureWithOrder(3, 3), quadratureForMass,
                                               ExtrapolationGaussLegendre3x3.UniqueInstance,
                                               materialsAtGaussPoints, dynamicMaterial);

            IMatrix M         = quad8.BuildConsistentMassMatrix();
            Matrix  expectedM = Matrix.CreateFromArray(new double[, ]
            {
                { 9.115245555556, 0.000000000000, 1.881383333333, 0.000000000000, 3.914882222222, 0.000000000000, 2.417800000000, 0.000000000000, -7.376906666667, 0.000000000000, -11.056637777778, 0.000000000000, -9.104604444445, 0.000000000000, -7.444940000000, 0.000000000000 },
                { 0.000000000000, 9.115245555556, 0.000000000000, 1.881383333333, 0.000000000000, 3.914882222222, 0.000000000000, 2.417800000000, 0.000000000000, -7.376906666667, 0.000000000000, -11.056637777778, 0.000000000000, -9.104604444445, 0.000000000000, -7.444940000000 },
                { 1.881383333333, 0.000000000000, 9.727545555556, 0.000000000000, 2.239866666667, 0.000000000000, 3.841615555556, 0.000000000000, -6.727973333334, 0.000000000000, -6.701806666667, 0.000000000000, -9.031337777778, 0.000000000000, -11.077571111111, 0.000000000000 },
                { 0.000000000000, 1.881383333333, 0.000000000000, 9.727545555556, 0.000000000000, 2.239866666667, 0.000000000000, 3.841615555556, 0.000000000000, -6.727973333334, 0.000000000000, -6.701806666667, 0.000000000000, -9.031337777778, 0.000000000000, -11.077571111111 },
                { 3.914882222222, 0.000000000000, 2.239866666667, 0.000000000000, 7.681312222222, 0.000000000000, 2.776283333333, 0.000000000000, -11.082804444445, 0.000000000000, -8.784673333334, 0.000000000000, -6.832640000000, 0.000000000000, -11.150837777778, 0.000000000000 },
                { 0.000000000000, 3.914882222222, 0.000000000000, 2.239866666667, 0.000000000000, 7.681312222222, 0.000000000000, 2.776283333333, 0.000000000000, -11.082804444445, 0.000000000000, -8.784673333334, 0.000000000000, -6.832640000000, 0.000000000000, -11.150837777778 },
                { 2.417800000000, 0.000000000000, 3.841615555556, 0.000000000000, 2.776283333333, 0.000000000000, 7.581878888889, 0.000000000000, -11.009537777778, 0.000000000000, -10.983371111111, 0.000000000000, -6.895440000000, 0.000000000000, -8.941673333334, 0.000000000000 },
                { 0.000000000000, 2.417800000000, 0.000000000000, 3.841615555556, 0.000000000000, 2.776283333333, 0.000000000000, 7.581878888889, 0.000000000000, -11.009537777778, 0.000000000000, -10.983371111111, 0.000000000000, -6.895440000000, 0.000000000000, -8.941673333334 },
                { -7.376906666667, 0.000000000000, -6.727973333334, 0.000000000000, -11.082804444445, 0.000000000000, -11.009537777778, 0.000000000000, 45.023413333334, 0.000000000000, 28.692622222223, 0.000000000000, 20.114142222223, 0.000000000000, 28.734488888889, 0.000000000000 },
                { 0.000000000000, -7.376906666667, 0.000000000000, -6.727973333334, 0.000000000000, -11.082804444445, 0.000000000000, -11.009537777778, 0.000000000000, 45.023413333334, 0.000000000000, 28.692622222223, 0.000000000000, 20.114142222223, 0.000000000000, 28.734488888889 },
                { -11.056637777778, 0.000000000000, -6.701806666667, 0.000000000000, -8.784673333334, 0.000000000000, -10.983371111111, 0.000000000000, 28.692622222223, 0.000000000000, 48.215746666667, 0.000000000000, 24.589688888889, 0.000000000000, 22.134208888889, 0.000000000000 },
                { 0.000000000000, -11.056637777778, 0.000000000000, -6.701806666667, 0.000000000000, -8.784673333334, 0.000000000000, -10.983371111111, 0.000000000000, 28.692622222223, 0.000000000000, 48.215746666667, 0.000000000000, 24.589688888889, 0.000000000000, 22.134208888889 },
                { -9.104604444445, 0.000000000000, -9.031337777778, 0.000000000000, -6.832640000000, 0.000000000000, -6.895440000000, 0.000000000000, 20.114142222223, 0.000000000000, 24.589688888889, 0.000000000000, 28.821013333334, 0.000000000000, 24.924622222223, 0.000000000000 },
                { 0.000000000000, -9.104604444445, 0.000000000000, -9.031337777778, 0.000000000000, -6.832640000000, 0.000000000000, -6.895440000000, 0.000000000000, 20.114142222223, 0.000000000000, 24.589688888889, 0.000000000000, 28.821013333334, 0.000000000000, 24.924622222223 },
                { -7.444940000000, 0.000000000000, -11.077571111111, 0.000000000000, -11.150837777778, 0.000000000000, -8.941673333334, 0.000000000000, 28.734488888889, 0.000000000000, 22.134208888889, 0.000000000000, 24.924622222223, 0.000000000000, 49.869480000000, 0.000000000000 },
                { 0.000000000000, -7.444940000000, 0.000000000000, -11.077571111111, 0.000000000000, -11.150837777778, 0.000000000000, -8.941673333334, 0.000000000000, 28.734488888889, 0.000000000000, 22.134208888889, 0.000000000000, 24.924622222223, 0.000000000000, 49.869480000000 }
            }); // from Abaqus

            Assert.True(M.Equals(expectedM, 1e-10));
        }
Esempio n. 9
0
        private static void TestConsistentMass0()
        {
            // reduced integration rule - bad idea
            IQuadrature2D quadratureForMass      = GaussLegendre2D.GetQuadratureWithOrder(1, 1);
            var           materialsAtGaussPoints = new List <ElasticMaterial2D>();

            foreach (GaussPoint gaussPoint in quadratureForMass.IntegrationPoints)
            {
                materialsAtGaussPoints.Add(material0.Clone());
            }
            var quad4 = new ContinuumElement2D(thickness, nodeSet1, InterpolationQuad4.UniqueInstance,
                                               GaussLegendre2D.GetQuadratureWithOrder(2, 2), quadratureForMass,
                                               ExtrapolationGaussLegendre2x2.UniqueInstance, materialsAtGaussPoints, dynamicMaterial);
            IMatrix M = quad4.BuildConsistentMassMatrix();

            Matrix expectedM = Matrix.CreateFromArray(new double[, ]
            {
                { 1, 0, 1, 0, 1, 0, 1, 0 },
                { 0, 1, 0, 1, 0, 1, 0, 1 },
                { 1, 0, 1, 0, 1, 0, 1, 0 },
                { 0, 1, 0, 1, 0, 1, 0, 1 },
                { 1, 0, 1, 0, 1, 0, 1, 0 },
                { 0, 1, 0, 1, 0, 1, 0, 1 },
                { 1, 0, 1, 0, 1, 0, 1, 0 },
                { 0, 1, 0, 1, 0, 1, 0, 1 }
            });
            double lengthX = nodeSet1[1].X - nodeSet1[0].X;
            double lengthY = nodeSet1[2].Y - nodeSet1[1].Y;

            // For some reason , only half the thickness is used for Quad4 elements, as shown in Fig. 31.9. Therefore the
            // coefficient 1/16 (full thickness) became 1/32 (half thickness). Here 1/16 is used.
            double scalar = dynamicMaterial.Density * thickness * lengthX * lengthY / 16.0;

            expectedM.ScaleIntoThis(scalar);

            Assert.True(M.Equals(expectedM, 1e-10));
        }
        private static void ExtrapolateToGaussPoints()
        {
            double tolerance     = 1e-10;
            var    extrapolation = ExtrapolationGaussLegendre3x3.UniqueInstance;
            var    gaussPoints   = GaussLegendre2D.GetQuadratureWithOrder(3, 3).IntegrationPoints;

            for (int i = 0; i < gaussPoints.Count; ++i)
            {
                var scalarsAtGPs = new double[9];
                scalarsAtGPs[i] = 1.0;
                for (int j = 0; j < gaussPoints.Count; ++j)
                {
                    double extrapolatedScalar = extrapolation.ExtrapolateScalarFromGaussPoints(scalarsAtGPs, gaussPoints[j]);
                    if (j == i)
                    {
                        Assert.True(Utilities.AreValuesEqual(1.0, extrapolatedScalar, tolerance));
                    }
                    else
                    {
                        Assert.True(Utilities.AreValuesEqual(0.0, extrapolatedScalar, tolerance));
                    }
                }
            }
        }
        private static void ShellAndCohesiveRAM_11tlkShellPaktwsh(Model model)
        {
            //Origin: dhmiourgithike kata to ParadeigmataElegxwnBuilder.ShellAndCohesiveRAM_11ShellPaktwsh(model);
            // allaxame to cohesive element
            // gewmetria
            double Tk = 0.5;

            int nodeID = 1;

            double startX = 0;
            double startY = 0;
            double startZ = 0;

            for (int l = 0; l < 3; l++)
            {
                model.NodesDictionary.Add(nodeID, new Node(id: nodeID, x: startX, y: startY + l * 0.25, z: startZ));
                nodeID++;
            }

            startX = 0.25;
            for (int l = 0; l < 2; l++)
            {
                model.NodesDictionary.Add(nodeID, new Node(id: nodeID, x: startX, y: startY + l * 0.5, z: startZ));
                nodeID++;
            }

            startX = 0.5;
            for (int l = 0; l < 3; l++)
            {
                model.NodesDictionary.Add(nodeID, new Node(id: nodeID, x: startX, y: startY + l * 0.25, z: startZ));
                nodeID++;
            }

            // katw strwsh pou tha paktwthei

            startX = 0;
            for (int l = 0; l < 3; l++)
            {
                model.NodesDictionary.Add(nodeID, new Node(id: nodeID, x: startX, y: startY + l * 0.25, z: startZ - 0.5 * Tk));
                nodeID++;
            }

            startX = 0.25;
            for (int l = 0; l < 2; l++)
            {
                model.NodesDictionary.Add(nodeID, new Node(id: nodeID, x: startX, y: startY + l * 0.5, z: startZ - 0.5 * Tk));
                nodeID++;
            }

            startX = 0.5;
            for (int l = 0; l < 3; l++)
            {
                model.NodesDictionary.Add(nodeID, new Node(id: nodeID, x: startX, y: startY + l * 0.25, z: startZ - 0.5 * Tk));
                nodeID++;
            }

            double[][] VH = new double[8][];

            for (int j = 0; j < 8; j++)
            {
                VH[j]    = new double[3];
                VH[j][0] = 0;
                VH[j][1] = 0;
                VH[j][2] = 1;
            }
            // perioxh gewmetrias ews edw

            // constraints

            nodeID = 9;
            for (int j = 0; j < 8; j++)
            {
                model.NodesDictionary[nodeID].Constraints.Add(new Constraint {
                    DOF = StructuralDof.TranslationX
                });
                model.NodesDictionary[nodeID].Constraints.Add(new Constraint {
                    DOF = StructuralDof.TranslationY
                });
                model.NodesDictionary[nodeID].Constraints.Add(new Constraint {
                    DOF = StructuralDof.TranslationZ
                });
                nodeID++;
            }
            //perioxh constraints ews edw

            // perioxh materials
            var material1 = new BenzeggaghKenaneCohesiveMaterial()
            {
                T_o_3   = 57,               // New load case argurhs NR_shell_coh.m
                D_o_3   = 5.7e-5,
                D_f_3   = 0.0098245610,
                T_o_1   = 57,
                D_o_1   = 5.7e-5,
                D_f_1   = 0.0098245610,
                n_curve = 1.4,
            };

            //ElasticMaterial3D material2 = new ElasticMaterial3D()
            //{
            //    YoungModulus = 1353000,
            //    PoissonRatio = 0.3,
            //};
            var material2 = new ShellElasticMaterial3D()
            {
                YoungModulus = 1353000,
                PoissonRatio = 0.3,
                ShearCorrectionCoefficientK = 5 / 6,
            };

            // perioxh materials ews edw


            //eisagwgh tou shell element
            double[] Tk_vec = new double[8];
            for (int j = 0; j < 8; j++)
            {
                Tk_vec[j] = Tk;
            }

            Element e1;

            e1 = new Element()
            {
                ID          = 1,
                ElementType = new Shell8NonLinear(material2, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3))
                {
                    oVn_i = VH,
                    tk    = Tk_vec,
                }
            };
            e1.NodesDictionary.Add(8, model.NodesDictionary[8]);
            e1.NodesDictionary.Add(3, model.NodesDictionary[3]);
            e1.NodesDictionary.Add(1, model.NodesDictionary[1]);
            e1.NodesDictionary.Add(6, model.NodesDictionary[6]);
            e1.NodesDictionary.Add(5, model.NodesDictionary[5]);
            e1.NodesDictionary.Add(2, model.NodesDictionary[2]);
            e1.NodesDictionary.Add(4, model.NodesDictionary[4]);
            e1.NodesDictionary.Add(7, model.NodesDictionary[7]);

            model.ElementsDictionary.Add(e1.ID, e1);
            model.SubdomainsDictionary[subdomainID].Elements.Add(e1);
            //eisagwgh shell ews edw

            // eisagwgh tou cohesive element
            int[] coh_global_nodes;
            coh_global_nodes = new int[] { 8, 3, 1, 6, 5, 2, 4, 7, 16, 11, 9, 14, 13, 10, 12, 15 };

            Element e2;

            e2 = new Element()
            {
                ID          = 2,
                ElementType = new CohesiveShell8ToHexa20(material1, GaussLegendre2D.GetQuadratureWithOrder(3, 3))
                {
                    oVn_i            = VH,
                    tk               = Tk_vec,
                    ShellElementSide = 0,
                }
            };

            for (int j = 0; j < 16; j++)
            {
                e2.NodesDictionary.Add(coh_global_nodes[j], model.NodesDictionary[coh_global_nodes[j]]);
            }

            model.ElementsDictionary.Add(e2.ID, e2);
            model.SubdomainsDictionary[subdomainID].Elements.Add(e2);
            // eisagwgh cohesive ews edw

            // perioxh loads
            double value_ext;

            value_ext = 2 * 2.5 * 0.5;

            int[] points_with_negative_load;
            points_with_negative_load = new int[] { 1, 3, 6, 8 };
            int[] points_with_positive_load;
            points_with_positive_load = new int[] { 2, 4, 5, 7 };

            Load load1;
            Load load2;

            // LOADCASE '' orthi ''
            //for (int j = 0; j < 4; j++)
            //{
            //    load1 = new Load()
            //    {
            //        Node = model.NodesDictionary[points_with_negative_load[j]],
            //        DOF = DOFType.Z,
            //        Amount = -0.3333333 * value_ext,
            //    };
            //    model.Loads.Add(load1);

            //    load2 = new Load()
            //    {
            //        Node = model.NodesDictionary[points_with_positive_load[j]],
            //        DOF = DOFType.Z,
            //        Amount = 1.3333333 * value_ext,
            //    };
            //    model.Loads.Add(load2);
            //}

            // LOADCASE '' orthi '' dixws ta duo prwta fortia  (-0.3333) kai (1.3333)
            for (int j = 0; j < 3; j++)
            {
                load1 = new Load()
                {
                    Node   = model.NodesDictionary[points_with_negative_load[j + 1]],
                    DOF    = StructuralDof.TranslationZ,
                    Amount = -0.3333333 * value_ext,
                };
                model.Loads.Add(load1);

                load2 = new Load()
                {
                    Node   = model.NodesDictionary[points_with_positive_load[j + 1]],
                    DOF    = StructuralDof.TranslationZ,
                    Amount = 1.3333333 * value_ext,
                };
                model.Loads.Add(load2);
            }


            // perioxh loads ews edw
        }
 private ExtrapolationGaussLegendre3x3() : base(GaussLegendre2D.GetQuadratureWithOrder(3, 3))
 {
 }
 private ExtrapolationGaussLegendre2x2() : base(GaussLegendre2D.GetQuadratureWithOrder(2, 2))
 {
 }
Esempio n. 14
0
 public RectangularSubgridIntegration2D(int subgridsPerAxis) :
     this(subgridsPerAxis, GaussLegendre2D.GetQuadratureWithOrder(2, 2))
 {
 }