(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of 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[ 6769, 206]*) (*NotebookOutlinePosition[ 7823, 242]*) (* CellTagsIndexPosition[ 7779, 238]*) (*WindowFrame->Normal*) Notebook[{ Cell["", "Subtitle", Evaluatable->False], Cell[TextData[ "The Pre-Processing involve the building up of finite element model by nodal \ coordinates, user have to prepare nodal and element listing in order to be \ read in by program.\n\nTable of nodal and elemental listing will be produced \ for user to counter check. Nodal plot in colour will be displayed as well, \ shape functions, element properties could be read in for pre-processing."], "Subsection", Evaluatable->False], Cell["", "Subsubtitle", Evaluatable->False], Cell[TextData["<False], Cell[CellGroupData[{Cell[TextData[ "ReadCo[\"node\"];\nOutputForm[TableForm[co,TableHeadings->{Automatic,\n{\"X \ - Coord\",\"Y - Coord\"}}]] >> resfile.m;\n"], "Input"], Cell["", "Subsubtitle", Evaluatable->False], Cell[TextData[ "ReadElem[\"elem\"];\nOutputForm[TableForm[elem,TableHeadings->{Automatic,\n{\ \"Node - 1\",\"Node -2\",\"Node - 3\",\"Node - 4\"}}]] >>>resfile.m\n"], "Input"]}, Open]], Cell["", "Subsubtitle", Evaluatable->False], Cell[TextData[ "(* Reading in Shape Functions -- dkl *)\n<>>resfile.m\n\ OutputForm[MatrixForm[dpss]]>>>resfile.m\n"], "Input"], Cell["", "Subsubtitle", Evaluatable->False], Cell[TextData["FormGlobalStifMat[]\n\n"], "Input"], Cell["", "Subsubtitle", Evaluatable->False], Cell[TextData[ "\n(* Reading in Displacement and Mechanical \n Boundary conditions *)\ \n\nReadDispAnsys[\"disp\"]; ReadLoadAnsys[\"load\"];\n\ paload=Table[0,{i,totdof},{j,1}];\ndadisp=Table[0,{i,totdof},{j,1}];"], "Input"], Cell[TextData["\nApplyDispAnsys[]; ApplyLoadAnsys[];"], "Input"], Cell["", "Subsubtitle", Evaluatable->False], Cell[TextData[ "(* Routine to do element plot *)\nModelPlot2D[elem, co, ielem, inode, \ nnode];"], "Input"], Cell[TextData["\nModelMesh2D[elem, co, ielem, inode, nnode];"], "Input"], Cell["", "Subtitle", Evaluatable->False], Cell[TextData[ "In this phase, the assembled stiffness matrix with the known boundary \ conditions are called into user programmed routine to solve for the \ displacement unknowns. Gauss Elimination Method is used for the solution of \ simultaneous equations. Pivoting and row interchange procedures are used to \ treat ill-conditioned matrix.\n"], "Subsection", Evaluatable->False], Cell[TextData["\nSolutionLinear[];\n\n"], "Input"], Cell["", "Subtitle", Evaluatable->False], Cell[TextData[ "Post-Processing involved the print out of displacement and stress values of \ the analysis. Displacement plots are produced to give a better picture of \ final shape with magnification factor adjustable."], "Subsection", Evaluatable->False], Cell["", "Subsubtitle", Evaluatable->False], Cell[TextData["\nStressCompu[];x=.;y=.;"], "Input"], Cell[TextData["\nStressFunction[];"], "Input"], Cell["", "Subsubtitle", Evaluatable->False], Cell[TextData[ "newco=Table[0,{i,inode},{j,2}];\n\n(* Set displacement manification *)\n\ mag=1.;\n\nDo[newco[[i,1]]=co[[i,1]]+dadisp[[i*2-1,1]]*mag;\n \ newco[[i,2]]=co[[i,2]]+dadisp[[i*2,1]]*mag;\n,{i,inode}];\n\n\n\ OutputForm[TableForm[newco-co,TableHeadings->\n{Automatic,{\"X - Disp\",\n \ \"Y - Disp\"}}]] >>> resfile.m\n\n"], "Input"], Cell["", "Subsubtitle", Evaluatable->False], Cell[TextData["DispPlot2D[elem,newco,ielem,inode,nnode];"], "Input"], Cell[TextData["Show[pldisp,wiremesh,AspectRatio->Automatic];\n"], "Input"], Cell["", "Subsubtitle", Evaluatable->False], Cell[TextData["\nPlnssx[]"], "Input"], Cell[TextData["Show[%,wiremesh,Frame->False]"], "Input"], Cell[TextData["\nPlnssy[]"], "Input"], Cell[TextData["Show[%,wiremesh,Frame->False]"], "Input"], Cell[TextData["\nPlnssxy[]"], "Input"], Cell[TextData["Show[%,wiremesh,Frame->False]"], "Input"], Cell["", "Subsubtitle", Evaluatable->False], Cell[TextData["\nStressAtLocation[1.,2.]"], "Input"], Cell["", "Subtitle", Evaluatable->False], Cell[TextData[ "From the theory of beam bending, the stress at node 8 could be calculated \ through the following formulae :\n\nMoment at node 7 = M = force x distance\n \ \t = 5 x 10 Nm\n\t = 50 Nm\n\nStress \ = ( M * y) / I where y = 1 m and I = (b d^3) / 12 = 0.6666 \ m^4\n\nTheoretical Stress = ( 50 * 1 ) / 0.6666 N/m^2 = 75 N/m^2"], "Subsection", Evaluatable->False], Cell[TextData[ "theorystress=75;polystress=xpoly[0.,2.];\nerrorstress1=(75 - calstress \ )*100/(75);\nerrorstress2=(75 - polystress )*100/(75);\n"], "Input"], Cell[TextData[ "TableForm[{{theorystress,calstress,errorstress1,\npolystress,errorstress2}},\ \nTableHeadings -> {{\"Node 8\"}, {\"Theoy Stress\",\n\"Cal. Stress\",\"% of \ Error\",\"Poly. Stress\",\"% of Error\"}}]\n\n"], "Input"], Cell[TextData["\n"], "Input"] }, FrontEndVersion->"Macintosh 3.0", ScreenRectangle->{{0, 640}, {0, 460}}, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{520, 365}, WindowMargins->{{4, Automatic}, {15, Automatic}}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False}, MacintoshSystemPageSetup->"\<\ AVU/IFiQKFD000000W7D@09ag@0000000O=J`09FV" ] (*********************************************************************** 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[1711, 51, 42, 1, 70, "Subtitle", Evaluatable->False], Cell[1756, 54, 442, 7, 70, "Subsection", Evaluatable->False], Cell[2201, 63, 45, 1, 70, "Subsubtitle", Evaluatable->False], Cell[2249, 66, 39, 0, 70, "Input"], Cell[2291, 68, 45, 1, 70, "Subsubtitle", Evaluatable->False], Cell[CellGroupData[{ Cell[2359, 71, 149, 2, 70, "Input"], Cell[2511, 75, 45, 1, 70, "Subsubtitle", Evaluatable->False], Cell[2559, 78, 178, 3, 70, "Input"] }, Open ]], Cell[2749, 83, 45, 1, 70, "Subsubtitle", Evaluatable->False], Cell[2797, 86, 378, 5, 70, "Input"], Cell[3178, 93, 45, 1, 70, "Subsubtitle", Evaluatable->False], Cell[3226, 96, 50, 0, 70, "Input"], Cell[3279, 98, 45, 1, 70, "Subsubtitle", Evaluatable->False], Cell[3327, 101, 235, 4, 70, "Input"], Cell[3565, 107, 65, 0, 70, "Input"], Cell[3633, 109, 45, 1, 70, "Subsubtitle", Evaluatable->False], Cell[3681, 112, 108, 2, 70, "Input"], Cell[3792, 116, 72, 0, 70, "Input"], Cell[3867, 118, 42, 1, 70, "Subtitle", Evaluatable->False], Cell[3912, 121, 385, 6, 70, "Subsection", Evaluatable->False], Cell[4300, 129, 50, 0, 70, "Input"], Cell[4353, 131, 42, 1, 70, "Subtitle", Evaluatable->False], Cell[4398, 134, 259, 4, 70, "Subsection", Evaluatable->False], Cell[4660, 140, 45, 1, 70, "Subsubtitle", Evaluatable->False], Cell[4708, 143, 51, 0, 70, "Input"], Cell[4762, 145, 46, 0, 70, "Input"], Cell[4811, 147, 45, 1, 70, "Subsubtitle", Evaluatable->False], Cell[4859, 150, 346, 5, 70, "Input"], Cell[5208, 157, 45, 1, 70, "Subsubtitle", Evaluatable->False], Cell[5256, 160, 68, 0, 70, "Input"], Cell[5327, 162, 74, 0, 70, "Input"], Cell[5404, 164, 45, 1, 70, "Subsubtitle", Evaluatable->False], Cell[5452, 167, 37, 0, 70, "Input"], Cell[5492, 169, 56, 0, 70, "Input"], Cell[5551, 171, 37, 0, 70, "Input"], Cell[5591, 173, 56, 0, 70, "Input"], Cell[5650, 175, 38, 0, 70, "Input"], Cell[5691, 177, 56, 0, 70, "Input"], Cell[5750, 179, 45, 1, 70, "Subsubtitle", Evaluatable->False], Cell[5798, 182, 52, 0, 70, "Input"], Cell[5853, 184, 42, 1, 70, "Subtitle", Evaluatable->False], Cell[5898, 187, 442, 7, 70, "Subsection", Evaluatable->False], Cell[6343, 196, 157, 2, 70, "Input"], Cell[6503, 200, 231, 3, 70, "Input"], Cell[6737, 205, 29, 0, 70, "Input"] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)