41 Cistern Program
|
08-13-2016, 08:29 AM
(This post was last modified: 08-13-2016 10:07 AM by wojtek.)
Post: #2
|
|||
|
|||
RE: 41 Cistern Program
(08-11-2016 12:46 PM)SlideRule Wrote: Does anyone have the program listing (key-codes etc.) for the CISTERN program described in the 13 April 1992 edition of Oil & Gas Journal article Simple Program Calculates Partial Liquid Volumes in Vessels? The program listing was available by request to anyone asking with a no-later-than date of 30 July 1992.Firstly sorry for typos, I am lying on a hospital bed and use my smartphone. I don't have this journal, but perhaps this can be of help to you. If I understood your problem cerrectly you would like to know a partial volume of liquid in a cy lindrical vessel set horizontally on the ground, given the depth of liquid in the vessel. I am rather weak at math but after a short search of the internet I found a formula for this problem. Details are on the picture attached. So, given the R and L (radius and lenght of the cistern respectively) and H (measured depth of liquid) the program for 50g could be something like: << -> H << Pi R 2 ^ * 1 H R / - acos * 180 / R H - H R 2 * * H 2 ^ - sqrt * - L * 2 / ->num >> >> Original formula had no division by 2 at the end and gave wrong results for the full and half full vessel. Addind this division by 2 gives correct results for H=0, R and 2R. Hope to help a little PS. 50g should be in degree mode, H is on the stack, R and L in global variables. PS2. The formula is for circular cross-section, for other shapes, eliptical for example would be more complicated |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 9 Guest(s)