The frame analysis spreadsheet presented in the previous post has been updated to use the solvers included in the Scipy package. There is now an option to use either the Cholesky solver, or an iterative sparse solver. The main advantages of this change are:
- Cholesky factorisation is the same method as used in the original Fortran code, but the Scipy solver makes better use of multi-core processors, and is significantly faster for large frames.
- For very large frames the iterative sparse solver provides much better performance, and will work with much larger frames without hitting memory limits.
In addition to linking to the Scipy functions it was necessary to modify the format of the stiffness matrix. The Cholesky function uses a lower triangle banded format, and the sparse solver uses a COO sparse format (see the Scipy manual for details). Using Python to generate these matrices was found to be very slow, so short Fortran routines were added to the main module.
As before, the new spreadsheet and related files, including full open source code, may be downloaded from:
See the previous post for details of software required, and installation details.
In addition to the 3D frame with 1476 beams used in the previous post, two larger frames were analysed, with 7065 beams:
For the frame used in the previous post the new solvers made little difference to performance, but with the first of the larger frames the time for the first iteration using the Fortran solver increased from about half a second to between 15 and 60 seconds, depending on the numbering system. Using the Scipy Cholesky solver, this was reduced to about 1 second for the first iteration (including the matrix factorisation stage), and about 0.5 seconds for each subsequent iterations, allowing iterative solution of 8 non-linear load stages in abut 90 seconds:
As before, beam shears and moments were compared with results from the Strand7 package, showing good agreement: