Вы находитесь на странице: 1из 8

# c -0.

2
u(x,0) 50(x-0.4)(0.6-x) 0.4 x 0.6
dx 0.05
Use Upwind scheme and btain sol. for three time steps
assume dt 0.01
Courant No. (C) -0.04

## as c<0 in upwind scheme we have to use F.T.F.S

x for t=0
0.4 0
0.45 0.375
0.5 0.5
0.55 0.375
0.6 0
0.65 0
in sol. for three time steps

## for t=0.01 for t=0.02 for t=0.03

0.015 0.0296 0.0438
0.6
0.38 0.3846 0.3888
0.495 0.4896 0.48384 0.5
0.36 0.3456 0.331776
0.4
0 0 0
0 0 0 0.3

0.2

0.1

0
0.35 0.4
x vs T
0.6

0.5

0.4

0.3

0.2

0.1

0
0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7

## for t=0 for t=0.01 for t=0.02 for t=0.03

u(x,0) 1
for t>0
at x=0 u=1
at x=1 du/dx=0 Use FDM using Crank Nicolson schem
dx 0.1
Foe 1
c 1
dt 0.01

## x for t=0 for t=0.01 for t=0.02

0 1 1 1
0.1 1 0.9907179677 0.9208014133
0.2 1 0.9901923789 0.9715693644
0.3 1 0.9900515478 0.9850912866
0.4 1 0.9900138122 0.9886926865
0.5 1 0.9900037011 0.989651835
0.6 1 0.990000992 0.9899072513
0.7 1 0.9900002671 0.9899751862
0.8 1 0.9900000763 0.9899929594
0.9 1 0.9900000382 0.9899964988
1 1 0.9900000382 0.9899964988

ai ai' ai" bi
2 0.5 0 1
2 0.5 0.5 0.9907179677
2 0.5 0.5 0.9901923789
2 0.5 0.5 0.9900515478
2 0.5 0.5 0.9900138122
2 0.5 0.5 0.9900037011
2 0.5 0.5 0.990000992
2 0.5 0.5 0.9900002671
2 0.5 0.5 0.9900000763
2 0 1 0.9900000382
k Nicolson scheme
1.2

0.8

0.6
for t=0.03 for t=0.04 for t=0.05
1 1 1
0.4
0.8775567392 0.8488779514 0.8286576917
0.9492349453 0.9281788394 0.9097104412 0.2
0.9762443131 0.9653675158 0.9538263941
0.9855597338 0.9808025976 0.9748601035 0
0.9886092491 0.986723407 0.9840088249 0 0.2 0.4

## 0.9895735927 0.9888725321 0.987728382 for t=0 for t=0.01

0.9898706189 0.989619536 0.989159639
0.9899585106 0.9898643742 0.989671102
0.9899775047 0.9899209394 0.9897960207
0.9899775047 0.9899209394 0.9897960207

pi qi q2
0 0 T2 0
0.25 0.5 1 0.5
0.2666666667 0.6617162494 0.9208014133 0.6244274204
0.2678571429 0.7077056269 0.9715693644 0.6877409328
0.2679425837 0.7201784137 0.9850912866 0.7121708916
0.2679487179 0.7235167461 0.9886926865 0.7206631529
0.2679491584 0.7244070201 0.989651835 0.7234538378
0.26794919 0.7246442021 0.9899072513 0.7243385621
0.2679491923 0.7247073724 0.9899751862 0.7246120356
0.2679491924 0.7247241971 0.9899929594 0.7246948377
0 0.9899964988 0.9899964988 0.9899775047
0
x vs T

i
1
2
3
4
5
6
0.2 0.4 0.6 0.8 1 1.2
7
or t=0 for t=0.01 for t=0.02 for t=0.03 for t=0.04 for t=0.05 8
9
10

q3 q4
T3 0 T4 0
1 0.5 1 0.5
0.8775567392 0.6013635942 0.8488779514 0.5860682407
0.9492349453 0.6695982548 0.9281788394 0.6542212285
0.9762443131 0.7025687337 0.9653675158 0.6926198591
0.9855597338 0.7164113257 0.9808025976 0.7111962005
0.9886092491 0.7217558443 0.986723407 0.7193478362
0.9895735927 0.723704779 0.9888725321 0.722683858
0.9898706189 0.7243861765 0.989619536 0.7239780666
0.9899585106 0.7246158579 0.9898643742 0.7244560576
0.9899775047 0.9899209394 0.9899209394 0.9897960207
0 0
pi
ai ai' ai" bi 0
2 0.5 0 1.49 0.25
2 0.5 0.5 0.99 0.2666666667
2 0.5 0.5 0.99 0.2678571429
2 0.5 0.5 0.99 0.2679425837
2 0.5 0.5 0.99 0.2679487179
2 0.5 0.5 0.99 0.2679491584
2 0.5 0.5 0.99 0.26794919
2 0.5 0.5 0.99 0.2679491923
2 0.5 0.5 0.99 0.2679491924
2 0 1 0.99 0

T5
1
0.8286576917
0.9097104412
0.9538263941
0.9748601035
0.9840088249
0.987728382
0.989159639
0.989671102
0.9897960207
0
qi Ti
0
0.745 1
0.7266666667 0.9907179677
0.725 0.9901923789
0.724784689 0.9900515478
0.7247435897 0.9900138122
0.7247337685 0.9900037011
0.7247312224 0.990000992
0.7247305463 0.9900002671
0.7247303656 0.9900000763
0.9900000382 0.9900000382
0