(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 4.2' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 12895, 304]*) (*NotebookOutlinePosition[ 13973, 338]*) (* CellTagsIndexPosition[ 13929, 334]*) (*WindowFrame->Normal*) Notebook[{ Cell["\<\ The following module computes the linear element stiffness matrix \ Ke, of a two-node, prismatic plane (2D) beam-column element.\ \>", "SmallText",\ CellFrame->True, CellMargins->{{Inherited, 58}, {Inherited, Inherited}}, CellLabelMargins->{{15, Inherited}, {Inherited, Inherited}}, ImageRegion->{{-0, 1}, {0, 1}}, FontFamily->"Times", FontSize->12, Background->RGBColor[1, 1, 0]], Cell[TextData[{ "PlaneBeamColumn2Stiffness[ncoor_,Em_,{A_,Izz_},options_]:= Module[\n \ {x1,x2,y1,y2,x21,y21,EA,EI,numer,L,LL,LLL,Te,Kebar,Ke}, \n \ {{x1,y1},{x2,y2}}=ncoor; {x21,y21}={x2-x1,y2-y1}; \n EA=Em*A; EI=Em*Izz; \ {numer}=options;\n LL=Simplify[x21^2+y21^2]; L=Sqrt[LL]; \n If \ [numer,{x21,y21,EA,EI,LL,L}=N[{x21,y21,EA,EI,LL,L}]]; \n If [!numer, \ L=PowerExpand[L]]; LLL=Simplify[LL*L];", StyleBox[" ", FontColor->RGBColor[1, 0, 0]], "\n Kebar= (EA/L)*{\n { 1,0,0,-1,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},\n \ {-1,0,0, 1,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}} +\n (2*EI/LLL)*{\n { \ 0,0,0,0,0,0},{0, 6, 3*L,0,-6, 3*L},{0,3*L,2*LL,0,-3*L, LL},\n { \ 0,0,0,0,0,0},{0,-6,-3*L,0, 6,-3*L},{0,3*L, LL,0,-3*L,2*LL}};\n \ Te={{x21,y21,0,0,0,0}/L,{-y21,x21,0,0,0,0}/L,{0,0,1,0,0,0},\n \ {0,0,0,x21,y21,0}/L,{0,0,0,-y21,x21,0}/L,{0,0,0,0,0,1}};\n \ Ke=Transpose[Te].Kebar.Te; \n Return[Ke]\n ]; " }], "Input", CellFrame->True, CellMargins->{{7, 58}, {Inherited, Inherited}}, InitializationCell->True, CellLabelMargins->{{15, Inherited}, {Inherited, Inherited}}, ImageRegion->{{-0, 1}, {0, 1}}, Background->GrayLevel[0.900008]], Cell["\<\ The following script evaluates Ke and perform various tests on a \ plane (2D) beam-column element numerically defined as going from (0,0) to (3,4), with Em,A,,Izz set as \ shown\ \>", "Text", CellFrame->True, CellMargins->{{Inherited, 58}, {Inherited, Inherited}}, CellLabelMargins->{{15, Inherited}, {Inherited, Inherited}}, ImageRegion->{{-0, 1}, {0, 1}}, Background->RGBColor[1, 1, 0]], Cell["\<\ ClearAll[L,Em,A,Izz]; ncoor={{0,0},{3,4}}; Em=100; A=125; Izz=250; Ke= PlaneBeamColumn2Stiffness[ncoor,Em,{A,Izz},{True}]; Print[\"Numerical Elem Stiff Matrix: \"]; Print[Ke//MatrixForm]; Print[\"Eigenvalues of Ke=\",Chop[Eigenvalues[Ke]]];\ \>", "Input", CellFrame->True, CellMargins->{{7, 58}, {Inherited, Inherited}}, CellLabelMargins->{{15, Inherited}, {Inherited, Inherited}}, ImageRegion->{{-0, 1}, {0, 1}}, Background->GrayLevel[0.900008]], Cell["\<\ The following script evaluates Ke symbolically for a plane (2D) \ beam-column elem of length L,with properties (Em,A,Izz) kept in symbolic form, and performs \ various tests.\ \>", "Text", CellFrame->True, CellMargins->{{Inherited, 58}, {Inherited, Inherited}}, CellLabelMargins->{{15, Inherited}, {Inherited, Inherited}}, ImageRegion->{{-0, 1}, {0, 1}}, Background->RGBColor[1, 1, 0]], Cell["\<\ ClearAll[L,Em,A,Izz]; ncoor={{0,0},{3*L/5,4*L/5}}; Ke= PlaneBeamColumn2Stiffness[ncoor,Em,{A,Izz},{False}]; Print[\"Symbolic Elem Stiff Matrix:\"]; kfac=Em; Ke=Simplify[Ke/kfac]; Print[kfac,\" \",Ke//MatrixForm]; Print[\"Eigenvalues of Ke=\",kfac,\"*\",Eigenvalues[Ke]];\ \>", "Input", CellFrame->True, CellMargins->{{7, 58}, {Inherited, Inherited}}, CellLabelMargins->{{15, Inherited}, {Inherited, Inherited}}, ImageRegion->{{-0, 1}, {0, 1}}, Background->GrayLevel[0.900008]], Cell["\<\ The following modules compute the linear element stiffness matrix \ Ke of a two-dimensional, two-node, prismatic spatial (3D) beam-column \ element.\ \>", "Text", CellFrame->True, CellMargins->{{Inherited, 58}, {Inherited, Inherited}}, CellLabelMargins->{{15, Inherited}, {Inherited, Inherited}}, ImageRegion->{{-0, 1}, {0, 1}}, Background->RGBColor[1, 1, 0]], Cell[TextData[{ "SpaceBeamColumn2Stiffness[ncoor_,{Em_,Gm_},{A_,Izz_,Iyy_,Jxx_},\n \ options_]:= Module[\n \ {x1,x2,y1,y2,z1,z2,x21,y21,z21,xm,ym,zm,x0,y0,z0,dx,dy,dz,\n \ EA,EIyy,EIzz,GJ,numer,ra,ry,ry2,ry3,rz,rz2,rz3,rx,\n \ L,LL,LLL,yL,txx,txy,txz,tyx,tyy,tyz,tzx,tzy,tzz,T,Kebar,Ke}, \n \ {x1,y1,z1}=ncoor[[1]]; {x2,y2,z2}=ncoor[[2]];\n \ {x0,y0,z0}={xm,ym,zm}={x1+x2,y1+y2,z1+z2}/2;\n If \ [Length[ncoor]<=2,{x0,y0,z0}+={0,1,0}];", StyleBox[" ", FontColor->RGBColor[1, 0, 0]], "\n If [Length[ncoor]==3,{x0,y0,z0}=ncoor[[3]] ];\n \ {x21,y21,z21}={x2-x1,y2-y1,z2-z1}; {numer}=options;\n EA=Em*A; EIzz=Em*Izz; \ EIyy=Em*Iyy; GJ=Gm*Jxx;\n LL=Simplify[x21^2+y21^2+z21^2]; L=Sqrt[LL];\n If \ [numer, {x21,y21,z21,EA,EIyy,EIzz,GJ,LL,L}=\n \ N[{x21,y21,z21,EA,EIyy,EIzz,GJ,LL,L}]]; \n If [!numer, L=PowerExpand[L]]; \ LLL=Simplify[LL*L];", StyleBox[" ", FontColor->RGBColor[1, 0, 0]], " \n ra=EA/L; rx=GJ/L;\n ry=2*EIyy/L; ry2=6*EIyy/LL; ry3=12*EIyy/LLL;\n \ rz=2*EIzz/L; rz2=6*EIzz/LL; rz3=12*EIzz/LLL; \n Kebar={\n { ra, 0, 0, \ 0, 0, 0, -ra, 0, 0, 0, 0, 0},\n { 0, rz3, 0, 0, 0, rz2, \ 0,-rz3, 0, 0, 0, rz2},\n { 0, 0, ry3, 0,-ry2, 0, 0, 0,-ry3, \ 0,-ry2, 0}, \n { 0, 0, 0, rx, 0, 0, 0, 0, 0, -rx, 0, \ 0},\n { 0, 0,-ry2, 0,2*ry, 0, 0, 0, ry2, 0, ry, 0},\n { 0, \ rz2, 0, 0, 0,2*rz, 0,-rz2, 0, 0, 0, rz}, \n {-ra, 0, 0, \ 0, 0, 0, ra, 0, 0, 0, 0, 0},\n { 0,-rz3, 0, 0, 0,-rz2, \ 0, rz3, 0, 0, 0,-rz2},\n { 0, 0,-ry3, 0, ry2, 0, 0, 0, ry3, \ 0, ry2, 0}, \n { 0, 0, 0,-rx, 0, 0, 0, 0, 0, rx, 0, \ 0},\n { 0, 0,-ry2, 0, ry, 0, 0, 0, ry2, 0,2*ry, 0},\n { \ 0, rz2, 0, 0, 0, rz, 0,-rz2, 0, 0, 0,2*rz}};\n \ {dx,dy,dz}={x0-xm,y0-ym,z0-zm}; If [numer,{dx,dy,dz}=N[{dx,dy,dz}]];\n \ tzx=dz*y21-dy*z21; tzy=dx*z21-dz*x21; tzz=dy*x21-dx*y21;\n \ zL=Sqrt[tzx^2+tzy^2+tzz^2]; \n If [!numer,zL=Simplify[PowerExpand[zL]]];\n \ {tzx,tzy,tzz}={tzx,tzy,tzz}/zL; {txx,txy,txz}={x21,y21,z21}/L; \n \ tyx=tzy*txz-tzz*txy; tyy=tzz*txx-tzx*txz; tyz=tzx*txy-tzy*txx;\n \ Te={{txx,txy,txz, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n \ {tyx,tyy,tyz, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {tzx,tzy,tzz, \ 0, 0, 0, 0, 0, 0, 0, 0, 0},\n { 0, 0, 0, txx,txy,txz, 0, \ 0, 0, 0, 0, 0},\n { 0, 0, 0, tyx,tyy,tyz, 0, 0, 0, 0, 0, \ 0},\n { 0, 0, 0, tzx,tzy,tzz, 0, 0, 0, 0, 0, 0},\n { 0, \ 0, 0, 0, 0, 0, txx,txy,txz, 0, 0, 0},\n { 0, 0, 0, 0, 0, \ 0, tyx,tyy,tyz, 0, 0, 0},\n { 0, 0, 0, 0, 0, 0, tzx,tzy,tzz, \ 0, 0, 0},\n { 0, 0, 0, 0, 0, 0, 0, 0, 0, txx,txy,txz},\n \ { 0, 0, 0, 0, 0, 0, 0, 0, 0, tyx,tyy,tyz},\n { 0, 0, \ 0, 0, 0, 0, 0, 0, 0, tzx,tzy,tzz}};\n", StyleBox[" (*Print[\"Kebar=\",Kebar//MatrixForm]; \ Print[\"Te=\",Te//MatrixForm];\n Print[\"check Te is \ orthogonal=\",Chop[Transpose[Te].Te]//MatrixForm];*)", FontColor->RGBColor[1, 0, 0]], "\n Ke=Transpose[Te].Kebar.Te; \n Return[Ke]\n ]; " }], "Input", CellFrame->True, CellMargins->{{7, 58}, {Inherited, Inherited}}, InitializationCell->True, CellLabelMargins->{{15, Inherited}, {Inherited, Inherited}}, ImageRegion->{{-0, 1}, {0, 1}}, Background->GrayLevel[0.900008]], Cell["\<\ The following script evaluates Ke and perform various tests on a \ spatial (3D) beam-column element numerically defined as going from (0,0,0) to (1,8,4), with Em,Gm,A,Izz,Iyy,Jxx set as \ shown\ \>", "Text", CellFrame->True, CellMargins->{{Inherited, 58}, {Inherited, Inherited}}, CellLabelMargins->{{15, Inherited}, {Inherited, Inherited}}, ImageRegion->{{-0, 1}, {0, 1}}, Background->RGBColor[1, 1, 0]], Cell["\<\ ClearAll[L,Em,Gm,A,Izz,Iyy,Jxx]; ncoor={{0,0,0},{1,8,4}}; Em=54; Gm=30; A=18; Izz=36; Iyy=72; Jxx=27; Ke= SpaceBeamColumn2Stiffness[ncoor,{Em,Gm},{A,Izz,Iyy,Jxx},{True}]; Print[\"Numerical Elem Stiff Matrix: \"]; Print[SetPrecision[Ke,4]//MatrixForm]; Print[\"Eigenvalues of Ke=\",Chop[Eigenvalues[Ke]]];\ \>", "Input", CellFrame->True, CellMargins->{{7, 58}, {Inherited, Inherited}}, CellLabelMargins->{{15, Inherited}, {Inherited, Inherited}}, ImageRegion->{{-0, 1}, {0, 1}}, Background->GrayLevel[0.900008]], Cell["Symbolic check of 3D beam-column", "Text", CellFrame->True, CellMargins->{{Inherited, 58}, {Inherited, Inherited}}, CellLabelMargins->{{15, Inherited}, {Inherited, Inherited}}, ImageRegion->{{-0, 1}, {0, 1}}, Background->RGBColor[1, 1, 0]], Cell["\<\ ClearAll[L,Em,Gm,A,Izz,Iyy,Jxx]; ncoor={{0,0,0},{2*L,2*L,L}/3}; Ke=SpaceBeamColumn2Stiffness[ncoor,{Em,Gm},{A,Izz,Iyy,Jxx},{False}]; kfac=Em; Ke=Simplify[Ke/kfac]; Print[\"Numerical Elem Stiff Matrix: \"]; Print[kfac,\" \",Ke//MatrixForm]; Print[\"Eigenvalues of Ke=\",kfac,\"*\",Eigenvalues[Ke]];\ \>", "Input", CellFrame->True, CellMargins->{{7, 58}, {Inherited, Inherited}}, CellLabelMargins->{{15, Inherited}, {Inherited, Inherited}}, ImageRegion->{{-0, 1}, {0, 1}}, Background->GrayLevel[0.900008]], Cell["\<\ Test transformation matrix for 2-node space beam - making sure is \ RHS orthogonal\ \>", "Text", CellFrame->True, CellMargins->{{7, 58}, {Inherited, Inherited}}, CellLabelMargins->{{15, Inherited}, {Inherited, Inherited}}, ImageRegion->{{-0, 1}, {0, 1}}, Background->RGBColor[1, 1, 0]], Cell[TextData[{ "ncoor={{-2,3,2},{3,4,8},{-1,25,-7}};\n \ {{x1,y1,z1},{x2,y2,z2},{x0,y0,z0}}=ncoor;\n \ {xm,ym,zm}={x1+x2,y1+y2,z1+z2}/2; \n {dx,dy,dz}={x0-xm,y0-ym,z0-zm};\n \ {x21,y21,z21}={x2-x1,y2-y1,z2-z1}; \n LL=Simplify[x21^2+y21^2+z21^2]; \ L=Sqrt[LL];", StyleBox[" ", FontColor->RGBColor[1, 0, 0]], " \n tzx=dz*y21-dy*z21; tzy=dx*z21-dz*x21; tzz=dy*x21-dx*y21;\n \ zL=Sqrt[tzx^2+tzy^2+tzz^2]; zL=Simplify[PowerExpand[zL]];\n \ {tzx,tzy,tzz}={tzx,tzy,tzz}/zL;\n {txx,txy,txz}={x21,y21,z21}/L; \n \ tyx=tzy*txz-tzz*txy; tyy=tzz*txx-tzx*txz; tyz=tzx*txy-tzy*txx;\n \ Te={{txx,txy,txz, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n \ {tyx,tyy,tyz, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {tzx,tzy,tzz, \ 0, 0, 0, 0, 0, 0, 0, 0, 0},\n { 0, 0, 0, txx,txy,txz, 0, \ 0, 0, 0, 0, 0},\n { 0, 0, 0, tyx,tyy,tyz, 0, 0, 0, 0, 0, \ 0},\n { 0, 0, 0, tzx,tzy,tzz, 0, 0, 0, 0, 0, 0},\n { 0, \ 0, 0, 0, 0, 0, txx,txy,txz, 0, 0, 0},\n { 0, 0, 0, 0, 0, \ 0, tyx,tyy,tyz, 0, 0, 0},\n { 0, 0, 0, 0, 0, 0, tzx,tzy,tzz, \ 0, 0, 0},\n { 0, 0, 0, 0, 0, 0, 0, 0, 0, txx,txy,txz},\n \ { 0, 0, 0, 0, 0, 0, 0, 0, 0, tyx,tyy,tyz},\n { 0, 0, \ 0, 0, 0, 0, 0, 0, 0, tzx,tzy,tzz}};\n \nTb= {{txx,txy,txz},\n \ {tyx,tyy,tyz},\n {tzx,tzy,tzz}}; \nPrint[\"Tb=\",Tb//MatrixForm];\n\ Print[\"T'T check=\",Simplify[Transpose[Tb].Tb]//MatrixForm];\nPrint[\"T'T \ check=\",Simplify[Tb.Transpose[Tb]]//MatrixForm];\n\ Print[Eigenvalues[N[Tb]]];" }], "Input", CellFrame->True, CellMargins->{{7, 58}, {Inherited, Inherited}}, CellLabelMargins->{{15, Inherited}, {Inherited, Inherited}}, ImageRegion->{{-0, 1}, {0, 1}}, Background->GrayLevel[0.900008]] }, FrontEndVersion->"4.2 for Macintosh", ScreenRectangle->{{0, 1920}, {0, 1180}}, AutoGeneratedPackage->None, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{1256, 1012}, WindowMargins->{{12, Automatic}, {Automatic, 9}}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False}, MacintoshSystemPageSetup->"\<\ 00<0001804P000000]P2:?oQon82n@960dL5:0?l0080001804P000000]P2:001 0000I00000400`<300000BL?00400@00000000000000060801T1T00000000000 00000000000000000000000000000000\>" ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[1754, 51, 409, 12, 60, "SmallText"], Cell[2166, 65, 1178, 22, 298, "Input", InitializationCell->True], Cell[3347, 89, 412, 10, 62, "Text"], Cell[3762, 101, 467, 12, 118, "Input"], Cell[4232, 115, 409, 10, 62, "Text"], Cell[4644, 127, 500, 12, 118, "Input"], Cell[5147, 141, 382, 10, 62, "Text"], Cell[5532, 153, 3465, 57, 838, "Input", InitializationCell->True], Cell[9000, 212, 430, 10, 62, "Text"], Cell[9433, 224, 536, 13, 133, "Input"], Cell[9972, 239, 255, 5, 46, "Text"], Cell[10230, 246, 524, 13, 133, "Input"], Cell[10757, 261, 306, 8, 46, "Text"], Cell[11066, 271, 1825, 31, 493, "Input"] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)