Fatigue User’s Guide > Fatigue Utilities > Advanced Loading Utilities
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Advanced Loading Utilities
The following sections describe advanced loading utilities. There are several advanced modules for manipulating loading history files of format .dac and other formats (.cyh). It is assumed that the user has a good working knowledge of the loading capabilities of MSC.Fatigue. Please review Loading Management (Ch. 4) first, if this is not the case.
Arithmetic Manipulation - (MART)
MART is a module which arithmetically manipulates standard MSC.Fatigue data files. Files may be operated on in ways similar to that offered by a hand held calculator. Complex mathematical procedures can be built up by “chaining” together sets of MART commands. If necessary, the arithmetic manipulation can be applied to a section or window in the data file, leaving the remainder of the data unaffected.
MART carries out arithmetic operations on MSC.Fatigue data files which have either the time-series, X-Y, or histogram formats, (1, 2 or 3 parameter files). MART supports the following arithmetic operations:
Multiply or Divide every data value in a file by a constant.
Add or Subtract a constant from every data value in a file.
Normalize a data file to a specific mean.
Raise every data value to a specified power.
Extract the SIN, COS or TAN of every value in a data file.
Take the Absolute value of every value in a data file.
Linear transformation of the type Y = MX + C for every value in a data file.
Logarithmic and Anti-Logarithmic transformations to base 10 or base e.
Throughout the course of the above manipulations the following conventions are observed:
The tangent of 90 and 270 degrees is taken to be zero.
Data files which contain negative values can only be raised to integer powers.
Zero values are taken to be real numbers in the range: -1.0 -10 < n < 1.0 -10
Zero values raised to a negative power are set to zero.
Module Operation
The MART module can be run in one of the following 3 ways:
From the Advanced Loading Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
In stand alone mode by typing mart at the system prompt.
By incorporating the MART commands in a batch operation.
Modes 1 and 2 above are interactive. Once running in one of the interactive modes MART will display the main screen which has various options. Select an option, then supply a file name and the data necessary for the selected option.
.
Option
Description
Multiply
Divide
Add
Subtract
MART will ask for the number by which the user wishes to multiply, divide, add, or subtract the data in the input file.
The defaults are 1, 1, 0, 0, for Multiplication, Division, Addition, and Subtraction respectively for safety i.e., to produce an output the same as the input if the default is accepted accidentally.
In addition to entering an explicit numeric value, it is possible to enter the name of an extra details keyword. See the section on data file formats, and the documentation associated with the File Manipulation module, Peak-Valley Extraction - (MPVXMUL), 977, for more information on the extra details area. After accepting a keyword, MART will search the extra details area of the input file and assign the value associated with it to the arithmetic constant to be used. For example, suppose that an input data file contains an extra details keyword called “MODULUS” which has a value 205000 associated with it. Entering the word MODULUS in response to the above prompt will cause MART to use the value 205000 as the arithmetic constant. If the keyword cannot be found an error message will result.
Selecting Normalize to a new mean
If this option is selected, MART will ask for the new mean value. The current mean of the data file is offered as the default, selecting this default will produce an output with the same mean as the input. Extra details keyword input is also supported as explained for the first options.
Selecting Raise to a power
Any valid numeric value may be entered as the required power. Extra details keyword input is also supported as explained for the first options. Data files that contain negative values can only be raised to INTEGER powers.
Selecting Trigonometric functions
If this option is selected, MART will display a submenu alongside the main menu which allows the user to specify whether the conversion function will be Sine, Cosine, or Tangent. The user must specify the units of the input file (using File type), the amount of input file to be processed (From and To), and its Y-axis labels and units.
Note that the TANGENT of 90 or 270 degrees is taken to be ZERO.
Selecting Absolute value of data
Selection of this option will cause MART to assign a positive sign to every negative value found in the input data file and write it out to the output file. Positive values will be written without change.
Selecting
Y = MX + C
This option allows the input signal to be multiplied by one constant, M, and then to have a second constant, C, added to the result. They are incorporated into the well-known equation for a straight line (linear transformation).
The value for M is entered in field 'Y = ' and the C value is entered in field 'X +'.
Any number consistent with the arithmetic operation to be undertaken, non-zero values for division for example, may be entered.
Note that the constant is added AFTER the multiplication by M.
Extra details keyword input is also supported as explained for the first options.
Selecting Logarithmic functions
If this function is selected, MART will display a submenu to the main menu.
Suboptions 1 and 2 will take the natural and base 10 logarithms of the input signal respectively and write the result to the output file. Options 3 and 4 carry out the reverse transformations i.e. ex and 10x respectively.
If the input data file contains NEGATIVE or ZERO values, MART will return an error message. Also, a file cannot be Anti-logged if the resultant file would contain values greater than 1E30.
After selecting a logarithmic function, MART will (as is always the case) ask for the name of the input and output file, and will then process the named input file.
If the NOTEBOOK keyword is defined within the local environment an entry of the information generated during the operation(s) of MART will be made within the MSC.Fatigue notebook. See the Modifying the MSC.Fatigue Environment (MENM), 1433 for details of the environment.
All of the main menu options use the same input screen, as shown in Figure 13‑1 below. The field that changes according to the option is the third field down (marked Option). The other fields may or may not be grayed out depending upon whether they are necessary for that option.Whichever option is chosen from the main menu, the first field that the user must fill is the name of the input file.
Figure 13‑1 Input File Name and Options Screen
Each data field is explained below:
.
Option
Description
File Names
MART can process data files which are in either a time series, X-Y, or histogram format. By default it expects the input file to have a time series format and to have a file extension of .dac. If such a file is to be processed it is only required to enter its name, the .dac extension may be omitted. Files with the correct internal format but different file extensions must have their names entered in full, i.e. including the file extension.
By default, MART expects to find the input data files to be resident in the user’s directory. However, other directories can be accessed.
The processed data will be written to an output file. As a default, this file will be created within the current directory and the extension of the input file is appended to the name entered. If another extension or destination is required then it must be entered in full.
The name of the input file is offered as the default output file name. Acceptance of this default means that input data will be overwritten and so MART will prompt for confirmation to proceed. In addition, if the name of a file which already exists is specified, MART will also prompt for confirmation to overwrite it.
When the input and output files have been named then some or all of the following fields will have to be completed.
From and To
Input files are of a finite length and not all of a file has to be processed. A time segment of a file may be processed. A time segment of a file can be specified by From (start time) and To (finish time).
The start of analysis 'From' option supports keywords (START, extra details etc.) and calculations such as START+5 (seconds). If the file is not a time history then enter the appropriate unit e.g. Hz for an .asd file. Data before the start time is not changed in any way, or deleted.
The finish time of analysis 'To' also supports keywords such as END, extra details, END-5. If the file is not a time history then enter the appropriate unit, e.g. Hz for an .asd file. The 'To' value must be greater than the start time of the analysis. The default is the end of the file. Data after the 'To' time is not changed in any way, or deleted.
Y-axis label + units
The Y-axis label is a text string which is stored in the header area of the data file and is used to describe the parameter that is represented on the Y-axis. The text entered will automatically appear on any plots generated by any suitable graphics module such as MQLD or MMFD.
The Y-axis units are represented by a text string which is stored in the header area of the data file. The text entered will automatically appear on any plots generated by any suitable graphics module such as MQLD or MMFD.
In the case of a file with a histogram format (.cyh or .mkv for example) MART will additionally prompt with:
Z-axis label + units
The Z-axis label is a text string which is stored in the header area of the data file and is used to describe the parameter that is represented on the Z-axis. The text entered will automatically appear on any plots generated by any suitable graphics module such as P3D. The text string must not be longer than 12 characters.
The Z-axis units are represented by a text string which is stored in the header area of the data file. The text entered will automatically appear on any plots generated any suitable graphics module such as MP3D. The text string must not be longer than 10 characters.
2 parameter files
If X-Y or 2 parameter files (often with the .mdf extension) are being processed then, MART prompts with the following fields:
Axis to use
Both \
X only\
Y only
This refers to which axis is going to be arithmetically operated upon. For example if multiplying only the X-axis, then the Y-axis data remains the same etc. Note that if only one axis is being operated upon then only the label and units for that axis can be user specified.
Batch Operation
mart /opt=l/inp=test/out=test1/ov=y/mul=10.1/con=-123
In this example, MART will process an input data file called test.dac by multiplying every value contained therein by 10.1 and then subtracting 123 from the result. The output will be written to another data file called test1.dac. If a file with this name already exists then it will be overwritten.
As another example of the use of simple arithmetic operations to significantly alter the nature of a time history consider the sine wave illustrated in Figure 13‑2 below.
Figure 13‑2 Fully Reversed Sine Wave With a Zero Mean Converted
Suppose that, for some reason, it was required to modify the data in such a way that all the negative values were set to zero. To achieve this the following strategy could be adopted.
Using MART's option Absolute value take the absolute value of the input data file and save the output in a scratch file.
Use the multi-file manipulation module, MMFM, to add the contents of the original data file to that contained in the newly created scratch file and store the result within an output file. Remember that the result of this addition cannot be stored within either of the two input files.
Finally, use MART again to divide the contents of the output file by 2 and save the result within the input file.
The batch command lines to achieve these operations are given below:
mart /opt=B/inp=sine/out=temp/ov=y/*=tt 
mmfm /opt=1/inp=sine,temp/out=sine1/ov=y/*=tt
mart /opt=D/inp=sine1/out=sine1/ov=y/*=tt/val=2
Multi-Channel Editor - (MCOE)
MCOE is an interactive alphanumeric editor that allows both the creation of new and the editing of existing time series data files. MCOE operates within a highly featured spreadsheet environment that allows data to be manipulated within the spreadsheet (points inserted, moved, etc.).
MCOE can be used to create or edit MSC.Fatigue data files which have a single parameter “time series” format. The time series structure is used to describe single channel data where the increment between samples is constant.
MCOE can create or edit multi-channel sets of files provided they have the same base offset and sample rate in every file in the set. Data is displayed on the screen in columns, and in response to MCOE commands, many functions are available to perform column operations.
Module Operation
The MCOE module can be run in one of the following ways:
From the Advanced Loading Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
In stand alone mode by typing mcoe in response to the system prompt.
There are 3 modes of operation of MCOE:
 
Option
Description
Browse
Allows existing data to be viewed but not edited.
Edit
Allows existing data to be viewed and edited.
Create
Allows new files to be created and edited.
All three modes use similar screen layouts and share a large number of capabilities. The differences are that each mode has capabilities appropriate to its purpose. For example, in Browse mode it is impossible to change data. Therefore, capabilities such as being able to enter new data values via the edit window are disabled. In Edit and Create modes these functions do operate.
Most of the differences occur between what is, and what is not available on the Options menu. Rather than largely duplicate an explanation for each mode of operation, it is simpler to highlight the differences between them, as shown in the table below.
After selecting Browse, Edit or Create, the first stage of a run of MCOE involves the specifying of the file or files upon which it will operate.
Figure 13‑3 Specifying the Input File Name
Editing an existing file
If two or more input files are entered, then MCOE offers the option to preserve the original data in a backup file. The name of this file is always the same as that of the input file but with a .bak extension. However, if only one input file is to be edited, then a specific output file name is asked for (rather than automatically reusing the input file name).
Up to 256 files can be specified here. The Pick List facility is probably the easiest way of specifying multiple file entries. All input files must have the same sample rate.
MCOE will expect the input to have an extension of .dac. Files with the correct internal format but different file extensions, such as frequency spectra (.psd), or joint probability density distributions (.jpd), must have their file extensions entered explicitly.
Creating an all new file(s)
This option will cause MCOE to ask for the files Sample Rate and Base Offset (as per Figure 13‑3 above). Up to 256 new file names can be entered in the input file name field, possibly by using quick entry naming conventions such as test(1-10) which will create test01.dac, test01.dac... test10.dac
.
Option
Description
Sample Rate and Base Offset
The Sample Rate is the number of points per second of the new files which is any number greater than zero. The Base Offset is the starting point of the sample relative to the zero line of the X-axis, i.e. if a Base Offset of 200 is entered and the units are seconds, then the created file will be assigned a start time of 200 seconds rather than the default of zero seconds.
If it is intended to create an another type of data set, such as a spectrum for example, then the “sample rate” must be used to define the increment between samples. For example, consider the creation of a spectrum with a maximum (Nyquist) frequency of 250 Hz and consisting of 128 data values. These parameters imply an inter-sample separation, spectral width, of 250 / 128 or 1.9531 Hz and so, in this case, the “sample rate” the would be 1 / 1.9531 or 0.512.
X and Y axes Labels and Units
The axes labels fields ask for the text string which will be assigned to the X and Y-axis labels of all the files to be created.
The axes units fields ask for the text string which will be assigned to the X and Y-axis units of all the files to be created.
Labels and units may be also defined and edited within the spreadsheet by selecting 'View Data' from the options menu.
Spreadsheet Screen
When the input files have been specified and the screen accepted, MCOE will move to its spreadsheet screen, which is shown below.
Figure 13‑4 The MCOE Spreadsheet Environment
There are three main areas on a spreadsheet screen.
The menu bar across the top of the screen which contains the buttons for manipulating the data and navigating around the columns and rows.
The data area itself which consists of rows and columns of data cells.
The status bar along the bottom of the form. It contains temporary or volatile data such as the data value currently highlighted or being edited and the data file’s name.
Each area will be explained separately, starting with the data area.
.
Option
Description
The Data Area
Figure 13‑4 shows the editing of a .dac file, as specified in the input field of Figure 13‑4. All columns from column C onwards (maximum 256) contain data values.
Column A contains a simple data point/row label. It can contain numerical designations for billions of rows. The labels can NOT be edited. Note that the numbers are not actually stored as part of the .dac file; they are present in MCOE for purposes of identification, and are implied rather than stated in the post MCOE .dac file
Column B contains the X-axis values of the file data. If a scale factor has been applied to the range column then the values appearing in this column will have been multiplied by this factor and the scale factor number is displayed above the column. Values in column B can not be edited.
Column C and all subsequent columns contain data values, i.e. the Y‑axis values.
The letter F that appears in columns A and B means that they are fixed, cannot be edited, and will be on-screen at all times. A letter G means that a column is grouped (see the Options menu for details).
The Edit Window
This is an edit window. The contents of whichever cell is highlighted will be displayed here. Any highlighted Y-axis data value can be edited simply by typing a new number. As soon as typing starts the edit window becomes active and values can be entered in the usual way.
If a value is entered beyond the end of the current column, then all values between the previous end - and the new column end positions ‑ are linearly interpolated.
The Header Bar
The menu options contain what are probably the most easily usable methods of navigating around the spreadsheet and manipulating its contents which are explained below.
The File Menu
 
Option
Description
OK
Exits MCOE completely.
Back
Goes back to MCOE’s main menu.
The View menu
 
Option
Description
Up\ Page Up key
Scrolls up 1 screen of data values.
Down\ Page Down key
Scrolls down 1 screen of data values.
Home/ End
Goes to row 1 or the last row.
Left/ Right
Move left or right n columns (if there are columns to move to).
First/ Last
Goes to column 1 or the last column.
Goto option
Goes to a user-specified row.
The Find menu
The FIND menu offers a data search facility. It is offered by clicking the mouse on the 'Find' option.
All searches operate in the current column starting at the current row. If the column end is reached and no match found the search resumes from the first row. A message is displayed if no match is found.
 
Option
Description
Find nearest match
A target value is input. All column data is compared against it and the closest match reported. Any other values equally close are found using the NEXT option
Less than value
A value is entered and the column is searched for the point at which the column date descends below the threshold value.
Greater than value
A value is entered and the column is searched for the point at which the column data rises above the threshold value
Between 2 values
Two values which form the target range are entered. The first value found within this range is reported.
The Options menu
This menu offers the principal tools for editing and manipulating the data. When a multi-column edit operation is selected a question is asked which determines the scope of the operation. The possibilities are: Current column, Grouped columns, All columns. The default is current column until MCOE is set differently.
 
Option
Description
Gap
Allows data to be repetitively appended to the end of the current column. The user must supply the number of points in the gap from which the equivalent number of points, NPTS, is determined. MCOE then moves NPTS on from the column's end and waits for the user to enter a number that will fill the new end cell. The gap between the previous and the new column end positions is bridged by a linear ramp.
Delete
Allows a block of data to be deleted from the columns. The block is copied to the clipboard and may be inserted elsewhere in the spreadsheet using the Paste option.
The user is asked for the start and end positions of the block. If the block extends beyond the end of any of the nominated columns the data cannot be copied to the clipboard and a warning question offers the option to cancel the operation.
Deleted data may be restored to any row position but multi-column data deletions can only be restored to their original columns. Delete is a multi-column operation.
Copy
Allows a block of data to be copied to the clipboard without it being deleted from the spreadsheet. The data may be pasted elsewhere in the spreadsheet.
The user is asked for the start and end positions of the block. If the block extends beyond the end of any of the nominated columns the operation is aborted and a warning issued. Copy is a multi-column operation.
Paste
Allows the clipboard's contents to be inserted into the spreadsheet. A question is asked to determine the point before which the data is to be inserted. Data cannot be pasted to a position starting beyond the end of the column into which it is being inserted.
Multi-column paste always returns data to the columns from which it was taken. Single column paste offers the option of returning data to its original column or to the current column (if different). Paste is a multi-column operation.
Cycle
Allows a sequence of saw-tooth ramps to be appended at the end of a column. The user must supply the following:
The start point of a cycle (Maximum or Minimum)
The cycle range (from Peak to Trough)
The number of cycles to be appended
The mean value of the first half-cycle
The mean value of the last half-cycle
The cycles are then appended to the end of the current column. Cycle is a single column operation.
Insert
Allows a linear ramp to be inserted into a column. The user must supply the following:
The duration of the data to be inserted
The first and last values to be inserted
The point before which the data is to be inserted
The first and last values are then inserted into the column and all intermediate points are linearly interpolated. Insert is a single column operation.
Append
Allows data to be added to the end of a column. The user must supply the following:
The duration of the data to be inserted
The first and last values to be inserted
The first and last values are then inserted into the column and all intermediate points are linearly interpolated. Append is a single column operation.
Join
Allows the data between two existing points in the columns to be joined by a simple linear ramp. Questions are asked to determine the two points between which the columns are to be joined by a linear ramp. A warning is issued if a join point is beyond the end of the data. Join is a multi-column operation.
Export
This writes column data to a TAB separated ASCII text file with a user supplied name and a .txt extension. The exported file may then be imported into other commercially available spreadsheets (e.g. MicroSoft EXCEL). Export is a multi-column operation.
Plot
Allows the contents of the columns to be viewed graphically by loading them into the MSC.Fatigue module Multi File Display (Multi-File Display (MMFD), 224). Plot is a multi-channel operation.
Rescale and offset
Performs a simple linear re-scaling of the columns according to the equation:
Y = FACTOR * X + CONSTANT.
Questions are asked to determine the following:
The start and end points of the rescaling region
The value of FACTOR and SCALE in the above equation
If the specified region extends beyond the end of any column to which the operation is being applied a warning is issued. Rescale is a multi-column operation.
View file Header
Toggles the spreadsheet between the data editing mode and the file header information editing mode.
View extra details:
The input files may have additional information about themselves appended to their extra details areas. You may also add new extra details area keywords to the input files with this option.
Format Columns
Columns can be locked onto the screen, formed into groups, and hidden from view.
Fixed: A fixed column will remain visible on the screen at all times regardless of how the spreadsheet viewing windows is maneuvered. A highlighted letter F appears in the banner of columns which are fixed.
Grouped: Specific columns of interest may be grouped together and submitted, as a group, to multi-file manipulation options (e.g. Plot). A highlighted letter G appears in the banner of grouped columns.
Hidden: When a column is hidden it is no longer displayed in the spreadsheet window. The column still forms part of the spreadsheet and is still subject to multi-file data manipulation commands.
Exit
Accepts all edits/modifications made during the current session and exits the program. Confirmation is requested before this operation is carried out.
Quit
Rejects all edits/modifications made during the current session and exits the program. Confirmation is requested before this operation is carried out.
The Preferences menu
The spreadsheet environment is customized by the preferences menu. When MCOE is exit or quit the current preferences are stored as the defaults for the next run of the program.
 
Option
Description
Point pick
The row specification method. When an option such as delete cells is carried out MCOE can ask for the location to delete in terms of point number (column A), X values (column B) or by pointing and clicking on the required rows.
Click on cells: All edit operations prompt for rows to be specified by clicking on the required rows. The column in which the mouse was last clicked becomes the current column for the operation.
Point numbers: All edit operations determine the required row or row range by asking for row numbers.
X values range: All edit operation determine the required row or row range by asking for X values. Values which are entered at other than the discrete positions at which they occur are rounded to the nearest match.
X-value format
The number of decimal places in the X-values column (B).
Data format
The number of decimal places in the data column (from C onwards). For both range and data format, if a value is so large that the number of places is not possible the display reverts to Exponential format.
Scale X-values
Allows X-values to be scaled by a factor. For example, setting the scale factor to 1000.0 allows a signal originally sampled in seconds to be displayed in milliseconds.
Export options
The export options capability allows the binary .dac file currently loaded to be saved as a text file suitable for import into commercial spreadsheet and database applications. When selected, a form appears asking for the specification of what data is to be written and column separation delimeters, such a tabs, commas, etc.
Rainflow Cycle Counter - (MCYC)
The rainflow cycle counter, mCYC, processes a time series signal, by extracting fatigue cycles according to the rainflow cycle counting algorithm. The utility is useful as it allows the user to count cycles using the same parameters (gate, range, bin width) for comparing and assessing various time signals. The results are presented in the form of a range-mean or a max-min matrix which can be displayed or used as input to mCLF or MSLF. In addition, a file containing a description of each cycle can be generated. If the time of each cycle can be stored, this file may also be used in crack growth analysis.
For example, use PTIME to Copy from central the time history, SAETRN.
1. Invoke MCYC by typing mcyc from the system prompt or select the Rainflow Cycle Counter option from the Advanced Loading Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
2. Select input file. By default, mCYC expects the input data to be a standard .dac file but files with the correct internal format but different file extensions must have their names entered in full e.g. filename.pvx.
3. Select Output Type - Histogram, Cycles Files, or Both. The layout of the lower part of the above screen and next screen (shown here) will depend on the selection made here. If Histogram or Both is selected the Gate, Histogram Filename, Range Parameters and Mean Parameters are prompted for in the screen as shown on page 416.
4. Enter Gate to filter cycles (e.g. 75 which is approximately 10% of the max indicated value 747). The value entered here must be in physical units (usually microstrain) and greater than zero. If the gate value is more than half the size of the largest cycle in the input file, an error message will be issued. All cycles bigger than the gate will be counted.
5. Enter Window Type - Time or Points. Selecting one or the other changes the next input to time or points.
6. Specify Start Time and End Time or Start Points and End Points. (e.g. start+6 -start 6 seconds or points from start and end-100 - end 100 seconds or points from end). Default is start and end.
7. Specify histogram filename if the Output Type selected is Histogram or Both.
8. Store Cycle Time and Cycles Filename are only activated if Cycles File or Both are selected above. If yes is selected, a time based cycles file (.tcy) is generated that can be used in crack growth analysis. If no is selected, a .cyc file is generated that stores the ranges and means from the largest cycle onwards.
9. Specify Cycles Filename if the Output Type selected is Cycles File or Both. The .tcy file can be reordered if desired using the Sort Cycles. If no is selected the cycles are sorted in order of size. Note that if sorting is not carried out, it is possible that a crack growth analysis will be wrong since the order of the cycles is important in crack growth analysis. If yes is selected the cycles are sorted in order of time. Slow selects an old method for sorting which requires less disk space than the current faster method. If disk space is not a concern, do not use this option.
10. The WSR component field is for the exponent on which to base the weighted stress range (range 2-10). The value of 2 would give a rms of stress ranges, the default of 3 gives a root mean cube used typically with welded joint S-N curves. For crack growth, the Paris Law exponent, m, should be used.
11. Pressing OK takes you to the next screen or, if only Cycles files was selected, a results summary is displayed as shown below.
Histogram Limits
The following form is displayed if both or Histogram is selected above:
The fields that are activated depend upon whether the environment keyword HISTFORM is set to MINMAX (use the full range from minimum to maximum values) or BINSIZ (specify on the minimum and the bin width).
1. Min (Range) - For the purposes of scaling the histogram, the range of the smallest cycle to be represented in the histogram must be entered in physical units. If there are any cycles smaller than the minimum range specified, then those cycles will be excluded from the histogram.
2. Max (Range) - For the purposes of scaling the histogram, the range of the largest cycle to be represented in the histogram must be entered in physical units. If there are any cycles larger than the maximum range specified, then those cycles will be excluded from the histogram.
3. No. of Bins - To scale the histogram, specify the number of bins into which to classify the cycle ranges. Any integer up to a maximum of 128 may be entered.
4. Min (mean) - For the purposes of scaling the histogram, the smallest mean value to be represented must be entered in physical units. If there are any cycles whose mean values are smaller than the value specified, then those cycles will be excluded from the histogram.
5. Max (mean) - For the purposes of scaling the histogram, the largest mean value to be represented must be entered in physical units. If there are any cycles whose mean values are greater than the value specified, then those cycles will be excluded from the histogram.
6. No. of Bins - To scale the histogram, specify the number of bins into which to classify the cycle means. Any integer up to a maximum of 128 may be entered.
7. If the environment variable HISTFORM=BINSIZ (set in mENM) then this field is displayed. The format (size and shape) of the histogram can be set by specifying the bin width. By default, the program calculates the bin width needed to include the maximum values in the input file but the user can enter a smaller or larger width.
8. The max-min toggle will plot a histogram based on a count of cycles between the between the maximum and minimum cycle. To scale the histogram, specify the number of bins into which to classify these cycles. Any integer up to a maximum of 128 may be entered.
The output histogram using the range-mean option is shown below.
Formula Processor (MFRM)
MFRM is an arithmetic and logical module which can be used to process formulae of varying complexity. The formulae themselves are defined by means of a command language which FRM interprets and executes. The command language is, in effect, a simple programming language that gives users access to all parts of MSC.Fatigue files, i.e., header, data area, and extra details keywords. MFRM supports the following functions:
Addition
Subtraction
Multiplication
Division
Exponentiation
SIN and arc SIN
COS and arc COS multiplication
TAN and arc TAN
Degrees to Radians Conversion
Radians to Degrees Conversion
Logs to the base 10
All can be written into an MFRM commands file.
MFRM interprets and executes commands which are stored in a formula command file. Individual commands, when grouped together, make up the required formula and so MFRM may be regarded as a formula processor. For example, the following formula command file could be used to prompt for the names of two input files which need to be added together, and the output loaded into a third file called result.dac
;
; --- Define all the files ---

%QYFIL /FILE=F1 /PROMPT="Enter first filename" /TYPE=INPUT
%QYFIL /FI=F2 /PR="Enter second filename" /TY=IN
%DFFIL /FILE=F3 /NAME=RESULT /TYPE=OUTPUT
;
; --- Carry out the addition ---
;
%BEGIN
;
F3 = F1 + F2
;
%END
;
; --- Finish ---
The template file must have an ASCII format. It can be created or edited through the use of a text editor or word processor. However, care must be taken to ensure that no control characters are output from the word processor (WP). Control characters cannot be interpreted and so will cause MFRM to stop processing and display an error message.
 
Note:  
Save the MFRM file as an ASCII file, not in the WP's proprietary format. Give it the extension .frm
The above command structure has two important regions.
The first is a constant, or file definition, region in which all the constants and file types for both input and output are defined.
The second is the arithmetic region in which all the arithmetic operations to be carried out are specified. The arithmetic region must always be embedded within the definition region and start with the %BEGIN command and finish with the %END command. The %BEGIN and %END commands themselves should be considered as belonging to the definition region.
From the above example, it is useful to note that, in the definition region, file specification is through keyword switches which may be expressed in their full form such as /FILE= or in a more compressed form such as /FI=. For more details of the keyword switches associated with each of the file definition commands are provided in the section Syntax of Commands in the Definition Region, 932.
Operational Constraints
Data Files
All data files which are input for processing by MFRM must have the following properties, otherwise they cannot be processed.
All input files must physically exist on the path specified
All input files must have the same length
All input files must have the same sampling rate
They must be single parameter files (normally with the .dac file extension
The default output data file is single parameter with a .dac file extension
The default output list file extension is .lst
The following pages contain details of the MFRM command language and syntax to be used in the MFRM command files.
Syntax of Commands in the Definition Region
A command in the definition region is made up of up to three sections:
A command mnemonic
One or more mandatory switches
Some optional switches
As an example, consider the %QYFIL command:
Command Mnemonic   Mandatory Switches          Optional Switch
%QYFIL             /FI=F1 /PR="INPUT"/TYP=IN   /LA="Pounds"/OV=Y
Note:  
Only one command may be issued per line and all questions and definitions must be declared before the %BEGIN command. All arithmetic, trigonometric or conversion commands must appear between the %BEGIN and %END commands.
All commands and switches can be written in either upper or lower case letters.
Switches are interpreted from a maximum of 3 characters, any further characters are ignored so that to define the /FILE= switch it is sufficient to write /FI =.
The following command mnemonics are supported in the definition region:
 
Command Mnemonic
Description
%QYFIL
Prompt for the entry of a filename.
%DFFIL
Define a file with a given filename.
%QYCON
Prompt for the entry of a constant.
%QYINT
May be used instead of %QYCON or GET_VARIABLE to define a variable that will only accept integers.
%DFINT
This command which may be used instead of %DFCON or DEFINE_VARIABLE to define a variable which will only take integer values.
%DFCON
Define a value for a constant.
%DLOOK
Define a lookup table.
%PRINT
Print a string to screen or file
%BEGIN
Define the start of the arithmetic processing region.
%END
Define the end of the arithmetic processing area.
The %QYFIL Command
This command causes MFRM to prompt for a filename. When using this command, three further definitions must be made. Firstly, the filename must be allocated an internal MFRM file number. Secondly, the prompt string must be defined followed by the nature of the file, input or output, specified. These additional definitions are made through the use of the mandatory command switches detailed below:
 
Command Switch
Description
/FI=Fn
Allocates a file number to the named file. /FI=F1 allocates the code F1. Up to a maximum of 64 files may be allocated, i.e. /FI=F32.
/PR="string"
String is a character string representing the required prompt. The string must be enclosed by quotation marks.
/TY=
Defines the type of the file. /TY=IN specifies an input file. /TY=OU specifies an output file. /TY=LI specifies a list file. If /TY=VA, then a variable length output file may be specified. Any files created in this way will only have data written to them when the file is specified on the left hand side. For example, if F2 is a variable file, then %IF (F1 > 20) F2 = F1
%ENDIF will cause only the values of F1 greater than 20 to be written to F2.
/DE is the default switch and may now specify an environment keyword. To do this, do not enclose the string in quotes. i.e., /DE="TEST101" will set the default to TEST101/DE=.DAC will set the default to the last file written to the .DAC environment keyword.
Examples of valid %QYFIL commands:
%QYFIL /FILE=F1 /PROMPT="Enter input filename" /TYPE=INPUT
%QYFIL /FI=F2 /PR="Enter output filename" /TY=OU
The following optional switches are available for use with files which are specified as output files:
 
Command Switch
Description
/LA="string"
String is a character string representing the Y-axis label.The string must be enclosed by quotation marks.
or /LA=$Fn
Where Fn is a defined input file. The label is copied from the Y label of file Fn.
/UN="string"
String is a character string representing the Y-axis units. The string must be enclosed by quotation marks.
or /UN=$Fn
Where Fn is a defined input file. The label is copied from the Y units of file Fn.
/OV=option
Whether to overwrite the output file or not. If option is Y, overwriting is automatic. If N, the file will not be overwritten, if Q then the user will be asked whether the file should be overwritten.
Example use of the %QYFIL command to define an output file:
%QYFIL 	/FI=F1 /pr="Enter results filename" /ty=ou
/la="Distance" /un="mtrs."/ov=q
The LA and UN parameters are ignored if the output type is LIST.
The %DFFIL Command
This command defines the name of a data file explicitly. When using this command the file must be allocated an internal MFRM file number, the filename defined, and the nature of the file, be it an input or output, specified. These definitions are made through the use of the mandatory command switches detailed below:
 
Command Switch
Description
/FI=Fn
Allocates a file number to the named file.
/FI=F1
allocates the code F1. Up to a maximum of 64 files may be allocated, i.e., /FI=F32.
/NA=FNAME
Where FNAME is the filename. If no extension is specified DAC will be assumed.
/TY=
Defines the type of the file. /TY=IN specifies an input file. /TY=OU specifies an output file. /TY=LI specifies a list file.
Examples of valid %DFFIL commands:
%DFFIL /FILE=F1 /NA=file1 /TYPE=INPUT
%DFFIL /FI=F2 /NA=result /TY=OU 
%DFFIL /FI=F2 /NA=data /TY=LIST
As a result of the first command line, MFRM will try to access an input file called file1.dac. From the second line, it will attempt to write out an output file called result.dac. If file1.dac does not exist or result.dac does, then an error condition will arise which will cause MFRM to cease processing. The third line will create an output file called data.lst to which the %PRINT command can write.
The following optional switches are available for use with files which are specified as output files:
 
Command Switch
Description
/LA="string"
String is a character string representing the Y-axis label. The string must be enclosed by quotation marks
or /LA=$Fn
Where Fn is a defined input file from which the variable is copied.
/UN="string"
String is a character string representing the Y-axis units.The string must be enclosed by quotation marks.
or /LA=$Fn
Where Fn is a defined input file from which the variable is copied.
/OV=option
Whether to overwrite the output file or not. If option is Y, overwriting is automatic. If N, the file will not be overwritten, if Q then the user will be asked whether the file should be overwritten.
Example use of the %DFFIL command to define an output file:
%DFFIL /FI=F1 /NA=RESULT/ty=ou /la="Distance" /un="mtrs."
The command DEFINE_FILE may be used as well as %DFFIL. The new /TY=VA keyword as described above is also supported.
The %QYCON Command
This command causes MFRM to prompt for the value of a constant. When using this command, it is necessary to assign the constant to an internal MFRM number and also to define the prompt string. These definitions are made through the use of the mandatory command switches detailed below:
 
Command Switch
Description
/CO=Cn
Allocates an internal number to the constant.
/CO=C1
allocates the code C1 to the required constant. Up to a maximum of 1000 constants may be allocated.
/PR="string"
String is a character string representing the required prompt. The string must be enclosed by quotation marks.
/DE="Default"
Gets the default string for the constant
Examples of valid %QYCON commands:
;
; -- Ask for constants --
;
%QYCON /CONSTANT=C1 /PROMPT="Enter amplitude"
%QYCON /CO=C2 /PR="Enter frequency value"/DE="5"
The command GET_VARIABLE may be used as well as %QYCON. A new keyword /NA=NAME may be used to define a name to represent the variable. For example,
GET_VARIABLE    /CO=C3 /PR="Enter speed" /NA="SPEED"
DEFINE_VARIABLE /CO=C4 /NA="DISTANCE"
(see %DFCON below for DEFINE_VARIABLE). Then instead of
C4=C3*5.75
one may use
DISTANCE=SPEED*5.75
Output files do not have to be declared before being created
%QYINT or GET_INTEGER
This command may be used instead of %QYCON or GET_VARIABLE to define a variable which will only take integer values.
The %DFCON Command
This command defines the value of a constant explicitly. When using %DFCON, it is necessary to assign the constant to an internal FRM number and also to define its value. These definitions are made through the use of the mandatory command switches detailed below:
 
Command Switch
Description
/CO=Cn
Allocates an internal number to the constant.
/CO=C1
allocates the code C1 to the required constant. Up to a maximum of 1000 constants may be allocated.
/VA=n
Defines the value of the required constant. The value may be integer or decimal.
Examples of valid %DFCON commands:
;
; -- Define the constants --
;
%DFCON /CONSTANT=C1 /VA=10
%DFCON /CO=C2 /VA=5.123
Optionally, %DFCON can be used to define header or extra details and store them in a constant. If the command /FILE=<file ID> is added, it will assume that the /VAL switch defines either a header or an extra details keyword, the data coming from the file specified by <file ID>. For example:
%DFCON /CO=C6 /FI=F1 /VAL=MEAN
%DFCON /CO=C7 /FI=F3 /VAL=EXTRA
The first example extracts the mean from the file defined as F1. In the second example, the value of the extra details keyword EXTRA will be stored in C7. Clearly the file specified in /FI= must be previously defined in a %QYFIL or %DFFIL, and must be of type INPUT. Some header keywords are:
:
TOTPTS
The number of points in the file.
SRATE
The sample rate of the file.
BASE
The base X-value of the file.
INCREM
The X-axis increment.
MEAN
The mean value of the data points.
SDEV
The standard deviation of the data points
YMAX
The maximum data value in the file.
YMIN
The minimum data value in the file.
RMS
The root mean square of the file
MAXLOC
The X location of YMAX
MINLOC
The X location of YMIN
The command DEFINE_VARIABLE may be used as well as %DFCON.
The %WTVAL command
This command writes to the extra details area of a specified file. It can write constants, file values, and temporary variables. The %WTVAL can only be used inside a %BEGIN and %END construction. The /VA switch can be: /VA=Cn constants, /VA=Fn a file value, /VA=Tn temporary variable.
An example of a line using /WTVAL is shown below:
%WTVAL 	/FI=F2		/KW=SPOINT	/VA=C2 
(command) (file to write to) (EDA keyword) (value of keyword)
A more comprehensive example is shown below. It should be used in conjunction with a signal and trigger file. The trigger start and end points are put into the signal file's extra details area.
;
; Get trigger start and end point numbers
; and put them in the signal file extra
; details area
;
%DFFIL /FI=F1 /NA=SIGNAL /TY=INP
%DFFIL /FI=F1 /NA=TRIGGER /TY=INP
%QYCON /CO=C1 /PROMPT="ENTER TRIGGER VALUE"
%DFCON /CO=C2 /FI=F1 /VAL=POINT
%DFCON /CO=C3 /FI=F1 /VAL=TIME
;
%BEGIN ;-- Initialise temporary variables on point 1 only --
%IF (C2 = 1)
T1 = 0.0
%ENDIF
;-- trigger start --
%IF (F2 = C1)
%IF (T1 1.0)
%WTVAL /FI=F1 /KW=SPOINT /VA=C2
%WTVAL /FI=F1 /KW=STIME /VA=C3
T1 = 1.0
%ENDIF
%ELSE
;-- trigger end --
%IF (T1 = 1.0)
%WTVAL /FI=F1 /KW=EPOINT /VA=C2
%WTVAL /FI=F1 /KW=ETIME /VA=C3
T1 = 0.0
%ENDIF
%ENDIF
%END
Figure 13‑5 Diagram Showing signal.dac and trigger.dac
Points t1 and t2 are put in the EDA of signal.dac
SPOINT=Y-axis value of signal.dac at t1
STIME= time at t1
EPOINT=Y-axis value of signal.dac at t2
ETIME= time at t2
Special keywords
In addition, two special keywords are provided.
 
POINT
Stores the current point being processed.
TIME
Stores the time of the point being processed.
The values of these 2 keywords are modified dynamically throughout the %BEGIN...%END processing loop.
Any other keywords are expected to be found in the extra details area, and their value must convert to a single valid real number.
The %DLOOK Command
Defines a lookup table to be used by the LUT<n> function. Up to 10 lookup tables may be defined, either in the MFRM file as pairs of X-Y points or as a DAC file, or as a paired (X-Y) file. To define the lookup table, it must be given an ID, and the type must be specified. If the values are defined in the MFRM file, the number of values must be given. The maximum number of pairs of values in each lookup table is 100. The definition is made using the switches below.
 
Command Switch
Description
/TA=n
Allocates an internal number to the table.
/TY=VALUES
Defines the table as a set of values stored in the MFRM file.
/NVALS=N
Defines the number of values.
/TY=FILE
Defines the table as being stored in an external file
/NA=name
Defines the filename. No assumption is made about the file extension.
If TYPE=VALUES, the next NVALS lines of the MFRM file must contain a lookup table as X,Y pairs, space delimited. The values of X must be increasing. For example:
%DFLOOK /TA=1 /TY=VALUES /NVALS=5 
1 100
3 200
7 300
9 600
10 665
If TYPE=FILE, the file must be a DAC or MDF format. The number of pairs must not exceed 100. In the case of the MDF, X must be increasing.
The command DEFINE_LOOKUP may be used as well as %DLOOK.
The %PRINT Command
The %PRINT command writes data to a list file or the screen. If it is used outside of the %BEGIN...%END loop, file names and constants may be displayed in addition to text. The following switches are used:
 
Command Switch
Description
/MEssage=string
The string to be written, including file names and constants (see below)
/FF
Will issue a form feed command to the printer which will cause it to scroll up 1 page
/FI=Fn
An output file to write to. Must be defined as type LIST. If omitted, the data is written to the screen.
A message string has the following format:
/ME="String"+5X+F1+30T+" another string "+C4
Entities must be separated by the + symbol. Strings must be enclosed in quotation marks. The entity Fn will cause the name of the file to be displayed at that point. The entity Cn will cause the value of constant Cn to be displayed at that point. The entity nX causes n spaces to be displayed. The entity nT causes the next entity to be displayed in column n (used for tabulation). n must be greater than the length of the string to that point. Examples:
%PRINT /FI=F4/ME=F1+25T+F2+50T+F3 %PRINT /ME=25T+"This is a file 						
heading"+3X+"mean = "+C5
The command PRINT may be used as well as %PRINT.
The %BEGIN Command
The %BEGIN command marks the start of the arithmetic operations region; it informs MFRM that until it encounters the %END command, all command lines are to be treated as arithmetic operations. The arithmetic operations region contains all the arithmetic, trigonometric and conversion commands required for execution of the formula.
 
Note:  
All file names and constants MUST be defined before the %BEGIN command is issued. Each formula template file MUST contain a %BEGIN command.
The command BEGIN may be used as well as %BEGIN.
The %END Command
The %END command marks the end of the arithmetic operations region. It informs MFRM that no further arithmetic operations will be required. Only comment lines can follow the %END command. The command END may be used as well as %END.
 
Note:  
The %END command cannot be issued before a %BEGIN has been defined. Each formula template file MUST contain a %END command.
Example of the use of %BEGIN and %END:
;
; --- Definition Region ---

%QYFIL /FILE=F1 /PROMPT="Enter first filename" /TYPE=INPUT
%QYFIL /FI=F2 /PR="Enter second filename" /TY=IN
%DFFIL /FILE=F3 /NAME=RESULT /TYPE=OUTPUT /OV=Q
%DFCON /CO=C1 /VA=5.123
;
; --- Carry out the addition ---
;
%BEGIN
;
T1 = F1 * C1
F3 = T1 + F2
;
%END
;
; --- Finish ---
In this example file F1 is multiplied by constant C1, the result stored in a temporary file called T1 added to file F2. The final result is loaded into file F3.
Syntax of Commands in the Arithmetic Region.
Commands in the arithmetic operations region are made up of variables and manipulative operands. Operands are themselves subdivided into arithmetic, trigonometric, and conversion functions. The syntactical relationship between variables and operands is given below:
{ output variable } = { input variable 1 } { operand } { input variable 2 }
 
Note:  
Spaces between variables, operands and the equals sign are allowed.
The only restriction concerning the placement of variables on either side of the equals sign is that any file which has been declared as an INPUT, through the use of the /TY=INPUT switch within either the %QYFIL or %DFFIL commands, cannot be treated as an output variable, i.e., it cannot appear on the LHS of the equals sign. Therefore the following would NOT be allowed:
		;
%DFFIL /FILE=F1 /NAME=RESULT /TYPE=INPUT
%DFCON /CO=C1 /VA=5.123
;
%BEGIN
F1=F1*C1
F1=T1*F1
Temporary variables and files declared as OUTPUTS, through the use of the /TY=OUTPUT switch within either the %QYFIL or %DFFIL commands, can appear on both sides of the equality, e.g., consider the following fragment:
		;
%DFFIL /FILE=F1 /NAME=RESULT /TYPE=OUTPUT /OV=Y
%DFCON /CO=C1 /VA=5.123
;
%BEGIN
T1=F1*C1
T1=T1*F1
F1=F1*C1
Syntax of Variables
Three type of variables are used to represent values within the arithmetic operations region:
 
Variable Type
Value
Files declared by the user
Denoted by Fn where n is the file number (1-64), e.g. F25.
Constants declared by the user
Denoted by Cn where n is the number of the constant (1-1000), e.g. C10.
Temporary file variables
Denoted by Tn where n is the temporary user variable number (1-1000), e.g. T27. Variables can also be given names (see %DFCON and %QYCON).
%QYINT or GET_INTEGER
This command which may be used instead of %QYCON or GET_VARIABLE to define a variable which will only take integer values.
Syntax of Arithmetic Operands
The table given below details the symbols required to achieve specific arithmetic
functions within the arithmetic region:
 
Arithmetic Function
Symbol
Addition
+
Subtraction
-
Multiplication
*
Division
/
Exponentiation
^
All the above arithmetic operations require two input variables and one output variable. Operations, may be carried out on files, temporary variables and constants. Upper or lower case lettering is acceptable and spaces can be inserted if required.
Examples usage of arithmetic operands:
;
; -- Add two files together --
;
F1 = F2 + F3
; -- Subtract two files --
;
F1 = F3 - F4
;
; -- Divide two files --
;
F1 = F3 / F4
;
; -- Raise a file by a power --
;
F1 = F1^C2
;
; - Multiply a file by a constant and place in a temporary variable
;
T5 = F1*3.141592
Assignments
A file or temporary variable appearing on the left of an equation may be simply assigned a value, with no operator. For example:
;
; Assign a file value
;
T3=F1
;
; Assign a numerical value
;
T3=3.141592
;
; Assign a constant value
;
T3=C1
%LOOP or LOOP
This is a command which may be used as the start of the arithmetic region. All commands between LOOP and BEGIN will be executed only once at the beginning of the processing. ENDLOOP or %ENDLOOP should then be used to terminate the loop. All commands after END and before ENDLOOP will be executed only once at the end of processing.
Example:
%BEGIN
%PRINT /ME="At the start of processing"
%LOOP
;Do the calcs.....
%ENDLOOP
%PRINT /ME="At the end of processing"
%END
The two PRINT statements will appear only once.
Arithmetic functions
The following arithmetic functions are available:
 
Trigonometric Function
Symbol
log base 10
LOG
absolute value
ABS
maximum of two values
MAX
minimum of two values
MIN
degrees to radians
RAD
radians to degrees
DEG
The LOG function requires one input variable, in rounded brackets, and one output variable.
Note:  
The argument of the LOG function must be greater than zero.
Examples:
;
; -- Log of a file --
;
F2 = LOG(F1)
;
; -- Log of a temporary variable --
;
F3 = LOG(T4)
;
; -- Log of a constant --
;
F3 = LOG(3.141592)
The ABS, RAD and DEG functions also takes one argument. The MIN and MAX functions take two arguments, of any type. Examples are:
;
F1 = ABS (F1) ;
F2 = MAX (F1,F3) ;
F2 = MIN (F1,0)
;
F3 = MIN (C3,50)
;
Syntax of Trigonometric Functions
The table given below details the symbols required to achieve specific trigonometric functions within the arithmetic region:
 
Trigonometric Function
Symbol
sine
SIN
arc sine
ASIN
cos
COS
arc cos
ACOS
tan
TAN
arc tan
ATAN or AT2
All trigonometric functions, except AT2, require one input variable, in rounded brackets, and one output variable. The inputs must be files rather than constants.
The input arguments required for the SIN, COS and TAN functions must be in RADIANS, each being treated modulo 2*PI.
AT2 is a real floating point arc tangent with two parameters, i.e. it represents the tan-1( a/b ) and so it requires TWO input variables, in round brackets (a,b) and one output variable. The output from this function is as follows:
 
a/b = 0
(a=0)
: angle = 0
a/b =
(b=0)
: angle = π/2
a/b =
(a=0,b=0)
: angle undefined.
The input arguments for ASIN, and ACOS must be less than or equal to 1.0.
 
Note:  
The outputs from the ASIN, ACOS, ATAN and AT2 functions is always in RADIANS.
In all instances upper or lower case letters are acceptable, and spaces can be inserted if required. Examples:
;
; -- Sine of a file --
;
F2 = SIN(F1)
;
; -- Tangent of a temporary variable --
;
F4 = TAN(T3)
;
; -- Real arc TAN function ------
;
F3 = AT2 (T1,T2)
Lookup Table Functions
The function LUTn(value) can be used on the right hand side of an equation. The lookup table n must have been defined in a %DLOOK command. The value must lie within the bounds of the lookup table, otherwise a fatal error will result. Example:
%DFFIL /TYP=INP/FI=F1/NAM=INPUT
%DFFIL /TYP=OUT/FI=F2/NAM=OUTPUT/OV=Q
%DLOOK /TA=1/TYP=VALS/NVALS=5
0 1
1 3
2 9
3 19
4 33
;
%BEGIN
F2=LUT1(F1)
%END
Get Point Value Functions
The function FGET(FNO,POINT) gets the value at point number POINT from any input file FNO.
%IF, %ELSE and %ENDIF
Logic can be performed within the %BEGIN...%END loop. The equations within the %BEGIN...%END are performed on each data point in the file, in sequence.
The commands %IF, %ELSE and %ENDIF can be used to control which equations are performed. The %ELSE is optional, and the structures can be nested up to a maximum of 5 deep.
The %IF command is structured as follows:
%IF ( value operator value )
where value may be a file, e.g. F1, a temporary variable, e.g. T4, a constant e.g. C3 or a number, e.g. 1000.
The operator may be one of the following:
 
Operator
Meaning
=
Equal to
<>
Not equal to
>
Greater than
>=
Greater than or equal to
<
Less than
<=
Less than or equal to
The %ELSE and %ENDIF commands have no arguments.
A typical structure is:
%BEGIN
%IF ( F2 = 0 )
F3 = 0
%ELSE
F3 = F1/F2
%ENDIF
%END
The spacing is optional. A nested example is:
%BEGIN
%IF ( F2 = 0 )
%IF ( F1 > 0 )
F3 = 1E10
%ELSE
%IF ( F1 > 0)
F3 = -1E10
%ELSE
F3 = 0
%ENDIF
%ENDIF
%ELSE
F3 = F1/F2
%ENDIF
%END
The commands %EXIT and %ABORT can be used to end the calculation if an error in logic occurs. They have the syntax:
%EXIT /ME=string
%ABORT /ME=string
%EXIT will stop the calculation and save the output files up to the point where the error occurred. %ABORT will delete all output files and terminate. For example,
%BEGIN
%IF ( F2 = 0 )
%ABORT /ME="Cannot divide by zero, sorry!"
%ELSE
F3 = F1/F2
%ENDIF
%END
The message format is the same as the %PRINT command (see below). The %ABORT and %EXIT commands cannot appear outside an %IF..%ENDIF structure, since the program would always terminate at the first point.
The %PRINT command, which was used in the definition section, may also be used within the calculation section. The syntax is the same, except that Fn will display the value of file n, and Tn will print the value of a temporary variable. For example,
%DFFIL /FI=F1/NAM=INPUT/TYP=INP
%DFCON /CO=C1/FI=F1/VAL=POINT
%BEGIN
%IF (F1 > 100 )
%PRINT /ME=C1+25T+F1
%ENDIF
%END
will print to the screen the point number and value of all points where the value exceeds 100.
%DFFIL /FI=F1/NAM=INPUT/TYP=INP
%DFFIL /FI=F2/NAM=LIST/TYP=LIST/OV=Y
%DFCON /CO=C5/FI=F1/VAL=TIME
%BEGIN
%IF ( F1 = 0 )
%PRINT /FI=F2/ME="Cannot invert at time "+C5
%ELSE
T3=1/F1
%PRINT /FI=F2/ME=C5+25T+T3
%ENDIF
%END
will print different messages to a file called LIST.LST depending on the value of the file.
The %BREAK command breaks the calculation for this data point and moves to the next. Effectively jumps to the %BEGIN.
%PAUSE or PAUSE
This command causes the program to pause and wait for a key press at any point during the processing loop.
Synonyms for %IF, %BREAK, etc.
 
%IF , %ELSE and %ENDIF
These may be replaced by IF, ELSE and ENDIF.
%EXIT and %ABORT
These may be replaced by EXIT and ABORT
%BREAK
...may be replaced by BREAK.
Error Codes and Messages
The following pages contain a list of the possible errors that can be produced by illegal commands or conditions in MFRM. The error numbers that correspond to each error condition are also given. For some errors MFRM will display the section in the command file that is causing the error. Suggested remedies are given for each error code.
 
ERROR
Meaning
Suggested remedy
1
Incorrect keyword
An illegal % command has been found in the template file. Edit the file and correct the command.
2
Illegal command file instruction.
A syntax error has occurred in the template file. Edit the command file and correct the syntax.
3
Invalid switch.
An illegal switch has been incorporated in the % command that is shown with the error code. Edit the template file and correct the switch.
4
No such input file.
The input file declared by the %DEFIL command, or the input file entered by the user does not exist in the specified directory. Edit the template file and define the correct filename or enter the correct filename when prompted.
5
Output file already exists.
The output file declared by the %DFFIL command, or the output file entered by the user already exists. Either define or enter another filename, or delete the existing version.
6
Missing switches in command line.
There is a required switch missing from the % command that is shown with the error code. See the sections above for details of the correct switches and edit the template file accordingly.
7
Syntax error in switch.
There is a syntax error in the switch that is shown with the error code. See the sections above for details of the correct switches and edit the template file accordingly.
8
File assignment number greater than 64.
FRM only allows 64 files to be defined in any one template file. Limit the number of files in the command file to 64.
9
Multiple file numbers.
There is more than one file defined with the same file number. Edit the template file and define each file with a unique file number.
10
There are more than 1000 constants defined.
MFRM only allows 1000 constants to be defined in any one template file. Use fewer constants in the command file.
11
Multiple constant numbers.
There is more than one constant defined with the same constant number. Edit the template file and define each constant with a unique number.
13
Too many temporary variables are defined.
FRM only allows 1000 temporary variables to be defined in any one template file. Use fewer temporary variables by overwriting unwanted variables.
14
Error in default option.
 
15
Undefined variable appears on RHS of = sign.
A temporary variable has been placed on the right hand side of the equals sign without it being assigned a value. Edit the template file and either change the temporary variable or assign it a value.
16
Undefined file.
A file number has been used in the template file, but there is no file assigned to it. Edit the template file and either change the file number, or assign a file to the file number using the %DFFIL or %QYFIL commands.
17
Undefined constant.
A constant number has been used in the template file, but there is no value assigned to it. Edit the template file and either change the constant number, or assign a value to the constant number using the %DFCON or %QYCON commands.
18
Illegal tangent function.
A calculation has occurred that involves taking the tangent of a value in the range 1.570796326 to 1.570796327 or the tangent of a value in the range 1.570796326 to 1.57079632.
19
Illegal arc cosine function.
A calculation has occurred that involves taking the arc cosine of a value greater than 1, or of a value less than -1.
20
Illegal arc sine function.
A calculation has occurred that involves taking the arc sine of a value greater than 1, or of a value less than -1.
21
Illegal log function.
A calculation has occurred that involves taking the log of a value less than zero.
22
Input files have different lengths.
The input files must all have the same length. Rerun FRM with files that have the same number of data points in each file.
23
Input files have different sample rates.
The input files must all have the same sample rate. Rerun FRM with files that have the same sample rate.
24
Corrupted template file.
The template file has become corrupted and cannot be interpreted. Try and edit the template file and then attempt rerun FRM again. If this is unsuccessful it may be necessary to recreate the template file.
25
Attempt to raise a negative number to a non-integer power.
An error has occurred in the course of a ^ calculation
26
No such command file.
 
27
Cannot open command file. (Check if file is locked).
An error has occurred reading the template file
30
Invalid lookup table ID.
The lookup table Id must be in the range 1-10.
31
Lookup table already defined.
An attempt has been made to define two lookup tables with the same ID.
32
Invalid lookup type. Use /TY=File or /TY=Values.
 
33
The number of lookup values must be in the range 2-100.
 
34
Lookup table file open or read error.
 
35
Number of lookup table values does not match /NV command.
 
36
Lookup table out of sequence.
 
37
There must be two real values on a lookup table entry.
The above errors may occur when defining lookup tables.
38
Invalid overwrite command, use /OV=N, /OV=Y or /OV=Q.
 
39
Lookup table not defined.
 
40
Input value out of lookup table range.
The above errors occur when using a lookup table.
41
Number of constants exceeds 100.
Too many numbers have been used in the calculation loop.
42
Equation must contain an = sign.
 
43
Equation must have a RHS expression.
An invalid equation structure has been encountered.
44
Invalid command encountered inside {%BEGIN %END}
Only IF,ENDIF,ELSE,PRINT,ABORT and EXIT are allowed after %
45
%IF structures nested too deeply.
 
46
%ELSE encountered outside %IF structure.
 
47
Consecutive %ELSE commands encountered.
 
48
%ENDIF command has no matching %IF.
 
49
%EXIT or %ABORT encountered outside %IF structure!
 
50
Missing "(" or ")" in %IF command.
 
51
Missing operator in %IF command.
 
52
Invalid or missing LHS of %IF command.
 
53
Invalid or missing RHS of %IF command.
 
54
Incomplete %IF structure - missing %ENDIF.
The above errors indicate invalid IF..ELSE..ENDIF structures
55
String too long.
 
56
Internal string table has exceeded 1024 characters.
The /ME parameters have exceeded internal limits.
57
Invalid constant value or missing file in %DFCON
 
58
File not defined.
 
59
Attempt to get details from an output file.
 
60
Error opening file to get DFCON keyword.
 
61
Error reading file header to get DFCON keyword.
 
62
Unable to convert DFCON keyword to a value.
 
63
Unable to find DFCON keyword.
The above errors occur when using DFCON to load header or extra details into a constant.
64
Attempt to use a list file in calculations.
 
65
Attempt to %PRINT to a non-list file.
 
66
Error writing to list file.
 
67
Invalid format for message string.
 
68
Expanded message string is too long.
 
69
Too many spaces for message string.
 
70
Temporary variables cannot be displayed outside { %BEGIN ... %END } structure.
 
71
Invalid tabulation in message string.
 
72
Cannot tabulate backwards.
The above messages occur when trying to %PRINT.
74
 
Checks that there is at least 1 valid input file. If there is NOT then error 74 is issued and the program terminates
Module Operation
The MFRM module can be run in one of the following three ways:
From the Advanced Loading Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
In Stand alone mode by typing mfrm
By incorporating the MFRM commands in a batch operation
Once initiated in either of the interactive modes one or two MFRM will display the following screen.
Figure 13‑6 Screen One of MFRM
Additional menu options will become available when a formula template file has been named. An overview of the module structure is shown below in Figure 13‑7.
Figure 13‑7 The Overall Module Structure of MFRM
The menu options on screen one are as follows:
 
Option
Description
Run the formula template
An MFRM template file must be named. If selected a file input screen appears.
A command Filename (template file) must be entered in this field. Probably the easiest way of naming a file is by using the F3/List facility which brings up the file browser.
The template file is an ASCII file such as might be created using a text processor. If it is created in a word processor then it must be saved as an ASCII file; a word processors own format usually contains hidden formatting characters embedded in the text, and these will confuse MFRM.
By default the template file must have a .frm extension, although the filename can be anything as long as MFRM can interpret it's contents. MFRM manipulates data files which are in either a time series or histogram format. The .dac extension may be omitted. Files with the correct internal format but different file extensions such as spectra or histograms must have their names entered in full, i.e., including the file extension.
Note: The input data files being processed, must all be of the same length, i.e., contain similar numbers of samples and must have the same sample rate. If these conditions are not met, MFRM will issue an error message. The MLEN PTIME modules can be used to ensure conformity with these conditions.
When a valid file has been entered and accepted MFRM will carry out whatever instructions it contains.
At this point, if no errors are detected, a message will be displayed to indicate that arithmetic processing has commenced. The appearance of subsequent screens depends very much upon the instructions in the template commands file.
Edit the template file
This option loads the MFRM file into a user nominated text editor.
The text editor's name can be user supplied, or it may be stored in the local environment by the keyword $EDITOR (see module MENM for environment manipulation).
Help on syntax
This option calls 8 pages of explanation and help about the syntax and usage of FRM commands. It is a concise version of the Technical Overview in this document.
eXit
Quits FRM. Work is not automatically saved.
After a template file has been run, MFRM will re-display the menu shown above, but with additional options which are designed to enable the results of processing to be plotted or listed as appropriate.
The post-processing menu is shown below.
Figure 13‑8 The Extended MFRM Postprocessing Menu
The additional menu options are as follows:
 
Option
Description
Plot results file
When selected, this option will run the graphics module Multi File Display (MMFD) which allows the results the output files to be viewed. When MMFD is quit the user is returned to MFRM.
If no plot file was produced then this option is superfluous.
View/edit list output
This option will load the text editor (discussed in Editing the Template File above) and display the ASCII list (.lst) file produced when the template was run.
If no list file was produced then this option is superfluous.
Output file statistics
This option will display a screen of statistics about the results of the most recent run of an MFRM template.
Batch Operation
MFRM can be run in all the standard batch modes as with most other MSC.Fatigue modules. A list of batch keywords:
 
/OPTion
Main menu option [Run,Edit,Plot,eXit
/INP=
The name of the template commands file to process. /INP=TEMP1
/FILnn=
The name of any input data file to manipulate, or output file to create. This keyword must be issued the same number of times as the %QYFIL command has been used. The sequence of file names must also correspond i.e., the first /FIL= keyword will be matched with the first %QYFIL command etc. /FILnn=FILE1/FILnn=FILE2
/DIVide
Divide by zero value
/ZERo
Special case of 0/0 (which is replaced by zero, one
/AZERo
Arctan (x=0, y=0) value
/OV=
Whether to overwrite an output file
/CONnn=
The value of any constant to be used. This keyword must be issued the same number of times as the %QYCON command has been used. The sequence of constants must also correspond i.e.the first /CONnn= keyword will be matched with the first %QYCON command etc. /CONnn=5.123
Example MFRM Command Template Files.
The three examples that follow have been provided in order to illustrate the use of the MFRM formula processor.
Simple Arithmetic Test
In this example, MFRM will be used to calculate the following formula in which the variables " a " and " b " are represented by data files and the variable " c " is a user-defined constant:
÷ { 2 a2 + ( b /c )2 }
;
; --- Template (FRM1.FRM) for the calculation of the function :
;
; ( 2.0 * A ** 2.0 + (B / C) ** 2) ** 0.5
;
; --- Prompt for the two input filenames ---
;
%QYFIL /FI=F1 /PR="Enter first input filename (a)" /TY=IN
%QYFIL /FI=F2 /PR="Enter second input filename (b)" /TY=IN
;
; --- Define the name of the output file ---
;
%DFFIL /FI=F3 /NA=RESULT.NEW /TY=OUT /LABEL="RESULT" /UN="WIDGETS"/OV=Q
;
;--- Prompt for the constant " c " ---
;
%QYCON /CO=C1 /PR="Enter the constant (c)"
;
; --- Define the other two fixed constants ---
;
%DFCON /CO=C2 /VA=2
%DFCON /CO=C3 /VA=0.5
;
; --- Now start the calculation ---
;
%BEGIN
;
T1=F1*F1
T1=C2*T1
T3=F2/C1
T4=T3^C2
T5=T4+T1
F3=T5^C3
%END
;
; --- Finished ---
Try executing together with data file 65.dac as file A and 102.dac as file B, both DC levels with amplitude 65 and 102 units respectively and using a value of 5 as the input constant. After processing, use MQLD to check the maximum value calculated in file result.new. It should be 94.1.
Generation of a Square Wave
In this example, a square wave function will be generated by first creating and then adding together a number of individual sine waves of appropriate amplitude and frequency. In effect the series, to five terms, being solved is:
The methodology for calculating this function is based on the use of a ramp or sawtooth function going from 0 to 360 degrees. If a ramp is used then only a single cycle of square wave form will be produced and if a sawtooth is used, then the same number of cycles as teeth will result. Figure 13‑9 below illustrates the sawtooth function, sawtooth.dac.
Figure 13‑9 The Sawtooth Function sawtooth.dac
The MFRM template detailed below converts the seed input file (sawtooth.dac) to RADIANS and stores the result in a temporary variable file called T50. This file is then scaled and each of the five terms of the series outlined above calculated and stored in variables T1, T3, T5, T7 and T9. Finally, all the terms are added and the result loaded into the output file square.dac.
;
; -- Get the name of the input seed file --
;
%QYFIL /FILE=F1/PROMPT="Enter name of seed file [Degrees]"/TYPE= INPUT
;
; -- Define the output file name --
;
%DFFIL /FILE=F2/ NAME=square/ TYPE=OUTPUT /OV=Q
;
; -- Ask for and define constants constants --
;
%QYCON /CONSTANT=C1 /PROMPT="Enter amplitude"
;
; -- Start the calculations --
;
%BEGIN
;
; --- Convert seed to RADIANS and create basic sine wave ---
;
T50 = RAD(F1)
T1 = SIN(T50)
;
; -- Calculate the first term in the series, T1 --
;
T1 = C1*T1
;
; -- Calculate the second term in the series, T3 --
;
T2 = 3*T50
T3 = SIN(T2)
T3 = T3/3
T3 = C1*T3
;
; -- Calculate the third term in the series, T5 --
;
T2 = 5*T50
T5 = SIN(T2)
T5 = T5/C
T5 = C1*T5
;
; -- Calculate the fourth term in the series, T7 --
;
T2 = 7*T50
T7 = SIN(T2)
T7 = T7/7
T7 = C1*T7
;
; -- Calculate the fifth term in the series, T9 --
;
T2 = 9*T50
T9 = SIN(T2)
T9 = T9/9
T9 = C1*T9
;
; -- Add all the terms to produce the final square wave ---
;
F2 = T1+T3
F2 = F2+T5
F2 = F2+T7
F2 = F2+T9
%END
;
; --- Finish ---
;
Turning Points in an Input File
The algorithm below calculates the irregularity factor which gives an indication of the spread of frequencies in a signal according to this equation.
where E[0] and E[P] which are statistical parameters that express the number of zeros and peaks per second according to:
The Mn values can be calculated from:
The value can vary from 1.0 (one dominant frequency) to 0.0 (equal energy at all frequencies).
; template calculates moments of PSD and irregularity factor 
;---------------------------------------------------------------
;
; Get the input filename and the output ASCII filename
;
%QYFIL /FI=F1 /TYP=INPUT /PR="Input Spectra Filename (.PSD)"
%DFFIL /FI=F2 /TYP=LIST /NA=irrfact.lst /OV=Y
;
; Define constants
;
%DFCON /CO=C2 /VA=2.0
%DFCON /CO=C3 /VA=TOTPTS /FI=F1
%DFCON /CO=C4 /VA=4.0 %DFCON /CO=C10 /VA=0.0
;
; Counter variables
;
; Current Point
;
%DFCON /CO=C9/VA=POINT/FI=F1
; Current time = frequency 
;
%DFCON /CO=C11/VA=TIME/FI=F1
;
; Frequency Increment
;
%DFCON /CO=C12/VA=INCREM/FI=F1
;
; Initialise Summation Counters
;
%DFCON /CO=C13/VA=0.0
%DFCON /CO=C14/VA=0.0
%DFCON /CO=C15/VA=0.0
;
%BEGIN
;
C5=C11^C2
C6=C11^C4
C7=C11^C10
T1=F1*C5
T2=F1*C6
T3=F1*C7
T4=T1*C12
T5=T2*C12
T6=T3*C12
C13=C13+T4
C14=C14+T5
C15=C15+T6
;
; Check for end of file and write out information
;
%IF (C9 = C3)
  %PRINT /FI=F2 /ME="Moment"+15T+"Value"
  %PRINT /FI=F2 /ME="----------------------------"
  %PRINT /FI=F2 /ME="0"+15T+C15
  %PRINT /FI=F2 /ME="2"+15T+C13
  %PRINT /FI=F2 /ME="4"+15T+C14
  %PRINT /FI=F2 /ME="----------------------------"
;
; Calculate expected number of zeros per second, E(0)
; C20=C13/C15 C21=C20^0.5
;
; Calculate expected number of peaks per second, E(P)
;
  C22=C14/C13
  C23=C22^0.5
;
; Calculate irregularity factor, Gamma
; C24=C21/C23
;
; Write out expected values and irregularity factor to ASCII file
;
  %PRINT /FI=F2 /ME="E(0) ="+15T+C21
  %PRINT /FI=F2 /ME="E(P) ="+15T+C23
  %PRINT /FI=F2 /ME="Gamma ="+15T+C24
;
; Write the irregularity value to extra details area of the PSD
;
  %WTVAL /FI=F1 /KW=IRRFACT /VA=C24
%ENDIF
%END
File Cut and Paste - (MLEN)
MLEN is used to extract a portion of data from one file or several files, and load the extracted portions into a new output file. It can be used to concatenate (merge), individual data sets into a single output file. It can also be used to delete a selected portion of data from files.
The process of data extraction is carried out by cutting portions of data from an input data file and copying them to a named output file. The limits of the extraction, i.e. the start and end of the data to be cut, may be defined in terms of X-axis parameter, usually time, or data point numbers; the original input data file remains unaltered. The process of concatenation consists of joining together a number of input data sets, with the same sampling rate, into a single output file.
MLEN automatically recalculates the appropriate header details for the resultant output file. If any of the input data files have extra details associated with them, then these will be attached to the output file accordingly. If any of the input files have extra details, then details from all files to be specified for concatenation will be attached to the output file. This will be done in the order the files are specified. If there are duplicate names then subsequent files will overwrite existing values.
Module Operation
The MLEN module can be run in one of the following three ways:
From the Advanced Loading Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
In stand alone mode by typing mlen at the system prompt.
By incorporating the MLEN commands in a batch operation.
Once running in interactive mode, a screen appears showing the main menu selections.
Extract Single File
This option displays a form shown in Figure 13‑10. The name of the data file from which data are to be extracted must be entered. By default, MLEN expects this file to have a time series format and a .dac file extension. If a .dac file is being processed then the .dac extension may be omitted. If another file type with the correct internal format, such as spectra is being processed, then it must have its name entered in full, i.e. including the file extension.
Figure 13‑10 Data Extraction from a Single File
 
Option
Description
Input File
MLEN looks for the input file in the current directory. However, other directories can also be accessed if the complete file specification of path name and file name is entered. Pressing the pick list button will display a list of available files, or allow the user to choose other files/directories, using the Path option.
Output File Name
The extracted data will be written to an output file with a .dac file extension. As a default, this file will be created within the current directory. If another file extension and/or destination are required then these must be specified in full.
At this stage it is required to specify the method by which the limits of the extraction will be defined. This is done by selecting either Time or Points on the two horizontal radio buttons.
Extraction according to X-axis parameter (Time)
The fields Start and End become active. For the start time, any X-axis value within the range defined between the start and end of the data set may be entered. Extraction will commence at the data point nearest and LESS than the value of X-axis parameter specified. For example, for a signal sampled at 50Hz, specification of a start time of 0.11 seconds will cause MLEN to commence extraction at 0.1 seconds.
The default for the start of extraction is the beginning of the data. In addition to entering an explicit numeric value at which extraction is to commence, it is possible to enter instead the name of an extra details keyword, see the documentation associated with the Extra Details Manipulation module, Peak-Valley Extraction - (MPVXMUL), 977, for more information on the extra details area.
After accepting a keyword, MLEN will search the extra details area of the input file and assign the value of the X-axis parameter for the start of extraction. For example, suppose that the input file referred to above contains an extra details keyword called T1 which has a value 0.11 associated with it, then entering the word T1 in response to the above prompt will cause MLEN to use the value 0.11 for the start time for extraction. If the keyword cannot be found an error message will result.
For the end time, any X-axis time value within the range defined between the start point specified above and end of the data set may be entered. The default for the end of extraction is the end of the data.
 
Note:  
MLEN analyzes the file selected and displays the range of start and end times/points on the screen. The numbers displayed will depend upon the file selected.
Extraction according to data point number
The fields Start Point and End Point become active. For the start point, any point number within the range defined by the data set may be entered. Extraction will include the data point specified.
The default for the start of extraction is the first data point; this default may be selected by pressing the ENTER key. Typing START would have the same effect. For the end point, any point number within the range defined by the data set may be entered (even a number less than the start point). Extraction will include both the data points specified.
The default for the end of extraction is the last data point; this default may be selected by pressing the ENTER key, or by typing END.
When the user has filled all the fields, and accepted them, MLEN will proceed to extract data according to the defined limits. On completion it will present a summary table of the operations carried out.
Extract Multiple Files
Multiple File Extraction allows the same portion of data to be extracted from a selection of one or more input files, and written to other output files, or files with the same names as the input files. There are two ways of selecting the input files:
Test Name + channels
Separate File names
Test name + channels
 
Option
Description
Test Name
Test Name is the generic file name, i.e. if the user were to enter data as the file name in this field then the program would look for data01, data02, data03 and so on up to the number of channels.
The concept of a generic name for a test represents a quick method of entering channel names for processing. The methodology is based on the fact that associated data (derived from the same test) are usually demultiplexed after data acquisition into individual channel files. The structure of these consists of a generic base name, normally the name of the multiplexed data file itself, with the appropriate channel numbers appended.
By default MLEN expects to process standard MSC.Fatigue time series data files with a file extension of .dac. Furthermore, the above generic test name convention only applies to .dac files.
Channels
MLEN will prompt for the numbers of the channels to process. The individual channel numbers can be entered as a string of numbers separated by commas, or grouped by hyphens, or as a combination of the two.
Start and End points and SRATE do not have to be equal. Each channel can have a different sample rate and signal length.If using extra details keywords to identify the start and end then the values may well differ from file to file.
Output File Name
The Output File Name is the generic test name used to create the output files, with the channel numbers selected appended to it. For example, if test was entered as the Output File Name name then the files; test01, test02, test03, etc., dependent on the channel numbers requested, would be created.
As with the Extract Single File option, it is required to specify the method by which the limits of the extraction will be defined. This is done by selecting either Time or Points on the horizontal bar question. The start and end points are entered in the same manner as they are for Single File Extraction (see above). After completion of all the entries, MLEN will proceed to extract data according to the defined limits and will display a scrolling list of file names and the number of points being processed as the extraction takes place on that file. On completion it will present a summary table of the operations carried out.
Separate File Names
 
Option
Description
Input File Names
MLEN allows up to fifty files per input line to be processed, which means a total of 200 files can be extracted at any one time. The four input file fields allow files to be selected in one of three ways:
A string containing a list of file names separated by commas, e.g. sine01, sine02.
A string containing a group of file names separated by hyphens, i.e. entering data(1-3) would select data01, data02, and data03.
A list of file names selected using the pick list button. If this method is used then a directory listing of .dac type files in the selected directory are displayed.
Start and End points and SRATE do not have to be equal. Each channel can have a different sample rate and signal length.If using extra details keywords to identify the start and end then the values may well differ from file to file.
Output File Options
The output files for a multiple extraction, by default will overwrite the input files unless a new extension for the output files is specified. This is achieved by selecting the Modify Extension option on the horizontal bar question.
New Extension
On pressing ENTER a new prompt will appear requiring a new extension to be entered. MLEN allows up to three characters for this extension.
As with the two extraction options described earlier, the user must specify the method and the limits of the extraction. This is achieved by selecting Time or Points on the horizontal bar question. The start and end points are entered in the same manner as they are for single file extraction (see earlier). On accepting this information an option is made available for editing the combined list of input files in case you made a mistake or wish to tag certain of them for processing and exclude others without redefining the input file lists. By using the cursor key or the mouse, files in the list can be tagged or untagged as desired. If OK is selected as in the above example, then MLEN carries out the extraction as per user specifications.
Delete Section of Single File
Single File Deletion enables a portion of data to be removed from a file and the remaining data to be written to a single output file. The method of input for deletion is the same as for extraction. See Extract Single File, 963.
 
Note:  
Defaults for the start and end limits for deletion are not given as they are for extraction, and entering start and end limits which both equal the start and end limits of the data set will result in an error message.
Delete Section of Multiple Files
Multiple File Deletion allows the same portion of data to be deleted from a selection of one or more input files and written to these or other output files. The method of input for deletion is the same as for extraction. See Extract Multiple Files, 965.
 
Note:  
Defaults for the start and end limits for deletion are not given as they are for extraction. Entering start and end limits which equal the start and end limits of the data set will result in an error message.
Concatenation
Concatenation allows the user to join several files into a larger single file. Joining is nose to tail. MLEN allows up to fifty files to be processed by using either the pick list or explicit file naming via the keyboard.
If you have selected a list of files and wish to change it, add to it, otherwise operate on that list, simply click on the pick list button a second time. A menu will appear allowing for several options to operate on the file list.
The File Options menu
 
Note:  
The order in which file names are entered is important. The sample rate associated with the first data set entered is used by MLEN as the reference rate. The sample rate of all the other data sets to be concatenated must be equal to this reference; if they are not them an error message will be output. It is up to the user to ensure that sample rates are compatible and, if necessary to use the PTIME module to adjust sample rates accordingly (Sample Rate Adjust Option, 212).
The merged data will be written to an output file. As a default, this file will be created within the current directory and, irrespective of the input file extensions, the extension .dac appended to the name entered. If another extension or destination are required then these must be entered explicitly. On completion it will present a summary table of the operations carried out. If the NOTEBOOK keyword is defined within the local environment, (see Modifying the MSC.Fatigue Environment (MENM), 1433 for more details) an entry of this information will be made within the MSC.Fatigue notebook.
Start-End Smoothing
The questions on this page determine the method by which the start and end of a signal are to be smoothed. Input fields are explained below.
Option
Description
Input File Names
The file name can be typed in directly or can be selected from a pick list. The default extension is .dac.
Joining Function
The end point may be joined to the first point using a half-sine, a linear ramp or by tapering a section at the end of the signal such that it blends into the first point. Alternatively, if the end point does not require joining to the first, the taper options may be used to smooth the start and end sections of the signal. The taper options may also be used in conjunction with the join options to smooth the start and end sections of the signal before appending the ramp or half-sine to join the signal start and end.
Join Window
The Join Window is the length of signal over which the edited ends will be joined.
Taper Function
The edited signal can be tapered using one of two functions:
Ramp function
Half sine function
If a function is selected then the duration over which the signal is to be tapered will be requested. If 'None' is selected, the end points are simply joined using the curve selected in the join function. If tapering is not used, the signal may exhibit hard transitions at the intersections of the joining curve.
Taper Window
The Taper Window is the length of signal over which the edited ends will be tapered together.
Output File Name
This is the name of the smoothed file. Its default extension is .dac.
Reverse File
This option allows the user to reverse a .dac file to produce a .dac file whose first point is the last point of the input file, and whose last point is the first point of the input file, etc. This can be an aid when filtering certain .dac files. There are only two fields to fill (the name of the input file and the name of the reversed order output file.
Batch Operation
MLEN can be run in non-interactive batch mode. In this mode of operation complex procedures for creating signals can be created. A typical batch command line is:
mlen /opt=1/inp=data01/out=data02/ov=y/type=t/sta=0.75/end=12.0
In this example, MLEN will extract a portion of data from an input file called data01.dac, resident in the current directory and write it to an output file called data02.dac. If a file with this name already exists MLEN will overwrite it. The extraction will be according to X-axis units, time in this case, and will commence at 0.75 seconds and end at 12.0 seconds.
A list of MLEN batch keywords:
 
/OPT=
=1 Single file extraction, =2 Multiple file extraction, =3 Single file deletion, =4 Multiple file deletion, =5 Concatenation, =6 Start-End smoothing, =7 Reverse File
/OUT=
The name of the output file.
/OV=
Whether to overwrite an existing output file, OV=Y.
/FILTYPe=
Multiple file option. FILTYP=T test name + channels, specifies a generic input file name (only applicable when OPT=2 or 4)
/INPut=
Input file list for single or multiple file /INP= FILE1,FILE2, etc. up to 50 times, processing. Input can be used up to and this structure can be used up to 4 times, each time naming up to 50 times making a total of 200 files (i.e. up to 200 files can be processed)
/MODify=
Whether to modify file extensions, = O - Overwrite input files for output files, = M - Modify extensions
/EXT=
Extension to append to output files EXT=EXTENSION
/GEN=
Generic input test name.
/CHA=
Channels to process CHA=(1-6)
/OUT=
Generic output name
/TYPE=
In the case of extraction and /TYPE= T - Selects X-axis units, (default) deletion, specifies the method for defining the start and end points /TYPE= P - Selects point numbers.
/STA=
Start point for the Extraction/Deletion STA= 0.5, STA= 3
/END=
End point for the Extraction/Deletion /END= 12.4, END= 25
Multi-File Manipulation - (MMFM)
MMFM is a module which can be used to manipulate standard MSC.Fatigue data files. Files can be added, subtracted, multiplied, divided, or added according to the rules of vector addition. Complex mathematical procedures can be built up by chaining together sets of MMFM commands in a batch process.
MMFM supports the following arithmetic operations:
Addition of a number of files.
Subtraction of one or several file(s) from another.
Multiplication of one or several file(s) by another.
Division of one file by one or more files.
Vector addition of two or three files.
Throughout the course of the above manipulations the following conventions are observed:
The largest and smallest numbers which can be processed are respectively 1.010 and 1.010. Some computer types may be able to process numbers beyond this range, however, results may be unpredictable.
Zero values are taken to be real numbers in the range: 1.0-10 < n < 1.010
The vector addition processor assumes that the input files X, Y, and Z are orthogonally related.
The vector addition processor accepts either two or three input files. Each point in the output file is calculated on the basis of the following combination of values from the input files:
OUTPUT = or OUTPUT =
Operations on single parameter data files (time series type, .dac)
Depending on the specific operation to be carried out, MMFM can accept an unlimited number of input files to process. These files can be of unequal length and unequal sampling rate. The length of the file which contains the result of the operation, the resultant output file, is calculated on the basis of the smallest and largest values of X-axis parameters found in the set of input data files. The sample rate of the resultant output file may take any value and is not limited to any of the input sample rates. For example, in Figure 13‑11 below, data file s1.dac had a sample rate of 1000 Hz and a duration of 1 second, whilst file s2.dac had a sample rate of 750 Hz and a duration of 2 seconds. The file resulting from the addition of these two data sets has a sample rate of 500 Hz and is given in file s12.dac.
Figure 13‑11 Addition of Files of Different Sample Rate and Duration
Operations on three parameter data files (histogram type)
In addition to processing time-series type data files, MMFM can also process files which have the standard MSC.Fatigue histogram format. In the general case, MMFM can process the following histogram file types:
Rainflow cycle (.cyh)
Fatigue damage (.dhh)
Range mean (.rmn)
Range pair (.rph)
Markov (.rph)
The ability to process histograms in this way can be very useful, particularly in situations where the data, if left in the form of time-series, would consume an inordinate amount of disk space if concatenated for some reason. A significant amount of disk space could be saved if each history were converted to an appropriate rainflow matrix and then the three histograms added together. The fatigue analysis could then be carried out using the matrix rather than the time series fatigue processors.
Note:  
Ensure that histograms are compatible prior to manipulation. They must have the same dimensions, i.e. the same start point and bin size on both axes.
Module Operation
The MMFM module can be run in one of the following three ways:
From the Advanced Loading Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
In stand alone mode by typing mmfm at the system prompt.
By incorporating the MMFM commands in a batch operation.
The first two modes are interactive. Once running in one of the interactive modes MMFM will display the following menu of options:
Addition
Subtraction
Multiplication
Division
Vector Addition
Regardless of the option you select you will be prompted for a list of input signal names than may be entered one per line, or as a string of names separated by commas, or as ranges e.g. saetrn, saesus, saebrakt, or data (1-3). The last example (DATA (1-3)) would load data01.dac, data02.dac and data03.dac.
 
Note:  
If histograms are being manipulated it is up to the user to ensure that they are compatible (see the technical overview).
Probably the easiest method of entering input file names is to use the pick list facility. Once a set of files has been selected you can always press the pick list button again to add or change the list of selected files.
 
Note:  
The order in which file names are entered is important especially the first one.
If file names are entered as:
file1,file2,file3,..., filen
MMFM will process them in the following ways:
 
Option
Description
Addition
Selection of the addition option above will cause MMFM to add the input data files according to:
file1 + file2 + file3 +... + filen
Subtraction
Selection of the subtraction option above will cause MMFM to subtract data files according to:
file1 - {file2 + file3 +... + filen}
Multiplication
Selection of the multiplication option above will cause MMFM to multiply data files according to:
file1 x file2 x file3 x... x filen
Division
Selection of the division option above will cause MMFM to divide data files according to:
file1 / {file2 x file3 x... x filen}
Vector addition
Selection of the vector addition option above will cause MMFM to add data files according to:
(file12 + file22)1/2 or
(file12 + file22 + file32)1/2
depending on the number of file names entered.
The second input screen looks like Figure 13‑12.
Figure 13‑12 The Addition Screen
 
Option
Description
Output File Name
The output file name defaults to the standard .dac type. If another extension or destination are required then these must be entered explicitly; this is particularly important when working with histograms.
The name of the first input file entered is offered as the default output name. Selection of this default means that this data file will be overwritten and so MMFM will prompt for confirmation to proceed.
Divide by Zero Value
Division by zero is illegal, so a value to replace the divide by zero calculation is needed. Whenever a division by zero is encountered during processing, the value entered will be used for the answer. A zero value is defined within the software as any value less than 1E-10.
Divide Zero by Zero Value
A division of 0/0 is a special case. The result of a 0/0 division could logically be zero or one, depending upon the application.
Whenever a 0/0 division is encountered during processing, the value entered will be used for the answer.
Sample Rate
In the case of time-series data structures, the resultant output data file can have any sample rate. By default, MMFM offers the lowest sample rate found in the input data files; this may be selected by clicking OK. Any other value, even outside the limits of the minimum and maximum values found may be entered; MMFM will automatically interpolate to provide the desired values. Note that decreasing the value may cause features to be missed.
MMFM will scan the input files for length and sampling rate. If the input files are of different length or sample rate a warning message will be output. Under all circumstances the following messages will be displayed.
The output signal will start at S and finish at F.
The lowest sample rate in these files is L samples/sec,
the highest is H samples/sec.
 
S
Is the smallest X-axis value found in the input files.
F
Is the largest X-axis value found in the input files.
L
Is the lowest sample rate found in the input files.
H
Is the highest sample rate found in the input files.
Signals with different sample rates will be correctly handled. Vector addition takes either two or three signals, the other options take up to 50 input files.
MMFM will handle MSC.Fatigue XYZ files, such as histograms, but only if the X and Y-axis limits (max and min values) are the same for each input file. The multi-file manipulation is performed only on the Z axis.
Environment Keywords
A list of environment keywords and meanings:
 
$SIGNAL
The Output File Name
.DAC
The Output File Name if the input file was a .dac file.
Batch Operation
MMFM can be run in non-interactive batch mode. In this mode of operation complex arithmetic formulations can be created. For example:
mmfm
/opt=a/inp=test1,test2,test3/out=outfile/ov=y/sam=300
In this example, MMFM will add together the contents of files test1.dac, test2.dac and test3.dac and write the result to a file called outfile.dac at a sample rate of 300 samples per second. If a file outfile.dac already exists in the current directory it will be overwritten. Keywords are:
 
/OPTion=
The number of the required arithmetic option where /opt=A is Addition, =S Subtraction, =M Multiplication, =D Division, =V Vector Addition. /OPT=A
/INPut=
The name of the data file(s) to process. /INP=file1,file2
/OUTput=
The name of the resultant output file. /OUT=output
/OVerwrite=
Whether to overwrite the existing output file. /OV=Y
/SAMple=
The new sample rate for the output file. /SAM=500
/ZERODIVide
The value of the output where a divide by 0 is attempted. /ZERODIV=1000
/ZEROZERO
When 0 is divided by 0 the result can be 1 (1) or 0 (Z). /ZEROZERO=Z
Peak-Valley Extraction - (MPVXMUL)
MPVXMUL extracts turning points (maxima and minima or “peaks” and “valleys”) from single parameter files such as .dac and RPC multiple data - channel files. The peak valley extraction process maintains synchronous phase by writing corresponding data values to all the output files whenever a turning point is found in any channel. Facilities for gating out small peak valley pairs by absolute value or by percentage of range, on each channel, are available.
1. Invoke MPVXMUL by typing mpvxmul at the system prompt or select the Peak-Valley Extraction option from the Advanced Loading Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
2. Select the Input File type of DAC or RPC. Press OK.
3. Select the generic Input Filename, the Channels, the Output Filename, and whether or not to write a time file. Click OK. See the MSC.Fatigue User’s Guide for file naming conventions and other information.
4. Either the range of cycles from rainflow analysis can be used as the gate in the completion of your analysis. This information along with other relative data is entered on the analysis setup form that is displayed. See the MSC.Fatigue User’s Guide for more information.
.
Note:  
Input .dac files exist as families of files with a common generic name but with different numbers appended to the name which denotes the channel number (i.e., test01.dac, test02.dac, etc., where test is the generic name).
See Peak-Valley Extraction (MPVXMUL), 227 for a more detailed description of this utility.
Simultaneous Values Analysis DAC/RPC - (MSIMMAX)
MSIMMAX performs simultaneous values analysis on either multi-channels in a single RPC file or multiple DAC files from the same test. Two analysis methods are available. The first uses a “control” channel, from which turning points are extracted and scanned for the highest peaks, the lowest valleys or the highest absolute maxima. Up to 50 of these events may be saved, with their positions in the data. The simultaneous values of all the other channels at these positions are saved into the output files. The second method scans each of the input channels for the single largest maximum, minimum or absolute maximum. For each channel, the simultaneous values of all other channels at the position of the largest event is saved into the output files.
The output file created is a tab-separated ASCII file suitable for input to a spreadsheet or word processing package.
1. Invoke MSIMMAX by typing msimmax at the system prompt or select the Simultaneous Values Analysis DAC/RCP option from the Advanced Loading Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
2. Select the Input File type of DAC or RPC. Click OK.
 
3. The next form is the Filename Input form which allows the names of the input and output files to be specified. For an input file type of RPC the RPC Filename field appears and for an input file type of DAC the Generic Filename field appears. Select the RPC Filename or the Generic Filename, the Channels, the Output Filename, and whether or not to recalculate the statistics. Click OK. See the MSC.Fatigue User’s Guide for file naming conventions and other information.
 
 
4. The final form for MSIMMAX is the Analysis Definition form. This form allows you to choose between Sort Channel analysis and All Channels analysis. It is here that the limits are set and the event type is selected. This information along with other relative data is entered on the form that is shown below. See the MSC.Fatigue User’s Guide for more information.
 
Amplitude Distribution - (MADA)
MADA, amplitude distribution analysis, calculates the probability density distribution (which defines the probability of finding a value of a particular magnitude within the population of measured values) and other function of a time signal.
For example if you use saetrn.dac as input to MADA and set the Analysis Type to Prob. Distribution, it will output a file saetrn.ada shown here which is the probability density function of Y-values.
Auto Spectral Density - (MASD)
MASD performs a frequency analysis of a time signal to determine frequency content. Various output types are available which are beyond the scope of this text. Perhaps the best use of this module comes in vibration fatigue problems for converting time signals into power spectral density functions (PSDFs).
As an example, let us convert the time signal SAETRN, used in many of the previous sections in this chapter into a PSDF, which will quickly show us the frequency content of the signal.
1. Invoke MASD by typing masd at the system prompt. It can also be invoked directly from PTIME under Add an entry | creaTe psd from time or select the Auto Spectral Density option from the Advanced Loading Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
2. Select the file saetrn.dac as the Input Filename.
3. Make sure the Output Type is Power Spectral Density and accept the defaults for all other inputs.
4. Click the OK button until the conversion takes place.
A display of the resulting PSDF is shown above. Note that only one predominate frequency is present in the signal at around 1/2 Hz plus a DC component at zero Hz. This PSDF could be used as input to a vibration fatigue analysis.
 
Note:  
See Auto Spectral Density (MASD), 234 for a more detailed description of this utility.
Fast Fourier Filter - (MFFF)
MFFF creates a finite impulse response (FIR), filter by using the window method. After creation, FFF automatically removes unwanted frequency components from time series data. High-pass, low-pass, band-pass or band-reject can be created.
MFFF calculates a set of filter coefficients, {h(n)}, which represent the ideal digital filter response {h(n)} modified by a Kaiser (Io-Sinh) window, {w(n)}. The windowed digital filter can be represented as:
In the time domain, the ideal filter response, h(n), is calculated for each of the four filter types: low-pass, high-pass, band-pass, and band-reject from the definitions of the cut-off frequencies and a {SIN(X) / X} type function. Figure 13‑13 illustrates such a function for a high-pass filter with a normalized cut-off of 0.35.
Figure 13‑13 Ideal Impulse Response for a High-Pass Filter,
f c = 0.35
The Kaiser (Io-Sinh) window function, w(n), is calculated from:
and
 
N
 
the number of values in the Kaiser window.
 
a constant that specifies a frequency response trade-off between the peak height of the side lobe ripples and the width or energy of the main lobe is given a value of 9.620 which assures a stop-band attenuation of -96 Db.
Io(x)
 
Is the modified zero-order Bessel function.
The modified zero-order Bessel function is calculated from the power series expansion of:
Io(x) = 1 + Å [(x/2)k/k!]2
 
k
 
summed from 1 to 25.
Having calculated the required impulse response, h(n), MFFF automatically realizes the filter, i.e., filters the specified data file.
A digital filter transfer function can be realized in either one of two ways, recursively or non-recursively. For a recursive realization, the functional relationship between the input {x(n)} and output {y(n)} sequences can be written as:
y(n) = fn [y(n-1), y(n-2), . . . . , x(n), x(n-1), . . .]
In this case, the current output sample, y(n), is a function of past output samples, y(n-1), y(n-2), as well as past and present input samples, x(n), x(n-1). . ..
For a non-recursive realization, the functional relationship between the input {x(n)} and output {y(n)} sequences can be written as:
y(n) = fn [ x(n), x(n-1), x(n-2), . . . ]
In this case, the current output sample, y(n), is a function of only past and present input samples, x(n), x(n-1). . ..
MFFF realizes the calculated filter function in a non-recursive way. If {h(n)} represents the set of, N, calculated filter coefficients then for a non-recursive realization the following difference equation may be written:
y(n) = h(0)x(n) + h(1)x(n-1) + h(2)x(n-2) + . . . + h(N-1)x(n-N+1) 
which may be rewritten as
y(n) =  h(m) x(n-m)
where m is summed from m = 0 to m = (N-1) the number of filter coefficients.
The above equation represents a linear convolution of x(n) and h(n), therefore, the process of “filtering” the time sequence {x(n)} involves convolving it with the filter function {h(n)}. Convolution may be carried out wholly in the time domain, i.e., by explicitly solving the difference equation or by direct multiplication of the filter response function and the time series in the frequency domain. Because the procedure in the time domain involves many more arithmetic operations it is called slow convolution whilst the frequency domain approach is called fast convolution. MFFF uses fast convolution.
Module Operation
The MFFF module can be operated in one of the following three ways:
From the Advanced Loading Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
In Stand alone mode by typing mfff
By incorporating the MFFF commands in a batch operation.
Figure 13‑14 MFFF's Only Data Input Screen
The fields are as follows:
 
Option
Description
Input Filename
MFFF filters the contents of a file containing a single channel of data. By default MFFF expects this file to be a standard time series with a file extension of .dac. Therefore, if a time series is to be processed, it is only necessary to enter the filename, the .dac extension may be omitted. Files with the correct internal format but different file extensions, must have their names entered in full, i.e,. including the file extension. The name offered in the input field is the current default filename. To select this default it is only necessary to press the RETURN key or the F1 key.
MFFF expects to find the input data files to be resident in the user’s directory, however, other directories can be accessed if the complete file specification i.e,. path name and filename are entered. Alternatively use the pick list facility.
Output Filename
The filtered signal is written to a standard time series file with an extension of .dac. The default for this output file is the input file, i.e., the input file itself being filtered. This default is presented in the output file name field and to select it is only necessary to press the RETURN key. If the default is selected, or if the filename of an existing file is entered, MFFF will prompt for confirmation to overwrite it.
The output file containing the filtered signal is written back to the user’s directory. If it is required to place it in some other directory, then this must be specified explicitly.
Filter type
1 - low pass, 2 - high pass, 3 - band pass, 4 - band stop
MFFF can filter data according to one of the following four filter types:
Low-pass - that which passes lower frequencies but excludes higher frequencies.
High-pass - which passes higher frequencies but excludes lower frequencies.
Band-pass - which passes a contiguous band of frequencies but excludes all other frequencies.
Band-stop - which excludes a contiguous band of frequencies but passes all other frequencies. Figure 13‑15 below illustrates the characteristics of the four filter types.
The two frequencies, f1 and f2, define the respective limits (cutoffs) of each filter type. Note that fn is the Nyquist frequency, i.e., half the sampling rate - 0.5 fs.
It is only necessary to enter the appropriate option number (1 to 4) to select the desired filter type. Depending upon the nature of the filter required, MFFF will prompt for the following inputs.
Low-Pass Option 1
Lower edge cut-off freq:
Enter the cut-off frequency for the pass-band, i.e. frequency f1 in Figure 13‑15. This frequency will define the limit of the pass band.
Any frequency between zero and fn, the Nyquist frequency, may be entered.
High-Pass Option 2
Lower edge cut-off freq:
Enter the cut-off frequency for the stop-band, i.e. frequency f1 in Figure 13‑15. This frequency will define the limit of the stop-band.
Any frequency between zero and fn, the Nyquist frequency, may be entered.
Band-Pass Option 3
Lower edge cut-off freq:
Enter lower cut-off frequency of the pass-band, i.e. frequency f1 in Figure 13‑15. This frequency will define the limit of the first stop band.
Upper edge cut-off freq:
Enter the cut-off frequency of the pass-band, i.e. frequency f2 in Figure 13‑15. This frequency will define the upper limit of the pass-band.
Any frequency, between f1 and fn, the Nyquist frequency, may be entered.
Band-Reject Option 4
Lower edge cut-off freq:
Enter the lower cut-off frequency of the stop-band, i.e. frequency f1 in Figure 13‑15. This frequency will define the limit of the first pass-band.
Upper edge cut-off freq:
Enter the cut-off frequency of the stop-band, i.e. frequency f2 in Figure 13‑15. This frequency will define the upper limit of the pass band.
Any frequency, between f1 and fn, the Nyquist frequency, may be entered.
FFT Buffer Size
Specify the size of the FFT buffer to use in the analysis. The bigger the buffer size, the higher the resolution of the FFT.
The FFT buffer sizes allowed are 256, 512, 1024, 2048, 4096, or 8192.
At this stage MFFF will proceed to create the desired filter and then use it to filter the input data file. On completion, it will display a page of results such as that shown below.
Figure 13‑15 Characteristics of the Four Filter Types
Figure 13‑16 A Results Screen
Batch keywords
A list of MFFF’s batch keywords:
 
/INPut
The name of the data file to process, /INP=INDATA
/OUTput
The name of the of the output data file, /OUT=OUTFIL
/OVerwrite
Whether or not to overwrite an existing data file, /OV=Y
/TYPe
The type of filter to use in the analysis. /TYP=1 selects a low-pass filter., /TYP=2 selects a high-pass filter., /TYP=3 selects a band-pass filter, /TYP=4 selects a band-stop filter
/LOcut
Lower edge cut-off frequency, f1 (Hz), /LO=5
/HIcut
Upper edge cut-off frequency, f2 (Hz), /HI=50
/FFT
Size of FFT buffer, 256-8192., /FFT=1024
Butterworth Filtration - (MBFL)
This program takes a signal file and passes it through a Butterworth filter to produce an output signal file.
The filter characteristic can be a low pass, high pass, band pass or band-stop. The filter order can be from 1 to 8 poles which will give a cutoff of between 6db and 48db per octave.
Module Operation
The MBFL module can be run in one of the following three modes:
From the Advanced Loading Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
In Stand alone mode by typing mbfl
By incorporating the MBFL commands in a batch operation.
The first two modes are interactive. Once running in interactive mode, the MBFL module will display the following screen:
Figure 13‑17 The First MBFL Screen
The purpose and usage of each field is explained below. Until Input Filename is completed and confirmed (by pressing F1) then none of the other fields will appear.
 
Option
Description
Input Filename
In this field the user should type the name of an input file (a single parameter .dac file). By default MBFL assumes a .dac file extension but if a file with a different file extension is to be processed then enter the file name plus extension in full.
MBFL will expect to find the input data files resident in the user’s directory, however, other directories can also be accessed if the complete file specification i.e., path name and filename are entered. Probably the easiest way to name an input file is to use the F3/List facility.
Output Filename
This is the file into which the filtered data is placed. It is a standard single parameter file, and will be given a .dac extension, although the user can enter a different extension. This file can also be created in a different drive/directory by specifying the full path name of the file.
If the file exists the user will be asked for permission to overwrite it.
Filter Method Forwards only / forwards & Backwards
In forwards mode the data is passed through the filter from tstart to tend. This emulates a normal analogue hardware Butterworth filter and induces phase shift characteristics.
In forwards/backwards mode the data is first passed through the filter from tstart to tend as above. The data is then passed again through the filter but this time from tend to tstart. This has the effect of correcting any phase shift introduced in the forward pass.
Note: Passing the data through forwards and backwards will double the attenuation, i.e., a 4 pole forward and back filter gives the equivalent attenuation to an 8 pole forward only filter.
Filter order [1-8]
The filter order determines the rate at which frequencies are rejected as the cut-off frequency is exceeded. For a Butterworth filter this is 6 dB per octave, or 20 db per decade (see Table 13‑1).
If the cutoff frequency is set at a Hz (amplitude = 1) then by the time b Hz is reached (which is 1 Octave higher than a the amplitude is 1/256, i.e., it is reduced by 256 times.
Lower orders will produce shallower filter slopes and a lesser reduction in signal amplitude per octave.
What this actually means is shown in the diagram below. It illustrates an 8th order low pass filter
Note: This means that data at and before the cut-off frequency is reduced in amplitude. The maximum reduction is always 0.7071 at the cut off frequency and the effect in the pass band is dependent on the order of the filter. This is a characteristic of all filters, both analogue and digital. The cutoff frequency defines a 3dB drop in amplitude
Filter type
Here you are being prompted to enter which filter type you wish to use on the input signal, there are four choices:
L - Low pass (frequencies above the cut-off will be attenuated).
H - High pass (frequencies below the cut-off will be attenuated).
B - Band pass (frequencies below the lower cut-off and above the higher cut-off will be attenuated).
S - Band stop (frequencies between the lower cut-off and the higher cut-off will be attenuated).
Note: For the Band pass, and Band stop filter, unpredictable results can occur if the upper and lower cut-off frequencies are close. The problem becomes worse the higher the filter order.
The fields that appear beneath Filter type depend upon the setting of filter type.
Cutoff frequency setting fields
The Figure 13‑19 flowchart determines which fields appear depending upon the setting of Filter type.
 
Table 13‑1
ORDER
Filter slope per octave (db)
Filter slope per decade (db)
Reduction/Octave
1
6
20
1/2
2
12
40
1/4
3
18
60
1/8
4
24
80
1/16
5
30
100
1/32
6
36
120
1/64
7
42
140
1/128
8
48
160
1/256
.
Figure 13‑18 An 8th Order Low-Pass Filter
If Filter type is...
Figure 13‑19 Flowchart of Cutoff Frequency Settings
 
Note:  
The time taken to perform a filter will be longer for band pass and band stop. It will also be longer the higher the order of the filter.
When all the above fields are set, pressing or clicking OK will cause MBFL to create the output file, and then exit MBFL.
Batch Operation
A list of MBFL’s batch keywords:
 
/INPut
The name of the input time series to be filtered, /INP=XFILE
/OUTput
The name of the output file that will contain the filtered data, /OUT=OFILE
/OVerwrite
Whether to overwrite existing output files, /OV=Y
/METhod
Filter method, forward or backward (F or B)
/TYPE
The type of filter to use, /TYPE=BP
/ORDER
The order of the filter [1-8], /ORDER=8
/FRQ1
The filter cut-off frequency for low, high pass or for the lower edge of the band pass and band stop, /FRQ1=100
/FRQ2
The filter cut-off frequency for the higher edge of the band pass or band stop, /FRQ2=150
Frequency Response Analysis - (MFRA)
The frequency response analysis, MFRA, analyses the response of a single input, single output linear system. Six files of statistics are generated as a result of this analysis.
The program analyses the response of a single input, single output linear system.
MFRA uses the following terms (ASD=auto spectral density, CSD=cross spectral density):
as the ASD of x(t)
as the ASD of y(t)
as the CSD of x(t) with y(t)
as the CSD of y(t) with x(t)
These are complex values having a real and imaginary part
e.g.,
where is the real part and is the imaginary part.
The GAIN of the system is defined as
The PHASE relationship between x(t) and y(t) is
The COHERENCE is
The TRANSFER FUNCTION of the system is a complex set of values where.
Real Part =
Complex Part =
The program uses Fourier Transforms to calculate the Auto and Cross Spectral Density files as complex values. Using these values it generates all the results files, then saves the Spectra as real parts only.
The following files are generated with each run of the program.
 
ASD of x(t)
.sxx
ASD of y(t)
.syy
CSDs
.sxy and syx
GAIN
.gai
PHASE ANGLE
.pha
COHERENCE
.coh
Module Operation
The MFRA module can be run in one of the following three modes:
From the Advanced Loading Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
In stand alone mode by typing mfra
By incorporating the MFRA commands in a batch operation.
The first two modes are interactive. Once running in interactive mode the MFRA module will display the following screen:
Figure 13‑20 MFRA's Main Menu
The routes through MFRA are shown below.
Figure 13‑21 The Routes Through MFRA
OPTION 1 : Analysis of signal - the Transfer Function Analysis (TFA)
The first screen in this option is:
Figure 13‑22 The First TFA Screen
 
Option
Description
Input Filename
By default, MFRA expects the input data file to be a standard time series with a file extension of .dac. Files with the correct internal format but different file extensions must have their names and extensions entered in full.
MFRA will expect to find the input data files resident in the user’s directory, however, other directories can be accessed by using the pick list facility.
Response Filename
This is the measured response of the system. Again, by default, the response data file is assumed to be a standard time series with a file extension of .dac. The same condition apply to this question as for the input signal.
Note: BOTH input files must have the same number of data points and sample rates. If they do not, then using the graphical editor MGED, and Sample Rate Adjuster (in PTIME), may rectify the situation.
Output Type
Power or Energy Spectral Density, Amplitude Spectrum
This option can be used to specify the nature of the spectral output required from the analysis. The different outputs arise from the way in which the complex FFT coefficients are postprocessed.
If the magnitude of the FFT is scaled, squared and then divided by the spectral width, then the Power Spectral Density, or PSD, results.
If the magnitude of the FFT is scaled to reflect the amplitude of the original data, the Amplitude Spectrum is produced.
If the PSD is multiplied by the analysis time the so-called Energy Spectral Density or ESD is produced.
Output Scaling
Peak/RMS
Normally the magnitude of the FFT components is scaled such that the amplitude will be the RMS of the frequency component. For example, a sine wave of amplitude 1 has an RMS of 0.7071. To calculate and display the true amplitude of the frequency components, select the Peak option.
Averaging Method
When multiple FFT buffers are calculated, the spectral estimates for each buffer can be handled in several ways.
One simple way is to linearly average the component values over the number of buffers calculated. The disadvantage of this method is that fast, high amplitude events which occur in a single buffer are lost when the average of a large number of buffers is taken.
In this case the alternative peak hold method, in which the largest FFT magnitude for each component is retained, may be more suitable.
Start time
This option allows the specification of a time window for analysis. As a default, the whole input time series will be analyzed.
Specific times for the start and end of analysis my be entered directly or alternatively the keywords START and END may be used, together with a single arithmetic operation.
For example, START+5 will specify that analysis should commence 5 seconds into the data and END-3.1 will specify a halt to analysis 3.1 seconds before the end of file.
Extra details keywords may also be used to define the extent of the analysis time window.
End time
This option allows the specification of a time window for analysis. As a default, the whole input time series will be analyses.
Specific times for the start and end of analysis my be entered directly or alternatively the keywords START and END may be used, together with a single arithmetic operation.
For example, START+5 will specify that analysis should commence 5 seconds into the data and END-3.1 will specify a halt to analysis 3.1 seconds before the end of file. Extra details keywords may also be used to define the extent of the analysis time window.
Note that the end of the analysis window is defined by the first occurrence of the last data point within an FFT buffer.
Figure 13‑23 Further Process Specification
 
Option
Description
Window type
Each buffer of data processed by MFRA is tapered using a window function. A window improves the accuracy of the FFT since it reduces the magnitude of the data at the ends of each FFT buffer in a gradual manner thus avoiding discontinuities at the extremities of the block of data. The following window functions are supported: Hanning, Kaiser-Bessel, Triangular, Cosine bell, User defined, and Rectangular.
Overlap (%)
The purpose of overlapping spectral windows is to minimize the effects of "leakage" at the edges of each window. The greater the overlap the smaller will be the effect of this leakage, however, the processing time will increase. An optimum value for the overlap, which minimizes attenuation between successive buffers, and providing reasonable computational times would be 67%.
Normalization
File\Buffer\None
A time series which has an overall mean significantly away from zero is said to possess a DC offset. This offset will generate a component in the frequency domain close to zero Hz. which can swamp the spectrum.
The effect of a DC component can be minimized by eliminating it prior to transformation into the frequency domain. This can be done in two ways:
Firstly, the mean of the whole file can be subtracted from each value in successive FFT buffers prior to transformation.
Secondly, the mean of each buffer can be calculated individually and that value subtracted.
Note that these normalization procedures do not permanently affect the input time series itself.
FFT Buffer Size
The FFT buffer size defines the resolution of the power spectrum. The buffer must be a power of 2, and the longer the buffer, the higher the resolution of the spectral lines. To calculate the resolution divide the Nyquist frequency by half the FFT buffer size. e.g., if nyquist = 178 Hz and the FFT buffer size selected is 1024, then the spectral lines are 178 / (1024 / 2) = 0.347 Hz apart. Another use of a smaller buffer size is for short data files as these cannot be adequately analyzed with a big buffer, since there may not be enough data to give a good spectral average. Using a smaller buffer size could give a better spectral average at the expense of spectral line width.
Noise floor (dB)
When the amplitude of a particular frequency component is small, the FFT coefficients become vanishingly small and may cause computational difficulties or distort results; for example, the phase calculation is particularly affected.
In order to overcome these difficulties, a value may be defined which represents an effective zero. This cut-off point is normally specified in dB down from the maximum magnitude. The default is -72dB.
Note that -20dB is one order of magnitude less than the maximum.
The final screen of the process setup is shown below:
Figure 13‑24 The Last Setup Screen
 
Option
Description
Generic Output Filename
The output results from MFRA are:
ASD of x(t) - (.sxx)
ASD of y(t) - (.syy)
CSD - (.sxy)
GAIN - (.gai)
PHASE ANGLE - (.pha)
COHERENCE - (.coh)
The name you enter here will have the above file name extensions.
Zero/Zero in Gain File
When calculating the gain, the software must decide what to output when there is no significant data in the FFT of both the input and response files. The two alternatives the user may select are Zero (result is not considered to be important) or One (input and output are identical).
OPTION 2: - Results Display
This form allows input of the generic results filename and some output parameters. The generic output filename will be used to form the stem of the six output filenames to be plotted.
The user will then be offered a list of plot options which will allow the plotting of one or all of the available results files.
Figure 13‑25 The Results Display Screen
The fields are as follows:
 
Option
Description
Result to Display
Choose any one, or choose all, or the results files to plot. MFRA will then load the graphics module Quick Look Display (MQLD) and plot the results file. When QLD is exited the user will be returned to this screen.
Multi File Display (MMFD) is used when ’7. All results files’ is selected.
Minimum frequency to plot
Specify the minimum frequency to plot in Hz. The value must not be negative and must be less than the Nyquist frequency (the Nyquist frequency for this case is displayed in the statistics area). This question is not so important for interactive users since the limits may be changed when the data is displayed graphically but is very useful for batch operation.
Maximum frequency to plot
Specify the maximum frequency to plot in Hz. The value must greater than the specified Nyquist frequency (the Nyquist frequency is displayed in the statistics area). This question is not so important for interactive users since the limits may be changed when the data is displayed graphically but is very useful for batch operation.
Batch Operation
A typical batch command line would be:
mfra /opt=1/inp1=data01/inp2=data02/fft=4/win=3
/gen=fraexamp/ov=y/norm=n/opt=2/disp=5/pltnam=fred
This batch command line will carry out a frequency response analysis using data01 as the input signal and data02 as the response. The results will be stored under the default generic name of fraexamp. The analysis will be carried out with a FFT buffer of 512 points and a hanning window. The default conditions of 30% overlap and normalized input data will be met. A graphical display hardcopy file (*.plt) will be produced from /OPT=2, and it will be the .pha file from /DISP=5, with the name fred.plt.
A list of MFRA’s batch keywords:
 
/OPTion
This keyword is used for the first menu where the user chooses either analysis (option 1) or display (option 2)
/INP1
The input filename, /INP1=FILE1
/INP2
The response filename, /INP2=FILE2
/GENeric
The output filename required for the results data file, /GEN=RESULT
/OTYPE
Output Type (PSD,AMP,etc.) P, A, E
/SCALE
RMS or Peak R, P
/AVERage
Linear averaging or Peak Hold L, P
/STArt
Start Time for Analysis
/END
End Time for Analysis
/OV
Whether to overwrite an existing results file, /OV=Y
/NORM
Option to normalize the input time series data (Y/N), //NORM=F,B,N
/OVERLap
The amount of overlap of the FFT buffers, /OVERL=45
/FFT
The permissible FFT buffer size: 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, /FFT=32
/FLOor
Noise Floor
/WFILE
User Defined Window Filename
/ZERo
Value of 0/0 in gain file Z, O
/WINdow
The type of window function to be used, H, C, R, /WIN=H
/DISPlay
This allows the user to choose the display to be viewed: 1. Power Spectrum of input signal (.SXX), 2. Power Spectrum of response signal (.SYY), 3. Cross Spectrum of input and response signals (.SXY), 4.Gain plotted against frequency (.GAI), 5.Phase angle plotted against frequency (.PHA), 6.Coherance function plotted against frequency (.COH), 7.Display all, 8.Exit display options, /DISP=1
/FMAX
The maximum frequency to be displayed, /FMAX=45
/FMIN
The minimum frequency to be displayed, /FMIN=10
/PLOt
Automatically plot results Y, N
/PLTNAM
Hardcopy filename
It is recommended that, by default, the /OV=Y keyword be included in every batch command line, since if it is omitted and an output file with the specified name already exists, batch operation will cease.
 
Statistical Analysis - (MRSTAT)
MRSTATS analyses a time signal and produces a number of statistics about that signal. MRSTATS works by breaking the input time signal into segments, and statistically analyzing each segment. Each statistic is fed into an output signal file.
Input files normally have the .dac file extension.
MRSTATS can generate a maximum of seven statistics from an input file. Each set of statistics is fed into its own type of output file, the type of statistic being identifiable by the file extension. For example, the output file that records the variation of the mean signal strength against time has a .mea file extension.
The MRSTATS module accepts input from .dac files and divides the signal recorded by the .dac file into a series of time slices of equal length. Each slice then has up to seven operations carried out upon it. The operations are as follows:
 
Operation
Output File Extension
Root Mean Square (RMS)
.rms
Standard Deviation
.rsd
Mean
.mea
Maximum Value
.max
Minimum Value
.min
Absolute Maximum
.abs
Area Under Data
.are
The result of each operation is placed in the appropriate file, and the next slice is then analyzed. Eventually all of the signal will be analyzed, and up to seven output files will have been created that record the variation of the above named statistics against time, for each user specified slice of the input signal.
The Area Under Data option is a record of the area under the curve as derived by integration.
MRSTATS does not have the ability to display the output files. Use data display modules such as MMFD or MQLD to display files.
Module Operation
The RSTATS module can be started and operated in one of three ways:
From the Advanced Loading Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
In Stand alone mode by typing mrstats
By incorporating the MRSTATS commands in a batch operation
MRSTATS is composed of three screens. Whether the user has run MRSTATS from the menu, or directly from the system prompt, the first screen that they will see looks like this:
Figure 13‑26 Selecting the Statistics
The horizontal bar contains the tag options menu. The items that can be tagged are those statistics named in the statistics list below the tag menu. Tagging a statistic means that MRSTATS will produce an output file containing the tagged type of statistical data.
A statistic is tagged when it has an asterisk (*) next to it.
 
Note:  
Use the left/right arrow keys and the space-bar to select from the tag menu, OR, press the appropriate letter (the capital letter in the option is the 'hot key'. The selected option is the one highlit with the highlight bar or point and click with the mouse.
To move the highlight bar within the list of statistics use the up/down arrow keys. The 5 tagging menu choices do the following:
 
Option
Description
aCcept (or OK)
When the user has selected those statistics for which they want an output file to be created, they must press OK to accept the screen, OR, press C for aCcept.
Pressing OK takes the user to the second (and last) screen of MRSTATS.
Tag/untag
This allows the user to tag individual statistics while leaving others untagged.
To tag/untag a statistic move the highlight bar over the statistic and press Enter. Users may select as many, or as few, statistics as they wish.
tag All
As the name suggests, this option allows the user to simply and quickly tag all the statistics.
To use tag All, move the highlight bar over it and press Enter. An output file will then be produced for all seven statistics.
Untag all
This has the opposite affect to tag All. The program will not run if there are no statistics tagged (there would be no point because no output would be produced).
Therefore, the only use of Untag all is to clear a previous set of selections prior to making new selections.
Exit
This option exits MRSTATS and returns the user to the operating system. Options are not saved.
When the user has selected those statistics for which they want an output file to be created, they must click OK to accept the screen. Pressing OK, or C to aCcept, takes the user to the second screen of MRSTATS.
The screen looks like this:
Figure 13‑27 Specifying the Analysis
Please note that initially only the first field is displayed (filename of input signal). Only when the input signal filename has been entered will MRSTATS display the other fields.
This screen allows the user to name the input (.dac) file, the output file names, and specify certain technical parameters.
The fields are as follows:
 
Option
Description
Input Filename
The name of the file that contain the input signal must be entered here. The input file will normally be a .dac file, which is also the default file extension. The full path must be specified only necessary if the file is not in the current directory, or currently defined path.
Output Filename(s)
Here the user can choose the name of the output file, or if more than one statistic has been flagged, the output files. If all seven statistics were tagged, and data01 was chosen as the output file name, the output files produced will have the following names:
data01.rms
data01.rsd
datao1.mea
data01.max
data01.min
data01.abs
data01.are
Both of the above fields can accept up to 32 characters (to name the drive, path, and extension).
Window Type
Enter the method used to specify the window size. The options are:
Time - specify a window size in seconds.
Points - specify the window as a number of points
% (Percent) - specify the window as a percentage of the signal length
Window size
It is in this field that the user specifies the length of the window size units into which the input signal will be divided. The diagram below illustrates how a 100 second long input signal is divided into five 20 second segments by choosing a window size of 20 s. The same rules apply if points or % are selected.
 
Each of the 5 segments will be analyzed and each of the 7 output files will contain data points each from of the five time segments.
If nothing is entered in this field, MRSTATS enters a default value of 10 units (seconds, %, or points). If the signal is less than 10 units long, the default window size is the length of the signal.
Users may not specify a window size greater than the length of the signal.
Overlap
This field enables users to overlap time segments. For example, if a window size of 10 seconds was input for a 100 second signal, and an overlap of 50%, the output readings will be at the following times: First reading between 0 and 10 seconds, second between 5 and 15 seconds, third between 10 and 20 seconds, etc. until 100 seconds is reached.
The default value is no overlap, i.e., consecutive windows. The maximum overlap is 99% or its equivalent. Negative overlaps are not allowed.
The options are:
Time - specify the overlap in seconds.
Points - specify the overlap as a number of points.
Percent - specify the overlap as a percentage of the window length.
Gating Option
A gating signal is a signal that records events which can be used to define which parts of an input signal will be analyzed. In other words it is a kind of filter. For example a user may only be interested in analyzing input signals that correspond to an event such as the brake being applied on a test vehicle. If the use of the vehicle's brakes are recorded, the signal can be used as a gating signal that is mapped to the input signal, so that only those parts of the input signal created by brake application will be analyzed.
There are 6 ways of setting the gating signal plus an option for no gate (the default):
1. Window starts when the gating signal reaches a specified value, and ends when the gating signal rises to the specified value.
2. Window starts when the gating signal is NOT at a specified value, and ends when the gating signal reaches the specified.
3. Window starts when the gating signal is greater than the specified value, and ends when it falls to the specified value.
4. Window starts when the gating signal is less than the specified value, and ends when it is outside the specified limits.
5. Window starts when the gating signal is inside the specified limits, and ends when it is outside the specified limits.
6. Window starts when the gating signal is outside specified limits
and ends when it is inside the specified limits.
Gating filename
The user enters the name of the gating signal (if any) into this field. Typically it will have a .dac file extension. The gating signal will normally be of the same time duration and sample rate as its corresponding input signal.
The default file extension for a gating signal is .dac.
The Gating value(s)
To complete the screen, move the highlight to the gating values box. The exact layout of the gating values boxes depends upon the Gating Options chosen.
The values must lie within the gating signal limits (displayed to the right of the gating value box).
Event Analysis Type
The gate, once triggered, will operate for a certain portion of the signal (an event frame), but it may encounter another trigger before it has reached the end of that event frame. How this is handled is set by the Event Analysis Type field.
The event analysis type can be of three forms:
1. Analysis of signal takes place for the whole of the event frame i.e., multiple windows can occur in one event. If an event is shorter than the window time then no analysis will occur for this event.
2. Analysis of signal takes place only for first window in an event frame. If an event is shorter than the window time then the analysis occurs over the event time.
3. The window value will be ignored and the analysis of the signal will take place over the whole of the event time in the gating signal. Note that the x-axis value in the output files is stepped in an arbitrary value of 1 sec.
Statistics are calculated for that part of the signal which lies within the window.
The two drawings below illustrate an input signal (A) and its corresponding gating signal (B). When brakes are applied the gating signal is 0.7, and it drops to 0 when brakes are not applied.
Figure 13‑28 A Signal and It's Gate Signal
If the gating value is set to 0.5 then only segments 1, 3, 4 and 5 on graph A will be analyzed. Only those peaks correspond to the 0.5 limit set as the gating signal trigger value. Note that the gating signal has to be greater than the gating value for the entire time window, if it drops below the gating value just once per window then the entire window's data is ignored. If nothing is entered in this field, MRSTATS assumes there is no gating signal and therefore analyzes all of the input signal.
The example given above was produced according to gating option 3.
If a gating option is chosen then the third and final screen is displayed.
If the no-gate option is accepted, the analysis proceeds and a % complete meter appears.
Figure 13‑29 Specifying the Gating Parameters (In This Case for Option 5)
To accept the screen and start the analysis, press OK.
Once the screen has been accepted a '% processing complete' progress bar appears on the screen.
Batch Operation
MRSTATS can be run in non-interactive batch mode. Typical batch command lines would be:
mrstats /opt=all/inp=test/ov=y
This would calculate all output statistic signals for the input file test.dac.
A list of MRSTATS’ batch keywords:
 
/OPT
The statistics options - 1 - 7 or ALL
/INP
The name of the input .dac file
/OUT
The name(s) of the output .dac files
/OV
Overwrite existing files
/WINTYP
The window type time, points, or percent
/WIN
The window size
/OVLTYP
The overlap type T(ime), P(oints), or %
/WINOV
The window overlap
/GSIG
The name of the gating signal.
/GOPT
The gating option from 1 to 6
/LIM1
The gating value.
/LIM2
Second gating value
/ETYP
The event analysis type
It is recommended that, by default, the /OV=Y keyword be included in every batch command line, since if it is omitted and an output file with the specified name already exists, batch operation will cease.
Header/Footer Manipulation - (MFILMNP)
File manipulation (MFILMNP) allows both header and extra details manipulation. In addition, it can check that a header conforms to MSC.Fatigue conventions.
MFILMNP can list and edit data file headers, and control the extra details data that can be written to files. The files types that can be edited include single parameter files e.g. .dac files and 2 parameter files e.g. .mdf. Three parameter histogram files can also be processed.
Headers tend to contain information relating to the data within the file. Extra Details Areas (also called footers) tend to contain user supplied data, or the results of the analysis of the data.
Header information is stored in at the top of a data file ahead of the data itself. The area is of fixed size and is reserved for a specific set of file details. Footers are appended to the end of files and tend to contain user specified details. The exact contents of the footer cannot be stated without looking at each footer because the extra details keywords, which specify the contents of the footer, vary. This is because the available extra details keywords vary between MSC.Fatigue modules, and in any case the user specifies which keywords are to be used.
Because of the difference between header and footer information, they are discussed separately, starting with The Header Area.
The Header Area
Although MSC.Fatigue strictly maintains file header accuracy and integrity, it may sometimes become necessary to edit the contents of a header element in order to meet a specific requirement. For example, under normal circumstances files with differing sampling rates or bases cannot be concatenated. MFILMNP provides a means for “adjusting” any header element so that concatenation, or any other operation which would not normally be allowed, can be undertaken. However, great care must be exercised when using MFILMNP in this way because the fundamental nature of the data is being changed! Because of this danger, these numeric operations can only be carried out, with a precise knowledge of the header format, and by accessing it through its ‘dump form’.
In addition to editing specific numeric elements, MFILMNP also provides a means of amending areas of the header that contain textual information such as axis labels and units. This functionality can be particularly useful when data files are being transformed, by some arithmetic or analytical process, from one unit system to another; the two example batch command lines provided at the end of the batch section illustrate this usage. Unlike the numeric operations referred to above, textual manipulation does not require a knowledge of the header format and so is carried out by accessing it through an ‘annotated form’.
The Dmp Form
The dump form provides a means of accessing the header in a relatively straightforward way by considering it to be made up of 128 four-byte elements, 512 bytes in all. Data can be stored in each element according to the number of bytes required for each data type; this storage requirement is detailed below:
 
Data Type
Example
Storage Requirement
(Bytes)
Number of values per dump form element
REAL
150.65
4
1
INTEGER
10
2
2
CHARACTER
A
1
4
In this regime, a real floating point number, requiring 4 bytes, will occupy one element of the dump form. An integer, on the other hand, will only half fill a dump form element, and so, two integers can be stored. Similarly, each dump form element will store four characters.
Access to the dump form is through element number i.e. 1 through 128. It is the user's responsibility to load each element with the correct data type and number of values. For example, if dump form element 33 is to be amended, the user will need to be aware that this element contains two integer values and enter them both. Omitting a value will set the second half of the element to zero, see the section on module operation for more details.
In all there are 128 elements numbered. All the elements are fully explained in the chapter called MSC.Fatigue DAC File Format Description, 249.
The Annotated Form
Unlike the dump form, the annotated form requires no prior knowledge of the format of the MSC.Fatigue file header. It is designed to allow access to specific header fields by name alone. The following fields may be accessed in this way:
X-axis unit string
Y-axis unit string
Z-axis unit string
X-axis label string
Y-axis label string
Z-axis label string
Original signal name
Final signal name
Signal base
Notice that although the signal base is a numeric field, it may nevertheless be accessed through the annotated form. See the section on module operation for more details.
The Footer (Extra Details Area)
Often the header area is not large, or flexible enough, to store non-standard system or even user-defined, information. To overcome this restriction, a system has been devised whereby information may be attached directly to the tail of an existing data file, into a region known as the Extra Details Area (EDA) or Footer.
The extra details area of a specific data file may be examined, modified and extended through the use of the MFILMNP module. However, many MSC.Fatigue modules access this region automatically, either to deposit, or recover information, some of these modules are detailed below:
Once extra details have been “attached” to a particular data file, MSC.Fatigue will automatically pass them on to any data files “spawned“from the original file and so the information can be carried forward from the beginning to the end of any analysis procedure.
Format of the extra details area.
Information is stored in the extra details area and are in the form of keyword/ value pairs, the sequence of the pairs is irrelevant. The maximum size of each field is illustrated below:
The Keyword Field - Up to 8 characters in length.
The Value Field - Up to 120 characters in length.
Since access is always via MFILMNP or other MSC.Fatigue modules, a more detailed knowledge of the format of the EDA is not required.
 
Note:  
Since extra details are stored entirely as character text, any detail which is supposed to be numeric will NOT be checked for validity by MFILMNP.
Module Operation
The MFILMNP module can be run in one of the following three modes:
From the Advanced Loading Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
In stand alone mode by typing mfilmnp at the system prompt
By incorporating the MFILMNP commands in a batch operation.
The first two modes are interactive. Once initiated in interactive mode, MFILMNP will display the following options:
Figure 13‑30 The MFILMNP Top-Level Menu
Input File Name
By default MFILMNP expects this file to be a standard MSC.Fatigue single parameter file with a file extension of .dac. Therefore, if a file of this type is to be processed, the .dac extension may be omitted. Files with the correct internal format but different file extensions must have their names entered in full, i.e. including the file extension.
Header Manipulation
 
Option
Description
View Annotated form
The annotated form is an annotated (cut down) version of the full dump form. It only contains those header parameters most often changed, i.e. about 20 of the total of 128 parameters. Output can be sent to either the screen or a file.
View Dump form
Lower limit:
The dump form of the file header consists of 128 four byte elements with each element containing either a single floating point number, two integers, or four characters. The response required here is the number of the dump form element at which the listing is to commence.
Upper limit:
The dump form of the file header consists of 128 four byte elements with each element containing either a single floating point number, two integers, or four characters. The response required here is the number of the dump form element at which the listing is to end. The number entered must be greater than or equal to the lower limit specified above and less than or equal to 128.
Operation type: real, integer*2, character (R):
The contents of each element of the dump form can be represented and displayed by means of any of the three data types; REAL, INTEGER and CHARACTER.
If the user wishes to view the first 3 (of 128) dump screen elements then entering Lower limit = 1 and Upper limit = 3 will display elements 1 to 3.
Update annotated form
Move the highlight bar over the field to update in the screen that is presented.
Update dump form
Dump form number:
The dump form of the file header consists of 128 four byte elements with each element containing either a single floating point number, two integers, or four characters. The response required here is the number of the dump form element to edit.
Operation type Real, Integer*2, Character:
The contents of each element of the dump form can be replaced by any of three data types; REAL, INTEGER and CHARACTER. The type offered as the default is the data type of the element specified for editing.
MFILMNP will present the current contents of each dump form element and prompt for an alternative value. Note that in this case the element specified was number 91. Number 91 is a character and characters have up to 4 values to be entered (Integers have 2 values and Real have 1).
Special characters such as Escape codes can be entered by surrounding number with <> characters.
New Value:
Type the new values here. Pressing OK will cause them to be passed to the dump form.
File integrity Check
Selection of this option will cause MFILMNP to recalculate all the statistics which are normally contained within the header area. This procedure is useful since it ensures that the calculated values are a true representation of the data.
Save changes
All edits MUST be explicitly saved before they become permanent. If changes are not saved then MFILMNP will prompt with a Save Changes to Header Yes/No message before leaving the Header manipulation options.
Return
Returns you to the main menu.
Extra Details (Footer) Manipulation
The second major option from the main menu is that which allows manipulation of the footer information.
If this option is selected then you have the following options:
 
Option
Description
1. Load extra details area from ASCII file
Extra details may be loaded into the specified data file from an external ASCII text file which may, for example, have been created with a text editor or word processor. This feature is very useful for loading additional, user-defined test information, particularly in batch mode; see the second example of typical batch commands for more details of this technique. By default MFILMNP assumes that the text file will have the extension .asc and that it resides in the user directory. Note that any extra details with matching keywords already in the file will overwrite. Other extra details are unaffected.
Syntax of the ASCII File:
The ASCII file must have one keyword/value pair per line with the delimiter between the keyword and value strings being the equals sign “=”, for example:
TITLE=This is the test title
ENGNAM=Fred 
TEMP=150
Keywords can be up to 8 characters in length; entry of longer strings will result in an error message. Values fields may by up to 120 characters in length. Any line without an equals sign will be disregarded and so can be used as comment lines. Spaces in the keyword are not allowed.
2. Load extra details area from another data file
It is possible to copy extra details from another file into the extra details area of the current data file. The other file must have version 3.0 (or above) extra details, and it is assumed by MFILMNP to have the default file extension .dac. Other file extensions must be entered explicitly. Note that any extra details with matching keywords already in the file will be overwritten. Other extra details are unaffected.
3. List extra details area
This option will simply list the entire contents of the specified data file to the screen or to a specified file. Note that a file must be Loaded from options 1 or 2.
4. Delete all of the extra details area
This option allows the user to delete the entire extra details area of a specified data file. This is a dangerous option since it may destroy important data, as a result MFILMNP will prompt for confirmation to proceed.
5. Add extra details pair.
The additional information stored in the EDA of standard MSC.Fatigue files are stored in the form of a keyword identifying the extra detail together with an associated value.
Keyword
A string of up to 8 characters, which will represent the keyword by which the particular piece of information will be identified, should be entered. If the keyword already exists, an error message will result. Valid keyword strings might be, TIME, Title, or My Name. These keywords will be stored as TIME, TITLE and MY NAME, notice that the SPACE character is maintained as a valid keyword character.
Value
The additional information stored in the EDA of standard MSC.Fatigue files are stored in the form of a keyword identifying the extra detail together with an associated value.
The value to be assigned to a particular keyword should be entered, it can be up to 120 characters in length and may be any text string. The 120 characters are split over two lines because of screen restrictions.
After entry of an extra details pair, any mistakes can be corrected by selection of option 6.
6. Modify extra details value.
Selection of option 6 will cause EDM to ask for the keyword and its value. The value associated with a particular keyword can be modified by means of this option. If the keyword itself needs to be modified, then it must first be deleted with option 7 and then re-inserted with option 5. Enter the keyword whose value is to be altered, option 3 can be used to list all the keyword/value pairs currently stored.
The modified value to be assigned to the specified keyword should be entered, it can be up to 120 characters in length and may be any text string.
7. Delete extra details pair.
The additional information stored in the EDA of standard MSC.Fatigue files are stored in the form of a keyword identifying the extra detail together with an associated value. Entering the name of an unwanted keyword at this point will remove it and it's associated value from the extra details area.
Keyword pairs can be displayed using F3/List. This facility also allows the user to tag more than 1 keyword, use a wildcard character (*) to tag families of keywords, and access keywords from other drives/directories.
8. Copy extra detail pair to environment file
MSC.Fatigue runs within the context of both a local (from the user’s directory) and global system environment. These environments are special data files that contain information to which each MSC.Fatigue program module can gain access.
Since the structure of the environment file and the extra details are fundamentally the same, data may be copied freely between them. As a result an environment file may then be used as a mailbox to pass information results between data files and program modules.
This option allows extra details keyword/value pairs to be copied from the specified data file TO the local environment file. Enter the name of the keyword which, together with its associated value, is to be copied from the extra details area of the current data file into the local environment file.
F3/List will list all available keywords.
9. Copy extra details from environment file
Equivalent to option 8 but instead copies FROM the local environment file to the specified data file. Enter the name of the keyword which, together with its associated value, is to be copied from the local environment file into the extra details area of the current data file.
A. Extra details calculation
This option can be used to perform arithmetic calculations on keyword values. An example is shown in Figure 13‑31 where speed in mph is converted to m/sec. The top line reads the value associated with a header variable called SPEED and multiplies it by 1.8 to get km/hr. The new speed value is automatically fed into line 2 (EDMV2) and multiplied by 1000 and the resultant speed value is fed into field EDMV3 where it is divided by 3600 (the number of seconds in an hour).
The results of all three stages are written to the extra details area, in this case as EDMV1, EDMV2 and EDMV3.
Available input name/values can come from
Extra details
Numbers
Header Keywords
Arithmetic operators can be
*(multiply)
/(divide)
+(Add)
-(subtract)
^(raise to the power of)
There should be no spaces between words and operators.
B. Compress extra details
Extra details are added to the end of a data file as a string of values. When values/words in the middle of the string are deleted, the blank space is NOT automatically closed up. The deleted areas become 'dead' space because values/words can only be added to the end of the string, not in its middle. This option closes up the spaces, or more accurately, it moves the spaces to the end of the string where they become available again.
Figure 13‑31 The EDA Calculation Screen
Validate Header
This option is a utility that checks the validity of the header. It:
checks the header values are correct by recalculating the values and comparing the calculated values to those in the header.
uses double precision for the statistic calculations.
checks that blocks of extra details are consistent with the header.
checks that all numbers are credible.
New File
Selection of this option simply removes the menu from the screen and makes the Input File Name field the screen focus once more.
Batch Operation
MFILMNP can be run in non-interactive batch mode. In this mode of operation simple but often tedious alterations to the file header to be made simply and accurately. Typical batch command lines would be:
mfilmnp
/inp=test101/opt=h/opt=u/ylabel=MPa/yunits=stress/*=tt
This changes the Y-axis label and the Y-axis units of the file test101.dac.
mfilmnp /inp=test101/opt=e/opt=8/key=*
This copies all the extra details pairs from the file test101.dac to the environment file. A list of MFILMNP’s batch keywords:
 
/INP=
The name of the input data file. /INP=FILE1
Main Menu options:
 
/OPT=
H-Header, E-Extra, V-Validate, N-New file
/OPT=
A submenu option number.
1-Load EDA from an ASCII file, 2-Load EDA from another data file, 3-List EDA, 4-Delete all of the EDA, 5-Add extra details pair, 6-Modify extra details value, 7-Delete extra details pair, 8-Copy EDA to local environment, 9-Copy EDA from local environment. /OPT=7
/KEYn=
The required EDA keyword. /KEY1=TIME, /KEY2=SPEED
/VALn=
The value to associate with the required keyword. /VAL1=60, /VAL2=100
/OV=
Confirmation to allow the deletion of an entire extra details area. /OV=Y
/INPut
The name of the ascii file or the data file from which to copy extra details from. /INP=INDATA
/OPTion
The required option number where: 1-View annotated form, 2-View dump form, 3-Update annotated form, 4-Update dump form, 5-File integrity check. /OPT=3
/DESTination
The destination for the header listing: S-Specifies to the user screen. F-Specifies to a file name. /DEST=F
/OUTput
Output file name, /OUT=fred.lst. Note that to direct the listing to a notebook, a notebook name must be defined in the local environment. In batch mode this is accomplished by issuing the following command to MFILMNP... /menm /opt=2/key=notebook/val=myname)
/LOWLIMit
Specifies the element in the header at which the listing of the dump form will begin. Values between 1 to 128 may be entered. /LOWLIM=1
/UPPLIMit
Specifies the element in the header at which the listing of the dump form will end. Values between /LOWLIM and 128 may be entered. /UPPLIM=10
/OPTYPe
Defines the type of the header element to be edited. R-Specifies a REAL (floating point) field, I-Specifies an INTEGER field, C-Specifies a character field. /OPTYP=I
/XUNIT
The text string that will define the units of the x-axis. Up to a maximum of 28 characters may be used. If the value is set to NONE, then this field will be made blank. /XUNIT= Secs.
/YUNIT
The text string that will define the units of the y-axis. Up to a maximum of 28 characters may be used. If the value is set to NONE, then this field will be made blank. /YUNIT= Secs.
/ZUNIT
The text string that will define the units of the z-axis. Up to a maximum of 28 characters may be used. If the value is set to NONE, then this field will be made blank./ ZUNIT= Secs.
/XLABel
The text string that will define the x-axis label. Up to a maximum of 16 characters may be used. If the value is set to NONE, then this field will be made blank. /XLAB=Elapsed Time.
/YLABel
The text string that will define the y-axis label. Up to a maximum of 16 characters may be used. If the value is set to NONE, then this field will be made. /YLAB=Load.
/ZLABel
The text string that will define the z-axis label. a maximum of 16 characters may be used. If the value is set to NONE, then this field will be made. /ZLAB=Damage.
/BASE
The new base value for the data file. /BASE=10
/REAL
If a REAL (floating point) field is being edited, then this keyword defines the new REAL value required. /REAL=26.5
/DUMPform
Dump form number /DUMP=91
/NUM1
First value for dump form update /NUM1 = A
/NUM2
Second value for dump form update /BASE=10
/NUM3
Third value for dump form update /NUM3 = C
/NUM4
Fourth value for dump form update /NUM4 = D