×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Script to perform Gaussian elimination with back substitution for 6DOF model

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

(OP)
Thanks, Doug. I suspected you might have something. The Frame4 link appears to be broken, though I have downloaded 3DFrame okay.

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

LRJ - The Frame4 download worked OK for me. Could you re-try and if it still doesn't work let me know error messages?

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

(OP)
Hi Doug,

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

Quote:

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?

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

(OP)
Thanks, Doug. I imagine a 6x6 matrix should be manageable with the VBA code, but I'll bear the others in mind if I ever get something bigger.

Also, I downloaded Frame4 fine. Thanks again.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

White Paper - How ESI is Helping Move New Medical Device Product to Market Quicker & More Cost Effic
Early Supplier Involvement has long been a strategy employed by manufacturers to produce innovative products. Now, it almost seems like a necessity. Because decisions made in the design phase can positively affect product quality and costs, this can help add value to OEM bottom lines. This white paper will discuss many facets of ESI, including why it’s so valuable today, what challenges limit the benefits of ESI, how cost is impacted, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close