PDA

View Full Version : offering 10 million silvers to solve a math problem



Rjex
05-22-2021, 09:08 PM
A ball valve can be adjusted from 0 to 90 degrees (0 degrees = closed, 90 degrees = 100% open)

I need a formula that takes the angle as an input, and outputs the PERCENTAGE of the valve's open area (0 to 100%)

The relationship is not linear since a ball valve is a sphere turning within a round saddle, so it follows an S shaped curve.

https://s3.amazonaws.com/finehomebuilding.s3.tauntoncloud.com/app/uploads/2012/11/30114422/ball-valve-main.png

https://valveman.com/product_images/uploaded_images/difference-between-a-vented-ball-valve-and-standard-valve-valveman.com.jpg

BriarFox
05-22-2021, 09:15 PM
Interesting. I don't think you can solve this without a least a series of data points for the flow output to create a line of best fit, which can then be expressed as an equation.

Rjex
05-22-2021, 09:19 PM
Interesting. I don't think you can solve this without a least a series of data points for the flow output to create a line of best fit, which can then be expressed as an equation.

That was my initial plan but I think it's just straightforward mathematical relationship there? It's basically one sphere with a cylindrical opening rotating within another sphere with a cylindrical opening, someone with a proper math background would probably know how that relation is expressed.

Rjex
05-22-2021, 09:22 PM
Also to clarify, it doesn't necessarily have to be a single formula per se, it could be a function in C# or ruby, or something I can understand and translate into C#.

Donut
05-22-2021, 09:48 PM
I could be over simplifying here, but here's my shot at it...

Formula here: **I think there's a mistake here**
https://www.desmos.com/calculator/5ozejfb61f
The angle is x ranging from 0 to 90.

Demo here:
https://www.desmos.com/calculator/hgtqvututl
Slider changes the angle and the integral at the bottom gives the area of the black shading as percentage of the red circle.

Rjex
05-22-2021, 09:55 PM
I could be over simplifying here, but here's my shot at it...

Formula here:
https://www.desmos.com/calculator/5ozejfb61f
The angle is x ranging from 0 to 90.

Demo here:
https://www.desmos.com/calculator/hgtqvututl
Slider changes the angle and the integral at the bottom gives the area of the black shading as percentage of the red circle.

That definitely looks plausible... let me try to digest it.

Zanatos
05-22-2021, 09:57 PM
Fock I actually have a noncalculus based answer for this. I guess donut really needs that 10 mil. :)

Rjex
05-22-2021, 09:59 PM
Fock I actually have a noncalculus based answer for this. I guess donut really needs that 10 mil. :)

By all means, do post

Nordred
05-22-2021, 10:05 PM
Kick it.

Rjex
05-22-2021, 10:13 PM
I could be over simplifying here, but here's my shot at it...

Formula here:
https://www.desmos.com/calculator/5ozejfb61f
The angle is x ranging from 0 to 90.

Demo here:
https://www.desmos.com/calculator/hgtqvututl
Slider changes the angle and the integral at the bottom gives the area of the black shading as percentage of the red circle.

I think you're absolutely correct! Any idea if there's some way to express this as a C# function?

At the end of the day I need these two functions:


private double GetAngle(double area){
// blah blah
return angle;
}

private double GetArea(double angle){
// blah blah
return area;
}

But I think I'll make these a separate thing. PM me in game for payment.

Donut
05-23-2021, 06:36 AM
Found a mistake in my formula where I scaled things to 90 degrees.

I'm pretty confident this is better:
https://www.desmos.com/calculator/aqgaa6tmp5

45 degree angle is about 39% open area, 90 degree angle fully open.

Rjex
05-23-2021, 07:01 AM
Shouldn't it have an s curve to it? I gotto log off for a while, will be back later.

dzulthu
05-23-2021, 01:06 PM
I love this entire thread, but also I'm surprised you didn't try to throw this on fiverr or something cheaper

Doomsday
05-23-2021, 02:04 PM
Are the flow rates here not important?

Rjex
05-23-2021, 03:36 PM
I love this entire thread, but also I'm surprised you didn't try to throw this on fiverr or something cheaper

I didn't even think of fiverr....


Are the flow rates here not important?They are but that adds another layer of complications.

rolfard
05-23-2021, 07:04 PM
Ok here is my best answer (from a friend)
valve angle 10degrees flow is 5 %
20 degrees approximate 7% flow
50degrees
Flow increases to approximately25%
At 70degrees
Flow increases to 60%
80 degrees =85%
90degrees 100%

Neveragain
05-23-2021, 08:05 PM
Is this for an automated irrigation system or something?

I haven't put pencil to paper but have been kind of thinking about it off and on today. Something tells me that the correct formula is going to involve the use of pi.

Realk
05-24-2021, 01:00 AM
Is this for an automated irrigation system or something?

I haven't put pencil to paper but have been kind of thinking about it off and on today. Something tells me that the correct formula is going to involve the use of pi.

i'm going to have to agree with that, you wont have the exact number because it's going to be a .xxxxxx

Rjex
05-26-2021, 08:32 PM
This was solved with Donut's integral thing which I now have converted into C# code. Case closed. Thanks for all the interest.