Shaft torsion - problems with sum(4) and torque diagram

Shaft torsion - problems with sum(4) and torque diagram - 消息

#1 已发布: 2021/4/13 07:59:05
EngMath

EngMath

0个赞,共51个帖子。

组: User

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)已下载 1236 次。

Thanks in advance for your help.
#2 已发布: 2021/4/13 10:17:08
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: Moderator

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.png
Torsion_kr.sm (105.74 KiB)已下载 1232 次。
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1位用户喜欢此帖子
EngMath 2021/5/30 08:58:00
#3 已发布: 2021/4/13 10:21:36
sergio

sergio

127个赞,共342个帖子。

组: User

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.97 KiB)已下载 1221 次。

sergio
1位用户喜欢此帖子
EngMath 2021/5/30 08:59:00
#4 已发布: 2021/4/13 10:28:47
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Numerical subscript are inefficient and most confusing [your first red].
l as variable name is even more confusing ... l => λ

Shaft.PNG
#5 已发布: 2021/4/13 10:52:40
EngMath

EngMath

0个赞,共51个帖子。

组: User

Thank you very much for your help.

Wrote



Torsion_kr.png
Torsion_kr.sm (105.74 KiB)已下载 1232 次。



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.

Wrote

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.97 KiB)已下载 1221 次。

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 已发布: 2021/4/13 11:17:07
Fridel Selitsky

Fridel Selitsky

520个赞,共451个帖子。

组: User

It is better to designate the length with a capital letter" L", so as not to confuse it with a"1"
#7 已发布: 2021/4/13 11:20:40
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: Moderator

Wrote

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.

cases.PNG
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1位用户喜欢此帖子
Davide Carpi 2021/4/13 17:02:00
#8 已发布: 2021/4/13 11:21:29
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

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 (116.21 KiB)已下载 1254 次。
#9 已发布: 2021/4/13 11:36:40
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

... bar plot added

Torsion (Doctored plot).sm (120.7 KiB)已下载 1272 次。
#10 已发布: 2021/4/14 10:40:59
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

... easy to bar plot. Respective scale not done.
If you want ... will attach.

Torsion.PNG
  • 有新帖
  • 无新帖