Boolean condition and diff issues - Messages
I have issues regarding diff function and boolean function.
I have been looking on different solution on the forum, but i have not found a related post.
How do you perform such calculation?
diff-issue.sm (19 KiB) downloaded 59 time(s).
I mainly use Smath for simple calculation, and such boolean conditions, are used for Moment / shear load diagram etc...
(ps: I am not looking for a 10 digit precision, this is structural engineering

You will find in attachment a spreadsheet detailing the different test performed.
Thank you,
Regards,
Pierre
To obtain an answer, you are going to have to keep the boolean test out of your diff. equation.
Your equation would look similar to the following:
As a tangent to your question, you may want to explore the following forum Topics (beam equation related):
- https://en.smath.com/forum/yaf_postst23343_Frame-and-Beam-analysis-with-Moment-distribution-method.aspx
- https://en.smath.com/forum/yaf_postst23264_FEBeam.aspx
- https://en.smath.com/forum/yaf_postsm10143_Beam-calculation.aspx#post10143
May this be of Good Help;
- Kenny Lemens, P.E. ᵂᴵ
diff-issue.sm (25 KiB) downloaded 65 time(s).
Best regards
Alvaro.
@Kenny Lemens,
If needed i will do this solution, or find a way to automatise this step, as it cas be quite cumbersome to implement.
I will take a closer look to you links, to see if i find answer to this.
@Jean Giraud
I have to admit, you may show me the moon, but i dont even get the finger

I believe, i was unclear on my question, and i will elaborate by providing my spreadsheet

@Razonar
I was quite exited when i saw your answer.
However, i am not sur i use heaviside correctly.
It seems that the condition disapears after derivation.
You can see on the plot, that the calculation of both M and V are OK once the last heaviside condition is satified.
Do you have any idea on how to solve?
I dont mind using my actual methodology, but i would like to progress with smath

e7_5_3-hs.sm (135 KiB) downloaded 49 time(s).
Regards,
Pierre
Wrote... It seems that the condition disapears after derivation.
Hi. You're using Heaviside from Statical Tools plugin. I forgot it, because I don't use it, It define Heaviside(x,y) as (1+sign(x-y))/2, which could be cool for numerical procedures, but the derivative of maple of sign(x) is zero, but diff Heaviside(x) /dx is Dirac(x). So, the file that I upload works very different with that plugin. There are also other posts in this forum about Heaviside, Dirac and civil engineering. Maxima have their own implementation of those functions too.
Best regards.
Alvaro.
WroteHello everybody,
I have issues regarding diff function and boolean function.
I have been looking on different solution on the forum, but i have not found a related post.
How do you perform such calculation?
diff() function can't parse if original function has boolean expression.
Once derivative is completed result can be booleaned. (is this even a proper word

Here how it is.
Regards
Wrote...
Do you have any idea on how to solve?
Yes. Use maple(diff(convert(M(x),Heaviside),x)) for convert SMath sign function into Maple Heaviside's. It looks ok now:
e7_5_3-hs ok.sm (139 KiB) downloaded 45 time(s).
Best regards.
Alvaro
The evaluation at 2m (ie:78in) is higher than the higher boolean/heaviside condition, therefore the result is always ok.
In My comuter the graph of shear (V) clearly showes an difference between V and V.hs below 45inch, is it similar for you?
Wrote
Yes. Use maple(diff(convert(M(x),Heaviside),x)) for convert SMath sign function into Maple Heaviside's. It looks ok now:
Best regards.
Alvaro
I am getting quite a nice result with the following function
hs(x,y):1/2+1/π*atan(10^10*(x-y)/UnitsOf(y))
It is quite a quick solution, easy to diff and integrate,
however to get all solution from solve, i need to limit the interval.
e7_5_3-hs-tan.sm (128 KiB) downloaded 49 time(s).
Thanks for you attention to all

Regards,
Pierre
WroteDear alvaro
The evaluation at 2m (ie:78in) is higher than the higher boolean/heaviside condition, therefore the result is always ok.
In My comuter the graph of shear (V) clearly showes an difference between V and V.hs below 45inch, is it similar for you?
Hi. Yes, but I just don't pay attention to the "small values" at inches, just see that both are the same at meters. Some notes about Heaviside in the attached.
notes.sm (11 KiB) downloaded 49 time(s).
Best regards.
Alvaro.
I have found a little workaround with late assignment.
heaviside_late_assignment.sm (9 KiB) downloaded 52 time(s).
I think it will be faster/cleaner once implemented than the atan solution.
Regards,
Pierre
WroteI think it will be faster/cleaner once implemented than the atan solution.
Atan is great if you don't go to use further the function too much, like in integrations. For this other option you have this other implementation too.
heaviside_late_assignment.sm (34 KiB) downloaded 57 time(s).
Best regards.
Alvaro.
-
New Posts
-
No New Posts