math with fixed number of mantissa digits example 63 digit mantissa numbers 0.106 x10 2 0.512 x10 1...

9
th with fixed number of mantissa digits Example 6 3 digit mantissa numbers 0.106 x10 2 0.512 x10 1 0.512 x10 Note: Objective is to multiply these two numbers together. 37020 0.106 x10 2 0542 0.543 x 10 2 0000 The multiplication with no constraints 0.054272 x 10 1 3 0.0543 x 10 3 Round off to 3 mantissa digits Example shows the philosophy of how it is done. Alternate approach Truncate least significant digit that is outside the “digit space” as soon as it shows up in the calculation error is created after every arithmetic step error is multiplied if previous value is put back into another multiplication. Bottom Line When computers calculate bad STUFF happens so be skeptical of your numerical method results! (when there isn’t enough digits for intermediate steps) Computer does these calculations in the base 2 number system so it is actually done as outlined above but with 1’s and 0’s.

Upload: agnes-ross

Post on 28-Dec-2015

220 views

Category:

Documents


0 download

TRANSCRIPT

Math with fixed number of mantissa digitsExample 6 3 digit mantissa numbers

0.106 x1020.512 x101 0.512 x10

Note:

Objective is to multiply these two numbers together.

37020

0.106 x102

05420.543 x 102

0000

The multiplication with no constraints

0.054272 x 10

1

3 0.0543 x 10

3Round off to 3 mantissa digits

Example shows the philosophy of how it is done.

Alternate approach

Truncate least significant digit that is outside the “digit space” as soon as it shows up in the calculation

error is created after every arithmetic step

error is multiplied if previous value is put back into another multiplication.

Bottom Line

When computers calculate bad STUFF happens so be skeptical of your numerical method results!

(when there isn’t enough digits for intermediate steps)

Computer does these calculations in the base 2 number system so it is actually done as outlined above but with 1’s and 0’s.

Lagrangian Control Volume

<

g

>One set of symbol options to indicate a vector <

linear velocity through control volume

> =

y

x

y

z= ( , , )

)(

m

[ m(t) ]

= (t)

=

x< F

acceleration of gravity

< aacceleration of control volume

Mass flow rate

< g

Velocity in x direction

x

Balance statement:

I = 1

n

< Fn =resultant force

Gravitational force on the object

The reference space moves and the stuff in that space moves because the space is moving.

Other perspective hasthe stuff moving through the non-moving control volume.

<

< a

Example 7

n

< Fn

=

resultant force

Develop the mass transport model for material referenced to the following Lagrangian control volume

=

< a +

(ii)

The actual force that is pulling the control volume up

< g

[ m(t) ] < F = < a + 2< F 1

< m

m

[ m(t) ]

For the y direction:

z

[m(t)]

I = 1

( +0, +0, )

=

+x

+z

+y

<

This vector equation contains three scalar equations. (one for each of the direction components of the vector)

( 0) + (0) = 0

(i) For the x direction: ( 0) + (0) = 0

For the x direction:(iii)

( -0, -0, -[m(t)] )gz

+

zm az

( 0, 0, +[m(t)] )=

( 0, 0, +[m(t)] )(-[m(t)] )

zm - gz +

gz

zm + az

=

az [m(t)]

zm -[m(t)]

gz+

=

dtd( )v (t)z

[m(t)]

zm - gz +=

dtd v (t)z

)(Note: tm

t=0+

m

m(t) =

m tm0

+m(t) =

< g

Lagrangian Control Volume

[ m(t) ]

Balance statement:

< a

Example 7

n

< Fn

=

resultant force

Develop the mass transport model for material referenced to the following Lagrangian control volume

=

< g < a +

(ii)

The actual force that is pulling the control volume up

< g

[ m(t) ] < F = < a + 2< F 1

< m

m

[ m(t) ]

For the y direction:

I = 1

( +0, +0, )

=

+x

+z

+y

This vector equation contains three scalar equations. (one for each of the direction components of the vector)

( 0) + (0) = 0

(i) For the x direction: ( 0) + (0) = 0

For the x direction:(iii)

( -0, -0, -[m(t)] )gz

+

zm az

( 0, 0, +[m(t)] )=

( 0, 0, +[m(t)] )(-[m(t)] )

- gz

gz

zm + az

=

az [m(t)]

zm -[m(t)]

gz+

=

[m(t)]

zm

d( )v (t)z

[m(t)]

zm - gz +=

dtd v (t)z

(

Note: tmt=0

+m(t) =

m tm0

+m(t) =[m(t)]

zm - gz += dtd( )v (t)z )(

[m(t)]

zm + dt)

z

zm momentum

acceleration

force

mass flow rate

scalar

m

the magnitude of

zm

linear velocity

Numerical methods for engineers includes units

mks

(iii) the “4 unit” system

A mass of stuff accelerating at “standard” sea level gravitational value

Weighs 9.8 kg force

cgs

1 gram of stuff accelerating at 1 cm/s

2

Weighs 981 dynes

mks

1 gram of stuff accelerating at 1 m/s

2

Weighs 1 NewtonThe amount stuff that has this weight

has a mass of 1 kg force-s / meter2

( force, length, mass, time )

force system

mass system

(i) The three “3 unit” systems

(ii) 2 “national” systems

( lenght, mass, time )

1 slug of stuff

American Engineering System

Object weighs 32.2 pounds force

1 pound of stuff

Object accelerates

at 1 ft/sec 2

British Mass System

1 lb mass

< a < F = ( )g1

Common in USA

Object weighs 32.2 poundals

Weighs 1 lbforce

1 lbforce

will make 1 lbmass

accelerate at 32.2 ft/s2(mass)

2s1 lb force

32.2 lb ftmass

Example using 4 unit system

10 ft2

Not typical pressure units but they are still pressure units.

Z = 100 ft

water tower is in Tampa

P

P

2

= (2,020 x 10 )2sft

lbmass

water density

= Zacceleration

( )mass

ft3(a)(ft )

1P = g cPressure difference (top to bottom)

Since mass is in lbmass

the force is lbforce

< a = = lb

force

2ft

2s1 lb force

32.2 lb ftmass

< F

conversion factor between lb and lb mass force (mass) < a = ( )g1

< F

P= (62.4 )ft3

lbmass 2

( 10 ft)s2

ft( 32.2 )

(2,020 x 10 )2sft

lbmass 62.4 x10

2s1 lb force

32.2 lb ftmass

(mass) ( )2

2

2s1 lb force

32.2 lb ftmassg =

Note: The “4 unit” system entertains two density concepts.

< a < F = (mass)2s1

32.2 ft(force magnitude) ( ) = (mass) ( )

2s1 lb force

32.2 lb ftmassg

2s1 lb force

32.2 lb ftmass

31 ft

62.4 lb massmass densityforce density 31 ft

62.4 lb force

Both look the same (have units of pounds per foot cubed) but each represents a different concept.

a

< F 1

<

gz

zm

< a < F = ( )g1

Math with fixed number of mantissa digitsExample 6 3 digit mantissa numbers

0.106 x1020.512 x101 0.512 x10

Note:

Objective is to multiply these two numbers together.

37020

0.106 x102

05420.543 x 102

0000

The multiplication with no constraints

0.054272 x 10

1

3 0.0543 x 10

3Round off to 3 mantissa digits

computer does these calculations in the base

Example shows the philosophy of how it is done.

Alternate approachTruncate least significant digit that is outside the “digit space” as soon as it shows up in the calculation

error is created after every arithmetic step

error is multiplied if previous value is put back into another multiplication.

Bottom Line

When computers calculate bad STUFF happens so be skeptical of your numerical method results!

(when there isn’t enough digits for intermediate steps)

2 number system so it is not actually done as outlined above.