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

11-Garnet

Iteration with several equations

Hello

I should somehow solve an parameter with iterating several equations simultaneously.

In the attached sheet are to constants, equations and the "to be solved" parameter.

The problem is that I don't know if "Given" "Find" system works for this kind of a problem...

I would prefer a solution using programming i.e. with "Add line" operator,

but I don't know how to program this.

Any help is appreciated.

9 REPLIES 9
23-Emerald I
(To:TikkaMasala)

A solve block should solve this, but you've got several problems:

1. You have some variables with units and there are numbers in your equations without units.  In several places you are raising stress (Pa) to fractional powers.  m_parameter adds a plane number to a number with units (which you cannot do.)
2. You have an exponential {exp((1.63-9.7/FC-15.7/FC)^2} which evaluates to a constant (3.521), why carry such a complicated expression; or is it wrong?

It looks like you're trying to program an iteration.  I would assume, then, that you would like delta q to go to zero (?)  Can you write simply the condition you want to be an equality?  That's what you need for the solve block.

It is possible to iterate (using a very old Mathcad construct.)  Attached is a Prime 4 file and its pdf.

16-Pearl
(To:TikkaMasala)

See the attached for how to structure the system in Mathcad.  However, the results cannot be trusted unless I have guessed the right units for your m.parameter function. You will need to adjust this appropriately.

Alan

11-Garnet
(To:AlanStevens)

Hi Alan

Your solution appears to work fine for the request that I had. I attached a computation file and

a pdf with the values using the correct units and the results seem to match with the graph.

The reason why I need an automatic iteration is that the computation should be done to a large number

of input values. The sheet with the large vectors can be found as attached.

Could you or someone else help to get the iteration program to work for a large number of these input values?

23-Emerald III
(To:TikkaMasala)

You can define the result of the solve block as a function. That should allow you to use the same solve block for any number of inputs.

Here is a very small example that should illustrate the method:

Success!
Luc

16-Pearl
(To:TikkaMasala)

Try the attached. It was quite an effort to get it to work, but you will have to examine it carefully to see if it makes sense!

Alan

11-Garnet
(To:AlanStevens)

Hi Alan and Luc

With your help I was able to get the iteration process done to a large number of inputs. Thank you for that.

As attached is a sheet which requires very similar type of iteration, which I think is working

relatively well. However, at the bottom of the computation I try to check if the iteration process results into a correct answer by comparing iterated Qtn and Qtn_test value which is computed using the iterated values.

For some reason the values do not result into a same value.

Is this something to do with the iteration process in mathcad, or is there still something wrong with the program?

23-Emerald III
(To:TikkaMasala)
Do you allow for some tolerance in the comparison? Note that you cannot expect the values to be (exactly) equal. But you can expect the absolute value of their difference to be less than a relatively small value (use TOL, or a small percentage of the average of the values).

Success!
Luc
16-Pearl
(To:TikkaMasala)

The differences are in all the rows as far as I can tell, not just row 2000.  They are too big to be explained simply by intrinsic numerical imprecision.

Are you sure you have implemented the iteration scheme correctly?  For example, your calculation of Fr seems to be outside of your iteration routine, though the flow diagram suggests it should be inside.  However, this is a complicated set of calculations of a physical scenario outside of my area of expertise, so I'm unable to make any more relevant suggestions I'm afraid.

You will just have to dig deep and spend a lot of time debugging!

Alan

11-Garnet
(To:AlanStevens)

Hi

I found the error in the program. The error was in the function of the n-parameter.

As attached is a sheet with the working iteration process to all values in the vectors.

Thank you all for your help.

Announcements