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
        }
Beispiel #2
0
        private static void ShellPlateBuilder(Model model, double load_value)
        {
            // Origin: branch master idio onoma ParadeigmataElegxwnBuilder2.ShellPlateBuilder(Model model, double load_value)
            var material1 = new ShellElasticMaterial3D()
            {
                YoungModulus = 135300,
                PoissonRatio = 0.3,
                ShearCorrectionCoefficientK = 5 / 6,
            };

            double[,] nodeData = new double[, ] {
                { 10.000000, 10.000000, 0.000000 },
                { 7.500000, 10.000000, 0.000000 },
                { 5.000000, 10.000000, 0.000000 },
                { 2.500000, 10.000000, 0.000000 },
                { 0.000000, 10.000000, 0.000000 },
                { 10.000000, 7.500000, 0.000000 },
                { 7.500000, 7.500000, 0.000000 },
                { 5.000000, 7.500000, 0.000000 },
                { 2.500000, 7.500000, 0.000000 },
                { 0.000000, 7.500000, 0.000000 },
                { 10.000000, 5.000000, 0.000000 },
                { 7.500000, 5.000000, 0.000000 },
                { 5.000000, 5.000000, 0.000000 },
                { 2.500000, 5.000000, 0.000000 },
                { 0.000000, 5.000000, 0.000000 },
                { 10.000000, 2.500000, 0.000000 },
                { 7.500000, 2.500000, 0.000000 },
                { 5.000000, 2.500000, 0.000000 },
                { 2.500000, 2.500000, 0.000000 },
                { 0.000000, 2.500000, 0.000000 },
                { 10.000000, 0.000000, 0.000000 },
                { 7.500000, 0.000000, 0.000000 },
                { 5.000000, 0.000000, 0.000000 },
                { 2.500000, 0.000000, 0.000000 },
                { 0.000000, 0.000000, 0.000000 },
                { 8.750000, 10.000000, 0.000000 },
                { 6.250000, 10.000000, 0.000000 },
                { 3.750000, 10.000000, 0.000000 },
                { 1.250000, 10.000000, 0.000000 },
                { 8.750000, 7.500000, 0.000000 },
                { 6.250000, 7.500000, 0.000000 },
                { 3.750000, 7.500000, 0.000000 },
                { 1.250000, 7.500000, 0.000000 },
                { 8.750000, 5.000000, 0.000000 },
                { 6.250000, 5.000000, 0.000000 },
                { 3.750000, 5.000000, 0.000000 },
                { 1.250000, 5.000000, 0.000000 },
                { 8.750000, 2.500000, 0.000000 },
                { 6.250000, 2.500000, 0.000000 },
                { 3.750000, 2.500000, 0.000000 },
                { 1.250000, 2.500000, 0.000000 },
                { 8.750000, 0.000000, 0.000000 },
                { 6.250000, 0.000000, 0.000000 },
                { 3.750000, 0.000000, 0.000000 },
                { 1.250000, 0.000000, 0.000000 },
                { 10.000000, 8.750000, 0.000000 },
                { 10.000000, 6.250000, 0.000000 },
                { 10.000000, 3.750000, 0.000000 },
                { 10.000000, 1.250000, 0.000000 },
                { 7.500000, 8.750000, 0.000000 },
                { 7.500000, 6.250000, 0.000000 },
                { 7.500000, 3.750000, 0.000000 },
                { 7.500000, 1.250000, 0.000000 },
                { 5.000000, 8.750000, 0.000000 },
                { 5.000000, 6.250000, 0.000000 },
                { 5.000000, 3.750000, 0.000000 },
                { 5.000000, 1.250000, 0.000000 },
                { 2.500000, 8.750000, 0.000000 },
                { 2.500000, 6.250000, 0.000000 },
                { 2.500000, 3.750000, 0.000000 },
                { 2.500000, 1.250000, 0.000000 },
                { 0.000000, 8.750000, 0.000000 },
                { 0.000000, 6.250000, 0.000000 },
                { 0.000000, 3.750000, 0.000000 },
                { 0.000000, 1.250000, 0.000000 },
            };

            int[,] elementData = new int[, ] {
                { 1, 1, 2, 7, 6, 26, 50, 30, 46 },
                { 2, 2, 3, 8, 7, 27, 54, 31, 50 },
                { 3, 3, 4, 9, 8, 28, 58, 32, 54 },
                { 4, 4, 5, 10, 9, 29, 62, 33, 58 },
                { 5, 6, 7, 12, 11, 30, 51, 34, 47 },
                { 6, 7, 8, 13, 12, 31, 55, 35, 51 },
                { 7, 8, 9, 14, 13, 32, 59, 36, 55 },
                { 8, 9, 10, 15, 14, 33, 63, 37, 59 },
                { 9, 11, 12, 17, 16, 34, 52, 38, 48 },
                { 10, 12, 13, 18, 17, 35, 56, 39, 52 },
                { 11, 13, 14, 19, 18, 36, 60, 40, 56 },
                { 12, 14, 15, 20, 19, 37, 64, 41, 60 },
                { 13, 16, 17, 22, 21, 38, 53, 42, 49 },
                { 14, 17, 18, 23, 22, 39, 57, 43, 53 },
                { 15, 18, 19, 24, 23, 40, 61, 44, 57 },
                { 16, 19, 20, 25, 24, 41, 65, 45, 61 },
            };

            // orismos shmeiwn
            for (int nNode = 0; nNode < nodeData.GetLength(0); nNode++)
            {
                model.NodesDictionary.Add(nNode + 1, new Node(id: nNode + 1, x: nodeData[nNode, 0], y: nodeData[nNode, 1], z: nodeData[nNode, 2]));
            }

            // orismos elements
            Element e1;
            int     subdomainID    = 1;
            double  tk_shell_plate = 0.5;

            for (int nElement = 0; nElement < elementData.GetLength(0); nElement++)
            {
                e1 = new Element()
                {
                    ID          = nElement + 1,
                    ElementType = new Shell8NonLinear(material1, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 2))                    //ElementType = new Shell8dispCopyGet(material2, 3, 3, 3)
                    {
                        //oVn_i= new double[][] { new double [] {ElementID, ElementID }, new double [] { ElementID, ElementID } },
                        oVn_i = new double[][] { new double[] { 0, 0, 1 },
                                                 new double[] { 0, 0, 1 },
                                                 new double[] { 0, 0, 1 },
                                                 new double[] { 0, 0, 1 },
                                                 new double[] { 0, 0, 1 },
                                                 new double[] { 0, 0, 1 },
                                                 new double[] { 0, 0, 1 },
                                                 new double[] { 0, 0, 1 }, },
                        tk = new double[] { tk_shell_plate, tk_shell_plate, tk_shell_plate, tk_shell_plate, tk_shell_plate, tk_shell_plate, tk_shell_plate, tk_shell_plate },
                    }
                };
                for (int j = 0; j < 8; j++)
                {
                    e1.NodesDictionary.Add(elementData[nElement, j + 1], model.NodesDictionary[elementData[nElement, j + 1]]);
                }
                model.ElementsDictionary.Add(e1.ID, e1);
                model.SubdomainsDictionary[subdomainID].Elements.Add(e1);
            }

            // constraint paaktwsh gurw gurw plevres
            int pointID;

            int[] cnstrnd = new int[] { 21, 22, 23, 24, 25, 26, 27, 28, 29, 1, 2, 3, 4, 5, 42, 43, 44, 45, 46, 47, 48, 49, 6, 11, 16, 10, 15, 20, 62, 63, 64, 65 };
            for (int k = 0; k < cnstrnd.GetLength(0); k++)
            {
                pointID = cnstrnd[k];
                model.NodesDictionary[pointID].Constraints.Add(new Constraint {
                    DOF = StructuralDof.TranslationX
                });
                model.NodesDictionary[pointID].Constraints.Add(new Constraint {
                    DOF = StructuralDof.TranslationY
                });
                model.NodesDictionary[pointID].Constraints.Add(new Constraint {
                    DOF = StructuralDof.TranslationZ
                });
                model.NodesDictionary[pointID].Constraints.Add(new Constraint {
                    DOF = StructuralDof.RotationX
                });
                model.NodesDictionary[pointID].Constraints.Add(new Constraint {
                    DOF = StructuralDof.RotationY
                });
            }

            // fortish korufhs
            Load load1;

            load1 = new Load()
            {
                Node   = model.NodesDictionary[13],
                DOF    = StructuralDof.TranslationZ,
                Amount = 1 * load_value
            };
            model.Loads.Add(load1);
        }