Post Reply 
Updated "Interchangeable Solutions" Module w/ Equation Library
01-17-2017, 12:40 PM (This post was last modified: 01-26-2017 09:00 PM by Ángel Martin.)
Post: #1
Updated "Interchangeable Solutions" Module w/ Equation Library
SOLVE Equation Library

A fairly obscure module - the "Interchangeable Solutions" ROM includes the UPLE program #01475C of the same title written by H. Suarez. The main addition is now updated with a poor-man's SOLVER ("SLV+") and a modest Equation Library - with 28 equations in all. See the attached QRG for more details.

SLV+ can deal with up to 5 variables (obviously three at least), and uses the {A-E} soft-keys for variable data entry and execution. It's a FOCAL program based on an old routine written by D. Brunell and possibly published on PPC (lost the actual reference, let me know if you have it). It relies on the SOLVE function to find the roots of the equation, which is programmed in a way expected by the SLV+ routine. This means each equation in the library:

1. Shows its own variables menu in the LCD when called by SLV+
2. Stores the known variables (in rgs. R01-R05) after data input (user flag 22 clear)
4. Stores the unknown variable number (1 to 5) in R00, depending on the soft-key pressed without actual data input (user flag 22 is set)
4. Includes the code for the SOLVE function to calculate the root within standard interval [0,1] or custom guesses.

The ROM includes 28 equations, but of course it's likely you'll write your own - using these as examples. These are:

Code:
  #  NAME       Description               CF00 <- Options -> SF00
----------------------------------------------------------------------
 1   "<)RLC     Delay Angle RLC           Serial RLC  / Parallel RLC
 2   "BERN-A    Bernoulli w/Areas
 3   "BERN-V    Bernoulli w/Velocities
 4   "CATNRY    Catenary Equation         d = H.[1 - (1/cosh(V/2a))]
 5   "F=Ma      Force Equation
 6   "F=MMR2    Gravitation
 7   "HEATX     Heat Exchangers           Counterflow / Parallel Flow
 8   "HERON     Heron Formula
 9   "ISENT     Isentropic Flow
10   "KEPLR     Kepler Equation
11   "MPAD      Michell Pad
12   "MVT       Linear Movement           x = x0 + v.t + 1/2 a.t^2
13   "ORBIT     Orbital Trajectory   
14   "PRJT-D    Projectile Displacement   X-Coordinate / Y-Coordinate
15   "PRJT-V    Projectile Velocity       X-Coordinate / Y-Coordinate
16   "PV=ZNT    Ideal Gas EOS
17   "R1+R2     Parallel Resistors
18   "REDLCH    Redlich-Kwong EOS
19   "RFLC      Resonance Frequency RLC
20   "RPM=TP    Torque Equation
21   "SRL-AC    Serial RL AC Control
22   "TVM       Time Value of Money       Begin mode   / End mode
23   "V=IR      Ohm's Law
24   "VMOD      Vector Module
25   "VWAALS    Van-der Waals EOS
26   "Y=aX+b    Linear Equation           P1 = a.x + b
27   "Y=PX2     Quadratic Equation        P2 = a0 + a1.x + a2.x^2
28   "Y=PX3     Cubic Equation            P3 = a0 + a1.x + a2.x^2 + x^3

General comments:

• You can press [R/S] at the “a^b=?” prompt to use the defaults. The default guess is the interval [0,1]. Most of the equations will find a root with this default setting, but using more accurate ones will likely reduce the execution times. Note however than custom guesses are *always* needed for those variables in a denominator of the formulas.

• The “SLV+” program assumes the existence of at least three variables. Pressing the [D] and [E] keys for equations without a fourth or fifth variable will save the value in the data register (R04 / R05) but will *not* trigger the execution of FROOT (the menu will be shown again).

• The attached module uses FROOT in the SandMath instead of the Advantage's SOLVE - you can change this as they're completely interchangeable (pun intended).

• If no solution is found by FROOT the program will show the variables menu again. Remember also that the accuracy of the solutions is directly affected by the number of decimal places set in the display settings.


PS. Updated MOD file attached


Attached File(s)
.pdf  Equation Library Reference.pdf (Size: 637.35 KB / Downloads: 27)
.zip  INTSOLN.zip (Size: 4.53 KB / Downloads: 16)

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
01-23-2017, 08:03 PM
Post: #2
RE: Updated "Interchangeable Solutions" Module w/ Equation Library
... the compiliation is somewhat weird but there are quite interesting applications / functions in the module. Did Monte include it in his ROM-collection?

Juergen
Find all posts by this user
Quote this message in a reply
01-23-2017, 09:20 PM
Post: #3
RE: Updated "Interchangeable Solutions" Module w/ Equation Library
The updated ISOL is in the memory reference for V4 boards now.
Find all posts by this user
Quote this message in a reply
01-23-2017, 10:01 PM
Post: #4
RE: Updated "Interchangeable Solutions" Module w/ Equation Library
(01-23-2017 08:03 PM)JurgenRo Wrote:  ... the compiliation is somewhat weird but there are quite interesting applications / functions in the module. Did Monte include it in his ROM-collection?

Juergen

So what's weird about it?
Eclectic perhaps?

;-)

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
02-03-2017, 06:51 PM
Post: #5
RE: Updated "Interchangeable Solutions" Module w/ Equation Library
(01-23-2017 08:03 PM)JurgenRo Wrote:  ... the compiliation is somewhat weird but there are quite interesting applications / functions in the module. Did Monte include it in his ROM-collection?

Juergen

"Somewhat interdisciplinary" but useful.
Find all posts by this user
Quote this message in a reply
Post Reply 




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