Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
2 views11 pages

Developing and Implementing Two-Step Adams-Bashfor

Uploaded by

mada.alharbi2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views11 pages

Developing and Implementing Two-Step Adams-Bashfor

Uploaded by

mada.alharbi2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

ACC JOURNAL 2017, Volume 23, Issue 1 DOI: 10.

15240/tul/004/2017-1-005

DEVELOPING AND IMPLEMENTING TWO-STEP ADAMS-BASHFORTH-MOULTON


METHOD WITH VARIABLE STEPSIZE FOR THE SIMULATION TOOL DYNSTAR
An Pletinckx1; Daniel Fiß2; Alexander Kratzsch3
Hochschule Zittau/Görlitz, IPM Department
Theodor-Körner-Allee 16, 02763 Zittau, Germany
e-mail: [email protected]; [email protected]; [email protected]

Abstract
The simulation tool DynStar, created by Hochschule Zittau/Görlitz IPM department, was
previously using only single-step methods to solve differential equations. This paper describes
the development of a multiple step method to complement the others. The Introduction gives
the reader a better idea why a multiple step method can be useful. The theory part is focused
on the two-step Adams-Bashforth-Moulton method and how it is possible to make the
formulas suitable for variable stepsize. Further, an algorithm is developed to solve the
differential equations, using the ABM formulas and adjusting the stepsize according to the
error between the prediction and the correction. This is described in the Implementation
section. Finally, the performance of the ABM method is compared with RK4 and the Hanna
method in the Results section.

Keywords
Adams-Bashforth-Moulton; Multistep method; Variable stepsize; Numerical solution;
Ordinary differential equation; Initial-value problem; Hanna method.

Introduction
In engineering, it is often necessary to simulate the behaviour of real-life systems. For this, a
mathematical model that describes the system is needed. When taking into account the speed
of some variations, the description may contain derivatives. This means that you will end up
with one or more differential equations in the model. Then you are left with the problem of
solving these equations, which can be done analytically or numerically. In the era of
computers, numerical solving techniques have become increasingly important.
Considering an initial-value problem 𝑦 ′ = 𝑓(𝑥, 𝑦) and 𝑦(𝑥0 ) = 𝑦0 , many methods have been
studied to solve this differential equation numerically [1]. The simplest one is undoubtedly the
(forward) Euler method, where the following value 𝑦𝑛+1 is calculated as:

𝑦𝑛+1 = 𝑦𝑛 + ℎ ∙ 𝑓(𝑥𝑛 , 𝑦𝑛 ) (1)

Of course, such a formula cannot be used in practice because it generally will not give an
accurate result. An attempt to construct a more reliable method has led to the improved Euler
method, which uses the average of the slopes in (𝑥𝑛 , 𝑦𝑛 ) and (𝑥𝑛+1 , 𝑦𝑛+1 ). Hence 𝑦𝑛+1 is
calculated implicitly:

𝑦𝑛+1 = 𝑦𝑛 + 2 (𝑓(𝑥𝑛 , 𝑦𝑛 ) + 𝑓(𝑥𝑛+1 , 𝑦𝑛+1 )) (2)

Solving an implicit equation on its own can be difficult because it leads to a non-linear
problem. However, this difficulty can be avoided by combining the implicit formula with an

51
explicit one in a predictor-corrector scheme; in this case the forward Euler method would be
the ideal choice. Unfortunately, the accuracy of the improved Euler method is still
disappointing.
Finally, generalization of the Euler formulas was created, which is now known as the Runge-
Kutta method. It uses a weighted average of slopes in the interval 𝑥𝑛 ≤ 𝑥 ≤ 𝑥𝑛+1 .

𝑦𝑛+1 = 𝑦𝑛 + ℎ(𝑤1 𝑘1 + 𝑤2 𝑘2 + ⋯ + 𝑤𝑚 𝑘𝑚 ) (3)

It can be concluded that the Euler method and the improved Euler method are in fact Runge-
Kutta methods of the first and second order respectively. The formulas that are most
commonly used, because they are very accurate and still easy to implement, are of the fourth
order.

𝑦𝑛+1 = 𝑦𝑛 + 6 (𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 ) (4)

𝑘1 = 𝑓(𝑥𝑛 , 𝑦𝑛 )
1 1
𝑘2 = 𝑓(𝑥𝑛 + ℎ, 𝑦𝑛 + ℎ ∙ 𝑘1 )
2 2
1 1
𝑘3 = 𝑓(𝑥𝑛 + ℎ, 𝑦𝑛 + ℎ ∙ 𝑘2 )
2 2
𝑘4 = 𝑓(𝑥𝑛 + ℎ, 𝑦𝑛 + ℎ ∙ 𝑘3 )

Even though RK4 is popular for its accuracy, it has the major disadvantage that in each step
the function must be calculated four times. When function evaluations are expensive, this can
seriously prolong the runtime. A solution is found in the category of multistep methods.
Notice that the methods mentioned above are all single-step methods because in order to
compute the successive value 𝑦𝑛+1 , information about only one prior value 𝑦𝑛 is needed.
Multistep methods use several points in the calculation, but they gain efficiency by storing the
previous information such that only one new function evaluation has to be computed at each
step. To improve the accuracy and stability of the algorithm, one can choose to add a
corrector step which also requires an additional function evaluation. This doubles the cost, but
it is still an improvement over the Runge-Kutta method. The best-known multistep method is
the Adams-Bashforth-Moulton one, which will be discussed in the next section.

1 Theory
Adams-Bashforth and Adams-Moulton are linear multistep methods. This means that the next
value 𝑦𝑛+1 is calculated as a linear combination of various 𝑦𝑖 and 𝑓(𝑥𝑖 , 𝑦𝑖 ) from the previous
𝑠 steps:

𝑦𝑛+1 + 𝑎1 𝑦𝑛 + 𝑎2 𝑦𝑛−1 + ⋯ + 𝑎𝑠 𝑦𝑛−𝑠+1


= ℎ(𝑏0 𝑓(𝑥𝑛+1 , 𝑦𝑛+1 ) + 𝑏1 𝑓(𝑥𝑛 , 𝑦𝑛 ) + ⋯ + 𝑏𝑠 𝑓(𝑥𝑛−𝑠+1 , 𝑦𝑛−𝑠+1 ))

For Adams-Bashforth, coefficient 𝑎1 = −1 and all others 𝑎2 = ⋯ = 𝑎𝑠 = 0. The coefficients


𝑏𝑖 are derived by considering the following form:
𝑥 𝑥
𝑦(𝑥𝑛+1 ) = 𝑦(𝑥𝑛 ) + ∫𝑥 𝑛+1 𝑓(𝑡, 𝑦(𝑡)) ∙ 𝑑𝑡 ≈ 𝑦(𝑥𝑛 ) + ∫𝑥 𝑛+1 𝑝(𝑡) ∙ 𝑑𝑡 (5)
𝑛 𝑛

52
It’s possible to replace the function 𝑓(𝑡, 𝑦(𝑡)) by the interpolation polynomial 𝑝(𝑡) through
the s previous points [2]. After the polynomial is calculated, an expression for the coefficients
bi can be found. For example, the two step Adams-Bashforth formula becomes:
3 1
𝑦𝑛+1 = 𝑦𝑛 + ℎ ∙ (2 𝑓𝑛 – 2 𝑓𝑛−1 ) (6)

However, the integration polynomial was integrated from 𝑥𝑛 to 𝑥𝑛+1, while its interpolation
interval is limited to [𝑥𝑛−𝑠+1 , 𝑥𝑛 ]. In general, integration polynomials cannot be used as a
reliable approximation outside their interpolation interval. So it is logical to include the point
(𝑥𝑛+1 , 𝑦𝑛+1 ) in the polynomial and do the calculations again. This results in the implicit
Adams-Moulton formulas. Again the two-step formula is shown:
5 8 1
𝑦𝑛+1 = 𝑦𝑛 + ℎ ∙ (12 𝑓𝑛+1 + 12 𝑓𝑛 – 𝑓 ) (7)
12 𝑛−1

Adams-Moulton has some great advantages over the explicit Adams-Bashforth [3]. As
already mentioned, Adams-Moulton methods give more accurate approximations due to the
wider interpolation interval. They also obtain a higher order with the same amount of previous
steps and generally, implicit methods are more stable than their explicit counterparts. Of
course, the drawback lies in its implicit nature, which makes it difficult to solve as it translates
to a non-linear equation.
The way to profit from both methods is to combine them in a predictor-corrector scheme. The
explicit Adams-Bashforth method computes a prediction 𝑦 ∗ 𝑛+1 . At this point, the function
evaluation 𝑓 ∗ 𝑛+1 is calculated. Then the corrected value 𝑦𝑛+1 is obtained with the Adams-
Moulton method and again, the function is evaluated to use in later steps. This is known as the
PECE procedure, but it is also possible to repeat the correction step, for example PECECE or
even more. Each additional correction step C makes the result more accurate, but also
introduces a new function evaluation E, which partly or completely reverses the advantage
that ABM has over RK4. A compromise is made by performing the correction step only once
while still ensuring a sufficient accuracy. This is established by starting the calculation over
with a smaller stepsize when the correction differs too much from the prediction.
This includes that we are now facing a variable stepsize problem and that formulas (6) and (7)
must be adapted, because they assume a constant stepsize. The coefficients bi depend on the
ratio of the stepsizes. That’s why they are constant for a fixed stepsize, but at each step they
need to be calculated in a variable stepsize problem. There are different ways to make the
Adams methods suitable for variable stepsizes, but we will follow a procedure developed by
Krogh and described by Lopez and Romay in their paper [4].
The expression of the variable stepsize k-step Adams-Bashfort predictor and Adams-Moulton
corrector is as follows:
𝑘−1
𝑝𝑛+1 = 𝑦𝑛 + ℎ𝑛 ∑ 𝑔𝑗 (𝑛) 𝛽𝑗 (𝑛) 𝜙𝑗 (𝑛) (8)
𝑗=0

𝑦𝑛+1 = 𝑝𝑛+1 + ℎ𝑛 𝑔𝑘 (𝑛) 𝜙𝑘 (𝑛 + 1) (9)

where ℎ𝑛 = 𝑥𝑛+1 − 𝑥𝑛

The coefficients are defined recursively:

53
𝑥𝑛+1 − 𝑥𝑛−𝑗+1
𝛽𝑗 (𝑛) = 𝛽𝑗−1 (𝑛) with 𝛽0 (𝑛) = 1 (10)
𝑥𝑛 − 𝑥𝑛−𝑗

𝜙𝑗 (𝑛) = 𝜙𝑗−1 (𝑛) − 𝛽𝑗−1 (𝑛 − 1)𝜙𝑗−1 (𝑛 − 1) with 𝜙0 (𝑛) = 𝑓𝑛 (11)

𝑔𝑗 (𝑛) = 𝑐𝑗,1 (𝑥𝑛+1 ) (12)


ℎ𝑛 1
𝑐𝑗,𝑞 (𝑥𝑛+1 ) = 𝑐𝑗−1,𝑞 (𝑥𝑛+1 ) − 𝑐𝑗−1,𝑞+1 (𝑥𝑛+1 ) 𝑥 with 𝑐0,𝑞 (𝑥𝑛+1 ) = 𝑞 (13)
𝑛+1 − 𝑥𝑛−𝑗+1

2 Implementation
Here, all this theory should be put into practice and implemented into the DynStar source
code. The most important step is to derive the correct formulas. The two-step ABM method
has been chosen because its formulas are the easiest to derive and implement, but the code can
be extended to allow other ABM methods with more complicated formulas. For 𝑘 = 2, the
formulas are derived as follows:

𝑝𝑛+1 = 𝑦𝑛 + ℎ+ (𝑔0 (𝑛) 𝛽0 (𝑛) 𝜙0 (𝑛) + 𝑔1 (𝑛) 𝛽1 (𝑛) 𝜙1 (𝑛))

1 ℎ+
⟹ 𝑝𝑛+1 = 𝑦𝑛 + ℎ+ (𝑓𝑛 + 2 ℎ− (𝑓𝑛 − 𝑓𝑛−1 )) (14)

and 𝑦𝑛+1 = 𝑝𝑛+1 + ℎ+ 𝑔2 (𝑛) 𝜙2 (𝑛 + 1)

1 1 ℎ+ ℎ+
⟹ 𝑦𝑛+1 = 𝑝𝑛+1 + ℎ+ (2 − 6 ℎ+ +ℎ−) (𝑓𝑛+1 − 𝑓𝑛 − ℎ− (𝑓𝑛 − 𝑓𝑛−1 )) (15)

where ℎ− = 𝑥𝑛 − 𝑥𝑛−1 is the previous stepsize and ℎ+ = 𝑥𝑛+1 − 𝑥𝑛 is the following


stepsize. Notice that if the stepsizes are equal, the formulas simplify to (6) and (7).
It's clear that the k-step ABM method needs information about k previous points in order to
calculate the following value. However, in the beginning of the algorithm only one value is
available: the initial condition 𝑦(𝑥0 ) = 𝑦0 . Hence the ABM method is not self-starting and
another method is needed to calculate the k-1 first values. In our case, only one extra value is
required and it is computed using one step of Runge-Kutta fourth order.
The next feature that needs to be implemented is the varying stepsize. The reasoning behind it
is that the stepsize should always be small enough to ensure accurate results, yet large enough
to avoid unnecessary calculations. The local truncation error can be used as a measure for
accuracy. This error is estimated as the relative difference between the predicted and the
corrected value.
𝑝𝑛+1 − 𝑦𝑛+1
relative error = abs ( ) (16)
𝑦𝑛+1

When this error gets too large, i.e. when it exceeds a certain tolerance, the stepsize should be
decreased immediately. On the other hand, when the error is below the tolerance, it is safe to
increase the stepsize. With these properties in mind, Hanna [5] proposed a formula to adjust
the stepsize:

𝑡𝑜𝑙
ℎ+ = ℎ− √𝑟𝑒𝑙 (17)

54
However, sometimes the error is unacceptably high, quantified by exceeding 1.5 times the
tolerance. In this case, choosing a small stepsize for the following step is not enough; it is the
stepsize for the current step that needs to be decreased. Then the program goes into
a ‘stepback mode’, where none of the new values are saved and the current step is completely
restarted with a smaller stepsize. The flowchart in Figure 1 shows how the algorithm is
organized.

Source: Own
Fig. 1: Flowchart of the algorithm

3 Results

3.1 ABM Compared to RK4


First, a comparison between ABM and RK4 is made. The methods are tested on a very simple
third-order ordinary differential equation given by (18). The solution is shown in Figure 2.

55
1
𝑦′1 = 𝑇 (𝑢 − 𝑦1 ) with 𝑦1 (0) = 0
1

1
𝑦′2 = 𝑇 (𝑦1 − 𝑦2 ) with 𝑦2 (0) = 0 (18)
2

1
𝑦′3 = 𝑇 (𝑦2 − 𝑦3 ) with 𝑦3 (0) = 0
3

𝑡0 = 0 and 𝑡𝑒𝑛𝑑 = 200

Source: Own
Fig. 2: Graph of PT3

As ABM calculates only two function evaluations per integration step and RK4 calculates
four, one would expect ABM to be twice as fast. However, in table 1 it can be seen that the
results do not support this hypothesis. In fact, the amount of time needed by the two methods
is approximately the same. The explanation is that the function evaluation is very simple or
cheap and does not account for a large portion of the runtime. Therefore, it can almost be
neglected whether the evaluation is done two or four times. But when the differential equation
is computationally expensive, the amount of function evaluations will certainly be reflected in
the runtime. To demonstrate this, we still use the same problem given by (18) but we make it
expensive by adding a delay of 1ms. Now it is clear that Runge-Kutta takes twice as much
time as ABM. In all tables, the time is expressed in seconds.
Tab. 1: ABM compared to RK4
Steps Time (cheap evaluation) Time (expensive evaluation)
TOL ABM RK4 ABM RK4 ABM RK4
10−4 116 121 0.02 0.02 0.46 0.95
10−7 1014 1037 0.14 0.15 3.99 8.12
Source: Own

56
3.2 ABM Compared to Hanna, Stiff Problem
The method that has already been implemented in DynStar is the one Hanna proposed in his
paper [5]. It is important to understand which method is more effective for different cases, so
that a DynStar user can choose the right option. Hanna method takes a weighted average of
the values obtained by the Euler method and the RK2 (or improved Euler) method. The great
advantage of the Hanna method is that it has a large stability domain. For stiff problems the
stepsize is limited rather for stability reasons than accuracy reasons. This means that a stable
method such as Hanna will be able to take bigger steps, hence saving time. Unfortunately,
ABM doesn't handle stiff problems very well and is more suitable for non-stiff problems. We
will test this hypothesis on a mildly stiff problem, also discussed by Hanna in his paper, called
Robertson chemical reaction system, given by (19). In Figures 3 and 4, the solution is shown
for different end times. Both graphs are in linear scale.

𝑦 ′1 = −0.04 ∙ 𝑦1 + 104 ∙ 𝑦2 𝑦3 with 𝑦1 (0) = 1

𝑦′2 = 0.04 ∙ 𝑦1 − 104 ∙ 𝑦2 𝑦3 − 3 ∙ 107 𝑦2 2 with 𝑦2 (0) = 0 (19)

𝑦′3 = 3 ∙ 107 𝑦2 2 with 𝑦3 (0) = 0

𝑡0 = 0 and 𝑡𝑒𝑛𝑑 = 10

Source: Own
Fig. 3: Graph of Robertson chemical reaction system, t: 0 → 500 seconds

57
Source: Own
Fig. 4: Graph of Robertson chemical reaction system, t: 0 → 10 seconds

The results in Table 2 show that ABM is forced to take small steps in order to maintain
stability, while achieving high accuracy in the process. On the other hand, Hanna is much
faster and in many cases this is preferred. Only when tolerances are very strict, Hanna gets in
trouble because it cannot be used to obtain highly accurate results. In the following table, RE
is the relative error between the computed solution for 𝑦3 at 𝑡 = 10 and the exact solution
𝑦3 (10) = 0.1586138397.
Tab. 2: ABM compared to Hanna in case of a moderately stiff problem
RE Steps Time
TOL ABM HAN ABM HAN ABM HAN
10−2 2.8 ∙ 10−6 1.2 ∙ 10−4 13696 3931 1.34 0.28
10−3 3.4 ∙ 10−8 1.8 ∙ 10−4 14022 4083 1.42 0.35
10−4 1.5 ∙ 10−8 1.3 ∙ 10−4 14060 4550 1.37 0.37
10−5 1.6 ∙ 10−8 1.2 ∙ 10−4 14159 5284 1.31 0.39
10−6 1.6 ∙ 10−8 8.9 ∙ 10−5 14475 8597 1.43 0.81
10−7 1.6 ∙ 10−8 5.8 ∙ 10−5 14753 19397 1.54 1.90
10−8 1.6 ∙ 10−8 2.6 ∙ 10−5 15733 54924 1.71 4.92
Source: Own

3.3 ABM Compared to Hanna, Non-stiff Problem


Further, the performances of these two methods are compared for a non-stiff problem. We use
a differential equation system similar to (18). The difference is that now we use a tenth order
ODE given by (20) and all time constants are chosen to be equal, ensuring a non-stiff
problem. The solution is shown in Figure 5.

58
1
𝑦′1 = 𝑇 (𝑢 − 𝑦1 ) with 𝑦1 (0) = 0

1
𝑦′2 = 𝑇 (𝑦1 − 𝑦2 ) with 𝑦2 (0) = 0

⋮ (20)
1
𝑦′10 = 𝑇 (𝑦9 − 𝑦10 ) with 𝑦10 (0) = 0

𝑡0 = 0 and 𝑡𝑒𝑛𝑑 = 200

Source: Own
Fig. 5: Graph of PT10

Now the results in table 3 are very positive for ABM because this method is both faster and
more accurate than the Hanna method. This can be explained by remembering that for a non-
stiff problem, stability is not much of an issue. This means that an accurate method such as
ABM can allow for taking bigger steps than a stable method such as Hanna, hence needing
fewer steps and less time. In table 3, RE is defined as the relative error between the computed
solution for 𝑦10 at 𝑡 = 200 and the exact solution 𝑦10 (200) = 0.9947057955.

59
Tab. 3: ABM compared to Hanna in case of a non-stiff problem
RE Steps Time
TOL ABM HAN ABM HAN ABM HAN
10−2 3.5 ∙ 10−3 5.8 ∙ 10−3 1279 1621 0.12 0.17
10−3 3.8 ∙ 10−4 3.0 ∙ 10−3 1623 2942 0.21 0.52
10−4 4.0 ∙ 10−5 1.1 ∙ 10−3 2362 7120 0.39 1.46
10−5 4.0 ∙ 10−6 3.8 ∙ 10−4 3954 20326 0.82 4.41
10−6 4.2 ∙ 10−7 1.2 ∙ 10−4 7383 62087 1.68 14.39
Source: Own

Conclusion
The goal of the assignment was to improve the simulation tool DynStar by adding another
solver algorithm for differential equations. After literature research, we succeeded to develop
formulas for a multistep method with a variable stepsize, namely the two-step Adams-
Bashforth-Moulton predictor-corrector method as described by Krogh. The method has been
tested and the following conclusions can be drawn. ABM is most effective when function
evaluations are expensive and/or when the problem is non-stiff. On the other hand, when
function evaluations are cheap, ABM still presents good, but not significantly better results
than RK4. In the case of a stiff problem, the Hanna method is more efficient in terms of
runtime; however, the ABM method gets more accurate results. Altogether, we can conclude
that the ABM algorithm is a valuable addition to the DynStar software and that it will prove
itself useful by solving many differential equations more accurately and/or more efficiently
than the methods that have already been implemented.

Literature
[1] ZILL, D. G.; WRIGHT, W. S.: Advanced Engineering Mathematics, Fourth edition,
Jones & Bartlett Learning, Massachusetts, 2011, pp. 275–286.
[2] HAIRER, E.; NORSETT, S. P.; WANNER, G.: Solving Ordinary Differential
Equations I: Nonstiff Problems, Second revised edition, Springer, Berlin, 2008,
pp. 357–360.
[3] BUTCHER, J. C.: Numerical Methods for Ordinary Differential Equations in the 20th
Century, Journal of Computational and Applied Mathematics, 2000, Vol. 125, Issues 1–
2, pp. 1–29.
[4] LÓPEZ, D. J.; ROMAY, J. G.: Implementing Adams Methods with Preassigned
Stepsize Ratios, Mathematical Problems in Engineering, 2010, DOI:
10.1155/2010/765620
[5] ASHOUR, S. S.; HANNA, O. T.: A New Very Simple Explicit Method for the
Integration of Mildly Stiff Ordinary Differential Equations, Computers and Chemical
Engineering, 1990, Vol. 14, Issue 3, pp. 267–272.

An Pletinckx; Dipl.-Ing. (FH) Daniel Fiß; Prof. Dr.-Ing. Alexander Kratzsch

60
ROZVOJ A REALIZACE DVOUKROKOVÉ ADAMS-BASHFORTH-MOULTONOVY
METODY S VARIABILNÍ VELIKOSTÍ KROKŮ U SIMULAČNÍHO NÁSTROJE DYNSTAR
Simulační nástroj DynStar, vytvořený na katedře IPM na Hochschule Zittau / Görlitz, dříve
používal pro řešení diferenciálních rovnic pouze jednokrokové metody. Tento článek popisuje
vývoj vícekrokové metody doplňující ostatní metody. Úvodní část dává čtenáři lepší
představu o užitečnosti vícekrokové metody. Teoretická část je zaměřena na dvoukrokovou
Adams-Bashforth-Moultonovu metodu (ABM), a možnost vhodného využití vzorců pro
variabilní velikost kroků (stepsize). Poté je vytvořen algoritmus řešení diferenciálních rovnic
za použití vzorců ABM a úpravou stepsize podle odchylky mezi predikcí a korekcí. To je
popsáno v sekci Realizace. V závěrečné sekci článku (Výsledky) je metoda ABM porovnána
s metodami RK4 a Hanna.

ENTWICKLUNG UND IMPLEMENTIERUNG DES ZWEI-SCHRITT-ADAMS-BASHFORTH-


MOULTON-VERFAHREN MIT VARIABLER SCHRITTWEITE FÜR DAS
SIMULATIONSWERKZEUG DYNSTAR
Das Simulationswerkzeug DynStar, das von der Hochschule Zittau / Görlitz IPM entwickelt
wird, verwendet bisher nur einstufige Methoden zur Lösung von Differentialgleichungen.
Dieser Beitrag beschreibt die Entwicklung eines mehrstufigen Verfahrens. Die Einleitung gibt
legt dar, warum eine mehrstufige Methode nützlich sein kann. Der Theorieteil konzentriert
sich auf das zweistufige Adams-Bashforth-Moulton (ABM)-Verfahren und wie es für variable
Schrittweiten angepasst wurde. Es wurde ein Algorithmus entwickelt, um die
Differentialgleichungen unter Verwendung des ABM-Methode zu lösen und die Schrittweite
entsprechend dem Fehler zwischen der Vorhersage und der Korrektur zu bestimmen. Dies
wird im Implementierungsabschnitt beschrieben. Abschließend wird die ABM-Methode mit
dem Runge-Kutta-Verfahren 4. Ordnung und der Hanna-Methode im Ergebnisabschnitt
verglichen.

OPRACOWANIE I REALIZACJA DWUKROKOWEJ METODY ADAMS-BASHFORTH-


MOULTONA ZE ZMIENNĄ WIELKOŚCIĄ KROKÓW W NARZĘDZIU SYMULACYJNYM
DYNSTAR
Narzędzie symulacyjne DynStar, opracowane w katedrze IPM (procesów automatyzacyjnych
i technik pomiarowych) w Hochschule Zittau/Görlitz, do rozwiązywania równań
różniczkowych wykorzystywało dawniej wyłącznie metody jednokrokowe. W niniejszym
artykule opisano proces opracowania metody kilkukrokowej będącej uzupełnieniem innych
metod. W pierwszej części przedstawiono zalety metody kilkukrokowej. W części
teoretycznej skupiono się na dwukrokowej metodzie Adams-Bashforth-Moultonaa (ABM)
oraz możliwości odpowiedniego wykorzystania wzorów do zmiennej wielkości kroków
(stepsize). Następnie opracowano algorytm służący rozwiązywaniu równań różniczkowych
z zastosowaniem wzorów ABM i dostosowaniem stepsize w zależności od odchylenia
pomiędzy prognozą a korektą. Opisano to w części Realizacja. W końcowej części artykułu
(Výsledky - Wyniki) metodę ABM porównano z metodami RK4 i Hanna.

61

You might also like