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

Showing results for

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

Showing results for

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

Mar 06, 2020
06:06 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 06, 2020
06:06 AM

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.

Labels:

9 REPLIES 9

Mar 06, 2020
07:51 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 06, 2020
07:51 AM

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

- 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.)
- 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.

Mar 06, 2020
10:24 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 06, 2020
10:24 AM

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

Mar 11, 2020
03:32 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 11, 2020
03:32 AM

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?

Thank you in advance.

Mar 11, 2020
10:14 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 11, 2020
10:14 AM

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

Mar 11, 2020
01:28 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 11, 2020
01:28 PM

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

Mar 18, 2020
02:32 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 18, 2020
02:32 AM

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?

Mar 18, 2020
03:51 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 18, 2020
03:51 AM

Didn't see your sheet yet....

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

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

Mar 18, 2020
05:37 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 18, 2020
05:37 AM

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

Mar 30, 2020
01:22 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Mar 30, 2020
01:22 AM

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.