Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Ante021  
#1 Posted : 03 August 2022 14:27:48(UTC)
Ante021

Rank: Newbie

Groups: Registered
Joined: 03/08/2022(UTC)
Posts: 3
Croatia

Dear all, 1st off - I am new to SM and experienced this problem with simple structural stress equation (stress due to bending) that I am unable to resolve - see attached. Solver returns error "No real roots".
I know there is as solution but I am unable to accomplish it.
Q1: Please advise - what am I doing wrong?
Q2: What is a best way to solve this as a system of equations (instead of substitution in order to arrive to a single eqn presented)?
5-6-14.sm (93kb) downloaded 17 time(s).StressSolver.png
Thanks!
Offline alyles  
#2 Posted : 03 August 2022 16:52:12(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 240
United States

Was thanked: 77 time(s) in 48 post(s)
You can use units. Don't listen to Jean on this point.

One solution - use maxima.



Untitled.png
5-6-14.sm (96kb) downloaded 14 time(s).
5-6-14.pdf (564kb) downloaded 3 time(s).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline PompelmoTell  
#3 Posted : 03 August 2022 17:18:37(UTC)
PompelmoTell


Rank: Advanced Member

Groups: Registered
Joined: 23/12/2011(UTC)
Posts: 305
Man
Italy
Location: italy

Was thanked: 105 time(s) in 89 post(s)
Considering the internal solutors of Smath, the only one who contains the units of measurement is "FindRoot". Otherwise there are all the solutors of the plugins (something has already been proposed to you for Maxima).
Also careful not to fix "b" with a value, otherwise it is no longer an unknown for the solutor (For this, Clear ( b ) was used in the example with Maxima).
5-6-14-ser.sm (89kb) downloaded 16 time(s).
sergio

Edited by user 03 August 2022 17:22:31(UTC)  | Reason: Not specified

Offline Razonar  
#4 Posted : 03 August 2022 18:11:21(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,012
Uruguay

Was thanked: 560 time(s) in 364 post(s)
Well, you have a solution with Maxima, another with FindRoot ... this is a solution with solve or roots.

5-6-14.sm (93kb) downloaded 27 time(s).

Best regards.
Alvaro.
Offline Kenny Lemens  
#5 Posted : 04 August 2022 01:34:46(UTC)
Kenny Lemens


Rank: Member

Groups: Registered
Joined: 11/01/2018(UTC)
Posts: 28
Man
United States
Location: Wisconsin

Was thanked: 9 time(s) in 7 post(s)
Greetings,

There are several forums that discuss similar issues; I would encourage you to look though these threads:

  1. https://en.smath.com/for...-real-roots--result.aspx
  2. https://en.smath.com/for...quations-with-Solve.aspx
  3. https://en.smath.com/for...or-Missing-Variable.aspx

You will notice a lot of different approaches; I am personally bias to using maple to solve these problems (In order to run maple functions, you need to install the "Maple Tools Plugins" )

[Using Maple]: Since you already constructed f( b ), all you need to do is perform a symbolic evaluation (keypress [Ctrl] + [.] instead of [=]). This will produce the following:
. . . SMATH_solveForB.jpg
NOTE: you cannot have any of the variables defined, else those values will be treated as constants and thus substituted into the equation.

You can copy the text below and paste it into your worksheet; this will generate the result based off of your variables (I work in imperial, thus 'ft' is referenced):
Code:
{1143*((nthroot(L.1*(2*σ.a*(Q.m*σ.a+sqrt(Q.m*(Q.m*σ.a^2+γ^3*L.1^5)))+γ^3*L.1^5),3))^2+γ^2*L.1^4+γ*L.1^2*nthroot(L.1*(2*σ.a*(Q.m*σ.a+sqrt(Q.m*(Q.m*σ.a^2+γ^3*L.1^5)))+γ^3*L.1^5),3))}/{5000*σ.a*nthroot(L.1*(2*σ.a*(Q.m*σ.a+sqrt(Q.m*(Q.m*σ.a^2+γ^3*L.1^5)))+γ^3*L.1^5),3)*'ft}


This brings us to units; by solving symbolically, you can identify those variables where the units "don't match". It looks like pressure is your culprit...
I haven't had much success using pressure with regards to force; there is something with regards to the gravitational constant that doesn't quite work right. Therefore, I consider pressure to be of units force/area instead of mass/area. This will cause the units of your inputs to change as such:
. . . SMATH_solveForB_UnitsOnInputs.jpg

I hope this Helps!
-Kenny Lemens, P.E.
Offline Ante021  
#6 Posted : 04 August 2022 10:45:46(UTC)
Ante021

Rank: Newbie

Groups: Registered
Joined: 03/08/2022(UTC)
Posts: 3
Croatia

Dear experts,
Thank you for your solutions! I like the elegance presented which answers my question Q2 above on substitution.

Re units / unitless project:
I eventually managed to solve it with polyroots (before reading your posts) after rearranging the eqn in the form of polynomial order b^3 (disadvantage: I do the math instead of SM..).
What I noticed is that with units result is 0.152 m while unitless returns value 3.8664 ratio of these being 25.47 which is (close to) units ratio mm/inch.
Coincidence or Bug?
How can one be sure on the output in case of professional application ?

Real world example of not using units properly and catastrophic outcome here https://www.wired.com/20...climate-observer-report/ and the same topic on YouTube video "Advanced Problem Solving with PTC Mathcad" @ 4th min.
Nostalgic side note: my old handheld hp48 returns correct result (0.152 m) in no time.
units vs unitless.jpg 5-6-14 - Unitless.sm (94kb) downloaded 5 time(s).

Edited by user 04 August 2022 10:52:59(UTC)  | Reason: Not specified

Offline Ante021  
#7 Posted : 04 August 2022 11:42:15(UTC)
Ante021

Rank: Newbie

Groups: Registered
Joined: 03/08/2022(UTC)
Posts: 3
Croatia

Originally Posted by: PompelmoTell Go to Quoted Post
Considering the internal solutors of Smath, the only one who contains the units of measurement is "FindRoot". Otherwise there are all the solutors of the plugins (something has already been proposed to you for Maxima).
Also careful not to fix "b" with a value, otherwise it is no longer an unknown for the solutor (For this, Clear ( b ) was used in the example with Maxima).
5-6-14-ser.sm (89kb) downloaded 16 time(s).
sergio



Thank you Sergio! I like the elegance presented.

However, changing initial guess value (b0) returns different results...(?)

For [b0] between 1 mm to 300 mm result is 152 mm while for b0=500 mm returns 145 mm, for b0=600 mm result is -39 mm. (?)
What is going on here?
Why this sensitivity to initial values and different results ?

Edited by user 04 August 2022 12:37:59(UTC)  | Reason: Not specified

Offline PompelmoTell  
#8 Posted : 04 August 2022 14:31:42(UTC)
PompelmoTell


Rank: Advanced Member

Groups: Registered
Joined: 23/12/2011(UTC)
Posts: 305
Man
Italy
Location: italy

Was thanked: 105 time(s) in 89 post(s)
These are non -linear equation, the solutions also depend on the research interval (especially with numerical solution methods) it is appropriate to proceed with a sanity check and sometimes trace the graph of the function to identify the search interval.
5-6-14-ser2.sm (94kb) downloaded 13 time(s).
sergio
Offline Razonar  
#9 Posted : 05 August 2022 01:39:26(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,012
Uruguay

Was thanked: 560 time(s) in 364 post(s)

Hi Ante. Another example about what important is work with units, as you well point too. And the Smath relevance just because is the only one unit friendly math program today. Notice that taking out the units requires the introduction of their multipliers like giga, kilo or mili in the unitless version. So there are not a bug there.

Best regards
Alvaro
Offline overlord  
#10 Posted : 05 August 2022 01:41:22(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 829
Turkey

Was thanked: 290 time(s) in 204 post(s)
Originally Posted by: Ante021 Go to Quoted Post
Q1: Please advise - what am I doing wrong?
Q2: What is a best way to solve this as a system of equations (instead of substitution in order to arrive to a single eqn presented)?

While solve() and roots() can't work with units, you can "trick" them by altering your equation.
And there are many possible ways to solve with units, please check the examples below.

5-6-14.sm (128kb) downloaded 18 time(s).

Click to enlarge


Originally Posted by: alyles Go to Quoted Post
You can use units. Don't listen to Jean on this point.

I agree with alyles about Jean, never ever listen to him about engineering calculations.
He may have some good examples about math calculations, but most of his samples are only for himself.
Worst of all he is notorious with his wrong formulas, faulty approach for basic engineering calculations, Don Quixote like crusade against units, etc.
And there are some aspects to use temperature units with SMath, read forums and help files carefully before using them.
Jean simply don't know how to work with units, because he never did use them.
And according to his own samples, he gets wrong results whenever units are involved and important.

Click to enlarge

Regards
Users browsing this topic
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.