/// <summary> ///Calculates the element stiffness matrix used for warping analysis ///and the torsion load vector. /// </summary> /// <param name="mat"></param> /// <param name="coords"></param> /// <returns>Element stiffness matrix *(k_el)* and element torsion load vector* (f_el) *</returns> internal void torsion_properties(SectionMaterial mat, ExtendedTri tri, out double[,] k_el, out double[] f_el) { //# initialise stiffness matrix and load vector k_el = new double[6, 6]; f_el = new double[6]; //# Gauss points for 6 point Gaussian integration var gps = ShapeFunctionHelper.gauss_points(6); var Nxy = new double[2]; for (int i = 0; i < gps.RowCount(); i++) { var gp = gps.Row(i); var B = tri.ShapeInfo[i].B; double[] N = tri.ShapeInfo[i].N; double j = tri.ShapeInfo[i].j; //# determine x and y position at Gauss point var Nx = N.Dot(tri.coords.Row(0)); var Ny = N.Dot(tri.coords.Row(1)); var B_Transpose = B.Transpose(); //# calculated modulus weighted stiffness matrix and load vector k_el.Append(B_Transpose.Dot(B).Dot(gp[0] * j * mat.elastic_modulus)); Nxy[0] = Ny; Nxy[1] = -Nx; f_el.Append(B_Transpose.Dot(Nxy).Dot(gp[0] * j * mat.elastic_modulus)); } }
shear_warping_integrals(SectionMaterial mat, ExtendedTri tri, double ixx, double iyy, double ixy, double[] omega) { //# initialise integrals var sc_xint = 0.0; var sc_yint = 0.0; var q_omega = 0.0; var i_omega = 0.0; var i_xomega = 0.0; var i_yomega = 0.0; var gps = ShapeFunctionHelper.gauss_points(6); for (int i = 0; i < gps.RowCount(); i++) { var gp = gps.Row(i); double[] N = tri.ShapeInfo[i].N; double j = tri.ShapeInfo[i].j; //# determine x and y position at Gauss point var Nx = N.Dot(tri.coords.Row(0)); var Ny = N.Dot(tri.coords.Row(1)); var Nomega = N.Dot(omega); sc_xint += gp[0] * (iyy * Nx + ixy * Ny) * (Nx * Nx + Ny * Ny) * j * mat.elastic_modulus; sc_yint += gp[0] * (ixx * Ny + ixy * Nx) * (Nx * Nx + Ny * Ny) * j * mat.elastic_modulus; q_omega += gp[0] * Nomega * j * mat.elastic_modulus; i_omega += gp[0] * Nomega * Nomega * j * mat.elastic_modulus; i_xomega += gp[0] * Nx * Nomega * j * mat.elastic_modulus; i_yomega += gp[0] * Ny * Nomega * j * mat.elastic_modulus; } return(sc_xint, sc_yint, q_omega, i_omega, i_xomega, i_yomega); }
/// <summary> /// Calculates the integrals used to evaluate the monosymmetry constant about both global axes and both prinicipal axes. /// </summary> /// <param name="mat"></param> /// <param name="coords"></param> /// <param name="phi">Principal bending axis angle</param> /// <returns></returns> internal (double int_x, double int_y, double int_11, double int_22) monosymmetry_integrals(SectionMaterial mat, ExtendedTri tri, double phi) { //# initialise integrals var int_x = 0.0; var int_y = 0.0; var int_11 = 0.0; var int_22 = 0.0; var gps = ShapeFunctionHelper.gauss_points(6); for (int i = 0; i < gps.RowCount(); i++) { var gp = gps.Row(i); double[] N = tri.ShapeInfo[i].N; double j = tri.ShapeInfo[i].j; //# determine x and y position at Gauss point var Nx = N.Dot(tri.coords.Row(0)); var Ny = N.Dot(tri.coords.Row(1)); //# determine 11 and 22 position at Gauss point (var Nx_11, var Ny_22) = principal_coordinate(phi, Nx, Ny); //# weight the monosymmetry integrals by the section elastic modulus int_x += (gp[0] * (Nx * Nx * Ny + Ny * Ny * Ny) * j * mat.elastic_modulus); int_y += (gp[0] * (Ny * Ny * Nx + Nx * Nx * Nx) * j * mat.elastic_modulus); int_11 += (gp[0] * (Nx_11 * Nx_11 * Ny_22 + Ny_22 * Ny_22 * Ny_22) * j * mat.elastic_modulus); int_22 += (gp[0] * (Ny_22 * Ny_22 * Nx_11 + Nx_11 * Nx_11 * Nx_11) * j * mat.elastic_modulus); } return(int_x, int_y, int_11, int_22); }
/// <summary> /// Calculates the variables used to determine the shear deformation coefficients. /// </summary> /// <param name="mat"></param> /// <param name="coords"></param> /// <param name="ixx">Second moment of area about the centroidal x-axis</param> /// <param name="iyy">Second moment of area about the centroidal y-axis</param> /// <param name="ixy">Second moment of area about the centroidal xy-axis</param> /// <param name="psi_shear">Values of the psi shear function at the element nodes</param> /// <param name="phi_shear">Values of the phi shear function at the element nodes</param> /// <param name="nu">Effective Poisson's ratio for the cross-section</param> /// <returns></returns> internal (double kappa_x, double kappa_y, double kappa_xy) shear_coefficients(SectionMaterial mat, ExtendedTri tri, double ixx, double iyy, double ixy, double[] psi_shear, double[] phi_shear, double nu) { //# initialise integrals var kappa_x = 0.0; var kappa_y = 0.0; var kappa_xy = 0.0; var gps = ShapeFunctionHelper.gauss_points(6); var d = new double[2]; var h = new double[2]; //var psi_shear = new Vector(psi_shear2); //var phi_shear = new Vector(phi_shear2); for (int i = 0; i < gps.RowCount(); i++) { var gp = gps.Row(i); var B = tri.ShapeInfo[i].B; double[] N = tri.ShapeInfo[i].N; double j = tri.ShapeInfo[i].j; //# determine x and y position at Gauss point var Nx = N.Dot(tri.coords.Row(0)); var Ny = N.Dot(tri.coords.Row(1)); //# determine shear parameters var r = Nx * Nx - Ny * Ny; var q = 2 * Nx * Ny; var d1 = ixx * r - ixy * q; var d2 = ixy * r + ixx * q; var h1 = -ixy * r + iyy * q; var h2 = -iyy * r - ixy * q; d[0] = d1; d[1] = d2; h[0] = h1; h[1] = h2; var B_Transpose = B.Transpose(); var psi_shearXB_Transpose = psi_shear.Dot(B_Transpose).Subtract(d.Dot(nu / 2)); var BXphi_shear = B.Dot(phi_shear).Subtract(h.Dot(nu / 2)); kappa_x += psi_shearXB_Transpose.Dot(B.Dot(psi_shear).Subtract(d.Dot(nu / 2))) * (gp[0] * j * mat.elastic_modulus); kappa_y += phi_shear.Dot(B_Transpose).Subtract(h.Dot(nu / 2)).Dot(BXphi_shear) * gp[0] * j * mat.elastic_modulus; kappa_xy += psi_shearXB_Transpose.Dot(BXphi_shear) * (gp[0] * j * mat.elastic_modulus); } return(kappa_x, kappa_y, kappa_xy); }
/// <summary> /// Calculates the element shear load vectors used to evaluate the shear functions. /// </summary> /// <param name="mat"></param> /// <param name="coords"></param> /// <param name="ixx">Second moment of area about the centroidal x-axis</param> /// <param name="iyy">Second moment of area about the centroidal y-axis</param> /// <param name="ixy">Second moment of area about the centroidal xy-axis</param> /// <param name="nu">Effective Poisson's ratio for the cross-section</param> /// <returns>Element shear load vector psi *(f_psi)* and phi *(f_phi)*</returns> internal (double[] f_psi, double[] f_phi) shear_load_vectors(SectionMaterial mat, ExtendedTri tri, double ixx, double iyy, double ixy, double nu) { //# initialise stiffness matrix and load vector var f_psi = new double[6]; var f_phi = new double[6]; //# Gauss points for 6 point Gaussian integration var gps = ShapeFunctionHelper.gauss_points(6); var d = new double[2]; var h = new double[2]; for (int i = 0; i < gps.RowCount(); i++) { var gp = gps.Row(i); // shape_function(coords, gp, out N, ref B, out j); var B = tri.ShapeInfo[i].B; double[] N = tri.ShapeInfo[i].N; double j = tri.ShapeInfo[i].j; //# determine x and y position at Gauss point var Nx = N.Dot(tri.coords.Row(0)); var Ny = N.Dot(tri.coords.Row(1)); //# determine shear parameters var r = Nx * Nx - Ny * Ny; var q = 2 * Nx * Ny; var d1 = ixx * r - ixy * q; var d2 = ixy * r + ixx * q; var h1 = -ixy * r + iyy * q; var h2 = -iyy * r - ixy * q; //d[0, 0] = d1; //d[1, 0] = d2; //h[0, 0] = h1; //h[1, 0] = h2; //var B_Transpose = B.Transpose; //Vector tmp = new Vector(N); //tmp *= 2 * (1 + nu); //f_psi += gp[0] * (nu / 2 * (B_Transpose * d).Transpose.Row(0) + // tmp * (ixx * Nx - ixy * Ny)) * j * mat.elastic_modulus; //f_phi += gp[0] * (nu / 2 * (B_Transpose * h).Transpose.Row(0) + // tmp * (iyy * Ny - ixy * Nx)) * j * mat.elastic_modulus; d[0] = d1; d[1] = d2; h[0] = h1; h[1] = h2; var B_Transpose = B.Transpose(); var NN = N.Dot(2 * (1 + nu)); f_psi.Append(B_Transpose.Dot(d).Dot(nu / 2).Append(NN.Dot(ixx * Nx - ixy * Ny)).Dot(gp[0] * j * mat.elastic_modulus)); f_phi.Append(B_Transpose.Dot(h).Dot(nu / 2).Append(NN.Dot(iyy * Ny - ixy * Nx)).Dot(gp[0] * j * mat.elastic_modulus)); } return(f_psi, f_phi); }