SMath Studio Forum
»
SMath Studio
»
Questions
»
Shaft torsion - problems with sum(4) and torque diagram
Rank: Advanced Member Groups: Registered
Joined: 18/10/2020(UTC) Posts: 50
|
Hi, I am working on a shaft torsion problem in SMath and I came accross 2 issues. The first one is related to the use of sum(4). I'm trying to sum l_1, l_2 and l_3. As you can see, sum(1) works fine but I wonder why sum(4) gives error (l_j is not defined): I'm quite surprised that it doesn't work because I've found a similar example in "SMath Suite: A Primer" document: Second issue is that I can't find out how to make a torque diagram. First I tried the way it's done in MathCAD (the example I'm working on here is from a book about MathCAD): Then I tried with piecewise function and again something is wrong (the image below features also reference diagram from a book): Of course M_s1, M_s2 and M_s3 are calculated first but I also tried with their values inside the if function and still didn't get any plot. Here's the sm file: Torsion.sm (106kb) downloaded 8 time(s).Thanks in advance for your help.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,988 Was thanked: 1124 time(s) in 721 post(s)
|
The first problem is because you used text index instead of element index in the sum. This is visible by the added space between variable and index for element indices. This feature is discussed in the getting started guide, which has a polish version by the way thanks to Ihor Rokach. A convenient way to define piecewise continuous functions is the cases() function in combination with the ternary logical operators ltlt() or lele() defined in the Custom functions plugin by Davide Carpi. In the ternary operators I should have added brackets for better readibility or better: define x1...x3 in advance. Torsion_kr.sm (106kb) downloaded 10 time(s). |
|
1 user thanked mkraska for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/12/2011(UTC) Posts: 319 Location: italy Was thanked: 109 time(s) in 93 post(s)
|
be careful to: -subscript (which you get with the .) and vector index (which you get with [) are very different - range is used to create a vector and not a range of values - for diagrams the units of measurement must be managed torsion_S.sm (105kb) downloaded 12 time(s).sergio
|
1 user thanked PompelmoTell for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Numerical subscript are inefficient and most confusing [your first red]. l as variable name is even more confusing ... l => λ
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 18/10/2020(UTC) Posts: 50
|
Thank you very much for your help. Originally Posted by: mkraska How can I type this part in equation system bracket (or is it a different type of curly bracket) ? It doesn't let me type if (or anything else) after M_s1. Originally Posted by: PompelmoTell be careful to: -subscript (which you get with the .) and vector index (which you get with [) are very different - range is used to create a vector and not a range of values - for diagrams the units of measurement must be managed torsion_S.sm (105kb) downloaded 12 time(s).sergio I see that you fixed the first formulation used for the plot. But what changes were made to the second one ( M(x)=|y=if ...) ? I can't see any difference and yet it generates a plot, unlike in my file (even after adding units under the plot like you did). When it comes to l, this variable stands for length, that's why I don't use lambda.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/07/2010(UTC) Posts: 437 Location: Beer-Sheva Was thanked: 520 time(s) in 288 post(s)
|
It is better to designate the length with a capital letter" L", so as not to confuse it with a"1"
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,988 Was thanked: 1124 time(s) in 721 post(s)
|
Originally Posted by: EngMath Thank you very much for your help.
How can I type this part in equation system bracket (or is it a different type of curly bracket) ? It doesn't let me type if (or anything else) after M_s1.
This instruction is from the interactive handbook, accessible via extension manager. |
|
1 user thanked mkraska for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: EngMath When it comes to l, this variable stands for length, that's why I don't use lambda. No comment ... here is your plot. Torsion (Doctored plot).sm (117kb) downloaded 5 time(s).
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
... easy to bar plot. Respective scale not done. If you want ... will attach.
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
Shaft torsion - problems with sum(4) and torque diagram
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.