problem with solving a system of equations

problem with solving a system of equations - Messaggi

#1 Pubblicato: 17/08/2024 00:07:15
Prmtv

Prmtv

0 apprezzamenti in 49 post.

Gruppo: User

Hello!

Such a problem appeared. Please tell me what's the matter

00.png


00.sm (9,79 KiB) scaricato 1572 volta(e).


Thanks!
#2 Pubblicato: 17/08/2024 05:49:32
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: Moderator

roots() in this case needs a custom initial guess.

00_Kr.sm (13,52 KiB) scaricato 1647 volta(e).
2024-08-17 00_46_56-SMath Solver - [00.sm_].png
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#3 Pubblicato: 18/08/2024 00:20:41
Prmtv

Prmtv

0 apprezzamenti in 49 post.

Gruppo: User

Wrote

roots() in this case needs a custom initial guess.

00_Kr.sm (13,52 KiB) scaricato 1647 volta(e).
2024-08-17 00_46_56-SMath Solver - [00.sm_].png



how to choose the right one initial guess?
#4 Pubblicato: 18/08/2024 04:15:52
overlord

overlord

600 apprezzamenti in 1.381 post.

Gruppo: Moderator

Wrote

how to choose the right one initial guess?


What I can suggest is to use right solver.

2024-08-18_00-07.png

2024-08-18_00-13.png

#5 Pubblicato: 18/08/2024 19:25:46
Prmtv

Prmtv

0 apprezzamenti in 49 post.

Gruppo: User

Wrote

Wrote

how to choose the right one initial guess?


What I can suggest is to use right solver.

2024-08-18_00-07.png

2024-08-18_00-13.png



how is the order of output of variables determined? From function "Unknowns"?

2024-08-18_00-13.png
#6 Pubblicato: 18/08/2024 19:51:08
overlord

overlord

600 apprezzamenti in 1.381 post.

Gruppo: Moderator

Wrote

how is the order of output of variables determined? From function "Unknowns"?[/attach]


My guess and and experience is they are ordered alphabetically.
#7 Pubblicato: 22/08/2024 23:23:22
Prmtv

Prmtv

0 apprezzamenti in 49 post.

Gruppo: User

Wrote

Wrote

how to choose the right one initial guess?


What I can suggest is to use right solver.

2024-08-18_00-07.png

2024-08-18_00-13.png



Thanks!

But when creating exe-file required variables a, b, B, t = 1. Why does this happen? Or is this a feature of the plugin "Nonlinear solvers"?

0000.PNG
#8 Pubblicato: 23/08/2024 00:05:06
overlord

overlord

600 apprezzamenti in 1.381 post.

Gruppo: Moderator

I can't know what you have done without your sheet.
However, this was not an issue when I saved it as an exe.

Regards

Click to expand
#9 Pubblicato: 23/08/2024 03:42:01
Prmtv

Prmtv

0 apprezzamenti in 49 post.

Gruppo: User

Wrote

I can't know what you have done without your sheet.
However, this was not an issue when I saved it as an exe.

Regards

Click to expand



If I use the function "al_nleqsolve" then everything really works


The problem occurs when using the function "FindRoot"

00.PNG
#10 Pubblicato: 23/08/2024 04:11:17
overlord

overlord

600 apprezzamenti in 1.381 post.

Gruppo: Moderator

It is due to some bug or miscode for FindRoot().
Or this is totally SMath result parse method.
Your solution (A) is stored symbolic.
Make it totally numeric by eval().
Exe file can show correct results after that.

Regards

Click to expand
#11 Pubblicato: 26/08/2024 01:33:45
Prmtv

Prmtv

0 apprezzamenti in 49 post.

Gruppo: User

Wrote

It is due to some bug or miscode for FindRoot().
Or this is totally SMath result parse method.
Your solution (A) is stored symbolic.
Make it totally numeric by eval().
Exe file can show correct results after that.

Regards

Click to expand



Thanks!
  • Nuovi post
  • Nessun nuovo post