Fatigue Quick Start Guide > Introduction > Different Methods of FE Import
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Different Methods of FE Import
There are various methods of results import or access to FE results available in MSC Fatigue. The most common methods, and the one most often used in the exercises described in the following chapters, is the import of Output2 files.
 
Note:  
Although the method of import is discussed in this section for various analysis codes and file types, once the results are imported into the database they are all treated the same by MSC Fatigue. This means that any linear static or transient stress or strain tensor results that exist or can be imported into the database are supported by MSC Fatigue. Thus, the supported analysis codes are not necessarily limited to those discussed here and can include customer customization of proprietary or in-house codes within the MSC Patran environment.
To prepare to run each of these exercises in this section, create a fully reversed unit load using PTIME, the same as was done in the very first exercise in the manual. Call it unitload.
MSC Nastran FE Model and Results
You will need the following files to perform this mini-exercise: keyhole.bdf, keyhole.op2, keyhole.xdb, nastran_op2.fin, nastran_xdb.fin
To use MSC Nastran results you must set the Analysis Preference to MSC Nastran. This is done either when you open a new database and are asked for the New Model Preferences | Analysis Code or you can change it anytime from the Preference | Analysis pull-down selection.
Open a new database called keyhole, and set the Analysis Preference to MSC Nastran. Overwrite any old database if necessary.
There are two types of files that can be used from MSC Nastran:
Output2 Files
The first type is the Output2 file. This file is very convenient to use because it generally contains both the finite element results and the model FE connectivity information. To import an Output2 file:
In Pre & Post, select the Import application switch on the main form. (This is the Analysis switch in MSC Patran.)
3. Set the Action to Access Results, the Object to Read Output2, and the Method to Both.
4. Select the Output2 file, keyhole.op2, using the file browser from the Select Results File... button and then click Apply.
XDB Files
The second type of MSC Nastran file supported is the XDB file which is a MSC Nastran result database. The results contained in this file are not actually imported into the database but are retained in the XDB file. A direct access attachment is made between the database and the XDB file. To access XDB results:
1. In Pre & Post, select the Import application switch on the main form. (This is the Analysis switch in MSC Patran.)
2. Set the Action to Access Results, the Object to Attach XDB, and the Method to Result Entities. Select the XDB file, keyhole.xdb, using the file browser from the Select Results File... button and then click Apply.
Now we have read results and the model data from an Output2 file and have attached an XDB file. The exact same results are available from the Results application from the two different data sources in our example.
You should note that we read the model data from the Output2 file. This was unnecessary to do since this could have been done from the XDB file also. When you reopen the database and access any result cases associated with an XDB file, it will be reattached as long as you have not moved or deleted it.
Input Files
Another mechanism for importing model data only from MSC Nastran is to read the input file. This is done either from File | Import with the Object set to Model and the Source set to MSC Nastran Input; or this is done from the Import application (Analysis application in MSC Patran) with the Action set to Read Input File. You can try this with the keyhole.bdf file in a new database if you wish.
 
Note:  
When you read an MSC Nastran input file and then import the results from an Output2 or XDB file, but be sure to set the Method to Results Entities only.
Summary
With the database now containing the model and two sets of FE results, run a fatigue analysis using either the nastran_op2.fin file or nastran_xdb.fin. Go to the main MSC Fatigue setup form and in the Jobname databox type nastran_op2 or nastran_xdb, depending on which one you wish to run and press the carriage return to read in the job parameters. Investigate the job setup if you wish; then open the Job Control... form and submit the analysis. Successful completion of this exercise requires that the keyhole.op2 file be read in first and then the keyhole.xdb file attached to the database. If for some reason the jobs do not run properly, check carefully the Loading Info... form to make sure the correct Result Cases are selected. Close the database when you are finished.
In summary, MSC Nastran FE results and model information can be used in MSC Fatigue in the following ways:
1. Read both the model and results information directly into the database from an Output2 file.
2. Attach an XDB file to the database to access the results and specify to import the model information from the XDB file into the database.
3. Read the model information from an MSC Nastran input deck into the database and use the Output2 or XDB methods to access the results information only.
ABAQUS (or Advanced FEA) FE Results
You will need the following files to perform this mini-exercise: keyhole.fil, abaqus.fin.
To use ABAQUS or Advanced FEA results you must set the Analysis Preference to ABAQUS or MSC Advanced FEA.This is done either when you open a new database and are asked for the New Model Preferences | Analysis Code or you can change it anytime from the Preference | Analysis pull-down selection.
Open a new database called keyhole, and set the Analysis Preference to ABAQUS. Overwrite the old database if necessary.
To read in the results and model data from ABAQUS:
1. In Pre & Post, select the Import application switch on the main form. (This is the Analysis switch in MSC Patran.)
2. Set the Action to Read Results and the Object to Both.
3. Select the results file, keyhole.fil, using the file browser from the Select Results File... button and then click Apply.
4. Go to the main MSC Fatigue setup form and in the Jobname databox type abaqus and press the carriage return to read in the fatigue job parameters from the abaqus.fin file. Investigate the job setup if you wish; then open the Job Control... form and submit the analysis. Close the database when you are finished.
ANSYS FE Results
You will need the following files to perform this mini-exercise: keyhole.rst, ansys.fin.
To use ANSYS results you must set the Analysis Preference to ANSYS.This is done either when you open a new database and are asked for the New Model Preferences | Analysis Code or you can change it anytime from the Preference | Analysis pull-down selection.
Open a new database called keyhole, and set the Analysis Preference to ANSYS 5 and overwrite any old database if necessary.
To read in the results and model data from ANSYS:
1. In Pre & Post, select the Import application switch on the main form. (This is the Analysis switch in MSC Patran.)
2. Set the Action to Read Results and the Object to Both.
3. Select the results file, keyhole.rst, using the file browser from the Select Results File... button and then click Apply.
4. Go to the main MSC Fatigue setup form and in the Jobname databox type ansys and press the carriage return to read in the fatigue job parameters from the ansys.fin file. Investigate the job setup if you wish; then open the Job Control... form and submit the analysis. Close the database when you are finished.
MSC Marc FE Results
You will need the following files to perform this mini-exercise: keyhole.t16, marc.fin.
To use MSC Marc results you must set the Analysis Preference to MSC Marc. This is done either when you open a new database and are asked for the New Model Preferences | Analysis Code or you can change it anytime from the Preference | Analysis pull-down selection.
Open a new database called keyhole, and set the Analysis Preference to MSC Marc. Overwrite any old database if necessary.
To read in the results and model data from MSC Marc:
1. In Pre & Post, select the Import application switch on the main form. (This is the Analysis switch in MSC Patran.)
2. Set the Action to Read Results and the Object to Both.
3. Select the results file, keyhole.t16, using the file browser from the Select Results File... button and then click Apply.
4. Go to the main MSC Fatigue setup form and in the Jobname databox type marc and press the carriage return to read in the fatigue job parameters from the marc.fin file. Investigate the job setup if you wish; then open the Job Control... form and submit the analysis. Close the database when you are finished.
PATRAN Neutral and Result Files
You will need the following files to perform this mini-exercise: key.out, keyhole.nod, keyhole.els, keyhole.res_tmpl, patran_nod.fin, patran_els.fin, external.fin.
PATRAN Neutral files contain model information and PATRAN Result files contain FE results. Both are simple ASCII files with standard formats that have been used for years in the CAE community. Many proprietary and in-house codes use these standard formats. Because of the simplicity of these files it is simple to create them from any source for use with MSC Fatigue. There are two types of PATRAN Result files: nodal and elemental.
PATRAN Neutral Files
Only the nodes and elements are of interest or even necessary from a PATRAN Neutral file for use with MSC Fatigue. The format of this file is made up of various packets. The pertinent packets necessary for MSC Fatigue are (in order):
25	File title
26 Summary data
1 Node data
2 Element data
21 Named components (group information - optional)
99 End of file flag
The format of each of these packets is (see the file keyhole.out as an example):
Packet Type 25: Title Card
 
Header Card
Format
(I2,8I8)
25
ID
IV
KC
 
 
 
 
 
ID = 0 Not applicable
IV = 0 Not applicable
KC = 1
 
User Title Card
 
Format
(20A4)
TITLE
= Identifying title may contain up to 80 Characters
Packet Type 26: Summary Data
 
Header Card
Format
(I2,8I8)
26
ID
IV
KC
N1
N2
N3
N4
N5
ID = 0 n/a
N1 = Number of Nodes
IV = 0 n/a
N2 = Number of Elements
KC = 1
 
Summary Data Card
Format
(3A4, 2A4, 3A4)
DATE
TIME
VERSION
 
 
 
 
DATE
 
= Date neutral file was created
TIME
 
= Time neutral file was created
VERSION
= PATRAN release number - not necessary
Packet Type 01: Node Data
 
Header Card
Format
(I2,8I8)
1
ID
IV
 
KC
 
 
 
 
ID = Node ID
IV = 0 n/a
KC = 2
 
Data Card 1
 
Format
(3E16.9)
 
 
X
Y
Z
 
 
 
 
 
 
 
X = X Cartesian Coordinate of Node
 
Y = Y Cartesian Coordinate of Node
 
Z = Z Cartesian Coordinate of Node
Data Card 2
 
Format
(I1, 1A1, I8, I8, I8, 2X, 6I1)
ICF
GTYPE
NDF
CONFIG
CID
PSPC
 
None of these parameters are necessary but the card must exist.
Packet Type 02: Element Data
 
Header Card
Format
(I2,8I8)
2
ID
IV
KC
N1
N2
 
 
 
ID = Element ID
IV = Shape (2 = bar, 3 = tri, 4 = quad, 5 = tet, 7 = wedge, 8 = hex)
KC = 1 + (NODES + 9)/10 + (N1 +4)/5 (for text files)
N1 = Number of associate data values
N2 = ID of node in XY-plane (bar only)
Data Card 1
 
Format
(I8, I8, I8, I8, 3E16.9)
NODES
CONFIG
PID
CEID
θ1
θ2
θ3
NODES = Total number of nodes, all other parameters are not necessary.
Data Card 2
 
Format
(10I8)
LNODES= Element corner nodes followed by additional nodes
Data Card 3
 
 
Format
 
(5E16.9)
 
 
 
ADATA= Associate data values (will not be present if N1 is zero)
 
 
 
 
 
 
 
 
Packet Type 21: Named Components
 
Header Card
Format
(I2,8I8)
21
ID
IV
KC
 
 
 
 
 
ID = Component number
IV = 2 times the number of data pairs
KC = 1 + (IV + 9)/10
   
Data Card 1
Format
(A12)
NAME = Component Name
   
Data Card 2
Format
(10I8)
   NTYPE(1)1
ID(1)
NTYPE(2)
ID(2)
NTYPE(5)
ID(5)
(NTYPE(i), ID(i)) = Data pairs of type and ID number of each item in (i = 1, IV/2)component.

1 NTYPE meanings:

5-node
8-quadrilateral
6-bar
9-tetrahedron
7-triangle
11-wedge
 
12-hexahedron
NTYPEs 6-12 may have 100 or 200 added to the basic NTYPE. The number of hundreds is usually the number of midside nodes.
Packet Type 99: End of Neutral File
 
Header Card
 
Format
(I2, 8I8)
99
ID
IV
 
KC
 
 
 
 
ID = 0 not/applicable
IV = 0 not/applicable
KC = 1
 
 
PATRAN Nodal Result Files
These files contain results at nodes and are formatted as such:
Record 1:	TITLE	(80A1)
Record 2: NNODES,MAXNOD,DEFMAX,NDMAX,NWIDTH (2I9 E15.6, 2I9)
Record 3: SUBTITLE1 (80A1)
Record 4: SUBTITLE2 (80A1)
Record 5 to n+4: NODID,(DATA(J), J=1, NWIDTH) (I8, (5E13.7))
where
 
Parameter
Description
TITLE
80A1 title stored in an 80 word real or integer array
SUBTITLE1
Same format as TITLE
SUBTITLE2
Same format as TITLE
NNODES
Number of nodes (integer)
MAXNOD
Highest node ID number (integer)
DEFMAX
Maximum absolute displacement (real)
NDMAX
ID of node where maximum displacement occurs (integer)
NWIDTH
Number of columns after NODID for nodal information (integer)
NODID
Node ID number (integer)
DATA
Result quantities organized by column index (real)
PATRAN Elemental Result Files
These files contain results at element centroids and are formatted as such:
Record 1:	TITLE	(80A1)
Record 2: NWIDTH (I5)
Record 3: SUBTITLE1 (80A1)
Record 4: SUBTITLE2 (80A1)
Record 5 To N+4: ID, NSHAPE, (DATA(J), J=1,NWIDTH) (2I8, /, (6E13.7))
where
 
Parameter
Description
TITLE
80A1 Title Stored In An 80 Word Real Or Integer Array
SUBTITLE1
Same format as TITLE
SUBTITLE2
Same format as TITLE
NWIDTH
Number Of Columns Of Data Stored In The File (Integer)
ID
Element Identification Number (Integer)
NSHAPE
Essential Shape Code
(Bar = 2, Tri = 3, Quad = 4, Tet = 5, Pyr = 6, Wedg = 7, Hex = 8; Int.)
DATA
Result Quantities Organized By Column Index (Real)
Import the Files
All of these files can be imported into the database.
1. Open a new database called keyhole. Overwrite old database if necessary.
2. Import the Neutral file (key.out) first (File | Import - Object=Model, Source=Neutral). Keep the Analysis Preference set to MSC Nastran and ignore any error/warning messages.
The FE model is now in the database and should be visible from the graphics screen. Now import the FE results. There are two files to import, a nodal results file and an element centroidal results file that contain stress components.
3. From File | Import set the Object to Results and the Format to PATRAN2 .nod.... Two file browsers will appear, one asking for a template file and the other asking for the actual results file. The template file is called keyhole.res_tmpl and you will have to locate it from the browser which defaults to a standard installation directory. Once you have found and selected the template file, select the result file (keyhole.nod) and click the Apply button to have it imported.
The template is a file that defines how the columns of a PATRAN Results file will be translated and stored in the database. MSC Fatigue requires stress or strain tensors when imported into the database. Therefore the template file defines which 6 columns compose the 6 components of the tensor.
4. Repeat this procedure with the elemental results file (keyhole.els) but set the Format to PATRAN2 .els....
5. Go to the main MSC Fatigue setup form and in the Jobname databox type patran_nod or patran_els and press the carriage return to read in the fatigue job parameters from the patran_nod.fin or patran_els.fin file. Investigate the job setup if you wish; then open the Job Control... form and submit the analysis. Success of this exercise requires that the .nod file be read first and the .els file second. If the jobs fail, check that the proper Results Cases are called out in the Loading Info... form. Note that the patran_els setup uses Element as the Results Location.
External File Access
6. Before proceeding, make a copy of the file keyhole.nod from a system window or DOS prompt and call it keyhole1.nod.
7. The PATRAN Results files can also be accessed directly by MSC Fatigue instead of through the database. Read the job setup file external.fin by typing external in the Jobname databox and then pressing enter.
8. Open the Loading Info... form and note that the Results From optionmenu is set to External.
9. On the right side of the form the name of the external file is specified by putting a # in the place of the load case ID. Even for one load case this is necessary. This is why you renamed or copied the file to include a number in it.
10. The spreadsheet Load Case ID corresponds to the external file number that will be used for accessing the results, e.g., Load Case ID 10 will use file filename10.nod if filename#.nod is specified as the External File Name.
11. Submit the job from the Job Control... form if you so desire.
 
Note:  
Be careful as you import strains from external PATRAN Results files. Strains accessed directly from the database are required to be true or tensor strains, and not engineering strains. MSC Fatigue will convert them to engineering strains (by multiplying the shear components by two) in order to properly calculate strain combination parameters such as von Mises. If you import a PATRAN Results file that contains strains make sure they are true strains and not engineering strains. If they are engineering strains then you must access them externally. You can specify whether strains are tensor or engineering strains from the Strain Type selection on the Loading Info... form only if the access is External.
Creating External Files
With the ability of MSC Fatigue to access external results files in this manner and with the ability of Pre & Post and MSC Patran to write external results files, virtually any tensor result that exists in the database can be accessed by MSC Fatigue.
In the Results application, with the Object set to Report, you can specify the results to output and the format in which to write them such as an .nod or an .els file.
For example, to write out an .nod file from the Results application:
1. Set the Action to Create, the Object to Report, and the Method to Overwrite File.
2. Select the Result Case and the Result to output and specify the 6 components of the tensor to be output from the Selected Quantities.
3. Under Target Entities, make sure that the Addlt. Display Control is set to Nodes.
.
 
4. Under Display Attributes enter a file name and set the Report Type to Data Only.
 
5. Open the Format... form. Set the File Width to 80 and blank out all other databoxes. Set the Alignment of the Title to Left. Enter four lines for the Title as such:
TITLE
$NNODES$MAXNOD$DEFMAX$NDMAX$NWIDTH
SUBTITLE1
SUBTITLE2
Set the Value Format of the Entity ID to %I8% and all of the Components to %E13.7% except for the YZ Component which should be %E13.7%%1N%.
6. Click Apply to create the result file which can then be accessed externally by MSC Fatigue.
To create an element centroidal results file you follow the same procedure except the Addlt. Display Control must be set to Element Centroids; you must select NSHAPE and the 6 components in that order from the Select Results mode of the form; the format of the second line of the Title must be only $NWIDTH and the NSHAPE column Value Format must be %I8%%1N% (all others should be components should be %E13.7%).
For more information on creating report files, see the MSC Patran User’s Guide or access the on-line help from Pre & Post.
I-DEAS Master Series Universal Files
 
Note:  
This type of Model and Results import is only available in the Pre and Post version. It is not available in MSC Patran.
Open a new database called keyhole, and set the Analysis Preference to anything. Overwrite the old database if necessary. You will need the following files for this mini-exercise: keyhole.unv, universal.fin.
To import model and results data from a Universal file using Pre & Post:
1. Select File | Import.
2. Set the Object to Model and the Source to Universal File.
3. Select the results file, keyhole.unv and click Apply.
4. Go to the main MSC Fatigue setup form and in the Jobname databox type universal and press the carriage return to read in the fatigue job parameters from the universal.fin file. Investigate the job setup if you wish; then open the Job Control... form and submit the analysis. Close the database when you are finished.
 
Note:  
Both model and results are read even though we only specified that the Model be read. Also you can achieve the same by typing uf_reader.select_file( "keyhole.unv", "OPEN" ) in the MSC Patran command window.
MSC Patran FEA Result Files
One last type of results file can also be accessed by MSC Fatigue which is a file produced by the MSC Patran FEA analysis code which produces a .res results file. There are two ways to access it, either by importing its contents into the database or by accessing it externally.
Import the neutral file key.out as you did in PATRAN Neutral and Result Files. Then import the results into the database by using the File | Import mechanism with the Object set to Results and the Format set to P/FEA 2 .res.
To access the results directly from the file itself, on the Loading Info... form set the Results From pick to MSC Patran FEA. Then type in the name of the file on the right side of the form or use the Select File button to use a file browser.
If you would like to experiment with these operation, copy these files to your directory: keyhole.res, patran_fea.fin, patran_res.fin. Open a new database called keyhole and import the file and use the two setup files to run the fatigue jobs.