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]; }
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]; } }