Fatigue Quick Start Guide > Miscellaneous Features > Defining Histogram Matrices
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Defining Histogram Matrices
It is possible to start with a rainflow matrix as the load input (for a single load case only) as opposed to a time history file. There are two ways to do this using PTIME:
1. Convert a load history into a rainflow matrix.
Do this from Add an entry | rainflow Matrix. Select the time history file and click OK. The file will undergo rainflow cycle counting and a new matrix file will be created. This matrix file can then be selected in the spreadsheet on the Loading Info... form instead of a time history. The file will have a .cyh extension instead of a .dac extension.
 
Hint:  
A Fast Analysis (on the Job Control... form) does exactly this. It converts the load history to a rainflow matrix and then simply scales the histogram according to the stress or strain instead of doing a rainflow cycle count for each location for a single load case analysis.
2. Import an ASCII definition of a matrix.
This is also done under Add an entry | rainflow Matrix, in a very similar fashion as reading an ASCII time history. The format of the ASCII file takes on a specific form however. It is possible to define the matrices in two forms:
Range Bin - Mean Bin - Number of Cycles
Range Value - Mean Value - Number of Cycles
As an example let us say we want to define a load to have the following spectrum:
 
Number of Cycles
Range
Mean
5
2.0
0.0
10
1.0
0.5
10
1.0
-0.5
20
0.5
1.0
20
0.5
-1.0
Create a file with the following format and numbers:
 
#V6.0
# Example using range_mean_data
BINS=32
MEAN_MIN=-1.1
MEAN_MAX=1.1
RANGE_MIN=0
RANGE_MAX=2.1
RANGE_MEAN_DATA:
2 0 5
1 0.5 10
1 -0.5 10
0.5 1 20
0.5 -1 20
END_DATA
Note that the file defines the number of bins (32, 64, or 128), the maximum and minimum values on the x and y axes (range and mean) and then specifies the range and mean data that will be placed in the bins. The values in the RANGE_MEAN_DATA are <range value>, <mean value> and <number of cycles>. The maximum and minimum values on the x and y axes must be slightly larger than the largest specified range and/or mean value for any bin. This file results in the matrix shown to the side.
 
Note:  
The maximum and minimum values of the range and mean axes will determine the accuracy of the matrix. Each entry in the ASCII file must be able to fall into a unique bin or an error will occur on import.
Run PTIME and select Add an entry | rainflow Matrix. Then specify to input the matrix via an ASCII file and select the file that you created. Give the matrix the name “range” and import the file as Force in Newtons. Be sure to give it a description also. Then plot the entry.
If you know what bins to place cycles in you can define the ASCII file in terms of
#V6.0
# Example using bin_data
BINS=32
MEAN_MIN=-1.1
MEAN_MAX=1.1
RANGE_MIN=0
RANGE_MAX=2.1
BIN_DATA:
31 15 5
16 9 10
16 23 10
8 2 20
8 32 20
where BIN_DATA now replaces RANGE_MEAN_DATA and the data to be entered is <range bin number>, <mean bin number>, and <number of cycles>. If you import this file it should give you a matrix that looks equivalent to the one shown for our RANGE_MEAN_DATA values.