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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Program with 2 for loops and a while

5-Regular Member

Program with 2 for loops and a while

I'm trying to write a small program that calculates a new force for each increment. Each force will calculate the von mises stress at different angles

My desired output is the force (for each increment), von mises stress and corresponding angle just before the yield criterion.  (see file)

Not sure how to finish off my program.



Thank you!

Mathcad 2014


It is a good trick to use the return operator in programs


Try this:

Hi Fred,


Attached is a mathcad sheet that you fixed for another user nearly two years ago. I changed the units and the load values. i have few questions:


1. Does the sheet calculate  von Mises stress value for each load Pi applied at different angles from 5 to 45 degrees?

2. I noticed it only reports the largest angle and largest load only. Is that the intent? How do you make it report von Mises stress for each load value?

3. I put a limit on von Mises stress to be less or equal 50 ksi, but the resulting von Mises stress is much larger. i am not sure why.





23-Emerald I



I spent the better part of yesterday working on this problem.  The solution I provided did not examine the theory, just sorted out a programming issue that had been presented.


So I missed a basic issue:

       Von Mises stress looks at the total stress picture of a particular loading for comparison with a material failure or yielding condition; it gets a lot of use in finite element analysis because it can show where the critical spots are regardless of what stress component made them critical.  If you think about that for a minute it means that the Von Mises stress at any particular point cannot depend on an orientation of the frame of reference.  Yet that is what you're asking the me to do, "What is the Von Mises stress at different angles?"


I don't believe that the problem as posed in the file is correct.  When I have a better answer I'll post it.


Good Luck!


Attached is a corrected Von Mises analysis.  The problem originally address was either fatally flawed or beyond my understanding.

The attached file addresses what I think the problem originally was meant to show:

The Von Mises does not change when the frame of reference is rotated, but changing the orientation of the load (which changes the applied stresses) is reflected in the Von Mises stress.


Attached is Prime 4.0 Express, and a pdf of that file.


Revised, Corrected, Expanded



Thank you so much and I appreciate your efforts greatly.



Top Tags