       Re: horizontal cylinder

• To: mathgroup at smc.vnet.net
• Subject: [mg26659] Re: horizontal cylinder
• From: "Paul Lutus" <nospam at nosite.com>
• Date: Wed, 17 Jan 2001 00:47:15 -0500 (EST)
• References: <93racv\$57j@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```"Jessie" <jes_alarcos at pacific.net.ph> wrote in message
news:93racv\$57j at smc.vnet.net...
> Hi everyone,
>
> I am not really very good in mathematics and I am not a student.
> So I need help....
> I have tried to derived a general equation for finding the volume of a
> horizontal cylinder given length & diameter of the cylinder, and the
height
> of the liquid inside, all three terms as variables.
>
> I am planning to use the equation to make a simple basic program to
> calculate the volume of the horizontal cylindrical tank without the need
to
> look for a factor from table which uses ratio of diameter and height of
the
> liquid.

Unfortunately, there is no "simple basic program" to solve this problem. It
is soluble in closed form, but not simply.

First, please tell us whether you intend to write this program using
Mathematica or a general-purpose programming language. If the former, here
is one approach.

In these equations, r = tank radius, h = water height in tank, z = tank
length.

(* Provide the basic equation that relates the tank's width to a given
height *)

f[r_,h_] := Sqrt[1-h^2/r^2] 2 r

(* Integrate the above equation from bottom to (h) height, multiply by tank
length (z) *)

ff[r_,h_,z_] := z Integrate[f[r,x],{x,-r,h-r}]

(* Plot the basic equation to reveal why this approach works *)
(* (bottom of tank is at the left, top is at the right) *)

Plot[f[4,x],{x,-4,3}]

(* Example problem with numerical result *)

ff[4,6,9] // N

363.947

I strongly recommend that you not use this result until you understand why
it works. This will also allow you to detect any errors I may have made in
this quick solution.

--
Paul Lutus
www.arachnoid.com

```

• Prev by Date: Re: Mathematica 3.0, 4.0, 4.1 differences in DSolve[]
• Next by Date: Palette to Highlight and Substitute Same Subexpressions?
• Previous by thread: Re: horizontal cylinder