1 Pages (10 items)
Shaft torsion - problems with sum(4) and torque diagram - Messages
#1 Posted: 4/13/2021 7:59:05 AM
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 (105 KiB) downloaded 24 time(s).
Thanks in advance for your help.
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 (105 KiB) downloaded 24 time(s).
Thanks in advance for your help.
#2 Posted: 4/13/2021 10:17:08 AM
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 (105 KiB) downloaded 27 time(s).
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 (105 KiB) downloaded 27 time(s).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
EngMath 5/30/2021 8:58:00 AM
#3 Posted: 4/13/2021 10:21:36 AM
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 (104 KiB) downloaded 29 time(s).
sergio
-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 (104 KiB) downloaded 29 time(s).
sergio
1 users liked this post
EngMath 5/30/2021 8:59:00 AM
#4 Posted: 4/13/2021 10:28:47 AM
#5 Posted: 4/13/2021 10:52:40 AM
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.
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.
Wrote
Torsion_kr.sm (105 KiB) downloaded 27 time(s).
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.
Wrotebe 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 (104 KiB) downloaded 29 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.
#6 Posted: 4/13/2021 11:17:07 AM
It is better to designate the length with a capital letter" L", so as not to confuse it with a"1"
#7 Posted: 4/13/2021 11:20:40 AM
WroteThank 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.
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
Davide Carpi 4/13/2021 5:02:00 PM
#8 Posted: 4/13/2021 11:21:29 AM
WroteWhen 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 (116 KiB) downloaded 30 time(s).
#9 Posted: 4/13/2021 11:36:40 AM
#10 Posted: 4/14/2021 10:40:59 AM
1 Pages (10 items)
-
New Posts
-
No New Posts