Most Effective 7 Members Truss in Scilab

In summary, the conversation discusses the task of creating an efficient layout for a 7-member truss to be used as a highway sign support. The truss system must be L-shaped and only used for the top horizontal part, with two supports and the sign hanging at the furthest joint. Other constraints, such as size and height, are mentioned but not relevant to the question. The individual is a beginner in Scilab and is seeking guidance on how to approach the problem and find the best layout. They have shared a code they have created to calculate forces and tensions on the truss members, but do not have a function to quantify the "best layout". Suggestions are given for using loops and nested loops to modify coordinates and improve
  • #1
PauloE
28
0
Hello everyone,
I'm attempting to come up with a way to calculate the most efficient 7 members truss layout using Scilab.
The assignment is to make a highway sign support.
  • It has to be L shaped and the truss system is only for the top horizontal part.
  • Two supports.
  • The sign is hanging at the furthest joint.
There are other constrains like size and height but are not relevant for my question.
Since this is my first programming language I do not know how to approach it in order to get the best layout. My professor doesn't require it for the assignment and expects us to change the coordinates of the joints manually and sort of brute force the best layout that way. My idea would be just for extra credit.

Homework Equations


Is this possible given that I only know Scilab language at a beginner level?
What examples can I look at to know where to start?

Thank you all!

The Attempt at a Solution


Here is the most "advanced" thing I've done with Scilab so far:
Code:
//Create matrix called "joints" that stores the values of the coordinates
    //of Joints 1 (first row), 2 (second row) 3(third row)
   
    //Declare my variables (some of them)
    joints = [-3 6;-3 4;7 6]//after a semicolon a new row starts.
    members = [1 2; 1 3; 2 3]
    weight = 850
    wind = 320
   
    //Now we display the matrix
    printf("\n\n")// We add some space to make the console look cleaner
    printf("Coordinates of Joint 1 = x = %3.3f y = %3.3f \n", joints(1,1), joints(1,2))
    printf("Coordinates of Joint 2 = x = %3.3f y = %3.3f \n", joints(2,1), joints(2,2))
    printf("Coordinates of Joint 3 = x = %3.3f y = %3.3f \n", joints(3,1), joints(3,2))
   
    //now we store the coordinates in variables to call them later.
    j1x = joints(1,1)
    j1y = joints(1,2)
    j2x = joints(2,1)
    j2y = joints(2,2)
    j3x = joints(3,1)
    j3y = joints(3,2)
   
    //now we get the distances.
    d13x = abs(j3x - j1x)
    d12x = abs(j2x - j1x)
   
    //now create a matrix from the equilibrium equations.
    A = [1    0    0;
         0    0    1;
         0    0   d12x;]
  
    disp(A, "Matrix A")                 
   
    //matrix B
    B = [wind;
         weight;
         weight*d13x]
  
    disp(B, "Matrix B")
   
    //Solve matrix
    x=A\B
   
    //display results
    printf("\n Ax = %3.3fN\n Cx = %3.3fN\n Cy = %3.3fN\n\n",x(1,1), x(2,1), x(3,1))
   
    //Calculate the distances between the joints to be used later on the unit vector.
    d12 = sqrt( (j2x - j1x)^2 + (j2y - j1y)^2 );
    d13 = sqrt( (j3x - j1x)^2 + (j3y - j1y)^2 );
    d23 = sqrt( (j3x - j2x)^2 + (j3y - j2y)^2 );
   
    //now we calculate unit vectors
    e31x = (j1x - j3x) / d13      //x component of unit vector from 3 to 1
    e31y = (j1y - j3y) / d13      //y component of unit vector from 3 to 1
    e32x = (j2x - j3x) / d23      //x component of unit vector from 3 to 2
    e32y = (j2y - j3y) / d23      //y component of unit vector from 3 to 2
    e12x = (j2x - j1x) / d12      //x component of unit vector from 1 to 2
    e12y = (j2y - j1y) / d12      //y component of unit vector from 1 to 2
   
    //unit vectosr in either direction are the same
    e13x = -e31x
    e13y = -e31y
    e23x = -e32x
    e23y = -e32y
    e21x = -e12x
    e21y = -e12y
   
    //Create Matrix A
    //Coefficients
    //   T12    T13    T23    Ax    Ay    Bx  
    A = [e12x   e13x    0     1     0     0;//JOINT 1 x forces
         e12y   e13x    0     0     1     0;//JOINT 1 y forces
         e21x    0     e23x   0     0     1;//JOINT 2 x forces
         e21y    0     e23y   0     0     0;//JOINT 2 y forces
          0     e31x   e32x   0     0     0;//JOINT 3 x forces
          0     e31y   e32y   0     0     0;//JOINT 3 y forces
]
    //MATRIX M
    B = [0;
         0;
         0;
         0;
         wind;
         weight;]
    x = A\B
   
    //Now print the results
    printf("\n\n T12 = %7.3f LB\n T13 = %7.3f LB\n T23 = %7.3f LB \n", x(1,1), x(2,1), x(3,1))
    printf("\n\n Ax = %7.3f LB\n Ay = %7.3f LB\n Bx = %7.3f LB \n", x(4,1), x(5,1), x(6,1))
 
Physics news on Phys.org
  • #2
Thanks for the post! Sorry you aren't generating responses at the moment. Do you have any further information, come to any new conclusions or is it possible to reword the post?
 
  • #3
Do you have a function that quantifies "best layout"? Something you put your coordinates in, and it tells you how "good" those coordinates are?
That is the interesting part - if you have it, every optimization algorithm can find a good solution, and there are probably algorithms written for Scilab.
 
  • #4
mfb said:
Do you have a function that quantifies "best layout"?
Not at this point on the assignment. But what I mean by most efficient is whichever layout makes the compression and tensions forces to a minimum. I've been looking at the loop function but I'm not really sure how to use it yet.

To reinstate the problem as Mr Bernhardt suggested,

I want to get the layout of a 7 members truss that results on the least compression and tension forces on its members.
 
  • #5
Least maximum compression/tension? Least average compression/tension?

PauloE said:
I've been looking at the loop function but I'm not really sure how to use it yet.
Hmm okay. Then it will get tricky, as a solution will likely need nested loops unless you do some parts manually.

One approach that is relatively easy to implement: start with a reasonable design, modify one coordinate only, calculate the "quality" of the design (see questions above) for various different values of this coordinate with a loop, find the optimal position. Write it in your program, modify the next coordinate. Do this for all coordinates, then your final solution should be better than the initial design. Repeat as long as you like.

A more clever algorithm looks at all coordinates at the same time to find possible improvements, picks the best one and repeats that process until further changes do not improve the design any more.
 

1. What is a 7 members truss in Scilab?

A 7 members truss in Scilab is a type of structure that consists of seven interconnected members or bars, typically made of metal or wood, that are arranged in a triangular shape to form a stable framework. It is commonly used in engineering and construction projects to provide structural support and distribute weight evenly.

2. How is a 7 members truss designed in Scilab?

In Scilab, a 7 members truss can be designed using the truss function, which takes in the coordinates of the nodes and the connectivity matrix of the truss as inputs. The program then solves for the internal forces and displacements using the Finite Element Method.

3. What are the advantages of using Scilab for designing a 7 members truss?

One of the main advantages of using Scilab for truss design is its ability to handle complex and large-scale structures with ease. It also provides accurate and reliable results, thanks to its advanced computational methods. Additionally, Scilab is open-source and free to use, making it accessible to a wide range of users.

4. Can Scilab be used to analyze the stability of a 7 members truss?

Yes, Scilab has built-in functions for analyzing the stability of structures, including trusses. These functions can calculate factors such as the buckling load, critical load, and safety factor, which are essential for ensuring the stability and safety of a 7 members truss.

5. Is there any limitation to using Scilab for 7 members truss design?

While Scilab is a powerful tool for designing 7 members trusses, it does have some limitations. For example, it may not be suitable for real-time simulations or dynamic analysis of the truss. It also requires some knowledge of programming and Finite Element Analysis, which may be a barrier for some users.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
6K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
4
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
14
Views
2K
Replies
5
Views
807
  • Engineering and Comp Sci Homework Help
Replies
0
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
Back
Top