Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hello everyone.
I find myself trying to calculate the calorific value of natural gas based on the application of a series of equations described in Rule AGA in its report No. 8. I doubt in the interpretation of these equations, especially in how I handle values of "SC" because I get an error.
Thanks in advance
PD. Attached a spreadsheet.
Solved! Go to Solution.
I will work with your sheet more.
At the first view:
Valery already pointed you to the main error which is the index N° of the second sum. The upper limit of that sum is not allowed to exceed 4 (N°=10) because your matrix SC consists of four columns only.
One remark about the routine extract, which had confused me a little bit on first sight. I guess you can replace the onerror branch if you simply turn cols in a 1x1 vector in case its a scalar:
I find excellent substitute the command "on error" as you suggest, thank Werner.
As for the equations have much reason, in the second sum, the value of "Nº" should not be greater than 4. Assuming that the rest this good, worried about the value of "HNº" obtained as a result, no definitely something must be wrong in applying the equations gives the norm, but the truth is not where may be the error.
I got it at last.
The problem was in the coefficients of "Cpº" (a, b and c). I multiplied the values shown in the table rather than divide them.
Thank you very much for the help to Valery and Werner.