numerical analysis chapra 5ESM29.docx

上传人:b****7 文档编号:11210406 上传时间:2023-02-25 格式:DOCX 页数:23 大小:263.53KB
下载 相关 举报
numerical analysis chapra 5ESM29.docx_第1页
第1页 / 共23页
numerical analysis chapra 5ESM29.docx_第2页
第2页 / 共23页
numerical analysis chapra 5ESM29.docx_第3页
第3页 / 共23页
numerical analysis chapra 5ESM29.docx_第4页
第4页 / 共23页
numerical analysis chapra 5ESM29.docx_第5页
第5页 / 共23页
点击查看更多>>
下载资源
资源描述

numerical analysis chapra 5ESM29.docx

《numerical analysis chapra 5ESM29.docx》由会员分享,可在线阅读,更多相关《numerical analysis chapra 5ESM29.docx(23页珍藏版)》请在冰豆网上搜索。

numerical analysis chapra 5ESM29.docx

numericalanalysischapra5ESM29

CHAPTER29

29.1HerearetheresultsofusingLiebmann’smethodtoobtainthesolution.Noticethatafter6iterationsalltherelativeerrorestimateshavefallenbelow1%andthecomputationisterminated.

iteration=1

185.416.62

23.48.6422.578

61.0256.89874.8428

ea:

100100100

100100100

100100100

iteration=2

23.0413.4122.4724

41.1338.476851.222

71.204479.977675.39132

ea:

21.87559.7315436226.04261227

43.1072210177.5449101855.92128382

14.3030486928.857580120.727563863

iteration=6

37.8066606632.4163214834.29437766

59.0195280157.5172739454.73884006

80.7192162883.8443383477.14262488

ea:

0.6881817460.1302044540.019913358

0.0109336940.0208740120.049145839

0.0337676720.0371761680.02465349

Therefore,theresultsare:

29.2ThefluxesforProb.29.1canbecalculatedasinExample29.2.Forexample,fori=j=1,

Alltheresultsaresummarizedbelow:

qx:

0.6758001240.086050934-0.430800124

0.0608267880.1048768550.184173212

-0.5841862890.0876264890.829186289

qy:

-1.445978436-1.409173212-1.341101582

-1.051357613-1.259986413-1.049782057

-1.494021564-1.530826788-1.598898418

qn:

1.5961075921.411798111.408595825

1.0531157241.264343671.065815246

1.6041739471.5333326641.801118001

theta:

-64.95024572-86.50558167-107.8085014

-86.68881693-85.24186843-80.04932455

-111.356292-86.72389108-62.588814

29.3Theplateisredrawnbelow

After15iterationsoftheLiebmannmethod,theresultis

100

100

100

100

100

100

100

75

85.32617

88.19118

88.54443

87.79909

86.06219

82.39736

73.69545

50

75

78.10995

78.88691

78.1834

76.58771

74.05069

69.82967

62.38146

50

75

73.23512

71.06672

68.71675

66.32057

63.72554

60.48986

55.99875

50

75

68.75568

63.42793

59.30269

56.25934

54.04625

52.40787

51.1222

50

75

63.33804

54.57569

48.80562

45.37425

43.79945

43.97646

46.08048

50

75

54.995

42.71618

35.95756

32.62971

31.80514

33.62176

39.22063

50

75

38.86852

25.31308

19.66293

17.3681

17.16645

19.48972

27.17735

50

0

0

0

0

0

0

0

withpercentapproximateerrorsof

0

0

0

0

0

0

0

0

0.012%

0.011%

0.007%

0.005%

0.004%

0.004%

0.003%

0

0

0.011%

0.012%

0.008%

0.005%

0.006%

0.006%

0.005%

0

0

0.024%

0.010%

0.001%

0.001%

0.004%

0.007%

0.006%

0

0

0.054%

0.016%

0.007%

0.011%

0.002%

0.007%

0.008%

0

0

0.101%

0.040%

0.008%

0.007%

0.003%

0.008%

0.011%

0

0

0.234%

0.119%

0.063%

0.033%

0.012%

0.010%

0.015%

0

0

0.712%

0.292%

0.219%

0.126%

0.030%

0.001%

0.014%

0

0

0

0

0

0

0

0

29.4ThesolutionisidenticaltoProb.29.3,exceptthatnowthebottomedgemustbemodeled.Thismeansthatthenodesalongthebottomedgearesimulatedwithequationsoftheform

Theresultingsimulation(after15iterations)yields

100

100

100

100

100

100

100

75

86.4529

90.2627

91.2337

90.6948

88.7323

84.4436

74.8055

50

75

80.5554

83.3649

83.9691

82.8006

79.7785

74.2277

64.7742

50

75

77.4205

78.6771

78.4736

76.7481

73.3375

67.8999

60.0537

50

75

75.5117

75.4794

74.5080

72.3743

68.9073

63.9608

57.5247

50

75

74.2631

73.2996

71.7406

69.3405

65.9436

61.4870

56.0597

50

75

73.4348

71.8433

69.8853

67.3320

64.0357

59.9572

55.1934

50

75

72.8998

70.9218

68.7359

66.1171

62.9167

59.0892

54.7153

50

75

72.5345

70.4401

68.1797

65.5685

62.4467

58.7477

54.5354

50

withpercentapproximateerrorsof

0

0

0

0

0

0

0

0

0.009%

0.018%

0.024%

0.024%

0.018%

0.011%

0.004%

0

0

0.042%

0.066%

0.074%

0.069%

0.053%

0.034%

0.015%

0

0

0.079%

0.140%

0.155%

0.140%

0.110%

0.071%

0.032%

0

0

0.113%

0.224%

0.260%

0.239%

0.187%

0.124%

0.057%

0

0

0.133%

0.327%

0.388%

0.359%

0.284%

0.190%

0.089%

0

0

0.173%

0.471%

0.544%

0.502%

0.395%

0.261%

0.124%

0

0

0.289%

0.628%

0.709%

0.651%

0.508%

0.330%

0.153%

0

0

0.220%

0.665%

0.779%

0.756%

0.620%

0.407%

0.180%

0

29.5ThesolutionisidenticaltoExamples29.1and29.3,exceptthatnowheatbalancesmustbedevelopedforthethreeinteriornodesonthebottomedge.Forexample,usingthecontrol-volumeapproach,node1,0canbemodeledas

UsingLiebmann’smethodanditeratingtoahighlevelofprecision,theresultsare

100

100

100

75

81.6571

80.1712

72.5078

50

75

71.4579

66.5204

59.8602

50

75

62.6549

54.5930

50.4129

50

75

49.5694

38.7843

37.1984

50

Thefluxesforthecomputednodescanbedeterminedas

qx:

-0.1267

0.2242

0.7392

0.2077

0.2841

0.4048

0.5000

0.2999

0.1125

0.8873

0.3031

-0.2748

qy:

-0.6993

-0.8202

-0.9834

-0.4656

-0.6267

-0.5413

-0.5363

-0.6795

-0.5552

-0.6412

-0.7746

-0.6475

qn:

0.7107

0.8503

1.2303

0.5098

0.6881

0.6759

0.7332

0.7428

0.5665

1.0947

0.8318

0.7034

(degrees):

-100.269

-74.7153

-53.0695

-65.9517

-65.6094

-53.2145

-47.0062

-66.1845

-78.5428

-35.8536

-68.6311

-112.995

29.6ThesolutionisidenticaltoExample29.4,exceptthatnowheatbalancesmustbedevelopedfortheinteriornodesatthelowerleftandtheupperrightedges.Thebalancesfornodes1,1and3,3canbewrittenas

Usingtheappropriateboundaryconditions,simpleLaplacianscanbeusedfortheremaininginteriornodes.Theresultingsimulationyields

75

100

100

100

50

75

86.02317

94.09269

100

50

63.97683

75

86.02317

100

50

55.90731

63.97683

75

100

50

50

50

75

29.7Thenodestobesimulatedare

SimpleLaplaciansareusedforallinteriornodes.Balancesfortheedgesmusttakeinsulationintoaccount.Forexample,node1,0ismodeledas

Thecornernode,0,0wouldbemodeledas

Theresultingsetofequationscanbesolvedfor

0

25

50

75

100

23.89706

32.16912

45.58824

60.29412

75

31.25

34.19118

39.88971

45.58824

50

32.72059

33.45588

34.19118

32.16912

25

32.72059

32.72059

31.25

23.89706

0

Thefluxescanbecomputedas

Jx

-1.225

-1.225

-1.225

-1.225

-1.225

-0.40533

-0.53143

-0.68906

-0.72059

-0.72059

-0.14412

-0.21167

-0.27923

-0.2477

-0.21618

-0.03603

-0.03603

0.031526

0.225184

0.351287

0

0.036029

0.216176

0.765625

1.170956

Jy

1.170956

0.351287

-0.21618

-0.72059

-1.225

0.765625

0.225184

-0.2477

-0.72059

-1.225

0.216176

0.031526

-0.27923

-0.68906

-1.225

0.036029

-0.03603

-0.21167

-0.53143

-1.225

0

-0.03603

-0.14412

-0.40533

-1.225

Jn

1.694628

1.274373

1.243928

1.421222

1.732412

0.866299

0.577174

0.732232

1.019066

1.421222

0.259812

0.214008

0.394888

0.732232

1.243928

0.050953

0.050953

0.214008

0.577174

1.274373

0

0.050953

0.259812

0.866299

1.694628

(degrees)

136.2922

163.999

-169.992

-149.534

-135

117.8973

157.0362

-160.228

-135

-120.466

123.6901

171.5289

-135

-109.772

-100.008

135

-135

-81.5289

-67.0362

-73.999

0

-45

-33.6901

-27.8973

-46.2922

29.8Node0,3:

Therearetwoapproachesformodelingthisnode.OnewouldbetoconsideritaDirichletnodeandnotmodelitatall(i.e.,setitstemperatureat50oC).Thesecondalternativeistouseaheatbalancetomodelitasshownhere

Node2,3:

Node2,2:

Node5,3:

29.9Node0,0:

Node1,1:

Node2,1:

29.10Thecontrolvolumeisdrawnasin

Afluxbalancearoundthenodecanbewrittenas(notex=y=h)

Collectingandcancelingtermsgives

29.11AsetupsimilartoFig.29.11,butwith>45ocanbedrawnasin

Thenormalderivativeatnode3canbeapproximatedbythegradientbetweennodes1and7,

Whenisgreaterthan45oasshown,thedistancefromnode5to7isycot,andlinearinterpolationcanbeusedtoestimate

ThelengthL17isequaltoy/sin.Thislength,alongwiththeapproximationforT7canbesubstitutedintothegradientequationtogive

29.12ThefollowingVBAprogramimplementsLiebmann’smethodwithrelaxation.

OptionExplicit

SubLiebmann()

DimnxAsInteger,nyAsInteger,lAsInteger

DimiAsInteger,jAsInteger

DimT(20,20)AsDouble,ea(20,20)AsDouble,Told(20,20)AsDouble

Dimqy(20,20)AsDouble,qx(20,20)AsDouble,qn(20,20)AsDouble

Dimth(20,20)AsDouble

DimTritAsDouble,TlefAsDouble,TtopAsDouble,TbotAsDouble

DimlamAsDouble,emaxAsDouble,esAsDouble

DimpiAsDouble

DimkAsDouble,xAsDouble,yAsDouble,dxAsDouble,dyAsDouble

nx=4

ny=4

pi=4*Atn

(1)

x=40

y=40

k=0.49

lam=1.5

es=1

dx=x/nx

dy=y/ny

Tbot=0

Tlef=75

Trit=50

Ttop=100

Fori=1Tonx-1

T(i,0)=Tbot

Nexti

Fori=1Tonx-1

T(i,ny)=Ttop

Nexti

Forj=1Tony-1

T(0,j)=Tlef

Nextj

Forj=1Tony-1

T(nx,j)=Trit

Nextj

l=0

Sheets("sheet1").Select

Range("a5:

z5000").ClearContents

Range("a5").Select

Do

l=l+1

emax=0

Forj=1Tony-1

Fori=1Tonx-1

Told(i,j)=T(i,j)

T(i,j)=(T(i+1,j)+T(i-1,j)+T(i,j+1)+T(i,j-1))/4

T(i,j)=lam*T(i,j)+(1-lam)*Told(i,j)

ea(i,j)=Abs((T(i,j)-Told(i,j))/T(i,j))*100

If(ea(i,j)>emax)Thenemax=ea(i,j)

Nexti

Nextj

ActiveCell.Value="iteration="

ActiveCell.Offset(0,1).Select

ActiveCell.Value=l

ActiveCell.Offset(1,-1).Select

Forj=1Tony-1

Fori=1Tonx-1

ActiveCell.Value=T(i,j)

ActiveCell.Offset(0,1).Select

Nexti

ActiveCell.Offset(1,-(nx-1)).Select

Nextj

ActiveCell.Value="ea="

ActiveCell.Offset(1,0).Select

Forj=1Tony-1

Fori=1Tonx-1

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高中教育 > 其它课程

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1