Error estimation. By indicating with Th and T2h two applications of the extended trapezoid rule with integration steps h and 2h, respectively, the error with step h is estimated ... [Pg.30]

Evaluate estimated error given h and 2h step sizes erra odeerror(si,s2) Evaluation of estimated error print(errstat(erra[2] ) ) statistics of error estimate print(errstat(erra[3])) returns statistics of errors... [Pg.502]

Error is estimated from h 2h calculation (8000 and 4000 points) ] illlllilliiliiiliii ... [Pg.514]

The results obtained from Listing 10.14 are for a total of 8000 time points. If this number is increased by a factor of 4 to 32000 time points the h-2h estimated error would be expected to decrease by a faetor of 16 whieh would make it quite small on the scale of the solution. This is left as an exereise for the reader to execute the code in Listing 10.14 with various numbers of time steps and observe flie effect on the estimated error of the solution. For a linear step distribution, little improvement in the solution would be expeeted after a total number of 32000 steps. With modem desk top computers, fliis calculation can be performed in a few seconds even with the interpretative language used in fliis work. Interestingly in research for this work, a reference was found to such a calculation in 1974 using a UNIVAC 1108 computer and performing three simulations from 0 to 10 with a step size of 0.001 (total of 10,000 points per calculation) that was performed in a little less than 30 min Just shows how fortunate we are today with... [Pg.514]

Based upon this look at the errors achieved by the MATLAB funetions for these two test cases, eonsiderable confidenee ean be gained in the differential equation solvers developed in this chapter. The eode has been developed with the intent of easily estimating the accuracy of a solution using the h-2h teehnique. Because of the internal routines used in the MATLAB routines, it is not possible to readily evaluate the accuracy of the MATLAB eodes for general nonlinear differential equations. From the comparison in this section it can be expeeted that the codes developed in this work are comparable in accuraey to the MATLAB integration routines and with care in the selection of step distributions or with the use of the automatic adaptive selection algorithm to be more aecurate than the MATLAB routines with default parameters. [Pg.541]

In Figure 11.5 the error varies essentially as h as can be seen by the factor of 16 difference between the upper and lower curves in the figure. This is to be expected from the extensive discussion in Chapter 10 on the accuracy of the TP algorithm for initial value problems. This means that a good estimate of the error in file solution can be obtained by use of the h-2h algorithm discussed in the previous... [Pg.593]

The h-2h calculation needed for the Richardson type extrapolation is also the calculation needed to estimate the error in the solution of a boundary value problem as discussed in the previous section. Thus it seem appropriate to combine these into an eigenvalue solver and such a function has been coded as the function odebveveO which is also available with the require obebv statement. An example of using this function for a higher order eigenvalue and function of the same constant potential problem is shown in Listing 11.10. The difference from Listing... [Pg.607]

Listing 12.7. Code segments to estimate PDE solution error using h-2h technique. [Pg.734]

Figure 12.6. Comparison of exact error for diffusion equation with error estimate based upon the h-2h algorithm. Curves are very close near the peak errors for each solution. |

Figure 12.11. Estimated error in solutions for the tubular chemical reactor obtained by the h-2h algorithm at t = 20. Solid lines are solutions. Dotted curves are estimated errors. |

© 2019 chempedia.info