26.12.2014 Views

Introduction to and Andy Ruina and Rudra Pratap

Introduction to and Andy Ruina and Rudra Pratap

Introduction to and Andy Ruina and Rudra Pratap

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 0. Preface 0.2. A note on computation 19<br />

3. Giving physical interpretation of the mathematical solution.<br />

This book is primarily about setup (a) <strong>and</strong> interpretation (c), which are rather<br />

the same, no matter what method is used <strong>to</strong> solve the equations. If a problem<br />

requires computation, the exact computer comm<strong>and</strong>s vary from package <strong>to</strong><br />

package. And we don’t know which one you are using. So in this book<br />

we express our computer calculations using an informal pseudo computer<br />

language. For reference, typical comm<strong>and</strong>s are summarized on page 21.<br />

Required computer skills<br />

Here, in a little more detail, are the primary computer skills you need.<br />

Linear algebraic equations. Many mechanics problems are statics or<br />

‘instantaneous mechanics’ problems. These problems involve trying<br />

<strong>to</strong> find some forces or accelerations at a given configuration of a system.<br />

These problems can generally be reduced <strong>to</strong> the solution of linear<br />

algebraic equations of this general type: solve<br />

3 x C 4 y D 8<br />

7 x C p 2 y D 3:5<br />

for x <strong>and</strong> y. In practice the number of variables <strong>and</strong> equations can<br />

be quite large. Some computer packages will let you enter equations<br />

almost as written above. In our pseudo language we would write:<br />

set = { 3*x + 4*y = 8<br />

-7*x + sqrt(2)*y = 3.5 }<br />

solve set for x <strong>and</strong> y<br />

Other packages may require you <strong>to</strong> set up your equations in matrix form<br />

<br />

3 p 4 x 8<br />

D or Az D b<br />

7 2 y 3:5<br />

„ ƒ‚ …<br />

A<br />

„ƒ‚…<br />

z<br />

„ ƒ‚ …<br />

b<br />

which in computer-speak might look something like this:<br />

A = [ 3 4<br />

-7 sqrt(2) ]<br />

b = [ 8 3.5 ]’<br />

solve A*z=b for z<br />

where A is a 2 ¢ 2 matrix, b is a column of 2 numbers (the ’ indicates<br />

that the row of numbers b should be transposed in<strong>to</strong> a column), <strong>and</strong><br />

the two elements of z are x <strong>and</strong> y. For systems of two equations, like<br />

above, a computer is hardly needed. But for systems of three equations<br />

pencil <strong>and</strong> paper work is sometimes error prone. Given the tedium,<br />

the propensity for error, <strong>and</strong> the availability of electronic alternatives,<br />

pencil <strong>and</strong> paper solution of four or more equations is an anachronism.<br />

Plotting. In order <strong>to</strong> see how a result depends on a parameter, or <strong>to</strong> see<br />

how a quantity varies with position or time, it is useful <strong>to</strong> see a plot.<br />

Any plot based on more than a few data points or a complex formula is

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!