Ask Your Question
0

Entering complex formulas in Calc

asked 2020-07-30 15:05:55 +0200

SteveH_66 gravatar image

I am trying to add a formula on a worksheet in Calc. It is a complex formula, and I have tried all kinds of ways to enter it but none of them work - I always get an "invalid argument" error or something like that. It is the formula for calculating the volume of a substance (usually a liquid) in a tank (cylinder) of a certain radius and height.

Here is the formula (as I understand it)

 L(R^2 cos-1 ((R-D)/R) - (R-D) sqrt(2RD-D^2)

where: R is the radius of the cylinder. D is the depth. L is the length of the cylinder


That is the best I can do on the formula, as this text editor doesn't have some ways (that I can see) to express some things in the formula (squared, square root, cos-1 is actually cos^-1 [I think], etc). I hope it is not forbidden to post links to something in a question post, I am going to have to hope it isn't --- so that anyone reading this that might know how to set up this formula can look at it and give me some help. link text.

I knew that R D and L would have to have their own cells, and did that. I thought maybe cos needed to be worked separately in it's own cell, so I did that. And I figured maybe the square root would need to be done in it's own cell so I did that. Still no luck. Always get the error. Any help that someone could give me on this would be greatly appreciated. Thanks!



edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2020-07-30 16:09:30 +0200

Opaque gravatar image

updated 2020-07-30 16:09:50 +0200

Hello,

asssuming:

Radius in cell B3
Length in cell B4
Depth in cell B5 (I'd call this fill height or liquid height)

then the formula is:

=B4*(B3^2*ACOS(1-B5/B3)-(B3-B5)*SQRT(2*B3*B5-B5^2)) where I set (R-D)/R = 1-R/D)

See also the following sample file: C:\fakepath\Cylinder.ods

Please note The sample file or its formula doesn't contain any checking (e.g. Depth must not be grater than 2*Radius)

Hope that helps.

edit flag offensive delete link more

Comments

That worked great Opaque! Many thanks

SteveH_66 gravatar imageSteveH_66 ( 2020-07-30 17:03:41 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-07-30 15:05:55 +0200

Seen: 37 times

Last updated: Jul 30