Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Re: Maximize solve block with initial variables

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

10-04-2018
01:39 PM

10-04-2018
01:39 PM

I am trying to solve a nonlinear equation for the maximum value. The equation is from Bowles, Foundation Analysis & Design, 5th Edition, Chapter 11-7, page 609, Eq. (11-10).

I am interested in the maximum value of Kp for a given guess value assigned to two variables, rho and psi. I have tried defining the function before executing the Maximize function and have not had any success finding the maximum value of Kp. The Mathcad file is attached and I would appreciate any comments regarding format/syntax errors.

Please note that all the soil parameters are fixed and the maximum value for the function is the desired result.

Wayne Bell, PE

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

10-04-2018
08:11 PM

10-04-2018
08:11 PM

Hi,

This is the active pressure file. They are Mathcad 15 not Prime.

They use Bowles and the reference used by Bowles.

Cheers

Terry

10 REPLIES 10

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

10-04-2018
03:46 PM

10-04-2018
03:46 PM

Re: Maximize solve block with initial variables

This is what the function results are over a broad range of rho and psi:

But when you go a little further you can find this:

Which means I've found a 'maximum' near rho=66 degrees, and the value of psi doesn't (seem to) matter. The maximum is about 1.3E15. Very (too) big. Your function diverges and I guess using Maximize will not work, because it is bound to find this, and possibly other points where the function wil explode, probably due to division by zero...

Success!

Luc

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

10-04-2018
03:58 PM

10-04-2018
03:58 PM

Re: Maximize solve block with initial variables

Are you looking for something like shown below?

Note that you don't have to use a solve block (Given) as you don't have any additional constraints but of course you can use it - it will make no difference here.

When using maximize you also have to add which variable(s) Mathcad is supposed to play with and the result are rho and psi values.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

10-04-2018
04:09 PM

10-04-2018
04:09 PM

Re: Maximize solve block with initial variables

Thank you for the response. I fixed some syntax errors and mismatched parenthesis and using the initial values for Rho and Beta I am getting reasonable values, but still to high (Kp=2.292 vs alternate solution value = 1.65). I have copied out some discussion regarding the solution procedure from the text. The maximum value of the equation depends on the variables Rho and Psi and I thought the Maximize function would be able to solve the equation. I have reattached the sheet that is working when I define the variables explicitly, but I would appreciate any comments on setting up a Solve Block that uses the Maximize function correctly.

Excerpt from text:

*"In solving Eqs. (11-10) through (11-13), it is necessary to solve for the maximum value**of Kp or Ka. The maximizing of these equations depends on the two variables Rho and Psi.**This requires a search routine in computer program B-23. The values of the two dependent**variables are initialized to approximately**Rho = 0.5(Alpha + Beta)**Psi = 0.2(Alpha + Beta)**With these initial values, the search routine is used to revise the values until convergence is**obtained. In most cases values from which Kp is computed are found after not more than 20**iterations. A computer program should shut off after 46 to 50 iterations. In a few cases the**program may not find a solution using the above initial values because of the programming**search routine. For these cases, one must change the initial values and retry as necessary to**obtain the solution. Table 11-5 gives selected values of Kp for cohesionless soils. Note that**these equations correctly give Kp increasing with Beta. Values of Beta = Delta = 0 are not shown,**as they are identical to the Coulomb or Rankine solution."*

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

10-04-2018
04:47 PM

10-04-2018
04:47 PM

Re: Maximize solve block with initial variables

Looked up the equation in the book. I assume you're referring to equation (11-10).

Created a surface plot that shows there must be a (local) maximum for rho and psi both < 60 degrees.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

10-04-2018
06:36 PM

10-04-2018
06:36 PM

Re: Maximize solve block with initial variables

I've calculated the derivative of your formula and it NEVER gets to zero for any set of values of rho and psi between 0 and 60 degrees. When you plot your formula on a surface for low angles you can see that it drops off along the psi axis, but only rises with rising rho along the rho axis. That's why Maximize will run towards the 66 degrees maximum for rho (while psi can be 0).

From the description of the book, and looking at the formula in the book compared to what you've entered in Mathcad, I think you need more.

You need to enter both polarities of the formula and work from there.

You can create the Ka and Kp formula easily from your formula for Kp_C(rho,psi,p) by adding, say p, as an extra parameter and inserting/replacing a multiplication with this p everywhere a +/- is and a multiplication with -p (minus p) everywhere there is a -/+. Then Kp(rho,psi):=Kp_C(rho, psi,1) and Ka(rho,psi):= Kp_C(rho,psi,-1).

I'd suggest you then thoroughly investigate the surface plots of Kp and Ka, to find which (if one) of the two solves your problem satisfactorily. Then you might be able to apply Maximize successfully.

Success!

Luc

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

10-04-2018
08:09 PM

10-04-2018
08:09 PM

Re: Maximize solve block with initial variables

Hi,

Try this, There are two files so I will post twice. One file is for passive, other is for active.

Regards

Terry

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

10-04-2018
08:11 PM

10-04-2018
08:11 PM

Hi,

This is the active pressure file. They are Mathcad 15 not Prime.

They use Bowles and the reference used by Bowles.

Cheers

Terry

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

10-05-2018
06:09 AM

10-05-2018
06:09 AM

Re: Maximize solve block with initial variables

Hello Terry,

Wow! Exactly what I was looking for. I did find the paper by Chen & Rosenfard and will review your worksheet. The way you structured the solution by defining functions for the blocks of trigonometric functions makes it easier to evaluate the whole equation.

I am doing some engineering work for contractors here in Charlotte, NC and the municipalities require PE sealed shoring calculations, which typically reference DOT specifications. Several DOT agencies use the Caltrans Trenching and Shoring Manual and specifically, Chapter 6 of the same for designing unrestrained shoring systems. The Manual uses the method of nonplane-failure surfaces (Caquot and Kerisel) referenced by Bowles, but this requires interpolation from published curves and data tables. I am trying to keep to a "closed form" solution to make it easier for reviewers to check the calculations.

Again, thank you for sharing your work - very impressive.

Wayne Bell, PE

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

10-05-2018
07:01 AM

10-05-2018
07:01 AM

Re: Maximize solve block with initial variables

Hello Terry,

I am currently reviewing the Passive Pressure worksheet you shared and noticed that you set up the solution based on a minimized value; however, Bowles (p. 611) states that the maximum value must be solved for. Going back to the Chen and Rosenfarb paper (p. 9) they say the minimum value must be solved for the passive pressure and the maximum value for the active pressure. The paper also mentioned an iterative technique which incorporates the method of steepest decent. I checked the help file for a description of the different algorithms that are available and will investigate the results of manually specifying the different methods. If I find anything of interest, I will let you know.

Wayne

Top Tags