Simple implementation of a Bouc-Wen model with Mathematica.
Following the article about the implementation of the Bouc-Wen model in Mathematica for sinusoidal excitation, this article demonstrates the use of an arbitrary excitation. The example uses the well-known El Centro excitation. The excitation is hard-coded into the files, but you can use the ReadList[ ] function to read the data from a file. A sample file (el-centro.inp) is also provided if you want to experiment. Note that ReadList[ ] uses a backslash "/" instead of forward slash (as in Microsoft Windows).
The main difference with respect to the previous article with a sinusoidal excitation is the definition of an auxiliary function, GetGroundAcceleration[ ], to return the ground acceleration in-between the points of the excitation data.
A relevant publication is the following:
Note:
Mathematica 9 fails to integrate the differential equation with the message NDSolve::smpf: Failure to project onto the discontinuity surface when computing Filippov continuation at time 0. This is solved by adding the method NDSolve[... , Method -> {"DiscontinuityProcessing" -> False}].
However, DiscontinuityProcessing is unknown in Mathematica 8 or earlier, so there is a need for two versions of the file. Alternatively, one can add NDSolve[... , Method -> If[$VersionNumber > 8, {"DiscontinuityProcessing" -> False}, Automatic] so that the source code remains the same for all versions. I have opted for the separate files, because Mathematica 9 may not be available to you.
[ Bouc-Wen model with arbitrary excitation (Mathematica 7 or 8)] [ Bouc-Wen model with arbitrary excitation (Mathematica 9)] [ El Centro]