PLUS42  Usage of UNITS functions in solver

09212022, 01:38 PM
Post: #1




PLUS42  Usage of UNITS functions in solver
I am using Plus42 v.1.0.10 Decimal under Windows 10.
I am trying to use the Equation Solver to implement the following equation: Code: TEST:TimeH=L(K1:EXP(UBASE(U*A*(INV(W*C)INV(w*c)))))*0+L(K2:(M*(G(K1)*w*cW*C)/(W*w*c*(G(K1)1))))*0+G(K2)*LN((UBASE(t1)UBASE(T1))/(UBASE(t1)UBASE(T2))) All variables shall be with units. The use of UBASE in K1 definition is necessary to reduce all UOM to their base definition, and the semplification of UOMs will reduce to a pure number. The use of UBASE in LN argument has the same purpose of the above, plus the purpose of converting the temperatures to Kelvin degrees. When solving, i get a "NONEXISTENT" error, just like UBASE is interpreted as a variable (see attached screenshot) Such arrangement works properly on 48g/50g (of course keeping K1 and K2 definition outside the main equation and using MES) Code: { 'K2=M*((K1*w*cW*C)/(W*w*c*(K11.)))' 'K1=EXP(UBASE(U*A*(1./(W*C)1./(w*c))))' 'Theat=K2*LN((UBASE(t1)UBASE(T1))/(UBASE(t1)UBASE(T2)))' } What am i doing wrong? Thanks in advance 

09212022, 04:54 PM
Post: #2




RE: PLUS42  Usage of UNITS functions in solver
UBASE isn't defined as a builtin function in the equation language. (There is a complete list of builtin functions here, under the subheading Functions.)
I guess I should add it, but in the meantime, you can work around this problem by creating a function UBASE yourself, and implementing it using a program: UBASE(X):XEQ(UB:X) 00 { 8Byte Prgm } 01▸LBL "UB" 02 UBASE 03 END 

09212022, 06:23 PM
Post: #3




RE: PLUS42  Usage of UNITS functions in solver
Should any other unitrelated functions, apart from UBASE, be made available in the equation language as well?


09212022, 07:16 PM
(This post was last modified: 09212022 07:20 PM by Marco Polo.)
Post: #4




RE: PLUS42  Usage of UNITS functions in solver  
09212022, 09:46 PM
Post: #5




RE: PLUS42  Usage of UNITS functions in solver  
10032022, 01:17 PM
Post: #6




RE: PLUS42  Usage of UNITS functions in solver
(09212022 07:16 PM)Marco Polo Wrote:Just downloaded v. 1.0.11 for Windows 64bit.(09212022 06:23 PM)Thomas Okken Wrote: Should any other unitrelated functions, apart from UBASE, be made available in the equation language as well?Yes, UVAL will be useful too. UBASE and UVAL in EQN Solver works as expected. Thank you! 

« Next Oldest  Next Newest »

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