Curve fit function? - Looking to do a pump curve fit - Messages
Is there an equivalent?
Use this example QuadFit.sm (13 KiB) downloaded 236 time(s).
It was taken from here :http://people.stfx.ca/bliengme/SMath/
Regards
Add *.sm file of Pump Curve fit: Pump_Fitting_Curve_Example_a.sm (26 KiB) downloaded 105 time(s).
WroteUse this example QuadFit.sm (44 KiB) downloaded 64 time(s).
QuadFit (1).sm (40 KiB) downloaded 131 time(s).
The question is not if CBG works or not in your installation. The problem is
why my work sheet is not compatible to your version. You say it does not work.
Read the error message "Not set to an instance to compute" . So, how many of
the user created function your version won't read ? W/o user programmed functions,
Smath is just a curiosity.
"How simple" from your Mathcad !!! plot and see .
I have same result from OriginLab than Smath. OriginLab was doing gorgeous
fitting much before Mathcad 8/11 , Why? because fitting techniques were developped
between Mathsoft Collabs [especially: Robert, Paul, Jean ...].
"Jean, for the first time, your algo gave me an error".
Yes because your Smath version is not set to read backward version [to be confirmed].
"On a side note, on the picture (very bottom), you define "Poly" at the top of the next graph.
I am olmy familiar with poly and data being on the bottom like the top most picture".
"Poly" is any name to assign the result of the discrete algo.
Cheers, Jean
Your coding is phenomenal. Thank you again. Mike found the "character" that was off. I will look for the whole Mathcad sheet and post. I have snippets all over the place and I promised myself to try and be more organized. Not @ computer, but I think in poly:=, the function needed to be f(_x). I took a quick look see but I did not study
Wrotein poly:=, the function needed to be f(_x)
Thank you for pointing out where was the issue (and Jean for the code and Mike for the debug too)
In fact is not a problem of SS version, I opened the file attached by Jean with 0.97.5346 and I got the same error.

Still, I see the screenshot of Jean and I don't understand how it is possible that worked for him.
What is the purpose you are looking for adjusting flow against head?
Find a value for a Head with a flow not specified in the flow vector ? , Is it to interpolate ?
If it is to interpolate , the easiest thing is to use directly the function " ainterp (V1 , V2, V3 ) "
A very simple example: Example_Ainterp.sm (6 KiB) downloaded 64 time(s).
Best Regards
WroteStill, I see the screenshot of Jean and I don't understand how it is possible that worked for him.
I'm not sure he had x defined above the screenshoted region at the time of screenshoting

WroteI'm not sure he had x defined above the screenshoted region at the time of screenshoting
Good point (it may happens with auto calculation disabled). I think he have to download and evaluate his own attached worksheet and confirm if is still working or not.
WroteJust one character fixes Jean's excellent (as usual) sample
I am look at the fixed file from Mike and comparing it to Jean's original file. The only difference I see between them is the underscore in the function f(_x) in the Poly definition. Totally lost with the
- Why the underscore made it work?
- What the recasting of the scalar does?
WroteI am look at the fixed file from Mike and comparing it to Jean's original file. The only difference I see between them is the underscore in the function f(_x) in the Poly definition.
Yes, that's exactly that one character I mentioned above

QuoteWhy the underscore made it work?
Because the "_x" is undefined. Jean used function-as-parameter feature to pass an algo to a function. SMath requires that in this case, the passed function (here it's f(#)) must have its fictive parameters all previously undefined variables. This is very old requirement (I'm unsure if there ever existed a version without it). As Jean has defined "x" above, it coudn't be used as fictive parameter to passed f().
Edit: wrong English error message is reported as SS-2324.
Here is the screen shot of the attached work sheet.
My installed Smath 5346 is "as is" from the day it was installed.
No download update. Why the underscore would make it work on Elsid
version, can't explain. From what you are saying Davide, it looks
that if some of the "nightly build" reside in the same machine, it
broke logical link to user define function, or code incompatibility
between versions.
Jean
Poly Quadratic 5346.sm (38 KiB) downloaded 62 time(s).
And yes, as expected, Jean's last file opens fine, because it doesn't contain global definitions of x.
Thanks for the explanation
The screen shot I posted shows it equals nothing ... Multiplying the vectors with the second one being a vector within a vector does not compute in my brainWrote
- ANSWERED
Wrote- What the recasting of the scalar does?
Jean, The Mathcad file I posted in blue does NOT use the same data points, so the polynomial coefficients "b" will be different. I was trying to copy the syntax over to SMathWroteYour Mathcad coding is pure invention. It can't be otherwise than it was Mathcad 8/11. Where does that big blue note comes from ?
Great question. I will post the actual files for a project that describe what I am trying to model as soon as I get a copy of the files from the vendors archive (I cannot find my copies). Essentially, it is a VFD driven pump in a wet well, with a min/max elevation drawdown (range) as the wet well goes up and down so looking at min/max. I want to identify the "trapezoid" that the pump must operate in using the "hatching" code inWroteWhat is the purpose you are looking for adjusting flow against head?
The vendors typically give a "few" data points (some as little as 3). So tying it into one sheet would be phenomenal. Easy to do on paper ...WroteReservoir Flood Capacity Estimation.sm (188 KiB) downloaded 130 time(s).
I want to use the affinity rules to go from here.
File not found.File not found.
WroteEssentially, it is a VFD driven pump in a wet well, with a min/max elevation drawdown (range) as the wet well goes up and down so looking at min/max.I want to identify the "trapezoid" that the pump must operate in using the "hatching" code in
In 1970 I was working in the mning industries and that problem of min/max didn't exist.
All our 100's pump box had a little inexpensise level contol. w/o a diagram of what
you are attempting, hard to visualise. I don't see the relationship with the "Flood"
work sheet , maybe I'm wrong ? Too many bits and pieces in there.
Jean
-
New Posts
-
No New Posts