Solving Engineering Problems Using MATLAB: Systems of Linear Equations

Legun Emmanwori

South Carolina State University

Mechanical Engineering Technology

EmaiL: lemmanwo@scsu.edu

Author Profile
Initial Publication Date: October 10, 2024

Summary

Linear systems of equations arise in many problems in engineering and science, as well as in mathematics. Students in the Mechanical Engineering Technology program will learn how to use MATLAB in solving three applied engineering problems involving systems of linear equations.

Share your modifications and improvements to this activity through the Community Contribution Tool »

Learning Goals

Use of MATLAB in Solving Systems of Linear Equations

Context for Use

  • The educational level for this activity is senior level with a class size of fifteen (15) students at a four-year college/university
  • The activity is for one week
  • The technical skills and experience are basic MATLAB
  • Students should have taken our M-250, Linear Algebra for Engineering students
  • It is not hard to adapt the activity for use in other courses, such as the numerical part of heat conduction.
  • Basic introduction to MATLAB (matrices and matrix computation)

Description and Teaching Materials

  • There are three applied engineering problems to be completed in this activity.

1. Electrical Circuit Analysis Application: Consider the problem of finding the current in different parts of an electrical circuit, with resistors as shown in Figure 1 below.

Current flows in circuits are governed by Kirchhoff's laws. The first law states that the sum of the voltage drops around a closed loop is zero. The second states that the voltage drop across a resistor is the product of the current and the resistance. For our network in Figure 1 there are three separate loops. Applying Kirchhoff's second law yields the linear system of equations:

  •                                    R6i1 + R1(i1 - i2) + R2(i1 - i3)  =  V1 : Flow around loop I
  •                                     R3i2 + R4(i2 - i3) + R1(i2 - i1)  =  V2 :  Flow around loop II
  •                                    R5i3  + R4(i3 - i2) + R2(i3 - i1)  =  V3 :  Flow around loop III

which simplifies to (see Figure 1and equation 1). Solve for the resistors R1, R2, R3, R4, R5, and R6.





  2.  Statically Determinate Pin-Jointed Truss. Consider the loading of a statically determinate  pin-jointed truss shown in Figure 2  below. The truss has seven members and five nodes, and is under the action of the forces R1,  R2, and R3 parallel to the y-axis.

Applying the equations of equilibrium, method of joints or sections i.e. using the result that at each pin the sum of all forces Fi acting horizontally and vertically is equal to zero, we find the member forces (Fi) obtained from the following system of equations (see Figure 2 and equation 2).      



3. Heat Conduction on a Square Plate. Consider the uniform square plate shown in Figure 3 below. The left face is maintained at 100oC and the top face at 500oC, while th other faces are exposed to an environment at 100oC. By applying a numerical method known as the finite difference, the temperature at the various nodes is given by the solution of the system of equations: (see Figure 3 and equation 3).

 Find the temperature Ti, i = 1, . . . 9.



 

Brief introduction to project (PowerPoint 2007 (.pptx) 447kB Oct27 24)

 



Teaching Notes and Tips

The following reviews will be done before the activities are assigned to the students.

  • Review of Kirchhoff's laws
  • Review of the equations of equilibrium, method of joints or sections
  • Review of the finite difference method

Assessment

  • This is an individual activity to be carried out by each student in the course.
  • Each student will be examined on the output of the three activities and the proper or correct use of MATLAB commands, documentation of each part of the activities, readability, presentation of results, and overall programming abilities.

References and Resources

  • An Introduction to Numerical Methods A MATLAB Approach by Abdelwahab Kharab and Ronald B. Guenther; 3rd E, CRC Press; A CHAPMAN & HALL BOOK