cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

6-Contributor

## Prime 4.0 Integration/Plotting Problem

I have defined a load function, which plots nicely:

Then I find the shear force diagram by integrating the load function and considering reactions.  This also plots nicely:

Finally, I want to find the moment diagram... should be just an integration of the shear force diagram... but Mathcad seems to get confused:

(100kNm is just an estimate for demonstration purposes)

(Note the single point at 0, 100)

Am I doing something wrong, or is this a Mathcad problem?

The main source of my frustration is that the loading diagram 'works' and the shear force diagram which is based on it, also 'works' - why then not the bending moment?

Although I understand that posting the calculation file is preferred, I have not done so as it is over 25 pages long and almost every page feeds into these functions, eventually.

Would anyone have any ideas of what I should check?

1 ACCEPTED SOLUTION

Accepted Solutions
23-Emerald I
(To:Friengineer)

You should have been able to integrate shear to get moment.  There may have been a point where you're shear equation would not evaluate; as long as you weren't calculating that exact point for the graph the graph would work but the integral would fail.

One of the useful "tricks" is to approximate the solved for moment equation with a polynomial.  Using "polyfit" you can easily find the appropriate order polynomial by plotting the error (difference in two values.)  Since polynomials integrate easily, further integrations (for slope and deflection) are much faster.

At four minutes, and looking at your graph of shear, I'd be tempted to try for a "linterp" substitution for shear as well.

9 REPLIES 9
24-Ruby V
(To:Friengineer)

Because of the dynamic unit check in Prime you should use "0 m" as the lower integral limit instead of just "0". This should do the job. Alternatively you may use "Zero" (note the capital 'Z').

Plotting M(x) will take a while as of the double integration done for every point. How long will depend on how "narrow" your range x is defined.

BTW - its a bad habit to use the same variable as integral limit and as variable of integration! You should rather use something like V(x):=integral_from_0m_to_x  w(xi)  d xi ( I usually use the greek xi but thats up to you).

Mathcad will usually do OK if you use the same variable (but you never know for sure) but from a math point of view its simply wrong doing so.

P.S.: I noticed that you seem to never close the threads you started (by chosing an answer as correct or setting the thread to assumed to be answered) and sometimes you never come back at all after your initial question. Not a nice habit.

6-Contributor
(To:Werner_E)

Thank you, Werner, but neither using 0 m, nor "Zero" changed the result.

I have also tried using a different variable as described by yourself here: https://community.ptc.com/t5/PTC-Mathcad/Maximum-of-graph/td-p/220792 to no avail.

Edit: I am assuming I need to define a 'xi' range as well?  So it means I'm finding the integral from 0 to range 'x' for a function varying by the range 'xi'?

As for my bad habits - I apologise.  I have marked a solution for the first one (the other didn't really have a solution and I couldn't find how to set it to "assumed to be answered").  Will look for others.

6-Contributor
(To:Friengineer)

I suspect the problem is in the preceding functions which feed into the load function... I did a quick check:

I assume this is due to the discontinuous load functions, which Mathcad is unable to deal with properly.

An example of one of these functions is:

6-Contributor
(To:Werner_E)

Found the solution... the definition of the moment function.

Instead of integrating Vc(x), I defined Mc(x) as a double integral:

I've left the "incorrect" integration variables for now, as it looks neater and works.

Also, it literally takes 4 minutes to plot the moment graph...

If I needed the curvature and deflected shape as well... that would be painful.

24-Ruby V
(To:Friengineer)

Here is an example which works the same way as you had setup yours. Can't say why it did not work for you the same way.

Its the lower limit of the first integral which must be 0 m and not simply 0 for the second integral to work OK. I am not sure about the logic behind it and why the unit is not necessary for the second integral.

The xi is not necessary for it to work OK, its simply the way it should be written to be mathematically correct 😉

23-Emerald I
(To:Friengineer)

You should have been able to integrate shear to get moment.  There may have been a point where you're shear equation would not evaluate; as long as you weren't calculating that exact point for the graph the graph would work but the integral would fail.

One of the useful "tricks" is to approximate the solved for moment equation with a polynomial.  Using "polyfit" you can easily find the appropriate order polynomial by plotting the error (difference in two values.)  Since polynomials integrate easily, further integrations (for slope and deflection) are much faster.

At four minutes, and looking at your graph of shear, I'd be tempted to try for a "linterp" substitution for shear as well.

6-Contributor
(To:Fred_Kohlhepp)

I'm not quite clear on how to do this.  I tried using the x values from the functions but it fails.  I am assume I need to use a vector instead of a range?

23-Emerald I
(To:Friengineer)

@Friengineer wrote:

I'm not quite clear on how to do this.  I tried using the x values from the functions but it fails.  I am assume I need to use a vector instead of a range?

Precisely.  A range is not a vector.

6-Contributor
(To:Fred_Kohlhepp)

Thanks.  Will try to do this when I need the other deflection, etc.

Announcements
Top Tags