# FE Stiffness Matrix Solution

• posted

Can anyone please help me out on the problem with Finite element program I am facing with? The problem is as follows. I have all elemental stiffness matrices, connectivity table with all nodes & elements and Force vector [F]. I want to solve the structure K*X=F for X(Displacement) without writing the Global Stiffness Matrix [K] to the hard disc. This way lot of memory space can be saved. I wonder how commercial FEA software packages solve 200,000 dof structure without occupying much space on the hard disc whereas if it is to store [K] of size(200000,200000) it is a lot of space oh hard disc.

I am not sure, but I guess, at the time of assembling elemental stiffness matrices only, it has to solve the respective no of equations. This way it can write only that particular solution for those equations. Then it can take the next equations to solve from hard disc to the RAM.

If anyone can throw a light on this problem, it will be very great help for me. Any suggestion on FE coding available, any books to refer or any algorithm to assemble and solve the big structures are greately invited. Please help me out. Thanks for your time. Ravi.

• posted

From: snipped-for-privacy@yahoo.co.in (Ravi)

Your hard disk acts as "storage space". It isn't memory. Essentially, a hard disk is nothing more than a very large floppy disk, only faster. Your "Memory Chips" are what constitutes the memory of your system. In general, your hard disks will have a LOT more storage capacity than your memory chips will. Ideally, the size of your K, X and F matrices will easily fit into your computers memory space. If they don't... your job becomes much more difficult.

They don't store the entire K matrix... 200000x200000 elements ( you'd need at least 320 Gigabytes of memory or hard disk storage capacity for K alone ). Most of the elements of the K matrix have a value of zero. Thus... most of the zeros don't need to be kept in memory anywhere. Chances are you'd only need around 150 MB of memory for storage of K if you don't store all the zeros. Do a web search for stiffness matrix "bandwidth", "half bandwidth", "profile", "envelope" and "skyline". These terms are often used to describe how the non-zero elements of a stiffness matrix band together along the matrix diagonal. If your intent here is to write a computer code to do some analysis.... you simply should not proceed any further without first putting some serious time into studying these terms and how they relate to the solution of simultaneous equations.

For really large matrices, this is often done. But... it's a LOT more difficult. You first need to figure out how to write an efficient equation solver where all of the data fits nicely into your RAM. Then, if need be, think about what to do if your equations are too large to fit into RAM.

I recommend that you first study and write a code to solve "smaller" structures. Then, if you're successful, you'll be much more prepared to think about coding for larger structures. I've never known anyone who could sit down and write a complex program to solve for large structures right from the start. In fact, most people who attempt the smaller programs fail. So, keep it simple in the beginning. This will allow you to have some success as you go and to learn from your success and your failures along the way.

Dan :-)

• posted

The matrix K will be "sparse" - that means that only a *very* small fraction of the entries will be nonzero. You don't need to store all the zeros. You just need to store the value *and* the position of the nonzero elements in a list - it will be easy to fit this in RAM memory.

It is then possible to solve the system K*X=F just by knowing F and the value+position of the nonzero entries in K. However writing codes to do this task well is hard - you should probably look for a library code instead of writing your own.

Many books on finite element analysis include a section on sparse linear algebra, and you really should read one. This will tell you very important properties of K for your problem that will help you choose the correct library routine - e.g: is it "positive definite", symmetric, etc. All these properties are important. I don't know any exact book titles. You could look at the free book at: