(************** 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[ 7656, 267]*) (*NotebookOutlinePosition[ 8745, 307]*) (* CellTagsIndexPosition[ 8592, 298]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["How to run AnsysEmat", "Section", CellDingbat->"\[FilledSquare]"], Cell["\<\ Evgenii Rudnyi, 2003, \[Copyright]. Use it at your own risk. It may \ damage your data, computer and property. \ \>", "Text"], Cell[TextData[{ "First, it is necessary to install the application from within ", StyleBox["Mathematica", FontSlant->"Italic"], ". You need to know the binary location on a Sun. Please change path in the \ examples below to the correct one." }], "Text"], Cell["\<\ There are two ways to proceed. If you are working on Sun, \ then:\ \>", "Text"], Cell[BoxData[ StyleBox[\(lnk\ = Install["\"]\), "Input"]], "Input"], Cell["\<\ Another option is to run the application in a Sun and to connect to \ it from another system via the network. It is a bit slower but it is much \ more convinient. This is what I am doing by myself from my Powerbook. Note \ that the Ansys file should be located on the Sun filesystem in any case. \ \ \>", "Text"], Cell["\<\ In the last case, the installation is a two-step procedure. 1) Run \ application by itself. There is a script runServer in the AnsysEmat \ directory. Connect to any Sun (remeber its name) and choose a port number \ (for example 5555). Then\ \>", "Text"], Cell["\<\ cd path ./runServer 5555\ \>", "Program"], Cell["2) Connect to the application from another computer", "Text"], Cell[BoxData[ \(lnk = Install["\", LinkMode \[Rule] Connect]\)], "Input"], Cell["To check that the installation is working, run", "Text"], Cell[BoxData[ \(LinkPatterns[lnk]\)], "Input"], Cell["and make sure that the output is", "Text"], Cell[BoxData[ RowBox[{"{", RowBox[{ TagBox[\(OpenAnsysFile[str_String]\), HoldForm], ",", TagBox[\(DoNotConvertAnsysMatrices[key_Integer]\), HoldForm], ",", TagBox["CloseAnsysFile", HoldForm], ",", TagBox["ReadAnsysHeader", HoldForm], ",", TagBox["ReadAnsysElement", HoldForm], ",", TagBox[\(ReadAnsysElements[n_Integer]\), HoldForm]}], "}"}]], "Output"], Cell["At the end of your work, uninstall the application.", "Text"], Cell[BoxData[ \(Uninstall[lnk]\)], "Input"], Cell["Note that this also closes the Sun process.", "Text"], Cell["\<\ In the directory /ansys, there are two files you can play with. \ 1600.emat and 16000.emat contain 1600 and 16000 element matrices accordingly. \ You can use them for benchmarks. \ \>", "Text"], Cell["\<\ In the current version,the length of the array in the application \ is fixed to 100000 integers or 50000 doubles.If in your case,an Ansys records \ has a bigger length,you will probably get a crash.\ \>", "Text"], Cell["\<\ Below is timing on my PowerBook G3 for reading element matrices \ over network. An assumpition is that the application is already started at \ computer stevenson, it listens on port 5555 and its current directory is \ path. Otherwise, make necessary modifications.\ \>", "Text"], Cell[BoxData[ \(\(<< Imtek`Utilities`ExtendedTiming`;\)\)], "Input", CellTags->"In[8]:="], Cell[CellGroupData[{ Cell[BoxData[ \(lnk2 = Install["\<5555@stevenson\>", LinkMode \[Rule] Connect]\)], "Input", CellTags->"In[24]:="], Cell[BoxData[ \(LinkObject["5555@stevenson", 12, 3]\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(LinkPatterns[lnk2]\)], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{ TagBox[\(OpenAnsysFile[str_String]\), HoldForm], ",", TagBox[\(DoNotConvertAnsysMatrices[key_Integer]\), HoldForm], ",", TagBox["CloseAnsysFile", HoldForm], ",", TagBox["ReadAnsysHeader", HoldForm], ",", TagBox["ReadAnsysElement", HoldForm], ",", TagBox[\(ReadAnsysElements[n_Integer]\), HoldForm]}], "}"}]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(OpenAnsysFile["\<../ansys/1600.emat\>"]\)], "Input", CellTags->"In[36]:="], Cell[BoxData[ \(0\)], "Output"] }, Open ]], Cell[BoxData[ \(\(head\ = \ ReadAnsysHeader;\)\)], "Input"], Cell[BoxData[ \(\(nel\ = \ head[\([1, 1]\)];\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(ExtendedTiming[\(el\ = \ ReadAnsysElements[nel];\)]\)], "Input"], Cell[BoxData[ \({4.`, Null}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Uninstall[lnk2]\)], "Input", CellTags->"In[40]:="], Cell[BoxData[ \("5555@stevenson"\)], "Output"] }, Open ]], Cell["\<\ Now you can use a list of element matrices el to assemble global \ matrices with Oliver's code.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Length[el]\)], "Input"], Cell[BoxData[ \(1600\)], "Output"] }, Open ]], Cell["Each object looks like as follows", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(el[\([1]\)]\)], "Input"], Cell[BoxData[ \({{1, 0, 1, 0, 0, 4}, {1, 2, 3, 4}, {0.00006126105674500057`, \(-0.00002042035224833059`\), \ \(-0.00004084070449666914`\), \(-8.419507495707745`*^-19\), \ \(-0.00002042035224833059`\), 0.00010210176124166504`, \(-0.000040840704496665325`\), \ \(-0.000040840704496669154`\), \(-0.00004084070449666914`\), \ \(-0.000040840704496665325`\), 0.00010210176124166503`, \(-0.00002042035224833058`\), \ \(-8.419507495707745`*^-19\), \(-0.000040840704496669154`\), \ \(-0.00002042035224833058`\), 0.00006126105674500057`}, {0.000013370225634596772`, 0.`, 0.`, 0.`, 0.`, 0.000026740451269191765`, 0.`, 0.`, 0.`, 0.`, 0.000026740451269191758`, 0.`, 0.`, 0.`, 0.`, 0.00001337022563459677`}, {0.0032724923474894453`, 0.006544984694978453`, 0.006544984694978452`, 0.0032724923474894436`}}\)], "Output"] }, Open ]] }, Open ]] }, FrontEndVersion->"4.2 for Macintosh", ScreenRectangle->{{0, 1024}, {0, 705}}, WindowSize->{746, 561}, WindowMargins->{{2, Automatic}, {Automatic, 1}} ] (******************************************************************* 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->{ "In[8]:="->{ Cell[4837, 154, 95, 2, 33, "Input", CellTags->"In[8]:="]}, "In[24]:="->{ Cell[4957, 160, 126, 3, 33, "Input", CellTags->"In[24]:="]}, "In[36]:="->{ Cell[5761, 193, 96, 2, 33, "Input", CellTags->"In[36]:="]}, "In[40]:="->{ Cell[6236, 218, 72, 2, 33, "Input", CellTags->"In[40]:="]} } *) (*CellTagsIndex CellTagsIndex->{ {"In[8]:=", 8239, 282}, {"In[24]:=", 8324, 285}, {"In[36]:=", 8411, 288}, {"In[40]:=", 8497, 291} } *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1776, 53, 73, 1, 70, "Section"], Cell[1852, 56, 135, 3, 36, "Text"], Cell[1990, 61, 263, 6, 55, "Text"], Cell[2256, 69, 89, 3, 36, "Text"], Cell[2348, 74, 95, 2, 33, "Input"], Cell[2446, 78, 322, 6, 74, "Text"], Cell[2771, 86, 263, 5, 74, "Text"], Cell[3037, 93, 51, 3, 65, "Program"], Cell[3091, 98, 67, 0, 36, "Text"], Cell[3161, 100, 119, 3, 33, "Input"], Cell[3283, 105, 62, 0, 36, "Text"], Cell[3348, 107, 50, 1, 33, "Input"], Cell[3401, 110, 48, 0, 36, "Text"], Cell[3452, 112, 478, 14, 71, "Output"], Cell[3933, 128, 67, 0, 36, "Text"], Cell[4003, 130, 47, 1, 33, "Input"], Cell[4053, 133, 59, 0, 36, "Text"], Cell[4115, 135, 203, 4, 55, "Text"], Cell[4321, 141, 222, 4, 55, "Text"], Cell[4546, 147, 288, 5, 74, "Text"], Cell[4837, 154, 95, 2, 33, "Input", CellTags->"In[8]:="], Cell[CellGroupData[{ Cell[4957, 160, 126, 3, 33, "Input", CellTags->"In[24]:="], Cell[5086, 165, 69, 1, 33, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[5192, 171, 51, 1, 33, "Input"], Cell[5246, 174, 478, 14, 71, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[5761, 193, 96, 2, 33, "Input", CellTags->"In[36]:="], Cell[5860, 197, 35, 1, 33, "Output"] }, Open ]], Cell[5910, 201, 64, 1, 33, "Input"], Cell[5977, 204, 64, 1, 33, "Input"], Cell[CellGroupData[{ Cell[6066, 209, 85, 1, 33, "Input"], Cell[6154, 212, 45, 1, 33, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[6236, 218, 72, 2, 33, "Input", CellTags->"In[40]:="], Cell[6311, 222, 50, 1, 33, "Output"] }, Open ]], Cell[6376, 226, 119, 3, 36, "Text"], Cell[CellGroupData[{ Cell[6520, 233, 43, 1, 33, "Input"], Cell[6566, 236, 38, 1, 33, "Output"] }, Open ]], Cell[6619, 240, 49, 0, 36, "Text"], Cell[CellGroupData[{ Cell[6693, 244, 44, 1, 33, "Input"], Cell[6740, 247, 888, 16, 170, "Output"] }, Open ]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)