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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Basic integration problem

ptc-5151235
1-Newbie

Basic integration problem

I'm pretty new to MathCad and trying to integrate, however my integration is not converging. The problem seems to be in the sigma calculation since when I remove it from the second equation the calculation converges. The calc is listed below. z is defined as a vector from 5 to 50 ft and calculated every foot. Thank you very much!

Picture1.png

1 ACCEPTED SOLUTION

Accepted Solutions

Tha wasn't a good idea. Using a vector as input was OK. Its dangerous to mix up rangevariables and vectors. Range variable are good for three kind of things only: use them to index vectors & matrices, in programs in for-loops, in 2D-plots. Thats all. Don't confuse them with vectors just because they may look alike.

Look at the attached sheet if it would help. I set up the function to take a single scalar as parameter, but I am still unsure as of the integral. You can't take the parameter of the function as variable of integration.

View solution in original post

12 REPLIES 12

For questions of that kind its much mire useful if you post the worksheet. You can do this by chosing "Use advanced editor" at the upper left.

I am confused as of you variabl for integration - z. Chose another name, as z is the parameter of the function Q' and a constant vector as you wrote. Used the way you did it, sigma is called in the integral with a scalar (which has nothing to do with the vector z) and this will make sigma fail, I guess.

It seems to be easier if you setup your functions to deal with a single scalar value and then call it with the vector using vectorizing.

Im trying to figure out how to post the entire worksheet. may take a second

okay here it is. Thanks a bunch. The RangeVec function on the upper right hand of the worksheet is something that another student put together and has been used previously and worked just fine. I just have never run an integration in MathCad before.

Instead of the RangeVec function I have also used the following function and came up with the same non-convergance error.

Picture2.png

Tha wasn't a good idea. Using a vector as input was OK. Its dangerous to mix up rangevariables and vectors. Range variable are good for three kind of things only: use them to index vectors & matrices, in programs in for-loops, in 2D-plots. Thats all. Don't confuse them with vectors just because they may look alike.

Look at the attached sheet if it would help. I set up the function to take a single scalar as parameter, but I am still unsure as of the integral. You can't take the parameter of the function as variable of integration.

That works! Thanks a bunch. Integral is what I was trying to do.

One idea which came to me upon looking at your file again. Could it be that you didn't wanted a vector of results but simply wanted to calculate a single value and thought to get Mathcad doing the integral you would have somehow provide the integral range with interim values in form of a range or vector variable? You see that you don't need to do so as Mathcads numeric algorithm would do it on its own. So you even don't have to make it a function:

integral.png

The calculation is for the friction that soil exerts on a drilled bridge pier. The friction increases with depth and is cumulative. Within the intgral, sigma is the weight of soil above the calculated depth (z) and the weight must be multiplied by a friction angle which is the tangent calculation. This is done from a depth of 5ft to the depth of the pier (Ds). So that is why I need to run an intergral. I will do some hand calcs to make sure it is calculating correctly, however this cleared up some confustion.

Glad you are up and running.

"without sigma" should only mean that I had put the expression directly into the integral instead of calling that simple function everytime from within the integral. It was not meant that I omit it at all. Keeping sigma as a separate function makles sense if you intend to try your calculations with different functions for sigma.

So the calculation is working for the total depth of the pier (Ds). However I wish to plot the increase in friction on the perimeter of the pier as depth is increased. Currently, the calculation is producing one value as shown in the previous post

Do you mean something like the attached?

Alan

Picture1.pngyup that works! I got the same answer doing the following intergral!. Thanks so much for the help, now on with the rest of my homework.

Top Tags