************************** VOLSBMSPH 1.0 ********************************
*									*
*			Archimedes Simulation				*
*									*
*			DSB Scientific Consulting			*
*			Lugoff, SC					*
*			dsbscience@cetlink.net				*
*									*
*************************************************************************

*** Contents of this file ***

Contents
System Requirements
Introduction
Why Use the Program?
Using the program
License/Distribution
Tech Support/Contact Information

*************************************************************************

			*** System Requirements ***

The program should run properly on any computer running MS Windows 98
or later with a Pentium or later processor.

To open the source code/project, MS Visual Basic is required.  If you 
have a different BASIC compiler, it should be possible to port the 
VolSbmSph.frm file rather easily.

The program MAY be ported to C in the future to be distributed on 
additional platforms.  This is not definite, however.

*************************************************************************

			*** Introduction ***

This program is a simple Archimedes Demo that can be used to explore
several aspects of the physics of a spherical float.  

A basic hull can be considered by 'ignoring' the top half of the sphere.
That is, one can assume the hull is a semi-sphere.

This software is meant as an educational demo only.  In no way should 
results be used in the actual design of floatation.  No warranty is offered or implied.

A future version will include a cylindrical hull which would better
approximate a round bottomed boat hull.

*************************************************************************

			*** Why use the Program? ***

Why use this software? The simple answer is education.  The program was
designed to be used in a Physics Laboratory or Home-Schooling
environment.  Many basic Physics programs include the study of 
Archimedes Principle both in theory and via experiment.  The purpose
of this program is NOT to replace actual experimental exploration of
Archimedes Principle, but to extent the study to areas beyond what can
be 'easily' done in an instructional lab setting.

Many Archimedes labs involve simply proving the law that mass of the
displaced volume will equal the buoyed mass.  Further, these labs
emphasize that a comparison of densities can be used to determine if
an object will float or sink.  More quantitative experiments can be done
using cubic 'floats' to explore the 'amount' of an object that sinks,
as mass can easily be stacked on top of a cube to sink the object
further (and a rule can lie along the vertical edge).

The volume displaced is a linear function of the depth sunk for a cube.
Therefore, the depth vs. mass (of interest in float or hull design) is
also a linear function.  However, few floats or boat hulls are cubic
shapes; many involve curves, and a sphere represents a simple float.

It is more difficult (but certainly not impossible) to experimentally
determine the depth sunk as a function of mass of the float for a sphere.
This program can be used to explore this behavior, extending the
experimental study of Archimedes Principle to areas (and non-linear
behavior) that require more experimental design than intro labs often
employ.  In other words, this program does not replace existing lab
exercises of Archimedes Principle, but extends the study.

In addition, the use of the simulation introduces the student to the
important field of computer simulation for studies that have difficult
experiments.  It is important to note that the same fundamental theory
demonstrated by the Archimedes experiments done in lab is used in the
simulation.  So, but using both experiment and simulation, the student
learns of a tremendous tool in scientific exploration: mathematical
modeling.

*************************************************************************

			*** Using the Program ***

There is no included "HELP" in the program, so a brief outline will be given here.  A future revision may include instructions in a "HELP" package.

There are three parameters that can be set by the user: the mass of the sphere, the radius of the sphere, and the density of the fluid.  You must specify the mass and radius; there is no provision for simply inputting the sphere density.

Clicking "Compute" will solve the buoyancy equation for the depth submerged. The ouput from the calculation is given two ways: The 2d representation of the sphere will 'float' at the appropriate depth in the picture window, and the actual waterline from 'keel' is given.

When the sphere density = the fluid density, the sphere just barely floats.  In this condition, the waterline is at 2 * radius.  If the sphere density is greater than the fluid density, the program outputs "the sphere is completely submerged."

Before doing these simulations in a Physics Lab course, the student
should already be familiar with Archimedes Principle and preferably
have already performed analogous experiments with cubic objects.

The sphere floats different from a cube.  A floating cube sinks in 
a linear fashion as mass is added.  However, the sphere's buoyancy 
response to adding mass depends on how deep the hull sinks.  In other
words, adding 10 lbs to a floating ball will sink it a different amount
depending on how much mass the ball is already supporting!
Here is an 'experiment' that may be useful to explore the buoyancy characteristics of the sphere.

A.  Buoyancy Response To Mass

1. Do repeated calculations at different masses between 0 and the maximum floatable mass, recording the computed waterline for each mass.

2. Using Excel or some other program, graph the data, waterline vs. mass (mass on the x-axis, waterline on y-axis).

3. At what waterlines is the sphere easier to sink?  What waterlines does it more strontly resist sinking? What waterline would be 'ideal' as a working waterline?

B. Fluid Density Effect

The more dense the fluid, the more dense object it will support.  The waterline on the sphere will thus depend on the density of the fluid.  The results in Part A suggest that the waterline difference between two
fluids would depend on the mass the sphere is supporting.  (This is
important in ship design since seawater has a different density than
fresh water).

1. Repeat the calculations in Part A with a different fluid density.

2. Calculate the difference between the waterline at each mass.

3. Plot the waterline difference vs. mass.

4. Describe this effect.

The ability to compute other shapes may be added in a future revision. 

*************************************************************************

			*** License/Distribution

1. You are licensed to use this program under the license included in
the file license.txt.  Please read for the license details.

2. You are free to distribute this program under the terms of the 
license.  If you give this program to anyone, please read and 
understand the terms of the license.

3. The MS Visual Basic source code and project files are included 
in the distribution.  You are free to modify the code as you wish
or use any portion in another program, provided the terms of the GPL 
are met.  If you modify the program, please transmit your changes to 
the developer for possible inclusion in the base code.  You will be 
duly acknowledged.

4. DSB Scientific Consulting is providing this simple visual demo
free of charge.  Donations will be accepted and appreciated, but are not
necessary.  Contact information is given under "Technical Support."

*************************************************************************

		*** Technical Support / Contact Information ***

This software is published by:

DSB Scientific Consulting
Lugoff, SC
(803) 408-2729
dsbscience@cetlink.net
www.dsbscience.com

There are no help files in the project yet, but they may come (time permitting).  This section outlines some known possible issues.
If you observe a bug or unexpected behavior, have a suggestion for
another demo or simply have a question, feel free to call or email.
Email or posting on the dsbscience.com forum is the best way to 
contact DSB Scientific.

The function that describes what we are calling 'waterline' for the
simple sphere is:

R * z^2 - 1/3 z^3 - (MassOfSphere)/(Pi * FluidDensity) = 0

where

R is the sphere radius

z is the 'waterline' from "keel" distance (z^2 is z squared, z^3 is
z cubed)

This is a cubic equation, so the behavior is (as shown in the exercise
in Part A above) non-linear.  This equation is easily solved for z
on computer using the numerical technique Newton Raphson (NR)
iteration.

Basically, NR starts with a 'guess value' for z and repeatedly updates
that value using the NR equation.  However, due to the shape of the 
cubic function above, there can be some problems.

The first problem is that that the NR procedure may not find a value at
all.  In computational terms, the solution 'blows up.'  To keep the 
program from crashing, there is a basic counter that counts how many
times the solution is improved.  If it hits 10,000, the program just
stops, and a 'no convergence' message is displayed.

The second problem is that a cubic function may have up to three 
mathematically correct solutions (all three satisfy the equation), but
only one is physically meaningful.  There are a couple of ways this
can be addressed, but this simple demo does not get too fancy.
Therefore, the NR solver can find one of the 'wrong' solutions (they
are not wrong in the mathematical sense, just not appropriate for the
floatation problem).

Both of these problems may arise from a bad choice for the initial
guess that the NR procedure needs to get started.  The NR routine in 
the program has a 'guesser' algorithm that tries to pick a good initial
guess based on the ratio of densities (of the sphere and fluid), but it
sometimes may not work well.

What will you observe if the NR solver either blows up or finds the
wrong solution?  There are several possible symptoms.  First, the blow-up
will give a message on the screen.  The other case is less predictable.
There are three symptoms:

1.  If you are doing repeated calculations at different masses, you may notice a JUMP in the z value.  For example, you might see:

Mass		z
10		2.3
12		2.4
14		2.6
16		7.3

This behavior doesn't seem right intuitively, and it is not.  What has happened is that the NR solver went to the wrong solution.  In this case, 7.3 is a solution to the equation, but does not make physical
sense; there should not be a 'sudden' change in the depth.

2.  In repeated calculations, the circle may disappear when it was 
smoothly sinking (or rising).

3.  The circle may 'jump' above the surface of the fluid and seem to
'float' in the air.

Both (2) and (3) should also have (1) as a symptom.

At this point, there is nothing the user can do, except change the 
parameters of the calculation (such as the radius of the sphere).  The
guesser algorithm is fairly well tested for small spheres of a few cm.
If you use larger spheres, the guesser may fail to produce a good
initial guess.

A future revision may include a smarter guesser, or the ability to test
the solution against nearby solutions to evaluate possible meaningness.
Additionally, the ability for the user to manually enter an initial guess
may be added.

*************************** End of File *********************************
