Skip to main content
12-Amethyst
June 17, 2025
Solved

Calculating a soil area as a polygon

  • June 17, 2025
  • 3 replies
  • 2305 views

I am using MathCAD Prime 10

I’m working with a system of four vertically stacked blocks, each 4 feet high. The widths of the blocks are labeled B1, B2, and B3, and the bottom elevation of the lowest block is defined by BotEL.

The ground surface is sloped and described by a series of known (X, Y) coordinates.

For each block, I need to:

  1. Determine the coordinates of two intersection points with the ground surface.

    • These are labeled a1 and b1 for the first block, a2 and b2 for the second, and so on.

    • The "a" points represent vertical lines extending down from the right edge of each block. Their X-coordinates are defined by the block geometry, while the Y-coordinates should be interpolated from the ground surface at those X-positions.

    • The "b" points correspond to lines inclined at an angle ψ relative to the ground surface, as illustrated in the attached image.

I've also attached a Mathcad file and a diagram to help illustrate the problem setup.

Note: This is a more detailed version of a previous question I posted before. While I received an excellent response to the question as I posted it from @Werner_E, I wasn’t able to build on the response to get to my final goal.
For reference:
https://community.ptc.com/t5/Mathcad/Interpolated-Points-with-Sloped-Ground/td-p/1019396

Any guidance would be greatly appreciated!

Best answer by Fred_Kohlhepp

FWIW

 

I haven't done much (any really) work with soil and retaining walls; so I went looking to help me understand what this post was about.

 

Attached is a short treatise with information extracted from the internet.  Probably poses more questions than it answers!

3 replies

23-Emerald I
June 17, 2025

Attached is a simplified sheet (in Prime 4 Express) that solves your simplified problem.  It should open and run in any edition of Prime from 4 up.  It uses a linear interpolation function to define the surface contour, then integration to calculate areas,  Expansion to varying slip angles will be simple.

 

Hope this helps!

25-Diamond I
June 17, 2025

EDIT: 

@Fred_Kohlhepp 

It looks to me that you are assuming that the "b" points have the same y-coordinates as the corresponding "a" points. As far as I see that's not always the case and depends on the ground surface geometry.

 

Here is my suggestion (also working in P4E), following your way of using integration (my initial approach in the other thread was using polygon formulas)

Werner_E_0-1750170340643.png

Werner_E_0-1750182300835.png

 

The usage of the factor 0.99 was necessary because your Express "linterp" replacement fails when we use the endpoint 100ft.

Werner_E_0-1750171211246.png    Werner_E_1-1750171499586.png

 

The differences between your calculation and mine is not highly significant but noticeable. It also depends on the ground surface geometry.

The one chosen in the sheet is constant from x=9ft upwards, so differences only occur for the first two polygons:

Werner_E_1-1750170559468.png

By the way, I think that your approach with the integration is more suitable and targeted here than my way (other thread) with the polygon formulas.

 

Prime 4 sheet attached

25-Diamond I
June 17, 2025

@Fred_Kohlhepp 

Find attached at the top of the sheet a P4E "linterp" replacement "Linterp" which also allows for arguments outside the limits of the provided X vector. The function is ORIGIN-aware.

Its not thoroughly tested yet so use at your own risk 😉

Werner_E_2-1750173102267.png

 

25-Diamond I
June 17, 2025

Your drawing shows 3 blocks, but your sheet actually is using four, correct?

 

The picture shows an angle Phi - is it this angle which is meant in your sheet when you write psi?

 

Whats the reason for the creation of the vector theta?
You are creating four vectors here which are identical. Each of this vectors would consist of 10000 equally spaced values starting from psi/10^4 up to psi. Is this what you intended? But why four identical vectors?

 

I think that we had covered and solved most of your questions already in the other thread you referred to. Why don't you show any tiniest attempt to use the answers given there in your new sheet? You don't even define the interpolating function which would define your ground line.
Applying the suggestions given in the other thread would show us where you have troubles with the answers given there and could give us a hint where you would need further help.
Obviously it would not help if I copy and repeat the answer I gave in the other thread, where we already calculated the a and b points, the area of the polygons and the  coordinates of their centroids.

Only thing as far as I can tell which we did not deal with are the shaded polygon areas above the blocks.

12-Amethyst
June 17, 2025

@Werner_E @Fred_Kohlhepp ... Thank you all for trying to help, I really appreciate it. I did not go through the solutions in more details, but thought to provide this explanation to address @Werner_E 's questions...
I initially aimed to keep my question as simple and focused as possible, limiting it to a specific math-related point to avoid unnecessary complexity 😁, especially given the space constraints. However, it seems I need to provide more background and context to clarify what I’m trying to achieve.

I’m working on calculating soil pressure using what is called: "Trial Wedge Method", which is a graphical, visual, and iterative technique for determining the maximum active earth pressure acting on a wall. The method involves:

  • Assuming a range of potential failure wedges,

  • Calculating the soil weight and surcharge (though surcharge is beyond the scope of this question) for each wedge,

  • Finding the center of gravity (CG) of each load (focusing on the soil only for now),

  • Determining the combined CG and total load (This is also the next step beyond the scope of my question),

  • And identifying the wedge that produces the maximum force on the wall.

A few screenshots are attached to illustrate the approach in general.

 

In Mathcad, my general process is as follows:

  1. The maximum angle I’m evaluating is 54 degrees.

  2. I want to divide this angle into a large number of finite increments (e.g., 1000 iterations), each representing a possible wedge. For each wedge, I calculate the soil area, convert it to weight, and determine its CG. (which I am trying to achieve), and save in the back scene

  3. I’ll apply a similar process to the surcharge separately, (though that’s not the focus for now).

  4. I then compute the combined CG of soil and surcharge and use it to determine the resulting force on the wall. (not the focus now)

  5. Finally, I identify the wedge angle corresponding to the maximum combined loading.

The main challenge I’m facing is implementing this iterative process for the soil portion in Mathcad, specifically, automating the calculation of area, CG, and force for each wedge angle in the sequence. The concept is clear from the previously provided solution, but I’m unsure how to efficiently apply it across all iterations in the intended purpose that I am now explaining.

The second challenge is scalability. While my previously provided sample uses three stacked blocks, I need the equations to work for any number of courses (which I define as "NUM", typically ranging from 2 to 😎 without significantly increasing complexity.
I hope this answers some of the questions and gives a clearer picture of what I’m trying to do.
I will look into the provided solutions, in the sometime, I hope this explanation will give you both more insight into the end product that I need to achieve... Thanks again

25-Diamond I
June 17, 2025

I have no experience in your field of work so I can't comment on the "Trial Wedge Method" you mentioned.

As far as I understood you already know how to make the necessary calculations using a specific angle (psi or Phi?).

All you need is to make these calculations for a large number of different angles.

Is this correct?

It would help if your sheet would correspond with the drawing you provided in your sheet. Not only concerning the number of blocks but also also as far as the nomenclature is concerned.

And it sure would help if you would answer questions.

You use angle psi in your sheet and try to crate angles theta, but your drawing shows just an angle Phi!

You try to calculate a variable d.pr which is not seen in the picture. We can only guess that this would mean the difference of the x-coordinates of points "b" and "a"? But as you use the formula 

Werner_E_0-1750199292225.png

we cannot be sure about this. Even if theta (and also psi ?) is meant to be the addition of the angle Phi in the drawing to 90 degrees, the calculation would be wrong because the triangles you probably have in mind are not right angled.

On the other hand I already had shown in the other thread how to correctly calculate the coordinates of "a" and "b" points so why would you still use a wrong formula? Probably d.pr is meant to be something different. Maybe I also misinterpret the meaning of the angles you are using in your sheet - I possibly can't know.
So for me much further informations would be crucial, but not in terms of your field of work ("Horizontal distance from pressure plane to trial slip surface" doesn't mean anything to me) but rather in terms of geometry and math.

 

I would suggest that, using the help you got so far, you set up a worksheet which does the desired calcs for one specific angle.

Then we can look for looping through the various angles to find the angle with the maximal force or weight or whatever you are looking for.

Community Moderator
June 25, 2025

Hello @Eng_ReyD_497


You have some responses from our community champions. If any of these replies helped you solve your question please mark the appropriate reply as the Accepted Solution. 

Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Vivek N.
Community Moderation Team.

23-Emerald I
June 26, 2025

FWIW

 

I haven't done much (any really) work with soil and retaining walls; so I went looking to help me understand what this post was about.

 

Attached is a short treatise with information extracted from the internet.  Probably poses more questions than it answers!