more_1st_week

Download Report

Transcript more_1st_week

Math with fixed number of mantissa digits
Example 6
3 digit mantissa numbers
Objective is to
multiply these two
numbers together.
0.512 x10 1
0.106 x10 2
0.512 x10 1
0.106 x10 2
37020
0000
0542
0.054272
Round off to 3 mantissa digits
0.0543 x 10
3
0.543 x 10
The multiplication with
no constraints
2
Note:
3
x 10
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.
Example shows the philosophy of how it is done.
Alternate approach
(when there isn’t enough digits for intermediate steps)
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!
Lagrangian Control Volume
The reference space
moves and the stuff
in that space moves
because the space is
moving.
Other perspective has
the stuff moving through the
non-moving control volume.
<
<l
linear velocity through
control volume
<g
acceleration of
gravity
<a
acceleration of
control volume
m
Mass flow rate
l = l (t)
m <g = <F
One set of symbol
options to
indicate a vector
>
< l = (l x , l y , l z )
lx
l > = ( ly
lz
lx
Gravitational force
on the object
)
Velocity in x direction
n
Example 7
I=1
resultant
= force
+y
<a
[ m(t) ]
Fn
<
I=1
<g
+ m
The actual force
that is pulling the
control volume up
+x
n
Balance
statement:
<g
<Fn
+z
Develop the mass transport model for material
referenced to the following Lagrangian control volume
<l
resultant
= force
= [ m(t) ]
< F1
+
< F2
<a
= [ m(t) ]
l
( -0, -0, -[m(t)] g ) + ( +0, +0, m z ) = ( 0, 0, +[m(t)] a )
z
z
<a
This vector equation contains three scalar equations. (one for each of the direction components of the vector)
(i)
For the x direction: ( 0) + (0) = 0
l
(ii) For the y direction: ( 0) + (0) = 0
l
(iii) For the x direction: (-[m(t)] gz ) + m z = ( 0, 0, +[m(t)] a z )
(
d( vz (t) ) = - g +
z
l
m z
[m(t)]
)
dt
Note: m(t) = m
m(t) = m
t=0
0
+ mt
+ mt
a =
z
-[m(t)] g + m
z
z
[m(t)]
l
m z
d v (t) = - g +
z
z
dt
[m(t)]
Lagrangian Control Volume
Example 7
+y
<a
<Fn
I=1
[ m(t) ]
<g
+ m
The actual force
that is pulling the
control volume up
+x
n
Balance
statement:
<g
+z
Develop the mass transport model for material
referenced to the following Lagrangian control volume
<l
resultant
= force
= [ m(t) ]
< F1
+
< F2
<a
= [ m(t) ]
l
( -0, -0, -[m(t)] g ) + ( +0, +0, m z ) = ( 0, 0, +[m(t)] a )
z
z
<a
This vector equation contains three scalar equations. (one for each of the direction components of the vector)
(i)
For the x direction: ( 0) + (0) = 0
l
(ii) For the y direction: ( 0) + (0) = 0
l
(iii) For the x direction: (-[m(t)] gz ) + m z = ( 0, 0, +[m(t)] a z )
(
d( vz (t) ) = - g +
z
d( vz (t) ) =
(- gz
l
+
m z
[m(t)]
l
m z
[m(t)]
) dt
) dt
Note: m(t) = m
m(t) = m
t=0
0
+ mt
+ mt
a =
z
-[m(t)] gz+ m z
[m(t)]
l
m z
d v (t) = - g +
z
z
dt
[m(t)]
scalar
the magnitude of
m
mass flow rate
lz
ml z
linear velocity
acceleration
[m(t)]
l
force
l
momentum
m z
m z
Numerical methods for engineers includes units
(i) The three “3 unit” systems
( lenght, mass, time )
cgs
mks
1 gram of stuff
2
accelerating at 1 cm/s
1 gram of stuff
2
accelerating at 1 m/s
Weighs 981 dynes
mass
system
A mass of stuff
accelerating at
“standard” sea level
gravitational value
Weighs 1 Newton
force
system
Weighs 9.8 kg force
The amount stuff that has this weight
has a mass of 1 kg force-s 2/ meter
(ii) 2 “national” systems
British Mass System
1 pound
of stuff
mks
Object
accelerates
American Engineering System
1 slug of
stuff
at 1 ft/sec 2
Object weighs 32.2 poundals
(iii) the “4 unit” system
<
F
= ( 1 ) (mass)< a
g
32.2 lb
ft
mass
1 lb
s2
force
Object weighs 32.2 pounds force
( force, length, mass, time )
Common
in USA
1 lb mass
1 lb
will make 1 lbmass
force
2
accelerate at 32.2 ft/s
Weighs 1 lb force
Example using 4 unit system
Pressure difference
=
(top to bottom)
P = gc
1 acceleration
(mass )(a)(ft )
ft 3
Z
water
density
P = (62.4
lbmass
2
P = (2,020 x 10
ft s 2
water tower is
in Tampa
ft
lb
mass
ft3
) ( 32.2
2
s2
)
the force is lb
mass
32.2 lb
ft
mass
1 lb
s2
force
<F
conversion factor between lb force and lb mass
= (
force
<
F
s2
force
(mass)
=
32.2 lb
ft
mass
1 lb
Note:
<
10 ft
Not typical
pressure units but they are still pressure units.
Since mass is in lb
g =
2
Z = 100 ft
)( 10 ft)
2
a
P
(2,020 x 10
lbmass
ft s 2
1 lb
)(
32.2 lb
s2
ft )
force
mass
1
g
) (mass)
<a
2
= 62.4 x10
lb
force
ft2
The “4 unit” system entertains two density concepts.
g < F = (mass) < a
(force magnitude) (
32.2 lb
ft
mass
1 lb
s2
32.2 lb
32.2 ft
ft
mass
) = (mass) (
)
2
1 lb
s
1 s2
force
force
force density
62.4 lb force
3
1 ft
Both look the same (have
units of pounds per foot
cubed) but each represents
a different concept.
mass density
62.4 lb mass
3
1 ft
g
l
m az
z
m
m
<
< F1
<F
=( 1 )
g
<a
Math with fixed number of mantissa digits
Example 6
3 digit mantissa numbers
Objective is to
0.512 x10 1
multiply these two
numbers together.
The multiplication
with no constraints
0.512 x10 1
0.106 x10 2
0.106 x10 2
37020
Round off to 3 mantissa digits
0000
3
2
0.0543 x 10
0.543 x 10
0542
3
0.054272
x
10
Note: computer does these calculations in the base
2 number system so it is not actually done as outlined above.
Example shows the philosophy of how it is done.
Alternate approach (when there isn’t enough digits for intermediate steps)
Truncate least significant digit that is outside the “digit
space” as soon as it shows up in the calculation
error is created after error is multiplied if
every arithmetic step previous value is put back
into another multiplication.
Bottom Line
When computers calculate bad STUFF happens
so be skeptical of your numerical method results!