**DSM-SOLVER** is based on Direct Stiffness Method. Direct Stiffness Method is implementation of Finite Element Method. It is available in two flavors. One is octave/matlab while other is scilab script and distributed under GNU/GPL v2.0 license.

GNU Octave is free clone of matlab. It is fully compatible with matlab.

Scilab is an open source, cross-platform numerical computational package and a high-level, numerically oriented programming language. Scilab is alternative to matlab.

You can download the source-code of **DSM-OCTAVE-SOLVER** or ** DSM-SCILAB-SOLVER**. To understand how this script works, read the document provided along with the source files. Consider the following example:

The above example can be solved in one of the two scripts explained as under:

For Octave/Matlab example, first define some input variables as:

1 2 3 4 5 6 7 8 |
%define input variables xy = [100 75;0 75;200 0]; %joint coordinates conn=[2 1 1;1 3 1]; %connectivity matrix - i j mprop bc=[2 1 1 1;3 1 1 1]; %boundary conditions mprop=[1e4 10 1e3]; %material properties jtloads=[1 0 -10 -1000]; %joint loads memloads=[1 0 12 200 0 12 -200;2 -6 8 250 -6 8 -250]; %mem end forces |

To run the program, you need to update the directory to src folder, then, write following:

1 2 3 4 |
frame2d %or you can try following command for truss truss2d |

`Note that truss2d has same code as that of frame 2d. You can get pretty accurate result for trusses by considering it as frame.`

For SCILAB example, the input matrices and command for making var01.bin as provided in the preproc.sce file are:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
//pre-processor for pframem.sce. //generate the input matrices and stores in var01.bin //input variables for pframem.sce xy = [100 75;0 75;200 0]; //joint coordinates conn=[2 1 1;1 3 1]; //connectivity matrix - i j mprop bc=[2 1 1 1;3 1 1 1]; mprop=[1e4 10 1e3]; jtloads=[1 0 -10 -1000]; memloads=[1 0 12 200 0 12 -200;2 -6 8 250 -6 8 -250];//mem end forces //store to var01.bin fid = mopen('var01.bin','wb'); save(fid,xy,conn,bc,mprop,jtloads,memloads); mclose(fid); |

To run the program, you need to update the directory to src folder, then, write following:

1 2 3 4 5 |
lines(0) // for uninterepted continuous output of calc exec('preproc.sce',0) // preprocessor for new frame data exec('loadftn.sce',0) // load all functions pf this program. load('var01.bin') // load all input matrix. exec('pframem.sce',0) // run main program and give input for asked matrix by only retyping their names. |

I appreciate the effort, Great Work.