Fatigue Quick Start Guide > Fatigue Utilities > Advanced Loading Utilities
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Advanced Loading Utilities
The main module delivered with any basic MSC.Fatigue system is PTIME. This basic module has been used extensively throughout these example problems and allows for the following:
ASCII file load
xy point entry
graphical edit
waveform creation (including white noise)
block definition
matrix creation
polynomial and lookup table transformation
unit and sample rate conversion
From PTIME it is possible to access certain display and manipulation modules that have already been described in the various exercise problems in this manual such as:
Multi-File Display (MMFD)
Quick Look Display (MQLD)
Three Dimensional Display (MP3D)
Two Parameter Display (MTPD)
In addition to PTIME, the following utility modules exist to help in the definition of loading information:
Arithmetic Manipulation - MART
MART allows you to take any time signal or even a histogram and apply arithmetic operations such as adding, subtracting, multiplying, or dividing by a constant. You can normalize a signal to a new mean, raise it to a power, apply trigonometric or logarithmic functions, take the absolute value or use the linear equation Y=mX+c. You can apply these arithmetic operations to the entire signal or only a portion thereof.
For example, use PTIME to Copy to central the signal SAETRN. Use MART to raise the signal from 1000 seconds to the end of the signal by the power 1.1.
1. Invoke MART by typing mart from the system prompt or by selecting the Arithmetic Manipulation option from the Advanced Loading Utilities pull-down menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
2. Select the Raise to a power option.
3. Select saetrn.dac as the Input Filename and click OK.
4. Set the Output Filename to saetrn2.dac.
5. Change the Raise to Power databox to 1.1.
6. Change the From databox to 1000 and click OK. This will raise all Y values to the power 1.1 starting at 1000 seconds to the end of the signal.
Above are the results, before and after as displayed by MMFD.
Multi-Channel Editor - MCOE
MCOE allows you to tabularly view, edit, or create multiple time signals (files/channels) simultaneously. As an example:
1. Invoke MCOE by typing mcoe at the system prompt or select the Multi-Channel Editor option from the Advanced Loading Utilities pull-down menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
2. Select Edit as the mode of operation. You will be presented with a screen to select files. The operation of selecting files is identical whether you are browsing, editing, or creating. When creating you simply enter a file name and click OK for each column of data.
3. Using the List button select the two files from the previous exercise, saetrn.dac and saetrn2.dac. Use the Shift key to select both files. Click the OK button two times. A spreadsheet with four columns will appear. The first two columns are fixed data corresponding to the point number and the time. Only the right two columns of data are editable.
4. Edit any cell in these two right columns by selecting it with the cursor or using the arrow keys and typing the new value.
There are a number commands at the top of the spreadsheet that are useful for editing and viewing data. These are:
File: This has only two options, Back or OK. Both will end the editing session and quit from MCOE. Only OK will actually save any changes.
View: These commands under this pull-down are simple. They allow you to scroll up or down, right or left, or to the beginning or end of the spreadsheet.
Goto: This allows you to specify which row to go to based on the X value (time).
finD: This will find the next row in the current column with the value specified based on the criteria of greater than, less than, between, or closest to.
Opts: This is perhaps the most useful of the commands for editing the tabular data. These options are discussed below.
Pref: This sets preferences. For example, how you would like to select cells, or view number formats in the columns. You can even scale the X-axis (time) and define the format of exported files.
Next: This finds the next number based on the previously set finD command.
Editing Options Under Opts
The following options are available for editing the spreadsheet (see the MSC.Fatigue User’s Guide for options not mentioned here). Experiment with any of these as you see fit.
Gap: This command appends the specified duration of time onto the end of a signal. You type a number into the automatically selected cell and a linear interpolation occurs filling the cells in-between. The next time duration gap is determined from you entering another data value in the selected cell with interpolation occurring again. This cycle continues until you select another cell or invoke some other command.
Delete: This deletes all cells within the specified time duration. Cells below the deleted cells move up and close the gap.
Copy: Copies the data values in the specified time duration.
paSte: Pastes values that have been copied into the specified time duration overwriting any existing values.
cYcle: Appends a saw tooth type signal to the end of a column by specifying the maximum/minimum, range, number of cycles and mean.
Insert: Inserts the number of points or the time duration specified at the current row for the specified columns. A start and end data value are requested and intermediate values are linearly interpolated.
Append: Appends to the end of the signal the length of time or the number of points specified. It also requests a beginning and ending value and all other values in-between are linearly interpolated.
Join: This command asks for a start time and an end time and changes all values in-between based on a linear interpolation for the specified data columns.
Export: Creates a file with default extension .txt of the columns of data in the spreadsheet.
Plot: Plots the specified columns using the MMFD multi-file display program.
Rescale and offset: Specifies a start time and an end time, the column(s) to apply the scaling and offset, and the scale factor and the offset values.
Format columns: This allows you to hide or unhide columns from the spreadsheet, fix (or unfix) them to protect columns from data entry if desired, and to group columns for multiple column operations in other options.
eXit: This is the same as OK from the File pull-down to save and exit.
Quit: This is the same as Back from the File pull-down exit without saving.
Note:  
A back up file of each file specified is created with extension .bak. So you can always retrieve the original data if you make a mistake.
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 pull-down 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 re-ordered 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. Clicking 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 a formula processor for time series data or histogram files. It is a very powerful tool that includes its own programming language. Virtually any formula can be applied to any number of time history or histogram files. The formulas are defined via an ASCII template file that is created manually using a text editor. MFRM then reads the template file and executes the commands. After execution the resultant files can be graphically displayed.
As a quick example, define a file called example.frm using any text editor with the following content:
; --- Define all the files ---
%QYFIL /FILE=F1 /PROMPT="Enter filename" /TYPE=INPUT
%DFFIL /FILE=F2 /NAME=positive /TYPE=OUTPUT /OV=y
%DFFIL /FILE=F3 /NAME=negative /TYPE=OUTPUT /OV=y
%DFFIL /FILE=F4 /NAME=positive2 /TYPE=OUTPUT /OV=y
%DFFIL /FILE=F5 /NAME=negative2 /TYPE=OUTPUT /OV=y
;
; --- Carry out the calculations ---
;
%BEGIN
;
%IF(F1 > 0)
F2=F1
%ELSE
F2=0
%ENDIF
%IF(F1 < 0)
F3=F1
%ELSE
F3=0
%ENDIF
F4=MAX(F1,0)
F5=MIN(F1,0)
;
%END
Next, invoke MFRM from the system prompt or by selecting the Formula Processor option from the Advanced Loading Utilities pull-down menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
1. Select Run the formula template.
2. Enter example.frm as the template file that you just created. Click OK.
3. You will be prompted for an input file. This can be any .dac formatted type of time series file. Select saetrn.dac as the input file from the previous exercises in this section.
The processing will begin once this input file has been selected. If you look carefully at the template file you can see what operations are being executed. The first line prompts for the input file to process. Internally the input file will be known as a variable called F1. The next four lines define output files that will be internally knows as variables F2, F3, F4, and F5 respectively. They are given the names positive, negative, positive2, and negative2. The default file extension is .dac.
The next section of the template file contains the operations to be performed. These operations take F1 and break it up into its positive component and its negative component. This can be accomplished in two ways. The first way is done in the first IF-ELSE-ENDIF command by setting any points greater than zero in file F1 to file F2 and anything less than zero to zero. The second IF-ELSE-ENDIF command then does the negative side. The final two lines accomplish the exact same task by using the intrinsic math function MAX and MIN by taking the maximum or minimum of each point in the signal by comparing to zero.
4. Plot the results by selecting Plot results files. A plot of the resulting F2, F3, F4, and F5 files is shown to the right.
MFRM has the ability to perform very complex operations using IF statements, LOOPs, arithmetic, logarithmic and trigonometric functions as well as addition, subtraction, multiplication, division, and raising to a power. See the MSC.Fatigue User’s Guide for a full description of the MFRM commands and language syntax.
 
File Cut and Paste - MLEN
MLEN allows you to adjust the length of time signals by extracting or deleting sections, and concatenating files. Signals can be reversed and the starting and ending points of each signal can be smoothed. These operations can be on a single file or multiple files simultaneously.
For example, use PTIME to Copy from central the three SAE histories, SAETRN, SAESUS, and SAEBRAKT. Then use MLEN to extract a section from each simultaneously such that each signal is the same length.
1. Invoke MLEN by typing mlen from the system prompt or select the File Cut and Paste option from the Advanced Loading Utilities pull-down menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
2. Select option 2. Extract Section - Multiple File.
3. Select Separate filenames as the Entry Method.
4. Use the file List mechanism/browser to select the three signals, saetrn.dac, saesus.dac, and saebrakt.dac and click the OK button.
5. Select Modify extension and input a new extension such as mod.
6. We want to extract a portion of each signal such that all three become the same length. So set the Window Selection to Time[X-axis] and leave the Start Time at START and change the End Time to 1898 seconds, corresponding to the maximum time of the shortest signal. Click the OK button.
The first 1898 seconds of each signal is extracted and new files called saetrn.mod, saesus.mod, and saebrakt.mod are created. The before and after displays using MMFD are shown below.
Multi-File Manipulation - MMFM
MMFM is a module that allows for addition, subtraction, multiplication, division and vector addition of multiple time signals.
Addition of individual files is as such: file1 + file2 + ... + fileN.
Subtraction of individual files is as such: file1 - (file2 + file3 + ... + fineN).
Multiplication is as such: file1 * file2 * ... * fileN.
Division is as such: file1 / (file2 * file3 * ... * fileN).
Vector addition is performed as follows: (file12 + file22)1/2 or
(file12 + file22 + file32)1/2.
Experiment by taking the three signals from the previous exercise and performing the various arithmetic operations. For example, here is a plot where the three signals were added together. Note that the original signals were of varying length.
 
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 pull-down 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. 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: In
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).
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 pull-down 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 pull-down 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.
Fast Fourier Filtering - MFFF
MFFF uses filtering techniques to remove frequency content from a signal. As an example, invoke PTIME and create a white noise signal:
1. Invoke PTIME and select Add an entry... | white Noise.
2. Call the file noise, enter a description, and click OK. Set the Total Time of Signal to 100 and click OK.
This will create a signal with frequency content at all frequencies. To see this:
3. Invoke MASD (Add an entry... | creaTe psd from time from within PTIME).
4. Accept NOISE.DAC as the file name and all other defaults.
The time signal will be converted to a PSDF and displayed (if Plot Output was turned ON). Since it has frequency content across all frequencies it appears very random looking in the frequency domain just as it does in the time domain.
5. Now invoke MFFF and accept NOISE.DAC as input.
6. Type NOISE2 as the Output Filename.
7. Change the Filter Type to 3 band pass.
8. Set the Lower Edge Cutoff Freq. to 20 and the Upper Edge Cutoff Freq. to 30 and click OK.
9. Again invoke MASD to convert the new signal, noise2.dac to a PSDF and plot it noticing that all frequency content has above 30 Hz and below 20 Hz was removed from the signal.
Butterworth Filtration - MBFL
MBFL also uses filtering techniques to remove frequency content from a signal. If you perform the same steps as the previous section on the MFFF module and perform a Band pass filter between 20 and 30 Hz on the NOISE.DAC file with the new Output Filename set to NOISE3 you will get the top plot to the right. Notice the difference in the filtering between MBFL and MFFF. MBFL allows for some leakage and gives a smoother transition instead of completely eliminating frequency content.
Frequency Response Analysis - MFRA
MFRA performs frequency response analysis and calculates the transfer function of a single input, single response system. Perhaps the most useful application of this module is to compute the cross correlation function between the two supplied response signals. These correlation terms can then be used as input to a vibration fatigue analysis. As an example:
1. Copy over the three files 1pk.asc, 2pk.asc, 3pk.asc.
Using PTIME, select Add an entry... | ASCII convert+load to load these three signals which can be thought of as three input of a multiple load case problem acting simultaneously but in separate locations of an FE model. The Sample Rate must be 50 and X-y pairs must be specified as the Equally Spaced Data option. Quit from PTIME when you are done converting the files. These are large ASCII files and take some time to load.
2. Invoke MFRA from the system prompt by typing mfra or select the Frequency Response Analysis option from the Advanced Loading Utilities pull-down menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
3. Choose Transfer Function Analysis.
4. Set the Input Filename to 1pk.dac and the Response Filename to 2pk.dac. Click OK and continue to click OK accepting the defaults for all other screens except change the Generic Output Filename to pk1_2.
5. When the analysis is done select Results Display and plot All result files.
6. Repeat this for 1pk.dac vs. 3pk.dac and 2pk.dac vs. 3pk.dac using the Generic Output Filename, pk1_3 and pk2_3 respectively.
When the analysis is done, you can then use these PSDF and their cross correlation terms as loading input to a vibration fatigue analysis. By using PTIME you can set up the PSD matrix information for these three input loadings from Add an entry... | Psd matrix, the size of the matrix being 3x3. All the files from the transfer function analysis (*.sxx, *.syy, *.sxy) must be loaded into PTIME first. The matrix of PSDF and cross correlation files would look like this:
pk1_2.sxx or pk1_3.sxx
pk1_2.sxy
pk1_3.sxy
pk1_2.sxy
pk1_2.syy or pk2_3.sxx
pk2_3.sxy
pk1_3.sxy
pk2_3.sxy
pk2_3.syy or pk1_3.syy
Note:  
The diagonal terms in the PSD matrix of PSD and cross term files could also be created using MASD directly.
Statistical Analysis - MRSTATS
MRSTATS analyzes a time signal and produces a number of running statistics about the signal, each of which can be plotted by the standard plotting routines such as MQLD (quick look display), MTPD (two parameter display), or MMFD (multi-file display).
 
 
The statistics that are determined are running: RMS (.rms), Standard Deviation (.rsd), Mean (.mea), Maximum Value (.max), Minimum Value (.min), Absolute Maximum Value (.abs), Area Under Data (.are). Each new signal is defined by its extension. The statistics are determined by breaking the signal into segments and calculating the statistics on each segment. The length of a segment and the overlap of each adjacent segment is user definable. Try running saetrn.dac through MRSTATS. Shown here are the statistical signals produced from running MRSTATS against the SAE signal saetrn.dac.
Header/Footer Manipulation - MFILMNP
MMFILMNP allows you to view and manipulate/change header and extra detail information in any signal. It also can be used to validate the integrity of a file. Use this module if you wish to quickly and easily change axis labels or units and title information or you wish to validate the signal which will try and correct or flag any problems with the file.