Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equation Library: close analysis of bug c#3 in "Bernoulli Equation" #1401

Open
Wiljea opened this issue Dec 28, 2024 · 2 comments
Open

Equation Library: close analysis of bug c#3 in "Bernoulli Equation" #1401

Wiljea opened this issue Dec 28, 2024 · 2 comments

Comments

@Wiljea
Copy link

Wiljea commented Dec 28, 2024

Here we encounter the "Inconsistent units" error, see below:

P2=25_psi  P1=75_psi  y2=35_ft  y1=0_ft  D1=18_in  ρ=64_lb/ft^3  v1=100_ft/s
@ Failing [ A1=254.46900 4941 in↑2 ΔP=-50. psi Δy=35. ft Q=10 602.87520 59 ft↑3/min M=678 584.01317 5 lb/min v2=122.42131 1569 ft/s A2=207.86332 19 in↑2 D2=16.26836 81217 in ]
@ C#3 NOT OK. MSOLVER: "Inconsistent units", SOLVE: OK for A1;ΔP;Δy;Q;M calculated one at a time in order; NOT OK for v2;A2;D2:
@ "Inconsistent units" while searching for each unknown. It seems that isolating v2 from implicit eqn (1) doesn't work here
'ROOT(ⒺBernoulli Equation;[A1;ΔP;Δy;Q;M;v2;A2;D2];[1_in^2;1_psi;1_ft;1_ft^3/min;1_lb/min;1_ft/s;1_in^2;1_in])'
@Wiljea Wiljea changed the title Equation Library: close analysis of bug c#2 in "Bernoulli Equation" Equation Library: close analysis of bug c#3 in "Bernoulli Equation" Dec 28, 2024
@Wiljea
Copy link
Author

Wiljea commented Dec 28, 2024

Alternate presentation adding one more known value: v2

P2=25_psi  P1=75_psi  y2=35_ft  y1=0_ft  D1=18_in  ρ=64_lb/ft^3  v1=100_ft/s  v2=122.421311569_ft/s
@ Failing [ A1=254.46900 4941 in↑2 ΔP=-50. psi Δy=35. ft Q=10 602.87520 59 ft↑3/min M=678 584.01317 5 lb/min v2=122.42131 1569 ft/s A2=207.86332 19 in↑2 D2=16.26836 81217 in ]
@ C#3 NOT OK. MSOLVER: "Inconsistent units", OK for A1;ΔP;Δy;Q;M solved one at a time NOT OK for A2;D2 wrong values @ are obtained which is strange because eqn (7) should resolve for A2 BUT the value of Q change inadvertently, why?
'ROOT(ⒺBernoulli Equation;[A1;ΔP;Δy;Q;M;v2;A2;D2];[1_in^2;1_psi;1_ft;1_ft^3/min;1_lb/min;1_ft/s;1_in^2;1_in])'

@c3d
Copy link
Owner

c3d commented Jan 19, 2025

The root cause for this one seems to be an actual Inconsistent units caused by
the =0 at the end of the definition of the Bernouilli equation:

'(ΔP_Pa)/(ρ_(kg/m^3))+((v2_(m/s))^2-(v1_(m/s))^2)/2+Ⓒg*(Δy_m)=0'

This fails when the left-hand-side of the equation cannot be reduced to a
unit-less value, e.g.:

-2 283.86297 50002 62206 79154_m·ft/s↑2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants