示例#1
0
        private void GetInitialGeometricDataAndInitializeMatrices(IElement element)
        {
            (tU, tUvec) = Shell8DirectionVectorUtilities.GetInitialDirectionVectorValues(oVn_i);
            this.GetInitialGeometricDataForMidsurface(element);
            ox_i = new double[16][];
            if (ShellElementSide == 0)
            {
                for (int j = 0; j < 8; j++)
                {
                    ox_i[j] = new double[] { ox_i_shell_midsurface[j][0] - 0.5 * tk[j] * tU[j][3], ox_i_shell_midsurface[j][1] - 0.5 * tk[j] * tU[j][4],
                                             ox_i_shell_midsurface[j][2] - 0.5 * tk[j] * tU[j][5], };
                }
                for (int j = 8; j < 16; j++)
                {
                    ox_i[j] = new double[] { element.Nodes[j].X, element.Nodes[j].Y, element.Nodes[j].Z, };
                }
            }
            else
            {
                for (int j = 0; j < 8; j++)
                {
                    ox_i[j] = new double[] { element.Nodes[j + 8].X, element.Nodes[j + 8].Y, element.Nodes[j + 8].Z, };
                }
                for (int j = 8; j < 16; j++)
                {
                    ox_i[j] = new double[] { ox_i_shell_midsurface[j - 8][0] + 0.5 * tk[j - 8] * tU[j - 8][3], ox_i_shell_midsurface[j - 8][1] + 0.5 * tk[j - 8] * tU[j - 8][4],
                                             ox_i_shell_midsurface[j - 8][2] + 0.5 * tk[j - 8] * tU[j - 8][5], };
                }
            }

            x_local = new double[48];
        }
示例#2
0
        private void UpdateCoordinateData(double[] localdisplacements, IElement element, out double[][] tx_i)
        {
            double[][] ox_i = new double[8][];             // this should be allocated in the constructor
            for (int j = 0; j < 8; j++)
            {
                ox_i[j] = new double[] { element.Nodes[j].X, element.Nodes[j].Y, element.Nodes[j].Z, };
            }

            double ak;
            double bk;

            tx_i = new double[8][];
            for (int k = 0; k < 8; k++)
            {
                tx_i[k] = new double[3];
                for (int l = 0; l < 3; l++)
                {
                    tx_i[k][l] = ox_i[k][l] + localdisplacements[5 * k + l];
                }
                //update tU andUvec
                tU[k][0]    = localdisplacements[5 * k + 0];
                tU[k][1]    = localdisplacements[5 * k + 1];
                tU[k][2]    = localdisplacements[5 * k + 2];
                ak          = localdisplacements[5 * k + 3] - ak_total[k];
                ak_total[k] = localdisplacements[5 * k + 3];
                bk          = localdisplacements[5 * k + 4] - bk_total[k];
                bk_total[k] = localdisplacements[5 * k + 4];
                Shell8DirectionVectorUtilities.RotateNodalDirectionVectors(ak, bk, k, tU, tUvec);
            }
        }
示例#3
0
        private void UpdateCoordinateDataForDirectVectorsAndMidsurface(double[] localdisplacements, out double[][] tx_i_shell_midsurface)
        {
            double ak;
            double bk;

            tx_i_shell_midsurface = new double[8][];
            for (int j = 0; j < 8; j++)
            {
                tx_i_shell_midsurface[j] = new double[3];
            }

            for (int k = 0; k < 8; k++)
            {
                for (int l = 0; l < 3; l++)
                {
                    tx_i_shell_midsurface[k][l] = ox_i_shell_midsurface[k][l] + localdisplacements[5 * k + l];
                }

                //update tU & tUvec
                tU[k][0]    = localdisplacements[5 * k + 0];
                tU[k][1]    = localdisplacements[5 * k + 1];
                tU[k][2]    = localdisplacements[5 * k + 2];
                ak          = localdisplacements[5 * k + 3] - ak_total[k];
                ak_total[k] = localdisplacements[5 * k + 3];
                bk          = localdisplacements[5 * k + 4] - bk_total[k];
                bk_total[k] = localdisplacements[5 * k + 4];
                Shell8DirectionVectorUtilities.RotateNodalDirectionVectors(ak, bk, k, tU, tUvec);
            }
        }
示例#4
0
        private void CalculateInitialConfigurationData(IElement element, out double[][] tx_i)
        {
            double[] E;
            double[] ni;

            IReadOnlyList <double[]> shapeFunctions            = Interpolation.EvaluateFunctionsAtGaussPoints(QuadratureForStiffness);
            IReadOnlyList <Matrix>   shapeFunctionsDerivatives = Interpolation.EvaluateNaturalGradientsAtGaussPoints(QuadratureForStiffness);

            (Matrix[] ll1, Matrix[] J_0a) = JacobianShell8Calculations.Getll1AndJ_0a(
                QuadratureForStiffness, tk, shapeFunctions, shapeFunctionsDerivatives);
            //TODO J_0, J_0b etc. can be cached for not large scale models

            tx_i        = new double[8][];
            (tU, tUvec) = Shell8DirectionVectorUtilities.GetInitialDirectionVectorValues(oVn_i);
            double[][] oV1_i = new double[8][];             //tangent vector ''1'' initial configuration
            for (int j = 0; j < 8; j++)
            {
                tx_i[j]  = new double[] { element.Nodes[j].X, element.Nodes[j].Y, element.Nodes[j].Z, };
                oV1_i[j] = new double[3];

                oV1_i[j][0] = tUvec[j][0];
                oV1_i[j][1] = tUvec[j][1];
                oV1_i[j][2] = tUvec[j][2];
            }

            (Matrix[] J_0inv, double[] detJ_0) =
                JacobianShell8Calculations.GetJ_0invAndDetJ_0(J_0a, element.Nodes, oVn_i, nGaussPoints);

            for (int j = 0; j < nGaussPoints; j++)
            {
                double[] V3 = new double[3];
                double   V3_norm;
                double[] V1 = new double[3];
                double   V1_norm;


                for (int k = 0; k < 3; k++)
                {
                    V3[k] = 0; V1[k] = 0;               /* V2[k] = 0; */
                }

                for (int k = 0; k < 8; k++)
                {
                    for (int l = 0; l < 3; l++)
                    {
                        V3[l] += shapeFunctions[j][k] * oVn_i[k][l];
                        V1[l] += shapeFunctions[j][k] * oV1_i[k][l];
                    }
                }
                V3_norm = Math.Sqrt(V3[0] * V3[0] + V3[1] * V3[1] + V3[2] * V3[2]);
                V1_norm = Math.Sqrt(V1[0] * V1[0] + V1[1] * V1[1] + V1[2] * V1[2]);
                for (int l = 0; l < 3; l++)
                {
                    V3[l] = V3[l] / V3_norm;
                    V1[l] = V1[l] / V1_norm;
                }

                materialsAtGaussPoints[j].NormalVectorV3  = V3;
                materialsAtGaussPoints[j].TangentVectorV1 = V1;
            }

            integrationCoefficient = new double[nGaussPoints];
            for (int j = 0; j < nGaussPoints; j++)
            {
                integrationCoefficient[j] += QuadratureForStiffness.IntegrationPoints[j].Weight * detJ_0[j];
            }
        }