Fortran tips

I am relearning Fortran, including the features which have been added since I last used it some twenty years ago.Here is a method for compling a sample Fortran program NAME.F.  This method checks for memory leaks.gfortran -fbounds-check -o NAME NAME.F ./NAMETom’s Fortran programs & related… Read more

Autocorrelation & Cross-correlation

Cross-correlation is a measure of similarity of two waveforms as a function of a time-lag applied to one of them. Autocorrelation is the cross-correlation of a signal with itself. It is a time domain analysis useful for determining the periodicity or repeating patterns of a… Read more

Rainflow Fatigue Cycle Counting

Endo & Matsuishi (1968) developed the Rainflow Counting method by relating stress reversal cycles to streams of rainwater flowing down a Pagoda.  This method is very useful for fatigue analysis. The rainflow method allows the application of Miner’s rule in order to assess the fatigue… Read more

Fourier transform

The following Matlab scripts calculate the Fourier transform of a time history: fourier.zip The main script is: fourier.m The remaining scripts are supporting functions. * * * A Matlab GUI version is included in:  Vibrationdata Matlab Signal Analysis Package * * * See also: Shock… Read more

Shock Response Spectrum

 The most widely used algorithm for the Shock Response Spectrum (SRS) calculation for base excitation is the ramp invariant digital recursive filtering relationship given in: David O. Smallwood, An Improved Recursive Formula for Calculating Shock Response Spectra, Shock and Vibration Bulletin, No. 51, May 1981.… Read more

Solve a System of Linear Equations, Ax=B

Here is a Fortran program which solves a system of linear equations: LIN_EQ.F It is compiled via: gfortran -o LIN_EQ LIN_EQ.F -llapack The program uses the LAPACK subroutine: DGESV * * * A version written in C/C++ is given at:  linear_eq.cpp  It is compiled via: gcc… Read more

MPI

Introduction Message Passing Interface (MPI) is a portable library of subprograms which can be used to facilitate parallel computing. The MPI subprograms can be called from C and Fortran programs. Parallel Computing Parallel computing enables large scale numerical problems to be solved in a timely… Read more