Skip to main content
12-Amethyst
January 29, 2026
Solved

Algorithm to Calculate Soil Wedge Area, Weight, and Centroid Behind a Retaining Wall

  • January 29, 2026
  • 3 replies
  • 957 views

This is a clarified follow-up to a previously solved question. The new objective is to compute the soil wedge area, weight, and centroid (CGx, CGy) behind a retaining wall using the mathematical approach described in the attached Mathcad files, and input data is already explained in the attachment. I am using Mathcad Prime 11. Any help would be appreciated.

Eng_ReyD_497_0-1769684366557.png

 

Best answer by Werner_E

According to your explanations in the PM you sent to me

"To clarify, in addition to the soil self-weight, these loads represent surcharge (live) loads such as pedestrian or vehicular loads, etc.."

and

"If the surcharge region overlaps the critical wedge, only the overlapping length is considered."

I understand why only the second load can have any effect and so the others must result in zero.

I added violet boxes to represent the position of those loads and it can clearly be seen that load1 is to far to the left to be able to affect the wedges and load3 it too far to the right as beta is not lower than 34°. We would need an angle ß of 23° or lower to have xb exceed the 37,5 ft and so make load3 to have an effect.

The pic shows the situation with ß being the lowest value of interest (34°) and your function lsurLL correctly returns that the wedge is overlapped by load2 for its full length of 12 ft.

Werner_E_2-1769977360993.png

 

EDIT: I removed the point-in-polygon test area because that function is not used at all.

Also removed the calculation of 'weight' in the 'calculate' function as it easily can be calculated outside.

The "Intersect" function was taken from an older sheet of mine where points were represented by complex numbers (real part = x-coordinate, imag. part = y-coordinate) and polygons by simple vectors of complex numbers.

The functions for calculating area and center of gravity of a polygon assume polygons to be  presented as a nx2 matrix of real numbers.

replaced attached sheet

 

 

3 replies

21-Topaz II
January 30, 2026

Here is something I used to use to find the log spiral failure surface behind the wall for the active and passive horizontal and vertical pressures.

Cheers

Terry

 

12-Amethyst
January 31, 2026

Thanks @terryhendicott ,
I very much appreciate sharing your solutions, which shows that you are familiar with the problem I need to resolve. The example you shared is still does not give what I would need, and I do not know how to tweak it!! My MathCAD skills are still not as good as you may think!

I will need to calculate the area(s) and centroid(s) (CGx, CGy) of each shape bounded by the vertical plane and the inclined planes bounded by the dashed lines incrementally. The challenges to do this is to identify the coordinates of the intersecting points with the soil, then calculate the area(s), whether they are triangles or polygon, and their centroids (x & y) for each shape and so on.
This is the "trial wedge method". I appreciate sharing your problem, but I am not sure how to tailor it to get it to do the trial wedge.

Eng_ReyD_497_0-1769835202663.png

 

25-Diamond I
January 31, 2026

For a given angle ß (running from 90° down to 34°), which polygon are you looking for to calculate area and centroid?

The left or the right in this picture:

Werner_E_2-1769834222501.png

Is there a guarantee that the first segment in xy has an intersection with the vertical line at B1?

This means that the second x-value in xy is always larger than B1.

 

 
 

EDIT: Your reply to Terry seems to make clear that you have the left version in mind where the vertical line at B1 is a border.

The last question is not that important as we can run through xy until we come across a point to the right of B1,

 

P.S.: I think it was a mistake that you marked this post as the correct answer. You should remove that mark as others may ignore a thread they think is already answered.

12-Amethyst
January 31, 2026

Thanks @unknown ...
1) The left.

2) I am not clear on the second question, regarding intersection with B1, but I will answer both scenarios I thought you might mean

a) If I assume that you mean the vertical line, which is referenced as "Pressure plane", this is where the first segment starts, so the vertical line is one side of the segment. The intersection I mean will be with the soil profile which is the topmost line.


b) If you mean β₁ instead (the angle), what I am showing is read as βᵢ "with subscript letter i not 1"
as the iteration progresses, the wedge continuously increases in size, as you show on the left, and each new wedge has its own updated centroid.

The angle βᵢ is not intended to represent a single fixed plane, as I shown (I apologize!). Rather, it is a dynamic parameter representing each incremental dashed plane (β₁, β₂, β₃, β₄, and so on).

The dashed lines I am showing at these locations are just schematic for illustration purposes only. In practice, the dashed planes represent approximately 1,000 individual planes, each associated with a unique corresponding β angle value, starting from the vertical line (pressure plane), and rotating until it with the solid green line. I understand it was confusing, 

As shown in my file, the angle β is generated using an equation that computes about 1,000 incremental angles ranging from 90° to 34°, with each step equal to 1/1000 of the total angular range.


Eng_ReyD_497_0-1769836185242.png

I realize the dashed lines I added, for illustration, may have caused some confusion, my apologies!. The blue solid line shown happens to align with one of the planes in my model, but the dashed planes are not fixed at those locations. They are virtual and schematic only, generated dynamically during the iteration process.

I’ve also added a couple of notes to the original sketch for clarity. (attached). Please let me know if this addresses your questions, and I truly appreciate your help.

 

25-Diamond I
January 31, 2026

What I meant with my second question was if the soil polygon could also look that way:

Werner_E_0-1769840757191.png

Here the vertical line at x=B which is the left border of the polygon of interest does not intersect the first segment of the soil polygon.

 

But it doesn't matter anymore. The solution I am about to post should be able to deal with this situation as well.

25-Diamond I
January 31, 2026

OK, based on the informations so far here is my attempt.

I provide a function "calculate" which, given the angle beta and the soil polygon as input returns area, center of gravity, weight and also the polygon so we can plot it. Its not completely self-contained as it relies on variables B1 and gamma to be defined in the worksheet.

Werner_E_0-1769841097729.png

Of course this function "calculate" can also be used to create a table of values. I have chosen 1120 steps because this will make for a nice step value of 0.05 degree but of course that value can be freely chosen.

Because Prime does not allow to change the units in a matrix with mixed units i decided to create a table with dimensionless values and add a header line which specifies the units.

Werner_E_1-1769841379891.png

Hope this helps

Prime 11 sheet attached

 

 

 
 

 

 

25-Diamond I
January 31, 2026

Found an error in the sheet (it would not deal correctly with more weird soil polygons).

Fixed version attached

25-Diamond I
January 31, 2026

Damned!

Fixing the previous problem introduced a new bug which lets the calculation fail for the pathologic case of  ß=90°.

Is fixed in the attached file!