Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


2 Pages12>
Options
Go to last post Go to first unread
Offline ElSid  
#1 Posted : 19 April 2016 18:33:08(UTC)
ElSid


Rank: Advanced Member

Groups: Registered
Joined: 05/03/2009(UTC)
Posts: 433
Man
United States
Location: USA

Was thanked: 17 time(s) in 15 post(s)
Could not find an example short of an article by Urroz in 2010 PumpCurveFittingInSMathStudio.pdf (74kb) downloaded 132 time(s).. He discusses a "LinearDataFit.sm" snippet that I could not find as a download. This sheet Pump Curve Fit.sm (19kb) downloaded 77 time(s). is based off of the data in that PDF file. In Mathcad, I would type "linfit(x,y,F)="
Is there an equivalent?

Edited by user 19 April 2016 18:49:36(UTC)  | Reason: Updated file

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline CBG  
#2 Posted : 19 April 2016 20:02:33(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
Hi,

Use this example QuadFit.sm (14kb) downloaded 207 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 (27kb) downloaded 80 time(s).

Edited by user 19 April 2016 23:28:20(UTC)  | Reason: Not specified

thanks 1 user thanked CBG for this useful post.
on 19/04/2016(UTC)
Offline Jean Giraud  
#3 Posted : 19 April 2016 22:25:10(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: CBG Go to Quoted Post
Use this example <a class="attachedImageLink {html:false,image:false,video:false}" href="/forum/resource.ashx?a=13647


Your Smath version does not digest the algo style that Smath 5346 crunches so well.
If that would be the case with versions newer than 5346, it would scrap most of
my 400 Smath work sheets. If you have no red from my reply: your are OK, you can
read backward. For me, can't read upward your version. For years of update, my
Mathematica 4.0 could read newer versions from auto conversion.

Most interesting, but unsolved.

Jean

QuadFit.sm (45kb) downloaded 54 time(s).

thanks 1 user thanked Jean Giraud for this useful post.
on 20/04/2016(UTC)
Offline ElSid  
#4 Posted : 19 April 2016 23:13:54(UTC)
ElSid


Rank: Advanced Member

Groups: Registered
Joined: 05/03/2009(UTC)
Posts: 433
Man
United States
Location: USA

Was thanked: 17 time(s) in 15 post(s)
CBG's format worked great for me (Thank you). I was going through my MathCAD sheets/notes ...Curve.PNG

Jean, for the first time, your algo gave me an error.Plot.PNG

Edited by user 20 April 2016 00:18:13(UTC)  | Reason: Not specified

Offline mikekaganski  
#5 Posted : 20 April 2016 00:12:16(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
Just one character fixes Jean's excellent (as usual) sample:

QuadFit (1).sm (41kb) downloaded 114 time(s).
Best regards,
Mike Kaganski
thanks 1 user thanked mikekaganski for this useful post.
on 20/04/2016(UTC)
Offline Jean Giraud  
#6 Posted : 20 April 2016 00:38:54(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
"CBG's format worked great for me (Thank you). I was going through my MathCAD sheets/notes ..."

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
Offline Jean Giraud  
#7 Posted : 20 April 2016 01:08:27(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Your Mathcad coding is pure invention. It can't be otherwise than
it was Mathcad 8/11. Where does that big blue note comes from ?

Jean

Forum Quadratic Proof.gif

Offline ElSid  
#8 Posted : 20 April 2016 01:17:45(UTC)
ElSid


Rank: Advanced Member

Groups: Registered
Joined: 05/03/2009(UTC)
Posts: 433
Man
United States
Location: USA

Was thanked: 17 time(s) in 15 post(s)
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
thanks 1 user thanked ElSid for this useful post.
on 20/04/2016(UTC)
Offline Davide Carpi  
#9 Posted : 20 April 2016 01:22:53(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
Originally Posted by: ElSid Go to Quoted Post
in 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. Good

2016-04-20 00_26_34-SMath Studio Desktop - [QuadFit.sm_].png

Still, I see the screenshot of Jean and I don't understand how it is possible that worked for him.

Edited by user 20 April 2016 01:48:13(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline CBG  
#10 Posted : 20 April 2016 01:33:59(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
ElSid:

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 (7kb) downloaded 45 time(s).

Best Regards
Offline mikekaganski  
#11 Posted : 20 April 2016 01:53:38(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
Still, 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 Good
Best regards,
Mike Kaganski
thanks 1 user thanked mikekaganski for this useful post.
on 20/04/2016(UTC)
Offline Davide Carpi  
#12 Posted : 20 April 2016 02:00:10(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,654
Man
Italy
Location: Italy

Was thanked: 1340 time(s) in 879 post(s)
Originally Posted by: mikekaganski Go to Quoted Post
I'm not sure he had x defined above the screenshoted region at the time of screenshoting Good

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.

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline ElSid  
#13 Posted : 20 April 2016 04:08:59(UTC)
ElSid


Rank: Advanced Member

Groups: Registered
Joined: 05/03/2009(UTC)
Posts: 433
Man
United States
Location: USA

Was thanked: 17 time(s) in 15 post(s)
Originally Posted by: mikekaganski Go to Quoted Post
Just 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
  1. Why the underscore made it work?
  2. What the recasting of the scalar does?
See screenshot green items.Difference.PNG

Edited by user 20 April 2016 04:10:30(UTC)  | Reason: Not specified

Offline mikekaganski  
#14 Posted : 20 April 2016 05:11:19(UTC)
mikekaganski


Rank: Advanced Member

Groups: Registered
Joined: 17/01/2013(UTC)
Posts: 296
Man
Russian Federation
Location: Khabarovsk, Russia

Was thanked: 151 time(s) in 107 post(s)
Originally Posted by: ElSid Go to Quoted Post
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.

Yes, that's exactly that one character I mentioned above Good
Quote:
  • Why 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.

    Edited by user 20 April 2016 05:31:27(UTC)  | Reason: Not specified

    Best regards,
    Mike Kaganski
    Offline Jean Giraud  
    #15 Posted : 20 April 2016 05:40:33(UTC)
    Jean Giraud

    Rank: Guest

    Groups: Registered
    Joined: 04/07/2015(UTC)
    Posts: 6,866
    Canada

    Was thanked: 981 time(s) in 809 post(s)
    Hello Collabs ,

    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

    Forum Quadratic Proof 5346.gif



    Poly Quadratic 5346.sm (39kb) downloaded 38 time(s).
    Offline mikekaganski  
    #16 Posted : 20 April 2016 05:50:43(UTC)
    mikekaganski


    Rank: Advanced Member

    Groups: Registered
    Joined: 17/01/2013(UTC)
    Posts: 296
    Man
    Russian Federation
    Location: Khabarovsk, Russia

    Was thanked: 151 time(s) in 107 post(s)
    This topic discusses the functions-as-parameter thing. You may notice, that it's 6 years old (started 24 Jun 2010), much older than 0.97.5346 (21 August 2014). And yet, all requirements, including requirement that all variables must be previously undefined, are already in place.

    And yes, as expected, Jean's last file opens fine, because it doesn't contain global definitions of x.

    Edited by user 20 April 2016 05:52:39(UTC)  | Reason: Not specified

    Best regards,
    Mike Kaganski
    Offline ElSid  
    #17 Posted : 20 April 2016 16:26:06(UTC)
    ElSid


    Rank: Advanced Member

    Groups: Registered
    Joined: 05/03/2009(UTC)
    Posts: 433
    Man
    United States
    Location: USA

    Was thanked: 17 time(s) in 15 post(s)
    Mike,
    Thanks for the explanation
    Originally Posted by: ElSid Go to Quoted Post
    1. ANSWERED
      Originally Posted by: mikekaganski Go to Quoted Post
    2. What the recasting of the scalar does?
    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 brain
    Originally Posted by: Jean Giraud Go to Quoted Post
    Your Mathcad coding is pure invention. It can't be otherwise than it was Mathcad 8/11. Where does that big blue note comes from ?
    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 SMath
    Originally Posted by: CBG Go to Quoted Post
    What is the purpose you are looking for adjusting flow ​​against head?
    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 in
    Originally Posted by: ndtma Go to Quoted Post
    Reservoir Flood Capacity Estimation.sm (189kb) downloaded 103 time(s).
    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 ...
    I want to use the affinity rules to go from here.

    Edited by user 20 April 2016 16:30:42(UTC)  | Reason: Not specified

    Offline mkraska  
    #18 Posted : 20 April 2016 17:51:10(UTC)
    mkraska


    Rank: Advanced Member

    Groups: Registered
    Joined: 15/04/2012(UTC)
    Posts: 1,989
    Germany

    Was thanked: 1128 time(s) in 724 post(s)
    The Maxima plugin provides the function Fit(), see the interactive handbook for details.

    Fit.sm (15kb) downloaded 88 time(s).fit.PNG
    Martin Kraska

    Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
    thanks 1 user thanked mkraska for this useful post.
    on 20/04/2016(UTC)
    Offline Jean Giraud  
    #19 Posted : 20 April 2016 18:57:30(UTC)
    Jean Giraud

    Rank: Guest

    Groups: Registered
    Joined: 04/07/2015(UTC)
    Posts: 6,866
    Canada

    Was thanked: 981 time(s) in 809 post(s)
    Hello Martin,

    Very interesting, but does not work in 5346.
    Your work sheet does not work either.

    Jean

    Forum Maxima Forcibly closed.gif
    Offline Jean Giraud  
    #20 Posted : 20 April 2016 19:50:13(UTC)
    Jean Giraud

    Rank: Guest

    Groups: Registered
    Joined: 04/07/2015(UTC)
    Posts: 6,866
    Canada

    Was thanked: 981 time(s) in 809 post(s)
    Originally Posted by: ElSid Go to Quoted Post
    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 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

    Users browsing this topic
    Guest
    2 Pages12>
    Forum Jump  
    You cannot post new topics in this forum.
    You cannot reply to topics in this forum.
    You cannot delete your posts in this forum.
    You cannot edit your posts in this forum.
    You cannot create polls in this forum.
    You cannot vote in polls in this forum.