next up previous
Next: Structures Up: Overview of C++ Previous: Activity

Practical Problems

In this section some practical problems are introduced that need programming.
1.
A projectile is launched at A with a muzzle velocity vo=300 m/sec as shown. If L=4 km and h=1 km, determine the fringe angle $\theta$ which will permits the projectile to hit the target at B? To help you out the equations of projectile motion can be rearranged to be as

\begin{displaymath}
\tan^{2}{\theta}-\frac{2v_{o}^{2}}{gL}\tan{\theta}+
\left(1+\frac{2v_{o}^{2}h}{gL^{2}}\right )\end{displaymath}

Write a program to solve for $\theta$


 
Figure 2.1:
\begin{figure}
\epsffile{hw4f5.eps}\end{figure}

2.
In doing force analysis on systems one may arrive in situations that require solving a system of linear equations.

Consider the following example: The body mass is 250 kg and is supported by the flexible system shown. For a designer it is required to find the tension in cables A, B, C and D.


 
Figure 2.2:
\begin{figure}
\epsffile{figsy.eps}\end{figure}

If the system is in equilibrium the force analysis will lead to

\begin{displaymath}
T_{C}=\frac{W}{sin(60)}=2831.9\end{displaymath}

TD=TCcos(60)=1415.9

TBcos(30)-TAcos(40)=TCcos(60)

TBsin(30)+TAsin(40)=TCsin(60)

the last two equations can be rewritten as

0.866TB- 0.766TA=1415

0.5 TB+ 0.643 TA=2452.5

The last two equations become a system of linear equations.

Write a program to solve for the values of unknowns in a system of two linear equations.

a11x1+a12x2=b1

a21x1+a22x2=b2

The need to write a program increases if the values of the angles in the previous example are still undecided and the engineer needs to make a decision on the type of cords to use and the space limitation. Add parts in your program to accommodate for the additional calculations.(Hint. Tabulate your results based on fixing one angle and calculate for different values of the other angles)


next up previous
Next: Structures Up: Overview of C++ Previous: Activity
Yousef Haik
2/23/1998