Volume of part filled cylinder (On SIDE)-VBForums
Results 1 to 7 of 7

Thread: Volume of part filled cylinder (On SIDE)

  1. #1

    Thread Starter
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622

    Volume of part filled cylinder (On SIDE)

    How Can I Find The Area Of The Blue In the Picture

    Red Line - Height of water (H)
    Yellow Line - Chord
    Green - radius of Circle

    please dont overly compicate things diffrent color lines are just to helf you understand The Yellow line indicates the fill level of a cylinder on its side. How can I Calculate the volume of the water?

  2. #2

    Thread Starter
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622

    Forgot Picture

    oOPS

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    V = 1/3*pi*h^2(3r-h)
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4

    Thread Starter
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622
    I Made This Function with the formula u gave me and it returns 0

    Private Const PI As Long = 3.14
    Private Function GetAreaCovered(Height As Long, Radius As Long) As Currency
    Dim Tmp As Currency

    Tmp = (1 / 3) * PI * Height ^ 2 * (3 * Radius) * Height
    End Function

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    are you after the area or the volume?
    you forgot to return the value and its not the same function either
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    are you after the area or the volume?
    you forgot to return the value and its not the same function either
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  7. #7

    Thread Starter
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622
    I want the volume of the water inside the cylinder. is this how i would do it?
    VB Code:
    1. Private Const PI As Long = 3.14
    2. Private Function GetVolume(Height As Long, Length as Long,Radius As Long) As Currency
    3. Dim Tmp As Currency
    4.  
    5. Tmp = (1 / 3) * PI * Height ^ 2 * (3 * Radius) * Height
    6. GetVolume = Tmp * Length
    7. End Function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.