Post Reply 
SOLVE for Function Vectors
05-27-2018, 08:25 PM
Post: #3
RE: SOLVE for Function Vectors
Hi Mark,

Thanks for the welcome. After a 20 year hiatus from programmable calculators spent mostly on Excel sheets I'm back into programming.

I´m a Chemical Engineer working in an Oil refinery in the Middle East.

It all started with Pump Curves. Since the statistics and curve adjustment is super friendly, plus the polynomial coefficients have more significant digits, hence more accuracy. I basically simulated the pump curve parameters for a series of pumps.

It all started with the need of having pump curves in the palm of my hand. Head, Efficiency, Power and NPSH all as a function of the flow Q. So I made separate programs for each variable of each Pump. The functions are described below.
H(Q)= Head as a function of flow Q. 4th Degree polynomial.
Eff(Q)= Efficiency as a function of flow Q. 3rd degree Polynomial.
SP(Q)=Shaft power as a function of flow Q. Linear.
NPSH(Q)= Net Positive Suction Head as a function of flow Q. Exponential.

All well here, then I ask myself, what if I just make a program to return all these functions at once by just entering the flow?
Then I faced my first road block: You cant use RETURN multiple times in the program, it will only return the function on the first return line.
Then I bump into this tutorial blog by Eddie Shore:
https://edspi31415.blogspot.com/2013/10/...8245762045
The Solution: A Vector!
So you basically would type:
RETURN [H(Q),Eff(Q),SP(Q),NPSH(Q)];

Of course not these expressions as is, but the respective actual Polynomials or Functions.
Now I have a program that returns all the information at once by entering the flow.

The thing is that now my calculator is cluttered with the vector program and the individual functions.
So end up with programs like
PUMP1H(Q)
PUMP1Eff(Q)
PUMP1SP(Q)
PUMP1NPSH(Q)
And the Vector expression which groups them all.
PUMP1HEPN(Q)
Here´s my conundrum...I have more than 20 pumps to look after.I have done this for only 4 so far so it would take 100 programs to scroll through to solve the function.

Generally, on the field, the easiest of these functions to solve for Q is the head. Power is also relatively easy to estimate.

So when I want to check the flow against the flow meter I would determine the head, lets call it h, and use use for example

SOLVE(PUMP1H(Q)=h,Q); h i an actual number in this case.
Then the Prime will return the flow Q.

What I want to accomplish is just to keep the vector program to declutter the scrolling list then solve using the only known value is h.

Something like:
SOLVE(PUMP1HEPN(Q)=[h,unknown,unknown, unknown]);

In this part I have not succeded so far and where I am looking for someone to give me a clue on how to proceed.

Greetings from the desert,
Boris


Attached File(s) Thumbnail(s)
   

Nomad VeHr

HP-27, HP-67 ( both legacy), Casio FX880P, HP-35S, WP34S, DM42, HP Prime.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
SOLVE for Function Vectors - NomadVehr - 05-26-2018, 10:51 PM
RE: SOLVE for Function Vectors - mfleming - 05-27-2018, 06:17 AM
RE: SOLVE for Function Vectors - NomadVehr - 05-27-2018 08:25 PM
RE: SOLVE for Function Vectors - NomadVehr - 05-29-2018, 04:39 PM
RE: SOLVE for Function Vectors - NomadVehr - 06-01-2018, 02:40 PM
RE: SOLVE for Function Vectors - NomadVehr - 06-02-2018, 05:16 PM
RE: SOLVE for Function Vectors - NomadVehr - 06-04-2018, 08:10 PM
RE: SOLVE for Function Vectors - NomadVehr - 06-05-2018, 03:21 PM
RE: SOLVE for Function Vectors - NomadVehr - 06-05-2018, 07:50 PM
RE: SOLVE for Function Vectors - NomadVehr - 06-10-2018, 03:26 PM
RE: SOLVE for Function Vectors - NomadVehr - 06-06-2018, 05:46 PM
RE: SOLVE for Function Vectors - NomadVehr - 06-10-2018, 04:04 PM
RE: SOLVE for Function Vectors - NomadVehr - 06-10-2018, 05:01 PM
RE: SOLVE for Function Vectors - NomadVehr - 06-10-2018, 05:54 PM



User(s) browsing this thread: 1 Guest(s)