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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Iterate a Solve block (Again, again..)

ptc-4918676
1-Newbie

Iterate a Solve block (Again, again..)

Hello all,

I know that this is a "beaten to death" topic, but I still have not been able to solve this in a satisfying way, so here goes..

There must be a way for me to iterate the solve block of the attached worksheet throug a "range variable" of the angles: Alpha and Beta,(Beta could be expressed using Alpha so in reality it is only a sollution for one variable that i need ) and I have searched high and low for a sollution.

I would be able to do it if i where trying to iterate throug a range of a normal variable like for instance F.AX or similar, but the angles illudes me.

Any help would be appreciated (i believe i have traverse most public paper/google-hits on things like "Iterate solve block" and "using range variable with given/Find")

Best regards

Rasmus

1 ACCEPTED SOLUTION

Accepted Solutions

However, i am having some difficulties when i try to expand my model(see Matrix9), and I can´t seem to identify the problem.

Are there som fundamental limit with Solveblocks or am i just messing up in my formulas (Perhaps in the definition of Deg/rad) .

The graph looks like i might have some sort of converging problem?

I am not sure what the cause here is. I found some error (see remarks in the attached sheet) but the main problem remains. I was confused about the way you managed your angles in degree already in your first post and wondered why you didn't use the pseudounits "deg" or "°" when you assign your variables, but I think the way you did it is consistent. At least I didn't spot an error there (assuming the way you calculate beta and gamma is correct for the whole range of alpha (also the values greater 90°)).

It could be either an error in your model or rather, as you suspected, a convergence problem. I tried to change convergence tolerance from the default 10^-3 down to 10^-11 but I couldn't spot a difference. Making it smaller than that value will make the solve block throw an error as of missing convergence.

View solution in original post

4 REPLIES 4

There must be a way for me to iterate the solve block of the attached worksheet throug a "range variable" of the angles:

Iteration would mean to me that the calculated values of one step are taken as input for the next one. Do you real mean that kind of procedure. It doesn't seem so as otherwise the two angles would have to be output variables.

Or do you just want your 6x1 vectors of forces calculated for a couple of alpha/beta combinations (and if yes - which?). That is just cycle through a range of angles.

Beta could be expressed using Alpha so in reality it is only a sollution for one variable that i need

So why don't you do that in your sheet and show how?

I would be able to do it if i where trying to iterate throug a range of a normal variable like for instance F.AX or similar,

??? Not sure why F.AX is more "normal" than one of your angles.

Anyway, it seems to me that for whatever you are finally after you should make your angles parameters of the function.

Look if the attached would be a step in the right direction

Maybe its also interesting to know that your system can be solved symbolically and the results may be used for future calculations avoiding the solve block and the guess values:

symb_sol.png

so you can define

symb_def.png

Hello Werner.

First off, Thank you for your time and effort, it is really appreciated.

Then secondly; You are offcourse right. I am NOT trying to iterate anything, I am, as you also deducted, trying to loop a solve block throug a predefined range of angles, and to populate a Matrix with resulting forces.

Your sollution is just what i where trying to do, and it workes like a charm.(see attached Matrix3)

However, i am having some difficulties when i try to expand my model(see Matrix9), and I can´t seem to identify the problem.

Are there som fundamental limit with Solveblocks or am i just messing up in my formulas (Perhaps in the definition of Deg/rad) .

The graph looks like i might have some sort of converging problem?

Best regards

Rasmus

However, i am having some difficulties when i try to expand my model(see Matrix9), and I can´t seem to identify the problem.

Are there som fundamental limit with Solveblocks or am i just messing up in my formulas (Perhaps in the definition of Deg/rad) .

The graph looks like i might have some sort of converging problem?

I am not sure what the cause here is. I found some error (see remarks in the attached sheet) but the main problem remains. I was confused about the way you managed your angles in degree already in your first post and wondered why you didn't use the pseudounits "deg" or "°" when you assign your variables, but I think the way you did it is consistent. At least I didn't spot an error there (assuming the way you calculate beta and gamma is correct for the whole range of alpha (also the values greater 90°)).

It could be either an error in your model or rather, as you suspected, a convergence problem. I tried to change convergence tolerance from the default 10^-3 down to 10^-11 but I couldn't spot a difference. Making it smaller than that value will make the solve block throw an error as of missing convergence.

You were so quick in marking my last post as correct answer before I could add my additional comment - so here it is:

My guess is that the problem arises because you have 19 variables to solve for, but only 14 equations - so Mathcad will have a great deal of freedom to chose any of the possible solutions in every step of the calculation.

There also are a lot of forces which should not be calculated in the solve block but should be simply defined as functions of alpha before as they do not depend on the other forces: F_CX, F_CY, F_DX, F_DY, F_FX. (These are exactly the five graphs which don't show the unwanted effects).

Which still leaves you with just 9 equations for 14 variables.

Top Tags