Sie sind auf Seite 1von 2

delt

k1
k2
k3
k4
k5
k6
u
ubar

2.00E-02
U1

U2

-0.04
-0.0494
-0.048316
-0.078176
-0.121055
-0.053277
0.951209
0.952486

-2
-1
-1.0625
2.020027
6.205128
-0.538462
0.025641
0.198303

hnew

7.07E-03 2.07E-03

error

1.34E-03 6.73E+00

Calculations in Cells A1 to C16 are


for this set of ODEs.
du1/dt = -3u1 + u2
du2/dt = -100 u2

Procedure:
1.
2.
3.
4.
5.
6.
7.

Start with a time step of 0.02 in cell B1


Excel calculates u and ubar for both u1 and u2 in cells B10 to C11
In cells B16 and C 16, relative error is computed.
In cells B13 and C13 new time step is calculated.
Replace B1 with smaller of B13 and C13.
Repeat steps 2 to 5, until smaller of B16 and C16 falls below 1e-3 (arbitrary)
Now, double the time step found in step 6 and follow the steps to find u1 and u2

8. HOPE YOU GET THE PROCEDURE TO ADJUST TIME STEP SIZE.


9. IF NOT, PLEASE SEE ME DURING OFFICE HOURS.

ns in Cells A1 to C16 are


t of ODEs.

3u1 + u2
100 u2

B10 to C11

elow 1e-3 (arbitrary)


e steps to find u1 and u2 at new time step.
SIZE.

Das könnte Ihnen auch gefallen