Skip to main content
7-Bedrock
January 4, 2021
Question

Determination by deriving a bending moment function (error message)

  • January 4, 2021
  • 2 replies
  • 13819 views

Hello, I have a beam with a triangular line load. For this task I wanted to visualize the existing Mb curve using a My curve. I created this with partial functions. So far so good. As a further step in my task, I wanted to use Mathcad 15.0 to determine the location of the greatest bending moment. From a purely mathematical point of view, this corresponds to zeroing the 1st derivative (lateral force). Everything is clear from the logical understanding to the procedure. Unfortunately, from this point on it does not work completely smoothly and without problems. Because I have created a new definition with the derivation and function including the run variable specified for the derivation. Then I wanted to use the symbolic commands "Coefficients" to output the existing values ​​and to have the 2 possible zeros displayed again with the additional "Set to zero" function. Unfortunately, when performing these steps, I always get the error message that there is "more than one independent variable". Although the designation and definition of the entire variable including units would be correct. I have attached the file including screenshots of the problem addressed. As an appendix for my problem, I also wanted to ask what it is all about when I have values ​​calculated using the symbolic equal sign and these are completely overflowing with various units. After doing some research I saw a post here in the forum and have the same problem. (https://ww3.cad.de/foren/ubb/Forum479/HTML/000449.shtml) Is there already a solution for this or is it just the behavior of MC? I would like to thank you very much for advice or help. Unfortunately, I'm already very desperate and after researching Google etc. I don't know what to do next. Many Thanks.

2 replies

25-Diamond I
January 5, 2021

The main problem here is unfortunately the usage of the units.

The "coeffs" command correctly works symbolically as you can see if you symbolically evaluate "f":

Werner_E_0-1609859966943.png

The red error is because the numerics does not allow vectors or matrices where the elements are of different dimensions and f has three different ones - force, dimensionless and pressure.

This is also the reason why the "polyroots" command fails.

You may make all elements of "f" dimensionless by dividing through the appropriate units (you must evaluate symbolically!) - then "polyroots" works ok and gives the same result as your following alternate method:

Werner_E_1-1609860251149.png

 

Some remarks:

  • You defines a variable q:=4 kN/m and later a function q(x.1). You shouldn't do that because on one hand its bad habit to use the same name for different things in the same calculation and it also confuses Mathads symbolic engine. I rename your variable to "qq" in the attached sheet
  • You should use range variable in three cases only

for plotting

to index vectors and matrices

in a program when using a for-loop

  • The symbolics unfortunateley does not know anything about units and treats them as unknown variables!  So it doesn't know that N/pa=m^2 and can't simplify its results. Thats also the reason why its necessary to add the variable x.1 in the "coeffs" command to tell the symbolics which variable it should look at. The symbolics sees three variables - x.1, N and Pa.
    You may use the symbolics to directly solve for zeros of the derivative:
    Werner_E_2-1609860880746.png

    The symbolic correctly realizes that Pa=0 would be problematic and N=0 yields the simple solution 0.
    So you can tell the symbolic via the "assume" command, that Pa is positive:

    Werner_E_3-1609860977663.png
    If you are only interested in the positive solution, you can tell that the symbolic again using "assume", but you also must tell it that N is positive, too, otherwise it would not be able to decide if a solution is positive, negative or even non-real:
    Werner_E_4-1609861082725.png

     

  • But you don't have to use the symbolics at all. Mathcad provides numerical means for solving equation with the solve block and the root command
    Werner_E_5-1609861471685.png

     

7-Bedrock
January 7, 2021

Hello,

 

first of all thank you for the help. But for the function q(x.1) i created it to set/create the bending moment function My(x.1) for the first part of l.1. Because if i cut through a certain length x1 there is not q=4kN/m at the peek of the triangular. Its (q/l.1)*x1 for the function.

And i saw you used simply "x" for the bending function. But how do i show the bending moment with the appropriate units for the diagram? Do i have to use 2 functions? 1 for solving the value of the maximum value and 1 for the illustration on the diagram.

And what i am also curious which you used to is how to create this type of symbolic solution that the arrow is in the center? How i am able to to that because in my case it is always at the top argument like the picture provided

Because i wanted to try i myself to use more than one argument but it always puts the symbolic arrow on the top argument. Can you explain or help me how you did that like in the screenshots i attached? Would be appreciated.

 

I also receive like in the picture above an incomprehensible syntax error all the time and i do not know why. In the picture above, i havent defined any values but for illustrative reasons. Is there any way, that Mathcad solves or symbolically shows the function of the transverse force Qz(x)? Not only for the evaluation of the "x" values but also directly the function like Qz(x)=...x^2+..x

25-Diamond I
January 7, 2021

Let me start by saying that I have little technical understanding of what this worksheet is about. I therefore limit myself to dealing with the handling and usage of Mathcad.



And i saw you used simply "x" for the bending function. But how do i show the bending moment with the appropriate units for the diagram?


I understand that you want to define a piecewise defined function. Range variables are OK for plotting that kind of thing, but not for calculations.

When you define a function, the name of the formal argument does not matter at all!

Werner_E_0-1610026053925.png

and is does not matter at all, if and how x or dummy are already defined in the worksheet. This only matters when you evaluate the function using the variable as actual/current argument.

To create a piecewise defined function you can use either the if command (similar in syntax to the "if" available in spreadsheets) or the if-statement from the programming palette.

Werner_E_1-1610026399034.png

The drawback is that the symbolic often has its problems with functions using if-branches, because they cannot be evaluated symbolically without knowing the specific values for the variables used.

But as I see it you don't need symbolic calculations at all. A numeric solve block or the numeric root command seems to be all thats needed to get your maximum.

Werner_E_2-1610026671688.png

To indicate the units in the plot, you can divide the variable and function by the appropriate unit (use a range variable for plotting when you do so). I assume meter for x and kN*m for M.y:

Werner_E_3-1610026804887.png

 


And what i am also curious which you used to is how to create this type of symbolic solution that the arrow is in the center? How i am able to to that because in my case it is always at the top argument like the picture provided

Because i wanted to try i myself to use more than one argument but it always puts the symbolic arrow on the top argument. Can you explain or help me how you did that like in the screenshots i attached? Would be appreciated.


Actually I have no idea how you created that symbolic evaluation which is shown in your picture. The vertical bar looks like you had created a program, which would be wrong and may be the reason for the error you get.

You create the symbolic eval with keywords either from the symbolic toolbar menu or using the appropriate keyboard shortcut. In foreign  (= non-english) languages the tooltip may be wrong. In my German version its says "Ctrl+>" while actually its "Ctrl+:" for a German keyboard:

Werner_E_1-1610028956514.png

 

To add separate different keywords in a row by separating them with a comma and you can add additional lines by simply using the same keyboard short again (or click the toolbar menu item).

 


Is there any way, that Mathcad solves or symbolically shows the function of the transverse force Qz(x)? Not only for the evaluation of the "x" values but also directly the function like Qz(x)=...x^2+..x

You did it yourself in the sheet! Simply evaluate the function using a formal argument which is still undefined.

You may limit the number of valid digits using the "float" command.

Werner_E_4-1610027593845.png

Be careful with the use of "float" when you make actual symbolic calculations because it not only limits the digits for the display but also limits the precision of the whole calculation.

Unfortunately, as already indicated above, you won't be happy with the result if you use a function which is derived from one using branches (if). You might get errors like "this value must be a scalar" or a cryptic "pattern match exception".

I guess that there is no way to symbolically show a function which uses if-statements. There are workarounds by defining the function using boolean expressions or the Heaviside function Phi instead of the if commands, but the results looks quite unclear and clumsy.

But if the function does not use any "if's" like the test function f you defined at the ned of the worksheet, the symbolic will be happy to display it using any formal argument you provide:

Werner_E_5-1610028255808.png

 

 

23-Emerald I
January 5, 2021

Since I used to do this for a living and I'm stuck at home from the virus, I took a shot at this (using Prime 4.0 Express.)  I don't like your graph of moment!

Fred_Kohlhepp_0-1609868559805.png

 

 

I don't think you can get a reversal like that with this loading.

Mine looks much different.

Fred_Kohlhepp_1-1609868591165.png

Attached is Prime 4.0 sheet (and pdf.)

7-Bedrock
January 7, 2021

The graph of the bending moment attached in my file is correct. I checked i with the given solution option from the book.

And secondly it goes to zero with a linear function and function third grad due the triangular track load.

 

23-Emerald I
January 7, 2021

Could be I miss-understood the problem. 

Fred_Kohlhepp_0-1610025442048.png

I thought you had a beam, simply supported both ends, partial length distributed load (q), and load F1 at the right end at a 60 degree angle, putting a vertical load and a cross load (into/out of the page).  

 

In that case ALL of F1 gets reacted in the right support. 

 

If I got it wrong, I apologize!