Skip to main content
1-Visitor
September 9, 2019
Solved

Direct Integration Problem - MathCAD

  • September 9, 2019
  • 3 replies
  • 6965 views

Hello All,

 

I am having a bit of trouble with direct integration on the attached sheet. I have a data set provided in Excel format which I have converted to matrix/vector form and then to function form using cubic spline interpolation. Unfortunately I am having trouble integrating the resulting function in x and am receiving a "This calculation does not converge to a solution" error message.

 

I have tried changing TOL to ridiculous values like 1E-50, with no luck.

 

Any assistance would be greatly appreciated.

 

Many thanks and kind regards

Best answer by AlanStevens

utot works ok as it is for me!

 

The uvol integral works by using an overbar.

 

See attached.

 

Alan

 

NB I removed the ridiculously low value of TOL.

 

3 replies

16-Pearl
September 9, 2019

I'm not sure what the problem is, but a b-spline works (at least in prime).

 

2019-09-09_8-54-41.png

AATaylor1-VisitorAuthor
1-Visitor
September 9, 2019
Hi Alex, Thanks for the response, much appreciated, although Cspline appears to be working now

Cheers
19-Tanzanite
September 9, 2019

utot works ok as it is for me!

 

The uvol integral works by using an overbar.

 

See attached.

 

Alan

 

NB I removed the ridiculously low value of TOL.

 

AATaylor1-VisitorAuthor
1-Visitor
September 9, 2019
Hi Alan,

I’m not sure what has happened but it now works for me too! Annoyingly I wasted about 2 hours fiddling with the sheet without any obvious remedy before giving up and posting here...

Thanks for the overbar vectorisation tip - I had missed that detail from the online help example!

Cheers
23-Emerald IV
September 9, 2019

Without seeing your worksheet...

Why do you think that creating a spline from a data vector and integrating along that spline would give you a better (more accurate?) result than just summing all data points?

A spline is no more than a nice curve along your data points and, unless there is other/prior knowledge about the system that creates the data points, you cannot add accuracy by creating a spline.

 

Assuming that Alan solved the problem, and you now know the result of integration: compare that with simply adding up the data points. Then decide if creating the spline is worth all the trouble...

 

Success!
Luc

AATaylor1-VisitorAuthor
1-Visitor
September 9, 2019
Hi Luc,

I’m not sure what you mean by summing all the data points? Surely just adding the stress values would not be the same as calculating the area? Are you referring to a summation of trapezoidal areas? I have done a crude method of that in the worksheet.

The basic answer to your question is that the method I used is the easiest way I know to find the area under a curve in mathcad.

If you know a different way using the vectors directly I’d love to know!

Cheers
25-Diamond I
September 10, 2019

Out of curiosity I implemented the different integration methods Luc had shown as functions and compared their results to the result of the trapezoid integration.

Apart from the spline interpolation Lucs methods work best if the values in abscissa vector X are (nearly, mostly) equidistant.

B.png

Worksheet in MC11 format (so Luc can make his own tries with the original data) attached.