//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Node load //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Member transverse load //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Primary End Forces in Local Coordinate System of Member // Member default - no transverse load at member public void GetEndLoad(CE_1D Element) { for (int i = 0; i < 6; i++) { Element.m_VElemPEF_LCS_StNode.FVectorItems[i] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[i] = 0f; } // Set Primary End Forces of Elemnent in Global Coordinate system SetGetPEF_GCS(Element); // Update Element Primary End Forces Vector (1x12) in LCS UpdateElemPEF_LCS_Vector(Element); // Update Element Primary End Forces Vector (1x12) in GCS UpdateElemPEF_GCS_Vector(Element); }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // TEMPORARY EXAMPLE DATA // Consructor - old public CFEM_CALC() { // Geometry float fGeom_a = 4f, fGeom_b = 5f, fGeom_c = 3.5f; // Unit [m] // Material CMaterial m_Mat = new CMaterial(); // Cross-section CCrSc m_CrSc = new CCrSc_3_00(0, 8, 300, 125, 16.2f, 10.8f, 10.8f, 6.5f, 241.6f); // I 300 section // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! m_CrSc.FI_t = 5.69e-07f; m_CrSc.FI_y = 9.79e-05f; m_CrSc.FI_z = 4.49e-06f; m_CrSc.FA_g = 6.90e-03f; m_CrSc.FA_vy = 4.01e-03f; m_CrSc.FA_vz = 2.89e-03f; // Define Nodes Properties for (int i = 0; i < iNNoTot; i++) { // Create auxiliary Node object CFemNode CNode_i = new CFemNode(iNodeDOFNo); // Fill array object item with auxliary Node m_NodeArray[i] = CNode_i; } // Node 1 m_NodeArray[0].ID = 1; m_NodeArray[0].m_fVNodeCoordinates.FVectorItems[(int) e3D_DOF.eUX] = fGeom_a; m_NodeArray[0].m_fVNodeCoordinates.FVectorItems[(int) e3D_DOF.eUY] = 0f; m_NodeArray[0].m_fVNodeCoordinates.FVectorItems[(int) e3D_DOF.eUZ] = 0f; // Node 2 m_NodeArray[1].ID = 2; m_NodeArray[1].m_fVNodeCoordinates.FVectorItems[(int) e3D_DOF.eUX] = 0f; m_NodeArray[1].m_fVNodeCoordinates.FVectorItems[(int) e3D_DOF.eUY] = 0f; m_NodeArray[1].m_fVNodeCoordinates.FVectorItems[(int) e3D_DOF.eUZ] = 0f; // Node 3 m_NodeArray[2].ID = 5; m_NodeArray[2].m_fVNodeCoordinates.FVectorItems[(int) e3D_DOF.eUX] = fGeom_a; m_NodeArray[2].m_fVNodeCoordinates.FVectorItems[(int) e3D_DOF.eUY] = 0f; m_NodeArray[2].m_fVNodeCoordinates.FVectorItems[(int) e3D_DOF.eUZ] = -fGeom_c; // Node 4 m_NodeArray[3].ID = 3; m_NodeArray[3].m_fVNodeCoordinates.FVectorItems[(int) e3D_DOF.eUX] = fGeom_a; m_NodeArray[3].m_fVNodeCoordinates.FVectorItems[(int) e3D_DOF.eUY] = -fGeom_b; m_NodeArray[3].m_fVNodeCoordinates.FVectorItems[(int) e3D_DOF.eUZ] = 0f; // Set Nodal Supports (for restraint set 0f) // Node 1 // Node 2 m_NodeArray[1].m_VDisp.FVectorItems[0] = 0f; m_NodeArray[1].m_VDisp.FVectorItems[1] = 0f; m_NodeArray[1].m_VDisp.FVectorItems[2] = 0f; m_NodeArray[1].m_VDisp.FVectorItems[3] = 0f; m_NodeArray[1].m_VDisp.FVectorItems[4] = 0f; m_NodeArray[1].m_VDisp.FVectorItems[5] = 0f; // Node 3 m_NodeArray[2].m_VDisp.FVectorItems[0] = 0f; m_NodeArray[2].m_VDisp.FVectorItems[1] = 0f; m_NodeArray[2].m_VDisp.FVectorItems[2] = 0f; m_NodeArray[2].m_VDisp.FVectorItems[3] = 0f; m_NodeArray[2].m_VDisp.FVectorItems[4] = 0f; m_NodeArray[2].m_VDisp.FVectorItems[5] = 0f; // Node 4 m_NodeArray[3].m_VDisp.FVectorItems[0] = 0f; m_NodeArray[3].m_VDisp.FVectorItems[1] = 0f; m_NodeArray[3].m_VDisp.FVectorItems[2] = 0f; m_NodeArray[3].m_VDisp.FVectorItems[3] = 0f; m_NodeArray[3].m_VDisp.FVectorItems[4] = 0f; m_NodeArray[3].m_VDisp.FVectorItems[5] = 0f; // Set Global Code Numbers int m_iCodeNo = 0; // Number of unrestrained degrees of freedom - finally gives size of structure global matrix foreach (CFemNode i_CNode in m_NodeArray) // Each Node { for (int i = 0; i < iNodeDOFNo; i++) // Each DOF { if (i_CNode.m_VDisp.FVectorItems[i] != 0) // Perform for not restrained DOF { i_CNode.m_ArrNCodeNo[i] = m_iCodeNo; // Set global code number of degree of freedom (DOF) m_iCodeNo++; } } } // Fill members of structure global vector of displacement // Now we know number of not restrained DOF, so we can allocate array size m_fDisp_Vector_CN = new int[m_iCodeNo,3]; // 1st - global DOF code number, 2nd - Node index, 3rd - local code number of DOF in NODE FillGlobalDisplCodeNoOld(); //////////////////////////////////////////////////////////////////////////////////// // Set Nodal Loads (acting directly in nodes) //////////////////////////////////////////////////////////////////////////////////// // !!!!!! No kind of these loads actually /////////////////////////////////////////////////////////////////////////////////////// // Define FEM 1D elements /////////////////////////////////////////////////////////////////////////////////////// for (int i = 0; i < iElemNoTot; i++) { // Create auxiliary Element object CE_1D CElement_i = new CE_1D(); // Fill array object item m_ELemArray[i] = CElement_i; // Create auxiliary Element Load Object CLoad CLoad_i = new CLoad(); // Fill array object item m_ELoadArray[i] = CLoad_i; } // Member 1 [0] Nodes 1 - 2 ([0] [1]) m_ELemArray[0].NodeStart = m_NodeArray[0]; m_ELemArray[0].NodeEnd = m_NodeArray[1]; // Element Type m_ELemArray[0].m_eSuppType3D = EElemSuppType3D.e3DEl_000000_000000; // Element Material m_ELemArray[0].m_Mat = m_Mat; // Element Corss-section m_ELemArray[0].m_CrSc = m_CrSc; // Fill Basic Element Data m_ELemArray[0].FillBasic2(); // Load of Element only due to Element Transversal Forces m_ELoadArray[0].GetEndLoad_g(m_ELemArray[0], m_fq); // Output // kij_0 - local stiffeness matrix 6 x 6 m_ELemArray[0].m_fkLocMatr.Print2DMatrixFormated(); // A Tranformation Rotation Matrixes 6 x 6 m_ELemArray[0].m_fATRMatr3D.Print2DMatrixFormated(); // B Transfer Matrixes 6 x 6 m_ELemArray[0].m_fBTTMatr3D.Print2DMatrixFormated(); // Kij - global matrix of member 12 x 12 m_ELemArray[0].m_fKGlobM.Print2DMatrixFormated(); // Element Load Vector 2 x 6 m_ELemArray[0].m_ArrElemPEF_LCS.Print2DMatrixFormated(); #region MATRIX TEST ///////////////////////////////////////////////////////////////////////////////////////////////////// // TEST /* float[,] farrk11 = new float[6, 6]; float[,] farrk12 = new float[6, 6]; float[,] farrk21 = new float[6, 6]; float[,] farrk22 = new float[6, 6]; // Fill array for (int i = 0; i < 6; i++) { for (int j = 0; j < 6; j++) { farrk11[i, j] = ((i+1)*10)+1 + j; } } for (int i = 0; i < 6; i++) { for (int j = 0; j < 6; j++) { farrk12[i, j] = ((i + 1) * 10) + 1 + j; } } for (int i = 0; i < 6; i++) { for (int j = 0; j < 6; j++) { farrk21[i, j] = ((i + 1) * 10) + 1 + j; } } for (int i = 0; i < 6; i++) { for (int j = 0; j < 6; j++) { farrk22[i, j] = ((i + 1) * 10) + 1 + j; } } float[,][,] farrK = new float[2, 2][,] {{farrk11, farrk12}, {farrk21, farrk22}}; Console.WriteLine(m_ELemArray[0].CM.Print2DMatrix(farrK, 2, 6)); */ ////////////////////////////////////////////////////////////////////////////////////////////////////////////// #endregion // Member 2 [1] Nodes 1 - 3 ([0] [2]) m_ELemArray[1].NodeStart = m_NodeArray[0]; m_ELemArray[1].NodeEnd = m_NodeArray[2]; // Element Type m_ELemArray[1].m_eSuppType3D = EElemSuppType3D.e3DEl_000000_000000; // Element Material m_ELemArray[1].m_Mat = m_Mat; // Element Corss-section m_ELemArray[1].m_CrSc = m_CrSc; // Fill Basic Element Data m_ELemArray[1].FillBasic2(); // Load of Element only due to Element Transversal Forces m_ELoadArray[1].GetEndLoad_F(m_ELemArray[1], 0f, 0f, m_fF); // Output // kij_0 - local stiffeness matrix 6 x 6 m_ELemArray[1].m_fkLocMatr.Print2DMatrixFormated(); // A Tranformation Rotation Matrixes 6 x 6 m_ELemArray[1].m_fATRMatr3D.Print2DMatrixFormated(); // B Transfer Matrixes 6 x 6 m_ELemArray[1].m_fBTTMatr3D.Print2DMatrixFormated(); // Kij - global matrix of member 12 x 12 m_ELemArray[1].m_fKGlobM.Print2DMatrixFormated(); // Element Load Vector 2 x 6 m_ELemArray[1].m_ArrElemPEF_LCS.Print2DMatrixFormated(); // Member 3 [2] Nodes 1 - 4 ([0] [3]) m_ELemArray[2].NodeStart = m_NodeArray[0]; m_ELemArray[2].NodeEnd = m_NodeArray[3]; // Element Type m_ELemArray[2].m_eSuppType3D = EElemSuppType3D.e3DEl_000000_000___; // Element Material m_ELemArray[2].m_Mat = m_Mat; // Element Corss-section m_ELemArray[2].m_CrSc = m_CrSc; // Fill Basic Element Data m_ELemArray[2].FillBasic2(); // Load of Element only due to Element Transversal Forces m_ELoadArray[2].GetEndLoad_M(m_ELemArray[2], m_fM, 0f, 0f); // Output // kij_0 - local stiffeness matrix 6 x 6 m_ELemArray[2].m_fkLocMatr.Print2DMatrixFormated(); // A Tranformation Rotation Matrixes 6 x 6 m_ELemArray[2].m_fATRMatr3D.Print2DMatrixFormated(); // B Transfer Matrixes 6 x 6 m_ELemArray[2].m_fBTTMatr3D.Print2DMatrixFormated(); // Kij - global matrix of member 12 x 12 m_ELemArray[2].m_fKGlobM.Print2DMatrixFormated(); // Element Load Vector 2 x 6 m_ELemArray[2].m_ArrElemPEF_LCS.Print2DMatrixFormated(); /* // Nodal loads (sum nodal loads and nodal loads due to element loads) m_NodeArray[2].m_sLoad.s_fFZ += -55000; // Add local nodal load to element ends loads due to intermediate load */ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Set Global Code Number of Nodes / Nastavit globalne kodove cisla uzlov // Save indexes of nodes and DOF which are free and represent vector of uknown variables in solution // Save it as array of arrays n x 2 (1st value is index - node index (0 - n-1) , 2nd value is DOF index (0-5) // n - total number of nodes in model ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// SetNodesGlobCodeNoOld(); // Nastavi DOF v uzlov globalne kodove cisla ??? ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Right side of Equation System ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Global Stiffeness Matrix of Structure - Allocate Memory (Matrix Size) m_M_K_Structure = new CMatrix(m_iCodeNo); // Fill Global Stiffeness Matrix FillGlobalMatrixOld(); // Global Stiffeness Matrix m_iCodeNo x m_iCodeNo m_M_K_Structure.Print2DMatrix(); // Auxialiary temporary transformation from 2D to 1D array / from float do double // Pomocne prevody medzi jednorozmernym, dvojroymernym polom a triedom Matrix, // bude nutne zladit a format v akom budeme pracovat s datami a potom zmazat CArray objArray = new CArray(); // Convert Size float[] m_M_K_fTemp1D = objArray.ArrTranf2Dto1D(m_M_K_Structure.m_fArrMembers); // Convert Type double[] m_M_K_dTemp1D = objArray.ArrConverFloatToDouble1D(m_M_K_fTemp1D); MatrixF64 objMatrix = new MatrixF64(6, 6, m_M_K_dTemp1D); // Print Created Matrix of MatrixF64 Class objMatrix.WriteLine(); // Get Inverse Global Stiffeness Matrix MatrixF64 objMatrixInv = objMatrix.Inverse(); // Print Inverse Matrix objMatrixInv.WriteLine(); // Convert Type float[] m_M_K_Inv_fTemp1D = objArray.ArrConverMatrixF64ToFloat1D(objMatrixInv); // Inverse Global Stiffeness Matrix of Structure - Allocate Memory (Matrix Size) CMatrix m_M_K_Structure_Inv = new CMatrix(m_iCodeNo); m_M_K_Structure_Inv.m_fArrMembers = objArray.ArrTranf1Dto2D(m_M_K_Inv_fTemp1D); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Left side of Equation System ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Global Load Vector - Allocate Memory (Vector Size) m_V_Load = new CVector(m_iCodeNo); // Fill Global Load Vector FillGlobalLoadVectorOld(); // Display Global Load Vector m_V_Load.Print1DVector(); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Solution - calculation of unknown displacement of nodes in GCS - system of linear equations // Start Solver ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Global Displacement Vector - Allocate Memory (Vector Size) m_V_Displ = new CVector(m_iCodeNo); // Fill Global Displacement Vector m_V_Displ = VectorF.fMultiplyMatrVectr(m_M_K_Structure_Inv, m_V_Load); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // End Solver ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Display Global Displacemnt Vector - solution result //Console.ForegroundColor = ConsoleColor.Cyan; m_V_Displ.Print1DVector(); //Console.ForegroundColor = ConsoleColor.Green; //Console.BackgroundColor = ConsoleColor.White; // Set displacements and rotations of DOF in GCS to appropriate node DOF acc. to global code numbers for (int i = 0; i < m_iCodeNo; i++) { // Check if DOF is default (free - ) or has some initial value (settlement; soil consolidation etc.) // See Fill_NDisp_InitStr() for default values - float.PositiveInfinity if (m_NodeArray[m_fDisp_Vector_CN[i, 1]].m_VDisp.FVectorItems[m_fDisp_Vector_CN[i, 2]] == float.PositiveInfinity) m_NodeArray[m_fDisp_Vector_CN[i, 1]].m_VDisp.FVectorItems[m_fDisp_Vector_CN[i, 2]] = m_V_Displ.FVectorItems[i]; // set calculated else // some real initial value exists m_NodeArray[m_fDisp_Vector_CN[i, 1]].m_VDisp.FVectorItems[m_fDisp_Vector_CN[i, 2]] += m_V_Displ.FVectorItems[i]; // add calculated (to sum) } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Get final end forces at element in global coordinate system GCS ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// for (int i = 0; i < iElemNoTot; i++) { m_ELemArray[i].GetArrElemEF_GCS_StNode(); Console.WriteLine("Element Index No.: " + i + "; " + "Node No.: " + m_ELemArray[i].NodeStart.ID + "; " + "Start Node End Forces in GCS"); m_ELemArray[i].m_VElemEF_GCS_StNode.Print1DVector(); m_ELemArray[i].GetArrElemEF_GCS_EnNode(); Console.WriteLine("Element Index No.: " + i + "; " + "Node No.: " + m_ELemArray[i].NodeEnd.ID + "; " + "End Node End Forces in GCS"); m_ELemArray[i].m_VElemEF_GCS_EnNode.Print1DVector(); m_ELemArray[i].GetArrElemEF_LCS_StNode(); Console.WriteLine("Element Index No.: " + i + "; " + "Node No.: " + m_ELemArray[i].NodeStart.ID + "; " + "Start Node End Forces in LCS"); m_ELemArray[i].m_VElemEF_LCS_StNode.Print1DVector(); m_ELemArray[i].GetArrElemEF_LCS_EnNode(); Console.WriteLine("Element Index No.: " + i + "; " + "Node No.: " + m_ELemArray[i].NodeEnd.ID + "; " + "End Node End Forces in LCS"); m_ELemArray[i].m_VElemEF_LCS_EnNode.Print1DVector(); m_ELemArray[i].GetArrElemIF_LCS_StNode(); Console.WriteLine("Element Index No.: " + i + "; " + "Node No.: " + m_ELemArray[i].NodeStart.ID + "; " + "Start Node Internal Forces in LCS"); m_ELemArray[i].m_VElemIF_LCS_StNode.Print1DVector(); m_ELemArray[i].GetArrElemIF_LCS_EnNode(); Console.WriteLine("Element Index No.: " + i + "; " + "Node No.: " + m_ELemArray[i].NodeEnd.ID + "; " + "End Node Internal Forces in LCS"); m_ELemArray[i].m_VElemIF_LCS_EnNode.Print1DVector(); } }
//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- public CMLoadPart(CModel TopoModel, CE_1D[] arrFemMembers, int iMLoadIndex, int kMemberIndex, out float fTemp_A_UXRX, out float fTemp_Ma_UXRX, out float fTemp_A_UYRZ, out float fTemp_Ma_UYRZ, out float fTemp_A_UZRY, out float fTemp_Ma_UZRY, out float fTemp_B_UXRX, out float fTemp_Mb_UXRX, out float fTemp_B_UYRZ, out float fTemp_Mb_UYRZ, out float fTemp_B_UZRY, out float fTemp_Mb_UZRY ) { // Default fTemp_A_UXRX = 0.0f; fTemp_B_UXRX = 0.0f; fTemp_A_UYRZ = 0.0f; fTemp_B_UYRZ = 0.0f; fTemp_A_UZRY = 0.0f; fTemp_B_UZRY = 0.0f; fTemp_Ma_UXRX = 0.0f; fTemp_Mb_UXRX = 0.0f; fTemp_Ma_UYRZ = 0.0f; fTemp_Mb_UYRZ = 0.0f; fTemp_Ma_UZRY = 0.0f; fTemp_Mb_UZRY = 0.0f; if (TopoModel.m_arrMLoads[iMLoadIndex].IMemberCollection.Contains(TopoModel.m_arrMembers[kMemberIndex].ID)) // If member ID is same as collection item { // Fill external forces temp values switch (TopoModel.m_arrMLoads[iMLoadIndex].EDirPPC) // Load direction in principal coordinate system XX / YU / ZV { // 0 - Displacement in x-axis and rotation about x-axis in PCS // 1 - Displacement in y-axis and rotation about z-axis in PCS // 2 - Displacement in z-axis and rotation about y-axis in PCS case EMLoadDirPCC1.eMLD_PCC_FXX_MXX: // Axial force or torsional moment { // DOF RX can be released at one end only - one side is always supported switch (arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUXRX]) { // Type of supports is already defined but I check it once more in body of function !!! // XX - direction both sides supported displacement case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl_00_00: case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl_00_0_: case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl_0__00: case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl_0__0_: { // Type ObjLoadType = typeof(TopoModel.m_arrMLoads[i]); switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Axial Force { FEM_CALC_BASE.CMLoadPart_AXIAL_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_AXIAL_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUXRX], out fTemp_A_UXRX, out fTemp_B_UXRX); break; } case BaseClasses.EMLoadType.eMLT_M: // Torsional Moment { FEM_CALC_BASE.CMLoadPart_TORS objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TORS(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUXRX], out fTemp_Ma_UXRX, out fTemp_Mb_UXRX); break; } default: { break; } } break; } // XX - direction start supported, end free displacement //case FEM_CALC_BASE.Enums.EElemSuppType.eEl_00__0: case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl_00___: //case FEM_CALC_BASE.Enums.EElemSuppType.eEl_0____: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Axial Force { FEM_CALC_BASE.CMLoadPart_AXIAL_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_AXIAL_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUXRX], out fTemp_A_UXRX, out fTemp_B_UXRX); break; } case BaseClasses.EMLoadType.eMLT_M: // Torsional Moment { FEM_CALC_BASE.CMLoadPart_TORS objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TORS(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUXRX], out fTemp_Ma_UXRX, out fTemp_Mb_UXRX); break; } default: { break; } } break; } // XX - direction start free displacement, end supported //case FEM_CALC_BASE.Enums.EElemSuppType.eEl__0_00: case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl____00: //case FEM_CALC_BASE.Enums.EElemSuppType.eEl____0_: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Axial Force { FEM_CALC_BASE.CMLoadPart_AXIAL_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_AXIAL_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUXRX], out fTemp_A_UXRX, out fTemp_B_UXRX); break; } case BaseClasses.EMLoadType.eMLT_M: // Torsional Moment { FEM_CALC_BASE.CMLoadPart_TORS objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TORS(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUXRX], out fTemp_Ma_UXRX, out fTemp_Mb_UXRX); break; } default: { break; } } break; } // XX - direction start free displacement, end free displacement //case FEM_CALC_BASE.Enums.EElemSuppType.eEl__0__0: case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl______: default: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Axial Force { FEM_CALC_BASE.CMLoadPart_AXIAL_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_AXIAL_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUXRX], out fTemp_A_UXRX, out fTemp_B_UXRX); break; } case BaseClasses.EMLoadType.eMLT_M: // Torsional Moment { FEM_CALC_BASE.CMLoadPart_TORS objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TORS(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUXRX], out fTemp_Ma_UXRX, out fTemp_Mb_UXRX); break; } default: { break; } } break; } } break; } case EMLoadDirPCC1.eMLD_PCC_FYU_MZV: // Transversal load { switch (arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUYRZ]) { // Type of supports is already defined but I check it once more in body of function !!! // UZRY - direction both sides supported displacement case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl_00_00: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Transverse Force { FEM_CALC_BASE.CMLoadPart_TRANS_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TRANS_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUYRZ], out fTemp_A_UYRZ, out fTemp_B_UYRZ, out fTemp_Ma_UYRZ, out fTemp_Mb_UYRZ); break; } case BaseClasses.EMLoadType.eMLT_M: // Bending Moment { FEM_CALC_BASE.CMLoadPart_BEND objMLoadPart = new FEM_CALC_BASE.CMLoadPart_BEND(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUYRZ], out fTemp_A_UYRZ, out fTemp_B_UYRZ, out fTemp_Ma_UYRZ, out fTemp_Mb_UYRZ); break; } default: { break; } } break; } case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl_00_0_: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Transverse Force { FEM_CALC_BASE.CMLoadPart_TRANS_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TRANS_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUYRZ], out fTemp_A_UYRZ, out fTemp_B_UYRZ, out fTemp_Ma_UYRZ, out fTemp_Mb_UYRZ); break; } case BaseClasses.EMLoadType.eMLT_M: // Bending Moment { FEM_CALC_BASE.CMLoadPart_BEND objMLoadPart = new FEM_CALC_BASE.CMLoadPart_BEND(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUYRZ], out fTemp_A_UYRZ, out fTemp_B_UYRZ, out fTemp_Ma_UYRZ, out fTemp_Mb_UYRZ); break; } default: { break; } } break; } case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl_0__00: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Transverse Force { FEM_CALC_BASE.CMLoadPart_TRANS_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TRANS_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUYRZ], out fTemp_A_UYRZ, out fTemp_B_UYRZ, out fTemp_Ma_UYRZ, out fTemp_Mb_UYRZ); break; } case BaseClasses.EMLoadType.eMLT_M: // Bending Moment { FEM_CALC_BASE.CMLoadPart_BEND objMLoadPart = new FEM_CALC_BASE.CMLoadPart_BEND(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUYRZ], out fTemp_A_UYRZ, out fTemp_B_UYRZ, out fTemp_Ma_UYRZ, out fTemp_Mb_UYRZ); break; } default: { break; } } break; } case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl_0__0_: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Transverse Force { FEM_CALC_BASE.CMLoadPart_TRANS_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TRANS_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUYRZ], out fTemp_A_UYRZ, out fTemp_B_UYRZ, out fTemp_Ma_UYRZ, out fTemp_Mb_UYRZ); break; } case BaseClasses.EMLoadType.eMLT_M: // Bending Moment { FEM_CALC_BASE.CMLoadPart_BEND objMLoadPart = new FEM_CALC_BASE.CMLoadPart_BEND(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUYRZ], out fTemp_A_UYRZ, out fTemp_B_UYRZ, out fTemp_Ma_UYRZ, out fTemp_Mb_UYRZ); break; } default: { break; } } break; } // UZRY - direction start supported, end free displacement case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl_00___: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Transverse Force { FEM_CALC_BASE.CMLoadPart_TRANS_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TRANS_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUYRZ], out fTemp_A_UYRZ, out fTemp_B_UYRZ, out fTemp_Ma_UYRZ, out fTemp_Mb_UYRZ); break; } case BaseClasses.EMLoadType.eMLT_M: // Bending Moment { FEM_CALC_BASE.CMLoadPart_BEND objMLoadPart = new FEM_CALC_BASE.CMLoadPart_BEND(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUYRZ], out fTemp_A_UYRZ, out fTemp_B_UYRZ, out fTemp_Ma_UYRZ, out fTemp_Mb_UYRZ); break; } default: { break; } } break; } // UZRY - direction start free displacement, end supported case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl____00: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Transverse Force { FEM_CALC_BASE.CMLoadPart_TRANS_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TRANS_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUYRZ], out fTemp_A_UYRZ, out fTemp_B_UYRZ, out fTemp_Ma_UYRZ, out fTemp_Mb_UYRZ); break; } case BaseClasses.EMLoadType.eMLT_M: // Bending Moment { FEM_CALC_BASE.CMLoadPart_BEND objMLoadPart = new FEM_CALC_BASE.CMLoadPart_BEND(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUYRZ], out fTemp_A_UYRZ, out fTemp_B_UYRZ, out fTemp_Ma_UYRZ, out fTemp_Mb_UYRZ); break; } default: { break; } } break; } // UZRY - direction start free displacement, end free displacement case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl______: default: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Transverse Force { FEM_CALC_BASE.CMLoadPart_TRANS_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TRANS_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUYRZ], out fTemp_A_UYRZ, out fTemp_B_UYRZ, out fTemp_Ma_UYRZ, out fTemp_Mb_UYRZ); break; } case BaseClasses.EMLoadType.eMLT_M: // Bending Moment { FEM_CALC_BASE.CMLoadPart_BEND objMLoadPart = new FEM_CALC_BASE.CMLoadPart_BEND(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUYRZ], out fTemp_A_UYRZ, out fTemp_B_UYRZ, out fTemp_Ma_UYRZ, out fTemp_Mb_UYRZ); break; } default: { break; } } break; } } break; } case EMLoadDirPCC1.eMLD_PCC_FZV_MYU: // Transversal load { switch (arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUZRY]) { // Type of supports is already defined but I check it once more in body of function !!! // UZRY - direction both sides supported displacement case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl_00_00: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Transverse Force { FEM_CALC_BASE.CMLoadPart_TRANS_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TRANS_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUZRY], out fTemp_A_UZRY, out fTemp_B_UZRY, out fTemp_Ma_UZRY, out fTemp_Mb_UZRY); break; } case BaseClasses.EMLoadType.eMLT_M: // Bending Moment { FEM_CALC_BASE.CMLoadPart_BEND objMLoadPart = new FEM_CALC_BASE.CMLoadPart_BEND(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUZRY], out fTemp_A_UZRY, out fTemp_B_UZRY, out fTemp_Ma_UZRY, out fTemp_Mb_UZRY); break; } default: { break; } } break; } case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl_00_0_: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Transverse Force { FEM_CALC_BASE.CMLoadPart_TRANS_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TRANS_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUZRY], out fTemp_A_UZRY, out fTemp_B_UZRY, out fTemp_Ma_UZRY, out fTemp_Mb_UZRY); break; } case BaseClasses.EMLoadType.eMLT_M: // Bending Moment { FEM_CALC_BASE.CMLoadPart_BEND objMLoadPart = new FEM_CALC_BASE.CMLoadPart_BEND(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUZRY], out fTemp_A_UZRY, out fTemp_B_UZRY, out fTemp_Ma_UZRY, out fTemp_Mb_UZRY); break; } default: { break; } } break; } case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl_0__00: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Transverse Force { FEM_CALC_BASE.CMLoadPart_TRANS_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TRANS_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUZRY], out fTemp_A_UZRY, out fTemp_B_UZRY, out fTemp_Ma_UZRY, out fTemp_Mb_UZRY); break; } case BaseClasses.EMLoadType.eMLT_M: // Bending Moment { FEM_CALC_BASE.CMLoadPart_BEND objMLoadPart = new FEM_CALC_BASE.CMLoadPart_BEND(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUZRY], out fTemp_A_UZRY, out fTemp_B_UZRY, out fTemp_Ma_UZRY, out fTemp_Mb_UZRY); break; } default: { break; } } break; } case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl_0__0_: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Transverse Force { FEM_CALC_BASE.CMLoadPart_TRANS_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TRANS_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUZRY], out fTemp_A_UZRY, out fTemp_B_UZRY, out fTemp_Ma_UZRY, out fTemp_Mb_UZRY); break; } case BaseClasses.EMLoadType.eMLT_M: // Bending Moment { FEM_CALC_BASE.CMLoadPart_BEND objMLoadPart = new FEM_CALC_BASE.CMLoadPart_BEND(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUZRY], out fTemp_A_UZRY, out fTemp_B_UZRY, out fTemp_Ma_UZRY, out fTemp_Mb_UZRY); break; } default: { break; } } break; } // UZRY - direction start supported, end free displacement case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl_00___: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Transverse Force { FEM_CALC_BASE.CMLoadPart_TRANS_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TRANS_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUZRY], out fTemp_A_UZRY, out fTemp_B_UZRY, out fTemp_Ma_UZRY, out fTemp_Mb_UZRY); break; } case BaseClasses.EMLoadType.eMLT_M: // Bending Moment { FEM_CALC_BASE.CMLoadPart_BEND objMLoadPart = new FEM_CALC_BASE.CMLoadPart_BEND(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUZRY], out fTemp_A_UZRY, out fTemp_B_UZRY, out fTemp_Ma_UZRY, out fTemp_Mb_UZRY); break; } default: { break; } } break; } // UZRY - direction start free displacement, end supported case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl____00: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Transverse Force { FEM_CALC_BASE.CMLoadPart_TRANS_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TRANS_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUZRY], out fTemp_A_UZRY, out fTemp_B_UZRY, out fTemp_Ma_UZRY, out fTemp_Mb_UZRY); break; } case BaseClasses.EMLoadType.eMLT_M: // Bending Moment { FEM_CALC_BASE.CMLoadPart_BEND objMLoadPart = new FEM_CALC_BASE.CMLoadPart_BEND(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUZRY], out fTemp_A_UZRY, out fTemp_B_UZRY, out fTemp_Ma_UZRY, out fTemp_Mb_UZRY); break; } default: { break; } } break; } // UZRY - direction start free displacement, end free displacement case FEM_CALC_BASE.Enums.EElemSuppType2D.eEl______: default: { switch (TopoModel.m_arrMLoads[iMLoadIndex].MLoadType) { case BaseClasses.EMLoadType.eMLT_F: // Transverse Force { FEM_CALC_BASE.CMLoadPart_TRANS_F objMLoadPart = new FEM_CALC_BASE.CMLoadPart_TRANS_F(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUZRY], out fTemp_A_UZRY, out fTemp_B_UZRY, out fTemp_Ma_UZRY, out fTemp_Mb_UZRY); break; } case BaseClasses.EMLoadType.eMLT_M: // Bending Moment { FEM_CALC_BASE.CMLoadPart_BEND objMLoadPart = new FEM_CALC_BASE.CMLoadPart_BEND(TopoModel.m_arrMLoads[iMLoadIndex], (CE_1D_BASE)arrFemMembers[kMemberIndex], arrFemMembers[kMemberIndex].m_eSuppType2D[(int)EM_PCS_DIR1.eUZRY], out fTemp_A_UZRY, out fTemp_B_UZRY, out fTemp_Ma_UZRY, out fTemp_Mb_UZRY); break; } default: { break; } } break; } } break; } default: // Exception { fTemp_A_UXRX = float.MaxValue; fTemp_B_UXRX = float.MaxValue; fTemp_A_UYRZ = float.MaxValue; fTemp_B_UYRZ = float.MaxValue; fTemp_A_UZRY = float.MaxValue; fTemp_B_UZRY = float.MaxValue; fTemp_Ma_UXRX = float.MaxValue; fTemp_Mb_UXRX = float.MaxValue; fTemp_Ma_UYRZ = float.MaxValue; fTemp_Mb_UYRZ = float.MaxValue; fTemp_Ma_UZRY = float.MaxValue; fTemp_Mb_UZRY = float.MaxValue; break; } } } }
public void GenerateMesh1D(CModel TopoModel) { // Generate FEM nodes // Nodes for (int i = 0; i < TopoModel.m_arrNodes.Length; i++) { // Create FEM node CFemNode TempNode = new CFemNode(TopoModel.m_arrNodes[i]); m_arrFemNodes[i] = TempNode; // Set FEM node DOF // Get nodal support // Search if node is in list of supported nodes for each nodal support for (int i2 = 0; i2 < TopoModel.m_arrNSupports.Length; i2++) // Check all nodal supports { for (int j = 0; j < TopoModel.m_arrNSupports[i2].m_iNodeCollection.Length; j++) // Check list of nodes (Nodes IDs collection) { if (m_arrFemNodes[i].ID == TopoModel.m_arrNSupports[i2].m_iNodeCollection[j]) { // DOF of nodes are free - zero rigidity of restraints false as default m_arrFemNodes[i].m_ArrNodeDOF[(int)e3D_DOF.eUX] = TopoModel.m_arrNSupports[i2].m_bRestrain[(int)e3D_DOF.eUX]; // !!! 3D Environment enum m_arrFemNodes[i].m_ArrNodeDOF[(int)e3D_DOF.eUY] = TopoModel.m_arrNSupports[i2].m_bRestrain[(int)e3D_DOF.eUY]; // !!! 3D Environment enum m_arrFemNodes[i].m_ArrNodeDOF[(int)e3D_DOF.eUZ] = TopoModel.m_arrNSupports[i2].m_bRestrain[(int)e3D_DOF.eUZ]; // !!! 3D Environment enum m_arrFemNodes[i].m_ArrNodeDOF[(int)e3D_DOF.eRX] = TopoModel.m_arrNSupports[i2].m_bRestrain[(int)e3D_DOF.eRX]; // !!! 3D Environment enum m_arrFemNodes[i].m_ArrNodeDOF[(int)e3D_DOF.eRY] = TopoModel.m_arrNSupports[i2].m_bRestrain[(int)e3D_DOF.eRY]; // !!! 3D Environment enum m_arrFemNodes[i].m_ArrNodeDOF[(int)e3D_DOF.eRZ] = TopoModel.m_arrNSupports[i2].m_bRestrain[(int)e3D_DOF.eRZ]; // !!! 3D Environment enum } } } } // Generate FEM members // Members for (int i = 0; i < TopoModel.m_arrMembers.Length; i++) { CE_1D TempMember = new CE_1D(TopoModel.m_arrMembers[i], m_arrFemNodes); m_arrFemMembers[i] = TempMember; // Set FEM Member DOF if (TopoModel.m_arrNReleases != null) // Some releases exist { for (int j = 0; j < TopoModel.m_arrNReleases.Length; j++) // Check each release { for (int k = 0; k < TopoModel.m_arrNReleases[j].m_iMembCollection.Length; k++) // Check each member in collection { if (TopoModel.m_arrNReleases[j].m_iMembCollection[k] == m_arrFemMembers[i].ID) // if release exists on member { if (TopoModel.m_arrMembers[i].CnRelease1 != null) m_arrFemMembers[i].CnRelease1 = TopoModel.m_arrMembers[i].CnRelease1; if (TopoModel.m_arrMembers[i].CnRelease2 != null) m_arrFemMembers[i].CnRelease2 = TopoModel.m_arrMembers[i].CnRelease2; } } } } } //////////////////////////////////////////////////////////////////////////////////////////////// // Additional data of nodes depending on generated members for (int i = 0; i < m_arrFemNodes.Length; i++) { m_arrFemNodes[i].m_iMemberCollection = new System.Collections.ArrayList(); // Allocate collection memory for (int j = 0; j < m_arrFemMembers.Length; j++) { if (m_arrFemNodes[i].ID == m_arrFemMembers[j].NodeStart.ID || m_arrFemNodes[i].ID == m_arrFemMembers[j].NodeEnd.ID) // Is node ID same as member start or end node ID { m_arrFemNodes[i].m_iMemberCollection.Add(m_arrFemMembers[j].ID); // Add FEMmember ID to the FEM node list } } } // Releases !!!! - copied from 2D solution, check implementation in 3D !!! // If only two members are connected in one node and if release exists at that node, copy this release from one member to the another for (int i = 0; i < m_arrFemNodes.Length; i++) { if (m_arrFemNodes[i].m_iMemberCollection != null && m_arrFemNodes[i].m_iMemberCollection.Count == 2) // Node is connected to two members { // We know member ID, so we can get index of members in list int iMember1_index = -1; int iMember2_index = -1; for (int j = 0; j < m_arrFemMembers.Length; j++) { // 1st member index if (iMember1_index < 0 && m_arrFemNodes[i].m_iMemberCollection.Contains(m_arrFemMembers[j].ID)) // if Member ID is in the list { iMember1_index = j; // Set 1st } if (iMember1_index > -1) // Index was defined, we can break cycle break; } // 2nd member index for (int k = iMember1_index + 1; k < m_arrFemMembers.Length; k++) // Search for second only in interval between first founded member and last member { if (iMember2_index < 0 && m_arrFemNodes[i].m_iMemberCollection.Contains(m_arrFemMembers[k].ID)) // if Member ID is in the list interval { iMember2_index = k; } if (iMember2_index > -1) // Index was defined, we can break cycle break; } // If relases exist, they are neccesary to define DOF of both members, therefore copy release of one member to the another one if (m_arrFemNodes[i].ID == m_arrFemMembers[iMember1_index].NodeStart.ID && m_arrFemMembers[iMember1_index].CnRelease1 != null) { if (m_arrFemNodes[i].ID == m_arrFemMembers[iMember2_index].NodeStart.ID && m_arrFemMembers[iMember2_index].CnRelease1 == null) m_arrFemMembers[iMember2_index].CnRelease1.m_bRestrain = m_arrFemMembers[iMember1_index].CnRelease1.m_bRestrain; else if (m_arrFemNodes[i].ID == m_arrFemMembers[iMember2_index].NodeEnd.ID && m_arrFemMembers[iMember2_index].CnRelease2 == null) m_arrFemMembers[iMember2_index].CnRelease2.m_bRestrain = m_arrFemMembers[iMember1_index].CnRelease1.m_bRestrain; } else if (m_arrFemNodes[i].ID == m_arrFemMembers[iMember1_index].NodeEnd.ID && m_arrFemMembers[iMember1_index].CnRelease2 != null) { if (m_arrFemNodes[i].ID == m_arrFemMembers[iMember2_index].NodeStart.ID && m_arrFemMembers[iMember2_index].CnRelease1 == null) m_arrFemMembers[iMember2_index].CnRelease1.m_bRestrain = m_arrFemMembers[iMember1_index].CnRelease2.m_bRestrain; else if (m_arrFemNodes[i].ID == m_arrFemMembers[iMember2_index].NodeEnd.ID && m_arrFemMembers[iMember2_index].CnRelease2 == null) m_arrFemMembers[iMember2_index].CnRelease2.m_bRestrain = m_arrFemMembers[iMember1_index].CnRelease2.m_bRestrain; } else if (m_arrFemNodes[i].ID == m_arrFemMembers[iMember2_index].NodeStart.ID && m_arrFemMembers[iMember2_index].CnRelease1 != null) { if (m_arrFemNodes[i].ID == m_arrFemMembers[iMember1_index].NodeStart.ID && m_arrFemMembers[iMember1_index].CnRelease1 == null) m_arrFemMembers[iMember1_index].CnRelease1.m_bRestrain = m_arrFemMembers[iMember2_index].CnRelease1.m_bRestrain; else if (m_arrFemNodes[i].ID == m_arrFemMembers[iMember1_index].NodeEnd.ID && m_arrFemMembers[iMember1_index].CnRelease2 == null) m_arrFemMembers[iMember1_index].CnRelease2.m_bRestrain = m_arrFemMembers[iMember2_index].CnRelease1.m_bRestrain; } else if (m_arrFemNodes[i].ID == m_arrFemMembers[iMember2_index].NodeEnd.ID && m_arrFemMembers[iMember2_index].CnRelease2 != null) { if (m_arrFemNodes[i].ID == m_arrFemMembers[iMember1_index].NodeStart.ID && m_arrFemMembers[iMember1_index].CnRelease1 == null) m_arrFemMembers[iMember1_index].CnRelease1.m_bRestrain = m_arrFemMembers[iMember2_index].CnRelease2.m_bRestrain; else if (m_arrFemNodes[i].ID == m_arrFemMembers[iMember1_index].NodeEnd.ID && m_arrFemMembers[iMember1_index].CnRelease2 == null) m_arrFemMembers[iMember1_index].CnRelease2.m_bRestrain = m_arrFemMembers[iMember2_index].CnRelease2.m_bRestrain; } } } // Additional data of members // Fill Members stifeness matrices for (int i = 0; i < m_arrFemMembers.Length; i++) { m_arrFemMembers[i].FillBasic3_StiffMatrices(); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // External Loads // Fill vectors // Nodal loads // Fill vector of external load for each node in list // Node could be included in all lists only once, more than one nodal load in one node is not allowed if (!object.ReferenceEquals(null, TopoModel.m_arrNLoads)) { for (int i = 0; i < TopoModel.m_arrNLoads.Length; i++) // Each load { if (TopoModel.m_arrNLoads[i].INodeCollection != null) // Check if some nodes are in list { for (int j = 0; j < TopoModel.m_arrNLoads[i].INodeCollection.Length; j++) // Each node in collection { // Set load vector values for (int k = 0; k < m_arrFemNodes.Length; k++) // Neefektivne prechadzat zbytocne vsetky uzly kedze pozname konkretne ID zatazenych { if (TopoModel.m_arrNLoads[i].INodeCollection.Contains(TopoModel.m_arrNodes[k].ID)) // If node ID is same as collection item { // Check object class if (TopoModel.m_arrNLoads[i] is BaseClasses.CNLoadAll) { CNLoadAll oTemp = new CNLoadAll(); // Create new object of necessary type oTemp = (CNLoadAll)(TopoModel.m_arrNLoads[i]); // Change object type m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eFX] = oTemp.Value_FX; m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eFY] = oTemp.Value_FY; m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eFZ] = oTemp.Value_FZ; m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eMX] = oTemp.Value_MX; m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eMY] = oTemp.Value_MY; m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eMZ] = oTemp.Value_MZ; /* m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eFX] = TopoModel.m_arrNLoads[i].Value_FX; m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eFY] = TopoModel.m_arrNLoads[i].Value_FY; m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eFZ] = TopoModel.m_arrNLoads[i].Value_FZ; m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eMX] = TopoModel.m_arrNLoads[i].Value_MX; m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eMY] = TopoModel.m_arrNLoads[i].Value_MY; m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eMZ] = TopoModel.m_arrNLoads[i].Value_MZ; */ } else { CNLoadSingle oTemp = new CNLoadSingle(); // Create new object of necessary type oTemp = (CNLoadSingle)(TopoModel.m_arrNLoads[i]); // Change object type m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eFX] = oTemp.NLoadType == ENLoadType.eNLT_Fx ? oTemp.Value : 0.0f; m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eFY] = oTemp.NLoadType == ENLoadType.eNLT_Fy ? oTemp.Value : 0.0f; m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eFZ] = oTemp.NLoadType == ENLoadType.eNLT_Fz ? oTemp.Value : 0.0f; m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eMX] = oTemp.NLoadType == ENLoadType.eNLT_Mx ? oTemp.Value : 0.0f; m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eMY] = oTemp.NLoadType == ENLoadType.eNLT_My ? oTemp.Value : 0.0f; m_arrFemNodes[k].m_VDirNodeLoad.FVectorItems[(int)e3D_E_F.eMZ] = oTemp.NLoadType == ENLoadType.eNLT_Mz ? oTemp.Value : 0.0f; } } } } } } } // Member loads // Set primary end forces only due to member loads in local coordinate system LCS // Summation of loads applied on one member // There can by more loads on one member, member could be in various loads lists (but only once in one list) if (!object.ReferenceEquals(null, TopoModel.m_arrMLoads)) { for (int i = 0; i < TopoModel.m_arrMLoads.Length; i++) // Each load { if (TopoModel.m_arrMLoads[i].IMemberCollection != null) // Check if some members are in list { for (int j = 0; j < TopoModel.m_arrMLoads[i].IMemberCollection.Length; j++) // Each node in collection { // Set end forces due to member load for (int k = 0; k < m_arrFemMembers.Length; k++) // Neefektivne prechadzat zbytocne vsetky pruty kedze pozname konkretne ID zatazenych { // Temporary value of end forces due to particular external force float fTemp_A_UXRX = 0f, fTemp_B_UXRX = 0f, fTemp_Ma_UXRX = 0f, fTemp_Mb_UXRX = 0f; float fTemp_A_UYRZ = 0f, fTemp_B_UYRZ = 0f, fTemp_Ma_UYRZ = 0f, fTemp_Mb_UYRZ = 0f; float fTemp_A_UZRY = 0f, fTemp_B_UZRY = 0f, fTemp_Ma_UZRY = 0f, fTemp_Mb_UZRY = 0f; // Fill end forces due to external forces vectors for member particular load index i and member index k // Depends on load dirrection and member support type // Use member PRINCIPAL coordinate system CMLoadPart objAux = new CMLoadPart(TopoModel, m_arrFemMembers, i, k, out fTemp_A_UXRX, out fTemp_Ma_UXRX, out fTemp_A_UYRZ, out fTemp_Ma_UYRZ, out fTemp_A_UZRY, out fTemp_Ma_UZRY, out fTemp_B_UXRX, out fTemp_Mb_UXRX, out fTemp_B_UYRZ, out fTemp_Mb_UYRZ, out fTemp_B_UZRY, out fTemp_Mb_UZRY ); // Add values of temporary end forces due to particular load to the end forces items of vector // Primary end forces due member loading in local coordinate system LCS // Start Node m_arrFemMembers[k].m_VElemPEF_LCS_StNode.FVectorItems[(int)e3D_E_F.eFX] += fTemp_A_UXRX; m_arrFemMembers[k].m_VElemPEF_LCS_StNode.FVectorItems[(int)e3D_E_F.eMX] += fTemp_Ma_UXRX; m_arrFemMembers[k].m_VElemPEF_LCS_StNode.FVectorItems[(int)e3D_E_F.eFY] += fTemp_A_UYRZ; // !!! Signs - nutne skontrolovat znamienka podla smeru lokalnych osi a orientacie zatazenia m_arrFemMembers[k].m_VElemPEF_LCS_StNode.FVectorItems[(int)e3D_E_F.eMZ] += fTemp_Ma_UYRZ; m_arrFemMembers[k].m_VElemPEF_LCS_StNode.FVectorItems[(int)e3D_E_F.eFZ] += fTemp_A_UZRY; // !!! Signs - nutne skontrolovat znamienka podla smeru lokalnych osi a orientacie zatazenia m_arrFemMembers[k].m_VElemPEF_LCS_StNode.FVectorItems[(int)e3D_E_F.eMY] += fTemp_Ma_UZRY; // End Node m_arrFemMembers[k].m_VElemPEF_LCS_EnNode.FVectorItems[(int)e3D_E_F.eFX] += fTemp_B_UXRX; m_arrFemMembers[k].m_VElemPEF_LCS_EnNode.FVectorItems[(int)e3D_E_F.eMX] += fTemp_Mb_UXRX; m_arrFemMembers[k].m_VElemPEF_LCS_EnNode.FVectorItems[(int)e3D_E_F.eFY] += fTemp_B_UYRZ; //-fTemp_B_UYRZ; // Zmena znamienka pre silu Vb na konci pruta, znamienko je opacne nez u reakcie, toto su vsak reakcie m_arrFemMembers[k].m_VElemPEF_LCS_EnNode.FVectorItems[(int)e3D_E_F.eMZ] += fTemp_Mb_UYRZ; m_arrFemMembers[k].m_VElemPEF_LCS_EnNode.FVectorItems[(int)e3D_E_F.eFZ] += fTemp_B_UZRY; //-fTemp_B_UZRY; // Zmena znamienka pre silu Vb na konci pruta, znamienko je opacne nez u reakcie, toto su vsak reakcie m_arrFemMembers[k].m_VElemPEF_LCS_EnNode.FVectorItems[(int)e3D_E_F.eMY] += fTemp_Mb_UZRY; } } } } } // Set primary end forces only due to member loads in global coordinate system GCS foreach (CE_1D Elem in m_arrFemMembers) { Elem.SetGetPEF_GCS(); } }
// Member 1-3 public void GetEndLoad_F(CE_1D Element, float fFx, float fFy, float fFz) { switch (Element.m_eSuppType3D) { case EElemSuppType3D.e3DEl_000000_000000: case EElemSuppType3D.e3DEl_000000_0_00_0: case EElemSuppType3D.e3DEl_0_00_0_000000: { Element.m_VElemPEF_LCS_StNode.FVectorItems[0] = fFx / 2f; Element.m_VElemPEF_LCS_StNode.FVectorItems[1] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[2] = -0.5f * fFz; Element.m_VElemPEF_LCS_StNode.FVectorItems[3] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[4] = fFz * Element.FLength / 8f; Element.m_VElemPEF_LCS_StNode.FVectorItems[5] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[0] = fFx / 2f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[1] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[2] = -0.5f * fFz; Element.m_VElemPEF_LCS_EnNode.FVectorItems[3] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[4] = -fFz * Element.FLength / 8f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[5] = 0f; break; } case EElemSuppType3D.e3DEl_000____000000: { Element.m_VElemPEF_LCS_StNode.FVectorItems[0] = fFx / 2f; Element.m_VElemPEF_LCS_StNode.FVectorItems[1] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[2] = 5f / 16f * fFz; Element.m_VElemPEF_LCS_StNode.FVectorItems[3] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[4] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[5] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[0] = fFx / 2f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[1] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[2] = 11f / 16f * fFz; Element.m_VElemPEF_LCS_EnNode.FVectorItems[3] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[4] = 3f / 16f * fFz * Element.FLength; Element.m_VElemPEF_LCS_EnNode.FVectorItems[5] = 0f; break; } case EElemSuppType3D.e3DEl_000000_000___: { Element.m_VElemPEF_LCS_StNode.FVectorItems[0] = fFx / 2f; Element.m_VElemPEF_LCS_StNode.FVectorItems[1] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[2] = 11f / 16f * fFz; Element.m_VElemPEF_LCS_StNode.FVectorItems[3] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[4] = 3f / 16f * fFz * Element.FLength; Element.m_VElemPEF_LCS_StNode.FVectorItems[5] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[0] = fFx / 2f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[1] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[2] = 5f / 16f * fFz; Element.m_VElemPEF_LCS_EnNode.FVectorItems[3] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[4] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[5] = 0f; break; } default: { GetEndLoad(Element); break; } } // Set Primary End Forces of Elemnent in Global Coordinate system SetGetPEF_GCS(Element); // Update Element Primary End Forces Vector (1x12) in LCS UpdateElemPEF_LCS_Vector(Element); // Update Element Primary End Forces Vector (1x12) in GCS UpdateElemPEF_GCS_Vector(Element); }
// Update Element Primary End Forces Vector (1x12) in LCS void UpdateElemPEF_LCS_Vector(CE_1D Element) { for (int i = 0; i < 6; i++) { Element.m_ArrElemPEF_LCS.m_fArrMembers[0, i] = Element.m_VElemPEF_LCS_StNode.FVectorItems[i]; // Start Node Element.m_ArrElemPEF_LCS.m_fArrMembers[1, i] = Element.m_VElemPEF_LCS_EnNode.FVectorItems[i]; // End Node } }
// Set vector of ends primary forces in global coordinate system public void SetGetPEF_GCS(CE_1D Element) { // Start Node // [PEF_GCS i] = [A0T] * [PEF_LCS i] Element.m_VElemPEF_GCS_StNode = VectorF.fMultiplyMatrVectr(MatrixF.GetTransMatrix(Element.m_fATRMatr3D), Element.m_VElemPEF_LCS_StNode); // End Node // [PEF_GCS j] = [A0T] * [PEF_LCS j] Element.m_VElemPEF_GCS_EnNode = VectorF.fMultiplyMatrVectr(MatrixF.GetTransMatrix(Element.m_fATRMatr3D), Element.m_VElemPEF_LCS_EnNode); }
// Member 1-4 public void GetEndLoad_M(CE_1D Element, float fMx, float fMy, float fMz) { switch (Element.m_eSuppType3D) { case EElemSuppType3D.e3DEl_000000_000000: case EElemSuppType3D.e3DEl_000000_0_00_0: case EElemSuppType3D.e3DEl_0_00_0_000000: { Element.m_VElemPEF_LCS_StNode.FVectorItems[0] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[1] = 9f * fMz / (8f * Element.FLength); Element.m_VElemPEF_LCS_StNode.FVectorItems[2] = 9f * fMy / (8f * Element.FLength); Element.m_VElemPEF_LCS_StNode.FVectorItems[3] = fMx / 2f; Element.m_VElemPEF_LCS_StNode.FVectorItems[4] = fMy * Element.FLength / 12f; Element.m_VElemPEF_LCS_StNode.FVectorItems[5] = fMz * Element.FLength / 12f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[0] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[1] = 9f * fMz / (8f * Element.FLength); Element.m_VElemPEF_LCS_EnNode.FVectorItems[2] = 9f * fMy / (8f * Element.FLength); Element.m_VElemPEF_LCS_EnNode.FVectorItems[3] = -fMx / 2f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[4] = -fMy * Element.FLength / 12f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[5] = -fMz * Element.FLength / 12f; break; } case EElemSuppType3D.e3DEl_000____000000: { Element.m_VElemPEF_LCS_StNode.FVectorItems[0] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[1] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[2] = 9f * fMy / (8f * Element.FLength); Element.m_VElemPEF_LCS_StNode.FVectorItems[3] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[4] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[5] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[0] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[1] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[2] = 9f * fMy / (8f * Element.FLength); Element.m_VElemPEF_LCS_EnNode.FVectorItems[3] = -fMx; Element.m_VElemPEF_LCS_EnNode.FVectorItems[4] = fMy * Element.FLength / 8f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[5] = 0f; break; } case EElemSuppType3D.e3DEl_000000_000___: { Element.m_VElemPEF_LCS_StNode.FVectorItems[0] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[1] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[2] = 9f * fMy / (8f * Element.FLength); Element.m_VElemPEF_LCS_StNode.FVectorItems[3] = fMx; Element.m_VElemPEF_LCS_StNode.FVectorItems[4] = fMy * Element.FLength / 8f; Element.m_VElemPEF_LCS_StNode.FVectorItems[5] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[0] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[1] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[2] = 9f * fMy / (8f * Element.FLength); Element.m_VElemPEF_LCS_EnNode.FVectorItems[3] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[4] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[5] = 0f; break; } default: { GetEndLoad(Element); break; } } // Set Primary End Forces of Elemnent in Global Coordinate system SetGetPEF_GCS(Element); // Update Element Primary End Forces Vector (1x12) in LCS UpdateElemPEF_LCS_Vector(Element); // Update Element Primary End Forces Vector (1x12) in GCS UpdateElemPEF_GCS_Vector(Element); }
// Member 1-2 - Loaded by uniform load public void GetEndLoad_g(CE_1D Element, float fg_z) { switch (Element.m_eSuppType3D) { case EElemSuppType3D.e3DEl_000000_000000: case EElemSuppType3D.e3DEl_000000_0_00_0: case EElemSuppType3D.e3DEl_0_00_0_000000: { Element.m_VElemPEF_LCS_StNode.FVectorItems[0] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[1] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[2] = fg_z * Element.FLength / 2f; Element.m_VElemPEF_LCS_StNode.FVectorItems[3] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[4] = -fg_z * (float)Math.Pow(Element.FLength, 2f) / 12f; Element.m_VElemPEF_LCS_StNode.FVectorItems[5] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[0] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[1] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[2] = fg_z * Element.FLength / 2f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[3] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[4] = fg_z * (float)Math.Pow(Element.FLength, 2f) / 12f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[5] = 0f; break; } case EElemSuppType3D.e3DEl_000____000000: { Element.m_VElemPEF_LCS_StNode.FVectorItems[0] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[1] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[2] = -3 * fg_z * Element.FLength / 8f; Element.m_VElemPEF_LCS_StNode.FVectorItems[3] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[4] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[5] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[0] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[1] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[2] = 5 * fg_z * Element.FLength / 8f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[3] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[4] = fg_z * (float)Math.Pow(Element.FLength, 2f) / 8f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[5] = 0f; break; } case EElemSuppType3D.e3DEl_000000_000___: { Element.m_VElemPEF_LCS_StNode.FVectorItems[0] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[1] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[2] = 5 * fg_z * Element.FLength / 8f; Element.m_VElemPEF_LCS_StNode.FVectorItems[3] = 0f; Element.m_VElemPEF_LCS_StNode.FVectorItems[4] = fg_z * (float)Math.Pow(Element.FLength, 2f) / 8f; Element.m_VElemPEF_LCS_StNode.FVectorItems[5] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[0] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[1] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[2] = -3 * fg_z * Element.FLength / 8f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[3] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[4] = 0f; Element.m_VElemPEF_LCS_EnNode.FVectorItems[5] = 0f; break; } default: { GetEndLoad(Element); break; } } // Set Primary End Forces of Elemnent in Global Coordinate system SetGetPEF_GCS(Element); // Update Element Primary End Forces Vector (1x12) in LCS UpdateElemPEF_LCS_Vector(Element); // Update Element Primary End Forces Vector (1x12) in GCS UpdateElemPEF_GCS_Vector(Element); }
// Function returns list of FEM 1D elements which includes given node // Do we need to store whole elements object (array of elements indexes should be enough) !!! public ArrayList GetFoundedMembers(CFemNode Node, CE_1D[] ElemArray, int iElemNo) { int j = 0; ArrayList ElemTempList = new ArrayList(); for (int i = 0; i < iElemNo; i++) { if ((ElemArray[i].NodeStart == Node) || (ElemArray[i].NodeEnd == Node)) { ElemTempList.Add(i); // Add Element to Element List j++; } } return ElemTempList; }
public ArrayList GetFoundedMembers_IndexOld(CFemNode Node, CE_1D[] ElemArray, int iElemNo) { int j = 0; ArrayList IndexList = new ArrayList(); for (int i = 0; i < iElemNo; i++) { if ((ElemArray[i].NodeStart == Node) || (ElemArray[i].NodeEnd == Node)) { IndexList.Add(i); // Add Element to Element Index Array j++; } } return IndexList; }
// Array of int values public ArrayList GetFoundedMembers_Index(CFemNode Node, CE_1D[] ElemArray) { ArrayList IndexList = new ArrayList(); for (int i = 0; i < ElemArray.Length; i++) // Check for each member in array { if ((ElemArray[i].NodeStart == Node) || (ElemArray[i].NodeEnd == Node)) { IndexList.Add(i); // Add Element to Element Index Array } } return IndexList; }