solve & roots with units

solve & roots with units - Poruke

#1 Objavljeno: 3. 6. 2023. 08:48:30
Valery Ochkov

Valery Ochkov

75 svidjanja u 735 postova.

Grupa: User

I can it solve in Mathcad - see please mcdx and pdf files
I try solve it (heat transfer) in SMath - see sm file
Help please
Fajl nije pronađen.Fajl nije pronađen.Fajl nije pronađen.
Kerimov-Cvetkov-Velichko-1-7.png
#2 Objavljeno: 3. 6. 2023. 15:37:44
overlord

overlord

601 svidjanja u 1.382 postova.

Grupa: Moderator

Wrote

I can it solve in Mathcad - see please mcdx and pdf files
I try solve it (heat transfer) in SMath - see sm file
Help please


SMath symbolic solving of integration is not capable as Mathcad.
Thus integrals can't be used with numeric solvers.
However, you can use a little trick to solve them.
Using maple or maxima plugins is the key.
Here is your problem solved with various ways, roots() and Findroot().

Regards

solvewithunits.sm (23,4 KiB) preuzeto 1464 put(ova).
3 korisnika je svidelo ovu objavu
Valery Ochkov 3. 6. 2023. 15:53:00, sergio 4. 6. 2023. 13:03:00, NDTM Amarasekera 4. 6. 2023. 03:15:00
#3 Objavljeno: 4. 6. 2023. 02:18:41
Alvaro

Alvaro

1.139 svidjanja u 1.805 postova.

Grupa: User

Hi. The attached have an al_nleqsol wrapper for a Mathcad block with units, that can accept SMath's integrals too.

Click to enlarge

Kerimov-Cvetkov-Velichko-1-7 - nSol.sm (17,97 KiB) preuzeto 1483 put(ova).

Best regards.
Alvaro.
2 korisnika je svidelo ovu objavu
sergio 4. 6. 2023. 13:03:00, Valery Ochkov 4. 6. 2023. 02:22:00
#4 Objavljeno: 4. 6. 2023. 10:00:56
overlord

overlord

601 svidjanja u 1.382 postova.

Grupa: Moderator

Actually, you don't need to find Tc2 first hand.
Findroot() can solve with all three equations at once.
All important is the order of unknowns.

Regards

2023-06-04_15-58.png
2 korisnika je svidelo ovu objavu
Valery Ochkov 4. 6. 2023. 12:03:00, sergio 4. 6. 2023. 13:48:00
#5 Objavljeno: 5. 6. 2023. 00:08:21
overlord

overlord

601 svidjanja u 1.382 postova.

Grupa: Moderator

Here is a paper-friendly version.
Also check how variable guess points are assigned.

Regards

2023-06-05_06-05.png
1 korisnika je svidelo ovu objavu
Valery Ochkov 5. 6. 2023. 02:23:00
#6 Objavljeno: 5. 6. 2023. 02:24:02
Valery Ochkov

Valery Ochkov

75 svidjanja u 735 postova.

Grupa: User

Wrote

Here is a paper-friendly version.
Also check how variable guess points are assigned.

Regards

2023-06-05_06-05.png


Thanks!
Send please the sm file.

#7 Objavljeno: 5. 6. 2023. 11:08:24
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Hello Valery,
In some application(s), you can associate FindRoot with epsilon.

Solve Diophantine Chemical Balance epsilon.sm (106,1 KiB) preuzeto 1517 put(ova).
1 korisnika je svidelo ovu objavu
Valery Ochkov 5. 6. 2023. 11:26:00
#8 Objavljeno: 5. 6. 2023. 17:39:04
overlord

overlord

601 svidjanja u 1.382 postova.

Grupa: Moderator

Wrote

Thanks!
Send please the sm file.


solvewithunits.sm (14,13 KiB) preuzeto 1450 put(ova).
#9 Objavljeno: 26. 6. 2023. 02:33:01
netsonicyxf

netsonicyxf

2 svidjanja u 79 postova.

Grupa: User

Please help, why can't find root for this simple equation?
Fajl nije pronađen.Fajl nije pronađen.
root.sm (20,2 KiB) preuzeto 1426 put(ova).
#10 Objavljeno: 26. 6. 2023. 05:54:06
Davide Carpi

Davide Carpi

1.444 svidjanja u 2.936 postova.

Grupa: Moderator

Wrote

why can't find root for this simple equation?



Because there aren't unknows

2023-06-26 10_49_28-SMath Solver - [root.sm_].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#11 Objavljeno: 26. 6. 2023. 08:45:01
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Wrote

Please help,
why can't find root for this simple equation ?


roots solves wrt scalar function(s)
In this example, both functions are scalar wrt 'x'.
Try ... roots[(sin(x)-Gamma(x),x,1]
'x not defined' ... Gamma(x) is not scalar wrt 'x'
Few more numerical functions are not scalar
erf(x), erf(x,n) ... erfc(x), erfc(x,n) ...

NLroots.PNG
#12 Objavljeno: 26. 6. 2023. 08:55:02
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Wrote

Try ... roots[(sin(x)-Gamma(x),x,1]


In that case and similar ones,
RootSecant algorithm will spits out 15 decimals, instantaneous.
Cheers ... Jean.

#13 Objavljeno: 26. 6. 2023. 10:06:59
netsonicyxf

netsonicyxf

2 svidjanja u 79 postova.

Grupa: User

Wrote

Wrote

why can't find root for this simple equation?



Because there aren't unknows

2023-06-26 10_49_28-SMath Solver - [root.sm_].png



Thanks Davide.
Now I put "N" as unknown in the Eq. But it can't be solved either.
1.png

root.sm (19,41 KiB) preuzeto 1397 put(ova).
#14 Objavljeno: 26. 6. 2023. 10:58:58
Davide Carpi

Davide Carpi

1.444 svidjanja u 2.936 postova.

Grupa: Moderator

You have to play a little with the precision, especially if there are units involved; in this case, seems that 10^-3 mm is a stable target (10^-2 works too, but in some case it returns the guess value, meaning that is "close enough" for the algorithm - you can see in the plot that 0kN to 200kN is in +0.02/-0.02mm range)

2023-06-26 15_55_45-SMath Solver - [root_r1.sm].png

root_r1.sm (24,03 KiB) preuzeto 1458 put(ova).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 korisnika je svidelo ovu objavu
netsonicyxf 26. 6. 2023. 12:18:00
  • Novi postovi
  • Nema novih postova