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

Summation - Mathcad Prime 9

SS_7889695
3-Newcomer

Summation - Mathcad Prime 9

Good afternoon,

I'm sure someone on here can assist, we are fairly new to using Mathcad and we are struggling to get the lambda formula in the below snip into a Mathcad sheet, it throws up a number of errors and we aren't sure what numbers we should be adding where.  If anyone can assist, we would be very grateful.

Cheers

Simon

 

SS_7889695_1-1713879072225.png

 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:SS_7889695)

As Luc already wrote, your first attempt fails because you simply used wrong syntax. Summations cannot be defined by typing two dots (which actually define a so called "range" in Prime).

 

On contrary to Luc I don't think that Primes infamous auto-label failures are responsible for your second attempt failing.

Rather the reason is (as Luc also writes at the end of his posting) only that you can't evaluate a function DEFINITION. In this definition the formal argument n (you could use any name there) is not related in any way to the variable n you defined earlier.

Here some thoughts:

Werner_E_1-1713953572703.png

Prime 9 worksheet attached

 

View solution in original post

8 REPLIES 8
Cornel
19-Tanzanite
(To:SS_7889695)

You can attach your sheet. In the image you show us we cannot see any error. Learn to attach your Mathcad file 

Werner_E
25-Diamond I
(To:SS_7889695)


@SS_7889695 wrote:

Good afternoon,

I'm sure someone on here can assist, we are fairly new to using Mathcad and we are struggling to get the lambda formula in the below snip into a Mathcad sheet, it throws up a number of errors and we aren't sure what numbers we should be adding where. 


 

And how should we know which length of electrodes or which number of  rods, etc. you would like the calculation to be done??

 

I would suggest that you state more clearly what exactly you need and that you attach the Mathcad or Prime worksheet with your attempts.
In case of Prime you should additionally state which version you are using.

 

All that could be done with the information in the picture is to set up a function with five input values rho, L, n, s and d (the latter is mot mentioned in the text!). This function could now be evaluated using different input values.

Werner_E_0-1713893077933.png

You may replace the sum by

Werner_E_1-1713893112858.png

In any case I guess that there is no need to use the approximation formula for lambda given in the text.

 

Because you specifically mentioned the formula for lambda (I assume the exact one with the sum), you can write a separate function for it and use that in the function for R.t

Werner_E_2-1713893446437.png

 

As shown you could also formulate the expression for lambda that way:

Werner_E_3-1713893524191.png

 

 

 

 

Good morning Werner

Thank you for your response, the snip shown in the original post is directly from BS7430, we are just looking to get the lambda formula to work using the summation function, the main formula works.

We were of the understanding that Mathcad would be a direct input system, ie, we write the formula as shown in the document, unfortunately, we cannot get this to work. I have laid the formula out in the attached file as is written in the standard.  Does Mathcad need the formula manipulating to work correctly then as you have shown?  The lambda formula you have written, we can't get to work, I laid this out in the sample file attached.

Using Excel, of which we are trying to move away from, the value returned is 3.658

Thanks Simon.

LucMeekes
23-Emerald III
(To:SS_7889695)

Simply accept that:

LucMeekes_0-1713950625275.png

is NOT supported as a valid notation for Prime

--  and loge(x) is also not a supported notation, you have to use ln(x) or log(x,e) --

but it is equivalent to

LucMeekes_1-1713950647976.png

Which gives, for n=9:

LucMeekes_2-1713950711035.png

Now your function:

LucMeekes_3-1713950831380.png

doesn't work due to a nice, but sometimes cumbersome feature of Prime called auto-labelling. Note that every item you enter gets automatically assigned a label:

LucMeekes_6-1713951190736.png

 

LucMeekes_5-1713951103841.png

and:

LucMeekes_7-1713951282156.png

Your three n's are labelled differently, so Prime treats them as different. Note that '(variable)' may be different from 'variable' but 'variable' is certainly different from '(-)'.

In this case I guess mainly the difference between (n) and the n above the summator is crucial. You can change the label for a variable using the selection box of  'labels', and make them equal, preferably 'variable'.

But in this case one other thing is interfering and that is the fact that you evaluate the definition of the lambda function in-line (You've but an = at the end of the definition). While that may work in many cases, it also causes trouble more than you wish for. If possible, refrain from doing that. Remove the = at the end, and evaluate the function separately.

 

Success!
Luc

 

Luc

 

Also thank you to you for explaining this so well, it is much appreciated.

 

Kind regards

 

Simon

Werner_E
25-Diamond I
(To:SS_7889695)

As Luc already wrote, your first attempt fails because you simply used wrong syntax. Summations cannot be defined by typing two dots (which actually define a so called "range" in Prime).

 

On contrary to Luc I don't think that Primes infamous auto-label failures are responsible for your second attempt failing.

Rather the reason is (as Luc also writes at the end of his posting) only that you can't evaluate a function DEFINITION. In this definition the formal argument n (you could use any name there) is not related in any way to the variable n you defined earlier.

Here some thoughts:

Werner_E_1-1713953572703.png

Prime 9 worksheet attached

 

Werner

 

Thank you again for your support it is much appreciated, being new to Mathcad some of the qwerks do catch us out.

 

Thanks again

 

Simon

LucMeekes
23-Emerald III
(To:SS_7889695)

Hi Simon,

Assuming you want to implement the other formulae of the standard also, I made some proposals in the attached Prime sheet.

 

The lambda for the third function, RTOT, is implemented using an interpolation function along the table values of Table 2. This allows you to use the odd values above 10 for n.  But beware, also non-integer values for the amount of rods, and values outside of the range 2 to 20 are accepted. Especially those last values will be nonsense because the curve described by the Table 2 values is no longer followed: linear extrapolation occurs. It is not difficult to include error checking on non-integer n-values and/or out-of range values, but it makes the function less straightforward to understand. It would be nice if the standard explained how the values of Table 2 were calculated, then we could use that algorithm instead...

 

You'll notice that there are small differences between the results in Appendix B of the standard versus those calculated with Prime. These are due to the fact that the standard uses rounded, intermediate results to calculate the end results. The way I set up the functions in Prime, the intermediate results keep the full precision.

 

Success!
Luc

Announcements

Top Tags