Script to perform Gaussian elimination with back substitution for 6DOF model
Script to perform Gaussian elimination with back substitution for 6DOF model
(OP)
I was wondering whether anyone had an existing VBA subroutine/function which can perform Gaussian elimination with back-substitution for a 6DOF model (i.e. contains a 6 x 6 stiffness matrix)?





RE: Script to perform Gaussian elimination with back substitution for 6DOF model
https://newtonexcelbach.wordpress.com/2013/03/17/3...
for links to downloads with both 2D and 3D frame analysis routines.
Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/
RE: Script to perform Gaussian elimination with back substitution for 6DOF model
There are a lot of subs in 3DFrame. What is the specific sub/function name that performs this elimination/back-substitution?
RE: Script to perform Gaussian elimination with back substitution for 6DOF model
The matrix solver routines are the same in both though (I think). in 3DFrame:
Go to the P44 sub in mFrameP44.
Scroll down to the comment --------equation solution---------
There are three solvers called there with a Select Case statement:
Case 1: ALLinCGSSolveSparse2; a c# sparse solver using the Alglib library
Case 2: p44BanRed; an Alglib dense solver
Case 3: BanRed; a VBA routine
Banred is in the mFrameP44 module, the other two are in AL_dllSolve.
The stiffness matrix for Banred is passed as a vector, kv. The code for generating that is under ---global stiffness matrix assembly---:
For each element:
Generate the element stiffness matrix using rigid_jointed3 or spring_jointed3
Copy to the kv vector with formkv
The code is all based on Fortran code in Programming the Finite Element Method by Smith and Griffiths. In my copy their program P44 was the basis of the code (hence the name), but the numbering has changed in more recent editions.
Also note that on the Misc sheet you can enter an element number in the cell named kmbeam (N8) and the code will write the km matrix for that element in the range below when you run the solver.
Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/
RE: Script to perform Gaussian elimination with back substitution for 6DOF model
The link still didn't work for me. It stated that 'Frame4.zip might have been moved or deleted'.
Thanks for the explanation on the solver. Am I right in thinking that BanRed will, for all intents and purposes, work for any given number of degrees of freedom since 'n' (which indicates nDOF) is an input? That would mean that if I wanted to have a 2DOF, 4DOF, 6DOF, ?DOF model I could just use that script?
RE: Script to perform Gaussian elimination with back substitution for 6DOF model
Yes, as long as the kv vector is in the right format it will work for a matrix of any size. The only restrictions are the available memory and time. The VBA code is very slow for large matrices, and the compiled versions are much quicker. For a small frame they are all near instantaneous though, and the VBA is much easier for debugging as you can step through the code.
I'm not sure what is happening with the Frame4 download. I'll check it out again.
Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/
RE: Script to perform Gaussian elimination with back substitution for 6DOF model
http://interactiveds.com.au/software/Frame4.zip
I have also re-uploaded the zip file.
Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/
RE: Script to perform Gaussian elimination with back substitution for 6DOF model
Also, I downloaded Frame4 fine. Thanks again.