partial evaluation of formulaes

partial evaluation of formulaes - Messages

#1 Posted: 9/13/2011 3:01:30 AM
Laurent Fournier

Laurent Fournier

9 likes in 66 posts.

Group: User

For my engineering worksheets I need to have the intermediate values shown during a calculation. The main point in an engineering document is to make the entire calculation as explicit as possible, and to show step by step how a number is arrived at. This is a traditional engineering practice and is the only solution to make checking by a third party possible, and inspire confidence.

There is a solution with Excel, by typing the formula as a text string and then use the "evaluate" internal function. Or, more simple but it involves typing the formula 2 times, by typing the formula normaly on the right side of the page, and as a text-string concatenation of operators as text strings and numbers as cell references on the left side, for visualising the formula instanced with the values of variables. I can send examples of my worksheets for those interested. It is inspired by the Mote method.

The only problem is, Excel has no pretty print function. We can type the formula in the equation editor but it involves typing two times.

It would be very useful if either:
- Smath studio could be integrated with excel in a manner that it's pretty print capability would be linked live with excel formulaes, or
- Smath studio would have a partial evaluation capability, where lines like the following could be printed:

C:= Pi * D = 3.14 * 100 = 314

Naturally, the formula should be typed only once, to work faster and to eliminate the risk of discrepancies. It would be printed without any evaluation on the left, with a partial evaluation in the middle, and a full evaluation on the right side.

Without this capability, Excel remains today a much better tool for ordinary engineering calculations than Smathstudio or Mathcad.
#2 Posted: 9/13/2011 5:27:27 AM
maweilian

maweilian

5 likes in 103 posts.

Group: User

loha,

Wrote

The main point in an engineering document is to make the entire calculation as explicit as possible, and to show step by step how a number is arrived at. This is a traditional engineering practice and is the only solution to make checking by a third party possible, and inspire confidence.



Here is a link to an example of what seems to me to be a very clear (albeit simple) example of an engineering calculation completed in Smath.

Heat Rejection Calcs

Wrote

Smath studio would have a partial evaluation capability, where lines like the following could be printed:

C:= Pi * D = 3.14 * 100 = 314

Naturally, the formula should be typed only once, to work faster and to eliminate the risk of discrepancies. It would be printed without any evaluation on the left, with a partial evaluation in the middle, and a full evaluation on the right side.



While there is certainly nothing wrong with the format you describe above (except for the absence of units), I would hold that the calculations in the example I point to above are equally clear. However, I do think that stringing expressions together with multiple equal signs in a single line would be a nice feature. The need for the partial evaluation in the middle seems to me to be unclear. It would also increase the work for the user (since the user would have to specify the units for the partial evaluation step).

Wrote

Without this capability, Excel remains today a much better tool for ordinary engineering calculations than Smathstudio or Mathcad.



While Excel is a powerful engineering tool, Smath and Mathcad, in my opinion, are far better at producing readable, explicit, and documented engineering calculations for review by others. Although they could always be improved, this is their strength, and they certainly do it better than Excel.
Will Massie Mechanical Engineer Oregon, USA
#3 Posted: 9/13/2011 12:40:13 PM
Laurent Fournier

Laurent Fournier

9 likes in 66 posts.

Group: User

Hi Will,

Thanks for your reply. I had a look at your calculation sheet and I understand mechanical engineers and structural engineers have different needs. When designing a structure we rely on methods which are very much standardised, so we don't need so much of explanation for the calculation part. On the other hand we focuss more our attention to the analysis. Our calculations are here mostly to check the relevance of the analysis, and even in the most standardised calculations (like a doubly-reinforced concrete beam) there are several parameters which we want to check, and these parameters are calculated at various steps in the course of the main calculation. These parameters help us to decide whether to increase the depth of the beam or its width, or the compression steel, etc. in case we are not satisfied with the results. So we need to see the numbers, all the time. And we like to see the numbers exactly the same way they would be if they were calculated by hand, at every step. Also, we have taken the habit of not putting the units at every calculation step, to make it easier to read. So we put the units generally at the end of each significant step only. I've tried to use the embedded units in Smath and I found it was giving me more work, not less! In Excel I put the units in the column next to the number, and it's faster to use. We also use conventional units which are not uniform in a calculation, like kN-m for moments, but N/mm2 for stress. Because N-mm for moments, or kN/m2 for stress would yield impossible numbers, and we don't like scientific notation. We write the concrete strain as 0.0035 and not 3.5E-3. We are also very careful to use as few decimals as possible. In construction, the accuracy is never higher than the millimeter, and most of the time closer to 25mm. The estimation of the material and loading data are also quite coarse. So our accuracy never goes beyond 4 significant digits, and we prefer to express the final result with 3 digits only. Any more accuracy would be confusing and misleading, as the actual accuracy, all uncertainties multiplied together, is between 1% and 10%, depending on the type of structure. (You see, there are various idiosyncrasies in every profession!)

I wanted to attach one of my excel sheets as an example but I don't find the "attach" button!

Regards,
Laurent
#4 Posted: 9/13/2011 10:39:16 PM
maweilian

maweilian

5 likes in 103 posts.

Group: User

Laurent,

I would enjoy very much to see one of your excel spreadsheets. See the following wiki page for info on how to attach files: Notes on Using the Forum
Will Massie Mechanical Engineer Oregon, USA
#5 Posted: 9/13/2011 10:54:27 PM
Laurent Fournier

Laurent Fournier

9 likes in 66 posts.

Group: User

Hi Will, I have uploaded a pdf print of a spreadsheet for checking doubly-reinforced sections as per Indian standard IS-456.

Laurent

https://smath.com/wiki/GetFile.aspx?File=forum_attach%5cloha%5cRib%2033%2c44%2c55%2c66%20at%20support%20-%20IS%20456m.pdf
#6 Posted: 9/14/2011 12:06:01 AM
Laurent Fournier

Laurent Fournier

9 likes in 66 posts.

Group: User

I should mention that I have re-used in my spreadsheet some elements (the overall layout and parts of the graphic) from the following spreadsheets, which are very good:

http://www.civl.port.ac.uk/rcc2000/

Also, you can find here an excellent short course on how to use excel and word in an efficient manner for engineering:

http://www.motagg.com/

After having read that course very recently, I will now work on improving my spreadsheets in the direction of self-documentation and transparency.

Laurent
#7 Posted: 2/6/2015 1:54:58 PM
jos.md

jos.md

0 likes in 8 posts.

Group: User

Hello,

I was searching the same topic that you posted.
I have a good answer from an advanced user. That was exactly what I needed, I think that will help you too. Here is the link of my question and answer:

http://en.smath.info/forum/yaf_postst4256_Explicit-values-of-formula-s-variables--partial-evaluation---equivalent-of--explicit-as-in-Mathcad.aspx#post19032

Regards.

#8 Posted: 3/9/2015 5:14:05 PM
Alexander O. Melnik

Alexander O. Melnik

127 likes in 494 posts.

Group: Moderator

jos.md,

thank you for the info, it does seem to work. One caveat - numeric optimization needs to be set to none when defining the variable which you would like to evaluate partially later one.

Which is unfortunate given that the workbook can be 10s of pages long and there is no search function.

Question to the developer - is there an easy way to set default numeric optimization to "none"? This would be quite valuable to us, engineer folks.
#9 Posted: 8/9/2015 10:21:46 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Most Engineering stuff is advanced and reproduces Engineering formulas. So, rarely partial results are needed especially if some intermediate calculations don't support "unit sytem", vg: spline interpolation. Advanced Engineering is not practical in bits and pieces, they are nested in program. Eventually, you can collect partial results in vectors and read back the indexed result from the program. Bad luck with this suggestion, some stuff when nested in program don't calculate, no matter hours spent in all permutations of "optimisation" Ah !
Example that don't calculate in nested program: Non-linear model fit LGC [Legendre-Gauss-Cholesky].

Finally, it's here that attachments can be uploaded.
From the "Post Reply" ... NOT from "Quick Reply".

jmgiraud@bell.net
#10 Posted: 8/9/2015 10:42:32 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Direct Files and Pictures attachments on the forum

Follow these steps:

1. write your post

2. pick the "Attach files to this post?" option on the bottom-left corner

3. click on the "POST" button
LGC Pharmacokinetics.sm (54 KiB) downloaded 69 time(s).
  • New Posts New Posts
  • No New Posts No New Posts