1 страниц (10 вхождений)
Shaft torsion - problems with sum(4) and torque diagram - Сообщения
#1 Опубликовано: 4 года назад
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 КиБ) скачан 100 раз(а).
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 КиБ) скачан 100 раз(а).
Thanks in advance for your help.
#2 Опубликовано: 4 года назад
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 КиБ) скачан 106 раз(а).
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 КиБ) скачан 106 раз(а).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
EngMath 4 года назад
#3 Опубликовано: 4 года назад
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 КиБ) скачан 105 раз(а).
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 КиБ) скачан 105 раз(а).
sergio
1 пользователям понравился этот пост
EngMath 4 года назад
#4 Опубликовано: 4 года назад
#5 Опубликовано: 4 года назад
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 КиБ) скачан 106 раз(а).
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 КиБ) скачан 105 раз(а).
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 Опубликовано: 4 года назад
It is better to designate the length with a capital letter" L", so as not to confuse it with a"1"
#7 Опубликовано: 4 года назад
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 пользователям понравился этот пост
Davide Carpi 4 года назад
#8 Опубликовано: 4 года назад
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 КиБ) скачан 100 раз(а).
#9 Опубликовано: 4 года назад
#10 Опубликовано: 4 года назад
1 страниц (10 вхождений)
-
Новые сообщения
-
Нет новых сообщений