(************** 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[ 5461, 170]*) (*NotebookOutlinePosition[ 6131, 193]*) (* CellTagsIndexPosition[ 6087, 189]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["AnsysRecords", "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[{ "AnsysRecords is a Mathlink application to read Ansys binary files into ", StyleBox["Mathematica", FontSlant->"Italic"], "." }], "Text"], Cell[BoxData[GridBox[{ { StyleBox[\(OpenAnsysFile[fileName]\), FontWeight->"Bold"], \(Opens\ the\ Ansys\ \(\(file\)\(.\)\)\)}, { StyleBox["CloseAnsysFile", FontWeight->"Bold"], \(Closes\ the\ \(\(file\)\(.\)\)\)}, { StyleBox[ RowBox[{ StyleBox["R", FontWeight->"Bold"], StyleBox["eadAnsysRecord", FontWeight-> "Bold"]}]], \(Read\ a\ next\ \(\(record\)\(.\)\)\)}, { TagBox[ StyleBox[\(ReadAnsysRecords[n]\), FontWeight->"Bold"], HoldForm], \(Read\ n\ next\ \(\(records\)\(.\)\)\)} }, GridFrame->True]], "Text"], Cell[BoxData[ \(OpenAnsysFile["\"]\)], "Input"], Cell[TextData[{ "returns return code from the ANSYS routine 'binset'. It must be 0 in the \ case of success. If not, check the file name and add the right path. Note \ that the application current directory is determined when the application \ starts and not when ", StyleBox["Mathematica", FontSlant->"Italic"], " connects to it. If you call ", StyleBox["OpenAnsysFile", FontWeight->"Bold"], " again, it calls ", StyleBox["CloseAnsysFile", FontWeight->"Bold"], " automatically, so actually you do not need ", StyleBox["CloseAnsysFile", FontWeight->"Bold"], " at all." }], "Text"], Cell[BoxData[ StyleBox[ RowBox[{"R", StyleBox["eadAnsysRecord", FontWeight->"Bold"]}]]], "Input"], Cell[TextData[{ "returns the next record from the current file as a list. In Ansys, the \ record is either a vector of integers or doubles. When the end of file is \ reached, ", StyleBox["ReadAnsysRecord", FontWeight->"Bold"], " returns -2. " }], "Text"], Cell["\<\ The meaning of a particular record is documented for some binary \ Ansys files in \"Guide to interfacing with Ansys\". You can also browse \ fd*.inc files in the directory \ /usr/local/ansys61/ansys61/customize/include.\ \>", "Text"], Cell[BoxData[ StyleBox[\(ReadAnsysRecords[n]\), FontWeight->"Bold"]], "Input"], Cell["returns a list of n next records from the current file.", "Text"], Cell[TextData[{ "Mathlink has communication overhead. Each call is expensive, especially \ over network. As a result, ", StyleBox["ReadAnsysRecords", FontWeight->"Bold"], " is much more efficient than ", StyleBox["ReadAnsysRecord", FontWeight->"Bold"], ". The problem is that I do not know how to determine a number of records \ in advance for an arbitrary Ansys file." }], "Text"], Cell["\<\ In order to use a Mathlink application, you have to 1) compile it, \ 2) install it or connect to it. The source code is included however it may \ not be easy to make a binary as it requires linking with the ANSYS bin \ library. A binary for Sun is available at BinaryLocation along with an \ example and documentation how to run it. Yet, the binary requires the ANSYS \ bin shared library, so it may work within IMTEK only.\ \>", "Text"], Cell["\<\ In the source code, the length of the temporary array is fixed to \ 100000 integers or 50000 doubles. You may change it if you need to work with \ big ANSYS models.\ \>", "Text"] }, Open ]] }, FrontEndVersion->"4.2 for Macintosh", ScreenRectangle->{{0, 1024}, {0, 705}}, WindowSize->{772, 643}, WindowMargins->{{Automatic, 74}, {Automatic, 0}}, StyleDefinitions -> "Default.nb" ] (******************************************************************* 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[CellGroupData[{ Cell[1776, 53, 65, 1, 70, "Section"], Cell[1844, 56, 135, 3, 36, "Text"], Cell[1982, 61, 162, 5, 36, "Text"], Cell[2147, 68, 765, 22, 103, "Text"], Cell[2915, 92, 63, 1, 33, "Input"], Cell[2981, 95, 614, 17, 93, "Text"], Cell[3598, 114, 126, 4, 33, "Input"], Cell[3727, 120, 264, 7, 55, "Text"], Cell[3994, 129, 243, 5, 55, "Text"], Cell[4240, 136, 88, 2, 33, "Input"], Cell[4331, 140, 71, 0, 36, "Text"], Cell[4405, 142, 399, 10, 74, "Text"], Cell[4807, 154, 447, 7, 93, "Text"], Cell[5257, 163, 188, 4, 55, "Text"] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)