高斯积分点
- 格式:doc
- 大小:17.00 KB
- 文档页数:2
Gauss integrations and weights(Containing the program)高斯积分点以及权重目录1.1D bar element(p181 computation mechanics) (2)2.2D triangle element(p230 computation mechanics) (12)3.2D quadrilateral element(p182 computation mechanics) (15)4.3D tetrahedron element(p231 computation mechanics) (17)5.3D hexahedron element (p187 computation mechanics) (19)1.1D bar element(p181 computation mechanics)root3 = 1./sqrt(3.) ; r15 = .2*sqrt(15.)nip = ubound( s , 1 )w = (/5./9.,8./9.,5./9./); v=(/5./9.*w,8./9.*w,5./9.*w/)select case (element)case('line')select case(nip)case(1)s(1,1)=0. ; wt(1)=2.case(2)s(1,1)=root3 ; s(2,1)=-s(1,1) ; wt(1)=1. ; wt(2)=1.case(3)s(1,1)=r15 ; s(2,1)=.0 ; s(3,1)=-s(1,1)wt = wcase(4)s(1,1)=.861136311594053 ; s(2,1)=.339981043584856s(3,1)=-s(2,1) ; s(4,1)=-s(1,1)wt(1)=.347854845137454 ; wt(2)=.652145154862546wt(3)=wt(2) ; wt(4)=wt(1)case(5)s(1,1)=.906179845938664 ; s(2,1)=.538469*********s(3,1)=.0 ; s(4,1)=-s(2,1) ; s(5,1)=-s(1,1)wt(1)=.236926885056189 ; wt(2)=.478628670499366wt(3)=.568888888888889 ; wt(4)=wt(2) ; wt(5)=wt(1)case(6)s(1,1)=.932469514203152 ; s(2,1)=.661209386466265;s(3,1)=.238619186083197s(4,1)=-s(3,1) ; s(5,1)=-s(2,1) ; s(6,1)=-s(1,1)wt(1)=.171324492379170 ; wt(2)=.360761573048139;wt(3)=.467913934572691wt(4)=wt(3); wt(5)=wt(2) ; wt(6)=wt(1)case defaultprint*,"wrong number of integrating points for a line"end select% Copyright (c) 2010, Thomas-Peter Fries, RWTH Aachen University function [xxIntRef, wwIntRef] = IntPoints1DGauss(nQ)% Set Gauss points in 1D reference element from [-1, 1].if nQ == 1Data = [...0.0000000000000000e+000 2.0000000000000000e+000];elseif nQ == 2Data = [...-5.7735026918962573e-001 1.0000000000000000e+0005.7735026918962573e-001 1.0000000000000000e+000];elseif nQ == 3Data = [...-7.7459666924148340e-001 5.5555555555555558e-0010.0000000000000000e+000 8.8888888888888884e-0017.7459666924148340e-001 5.5555555555555558e-001];elseif nQ == 4Data = [...-8.6113631159405257e-001 3.4785484513745385e-001-3.3998104358485626e-001 6.5214515486254609e-0013.3998104358485626e-001 6.5214515486254609e-0018.6113631159405257e-001 3.4785484513745385e-001];elseif nQ == 5Data = [...-9.0617984593866396e-001 2.3692688505618908e-001-5.3846931010568311e-001 4.7862867049936647e-0010.0000000000000000e+000 5.6888888888888889e-0015.3846931010568311e-001 4.7862867049936647e-0019.0617984593866396e-001 2.3692688505618908e-001];elseif nQ == 6Data = [...-9.3246951420315205e-001 1.7132449237917036e-001-6.6120938646626448e-001 3.6076157304813861e-001-2.3861918608319688e-001 4.6791393457269104e-0012.3861918608319688e-001 4.6791393457269104e-0016.6120938646626448e-001 3.6076157304813861e-0019.3246951420315205e-001 1.7132449237917036e-001];elseif nQ == 7Data = [...-9.4910791234275849e-001 1.2948496616886970e-001 -7.4153118559939446e-001 2.7970539148927664e-001 -4.0584515137739718e-001 3.8183005050511892e-001 0.0000000000000000e+000 4.1795918367346940e-001 4.0584515137739718e-001 3.8183005050511892e-001 7.4153118559939446e-001 2.7970539148927664e-001 9.4910791234275849e-001 1.2948496616886970e-001 ];elseif nQ == 8Data = [...-9.6028985649753618e-001 1.0122853629037626e-001 -7.9666647741362673e-001 2.2238103445337448e-001 -5.2553240991632899e-001 3.1370664587788727e-001 -1.8343464249564978e-001 3.6268378337836199e-001 1.8343464249564978e-001 3.6268378337836199e-001 5.2553240991632899e-001 3.1370664587788727e-001 7.9666647741362673e-001 2.2238103445337448e-001 9.6028985649753618e-001 1.0122853629037626e-001 ];elseif nQ == 9Data = [...-9.6816023950762609e-001 8.1274388361574412e-002 -8.3603110732663577e-001 1.8064816069485740e-001 -6.1337143270059036e-001 2.6061069640293544e-001 -3.2425342340380892e-001 3.1234707704000286e-001 0.0000000000000000e+000 3.3023935500125978e-001 3.2425342340380892e-001 3.1234707704000286e-001 6.1337143270059036e-001 2.6061069640293544e-0018.3603110732663577e-001 1.8064816069485740e-0019.6816023950762609e-001 8.1274388361574412e-002 ];elseif nQ == 10Data = [...-9.7390652851717174e-001 6.6671344308688138e-002 -8.6506336668898454e-001 1.4945134915058059e-001 -6.7940956829902444e-001 2.1908636251598204e-001 -4.3339539412924721e-001 2.6926671930999635e-001 -1.4887433898163116e-001 2.9552422471475287e-001 1.4887433898163116e-001 2.9552422471475287e-001 4.3339539412924721e-001 2.6926671930999635e-001 6.7940956829902444e-001 2.1908636251598204e-001 8.6506336668898454e-001 1.4945134915058059e-0019.7390652851717174e-001 6.6671344308688138e-002 ];elseif nQ == 11Data = [...-9.7822865814605697e-001 5.5668567116173663e-002 -8.8706259976809532e-001 1.2558036946490461e-001 -7.3015200557404936e-001 1.8629021092773426e-001 -5.1909612920681181e-001 2.3319376459199048e-001 -2.6954315595234501e-001 2.6280454451024665e-001 0.0000000000000000e+000 2.7292508677790062e-001 2.6954315595234501e-001 2.6280454451024665e-001 5.1909612920681181e-001 2.3319376459199048e-0017.3015200557404936e-001 1.8629021092773426e-0018.8706259976809532e-001 1.2558036946490461e-0019.7822865814605697e-001 5.5668567116173663e-002 ];elseif nQ == 12Data = [...-9.8156063424671924e-001 4.7175336386511828e-002 -9.0411725637047491e-001 1.0693932599531843e-001 -7.6990267419430469e-001 1.6007832854334622e-001 -5.8731795428661737e-001 2.0316742672306592e-001 -3.6783149899818024e-001 2.3349253653835481e-001 -1.2523340851146891e-001 2.4914704581340277e-001 1.2523340851146891e-001 2.4914704581340277e-001 3.6783149899818024e-001 2.3349253653835481e-001 5.8731795428661737e-001 2.0316742672306592e-001 7.6990267419430469e-001 1.6007832854334622e-001 9.0411725637047491e-001 1.0693932599531843e-001 9.8156063424671924e-001 4.7175336386511828e-002 ];elseif nQ == 13Data = [...-9.8418305471858814e-001 4.0484004765315877e-002 -9.1759839922297792e-001 9.2121499837728452e-002 -8.0157809073330988e-001 1.3887351021978725e-001 -6.4234933944034023e-001 1.7814598076194574e-001 -4.4849275103644681e-001 2.0781604753688851e-001 -2.3045831595513477e-001 2.2628318026289723e-001 0.0000000000000000e+000 2.3255155323087390e-001 2.3045831595513477e-001 2.2628318026289723e-001 4.4849275103644681e-001 2.0781604753688851e-001 6.4234933944034023e-001 1.7814598076194574e-001 8.0157809073330988e-001 1.3887351021978725e-0019.1759839922297792e-001 9.2121499837728452e-002 9.8418305471858814e-001 4.0484004765315877e-002 ];elseif nQ == 14Data = [...-9.8628380869681231e-001 3.5119460331751860e-002 -9.2843488366357352e-001 8.0158087159760208e-002 -8.2720131506976502e-001 1.2151857068790319e-001 -6.8729290481168548e-001 1.5720316715819355e-001 -5.1524863635815410e-001 1.8553839747793782e-001 -3.1911236892788974e-001 2.0519846372129560e-001 -1.0805494870734367e-001 2.1526385346315779e-001 1.0805494870734367e-001 2.1526385346315779e-001 3.1911236892788974e-001 2.0519846372129560e-0015.1524863635815410e-001 1.8553839747793782e-0016.8729290481168548e-001 1.5720316715819355e-0018.2720131506976502e-001 1.2151857068790319e-0019.2843488366357352e-001 8.0158087159760208e-002 9.8628380869681231e-001 3.5119460331751860e-002 ];elseif nQ == 15Data = [...-9.8799251802048538e-001 3.0753241996117269e-002 -9.3727339240070595e-001 7.0366047488108124e-002 -8.4820658341042721e-001 1.0715922046717194e-001 -7.2441773136017007e-001 1.3957067792615432e-001 -5.7097217260853883e-001 1.6626920581699392e-001 -3.9415134707756339e-001 1.8616100001556221e-001 -2.0119409399743449e-001 1.9843148532711158e-001 0.0000000000000000e+000 2.0257824192556129e-0012.0119409399743449e-001 1.9843148532711158e-0013.9415134707756339e-001 1.8616100001556221e-001 5.7097217260853883e-001 1.6626920581699392e-0017.2441773136017007e-001 1.3957067792615432e-0018.4820658341042721e-001 1.0715922046717194e-0019.3727339240070595e-001 7.0366047488108124e-002 9.8799251802048538e-001 3.0753241996117269e-002 ];elseif nQ == 16Data = [...-9.8940093499164994e-001 2.7152459411754096e-002 -9.4457502307323260e-001 6.2253523938647894e-002 -8.6563120238783176e-001 9.5158511682492786e-002 -7.5540440835500300e-001 1.2462897125553388e-001-6.1787624440264377e-001 1.4959598881657674e-001 -4.5801677765722737e-001 1.6915651939500254e-001 -2.8160355077925892e-001 1.8260341504492358e-001 -9.5012509837637427e-002 1.8945061045506850e-001 9.5012509837637427e-002 1.8945061045506850e-001 2.8160355077925892e-001 1.8260341504492358e-001 4.5801677765722737e-001 1.6915651939500254e-0016.1787624440264377e-001 1.4959598881657674e-0017.5540440835500300e-001 1.2462897125553388e-0018.6563120238783176e-001 9.5158511682492786e-0029.4457502307323260e-001 6.2253523938647894e-002 9.8940093499164994e-001 2.7152459411754096e-002 ];elseif nQ == 17Data = [...-9.9057547531441736e-001 2.4148302868547931e-002 -9.5067552176876780e-001 5.5459529373987203e-002 -8.8023915372698591e-001 8.5036148317179178e-002 -7.8151400389680137e-001 1.1188384719340397e-001 -6.5767115921669084e-001 1.3513636846852548e-001 -5.1269053708647694e-001 1.5404576107681028e-001 -3.5123176345387630e-001 1.6800410215645004e-001 -1.7848418149584788e-001 1.7656270536699264e-0010.0000000000000000e+000 1.7944647035620653e-0011.7848418149584788e-001 1.7656270536699264e-001 3.5123176345387630e-001 1.6800410215645004e-0015.1269053708647694e-001 1.5404576107681028e-0016.5767115921669084e-001 1.3513636846852548e-0017.8151400389680137e-001 1.1188384719340397e-0018.8023915372698591e-001 8.5036148317179178e-0029.5067552176876780e-001 5.5459529373987203e-002 9.9057547531441736e-001 2.4148302868547931e-002 ];elseif nQ == 18Data = [...-9.9156516842093090e-001 2.1616013526483312e-002 -9.5582394957139771e-001 4.9714548894969797e-002 -8.9260246649755570e-001 7.6425730254889052e-002 -8.0370495897252314e-001 1.0094204410628717e-001 -6.9168704306035322e-001 1.2255520671147846e-001 -5.5977083107394754e-001 1.4064291467065065e-001 -4.1175116146284263e-001 1.5468467512626524e-001 -2.5188622569150554e-001 1.6427648374583273e-001 -8.4775013041735292e-002 1.6914238296314360e-0018.4775013041735292e-002 1.6914238296314360e-001 2.5188622569150554e-001 1.6427648374583273e-0014.1175116146284263e-001 1.5468467512626524e-0015.5977083107394754e-001 1.4064291467065065e-0016.9168704306035322e-001 1.2255520671147846e-001 8.0370495897252314e-001 1.0094204410628717e-0018.9260246649755570e-001 7.6425730254889052e-0029.5582394957139771e-001 4.9714548894969797e-002 9.9156516842093090e-001 2.1616013526483312e-002 ];elseif nQ == 19Data = [...-9.9240684384358435e-001 1.9461788229726478e-002 -9.6020815213483002e-001 4.4814226765699600e-002 -9.0315590361481790e-001 6.9044542737641226e-002 -8.2271465653714282e-001 9.1490021622449999e-002 -7.2096617733522939e-001 1.1156664554733399e-001 -6.0054530466168110e-001 1.2875396253933621e-001 -4.6457074137596099e-001 1.4260670217360660e-001 -3.1656409996362989e-001 1.5276604206585967e-001 -1.6035864564022539e-001 1.5896884339395434e-0010.0000000000000000e+000 1.6105444984878370e-0011.6035864564022539e-001 1.5896884339395434e-0013.1656409996362989e-001 1.5276604206585967e-0014.6457074137596099e-001 1.4260670217360660e-0016.0054530466168110e-001 1.2875396253933621e-0017.2096617733522939e-001 1.1156664554733399e-0018.2271465653714282e-001 9.1490021622449999e-0029.0315590361481790e-001 6.9044542737641226e-002 9.6020815213483002e-001 4.4814226765699600e-002 9.9240684384358435e-001 1.9461788229726478e-002 ];elseif nQ == 20Data = [...-9.9312859918509488e-001 1.7614007139152118e-002 -9.6397192727791381e-001 4.0601429800386939e-002 -9.1223442825132595e-001 6.2672048334109068e-002 -8.3911697182221878e-001 8.3276741576704755e-002 -7.4633190646015080e-001 1.0193011981724044e-001 -6.3605368072651502e-001 1.1819453196151841e-001 -5.1086700195082702e-001 1.3168863844917664e-001 -3.7370608871541955e-001 1.4209610931838204e-001 -2.2778585114164507e-001 1.4917298647260374e-001 -7.6526521133497338e-002 1.5275338713072584e-0017.6526521133497338e-002 1.5275338713072584e-0012.2778585114164507e-001 1.4917298647260374e-0013.7370608871541955e-001 1.4209610931838204e-0015.1086700195082702e-001 1.3168863844917664e-0016.3605368072651502e-001 1.1819453196151841e-0017.4633190646015080e-001 1.0193011981724044e-0018.3911697182221878e-001 8.3276741576704755e-0029.1223442825132595e-001 6.2672048334109068e-0029.6397192727791381e-001 4.0601429800386939e-0029.9312859918509488e-001 1.7614007139152118e-002];elseif nQ == 21Data = [...-9.9375217062038945e-001 1.6017228257774335e-002-9.6722683856630631e-001 3.6953789770852494e-002-9.2009933415040079e-001 5.7134425426857205e-002-8.5336336458331730e-001 7.6100113628379304e-002-7.6843996347567789e-001 9.3444423456033862e-002-6.6713880419741234e-001 1.0879729916714838e-001-5.5161883588721983e-001 1.2183141605372853e-001-4.2434212020743878e-001 1.3226893863333747e-001-2.8802131680240106e-001 1.3988739479107315e-001-1.4556185416089507e-001 1.4452440398997005e-0010.0000000000000000e+000 1.4608113364969041e-0011.4556185416089507e-001 1.4452440398997005e-0012.8802131680240106e-001 1.3988739479107315e-0014.2434212020743878e-001 1.3226893863333747e-0015.5161883588721983e-001 1.2183141605372853e-0016.6713880419741234e-001 1.0879729916714838e-0017.6843996347567789e-001 9.3444423456033862e-0028.5336336458331730e-001 7.6100113628379304e-0029.2009933415040079e-001 5.7134425426857205e-0029.6722683856630631e-001 3.6953789770852494e-0029.9375217062038945e-001 1.6017228257774335e-002];elseerror(['The number ' num2str(nQ) ' is not implemented.']) endxxIntRef = Data(:, 1)';wwIntRef = Data(:, 2)';% % Plot situation.% reset(cla), reset(clf), hold on% a = plot(xxIntRef, zeros(size(xxIntRef)), 'k*'); % set(a, 'LineWidth', 2, 'MarkerSize', 15)% a = line([-1 1], [0 0]);% set(a, 'LineWidth', 2, 'Color', 'k')% box on, axis equal, axis([-1 1 -0.1 0.1])2.2D triangle element(p230 computation mechanics)Order n Location ξLocation ηWeight wcase('triangle')select case(nip)case(1) ! for triangles weights multiplied by .5s(1,1)=1./3. ; s(1,2)=1./3. ; wt(1)= .5case(3)s(1,1)=.5 ; s(1,2)=.5 ; s(2,1)=.5s(2,2)=0.; s(3,1)=0. ; s(3,2)=.5wt(1)=1./3. ; wt(2)=wt(1) ; wt(3)=wt(1) ; wt = .5*wtcase(6)s(1,1)=.816847572980459 ; s(1,2)=.091576213509771s(2,1)=s(1,2); s(2,2)=s(1,1) ; s(3,1)=s(1,2); s(3,2)=s(1,2)s(4,1)=.108103018168070 ; s(4,2)=.445948*********s(5,1)=s(4,2) ; s(5,2)=s(4,1) ; s(6,1)=s(4,2) ; s(6,2)=s(4,2)wt(1)=.109951743655322 ; wt(2)=wt(1) ; wt(3)=wt(1)wt(4)=.223381589678011 ; wt(5)=wt(4) ; wt(6)=wt(4) ; wt = .5*wt case(7)s(1,1)=1./3. ; s(1,2)=1./3.;s(2,1)=.797426985353087 ;s(2,2)=.101286507323456 s(3,1)=s(2,2) ; s(3,2)=s(2,1) ; s(4,1)=s(2,2) ; s(4,2)=s(2,2)s(5,1)=.470142064105115 ; s(5,2)=.059715871789770s(6,1)=s(5,2) ; s(6,2)=s(5,1); s(7,1)=s(5,1); s(7,2)=s(5,1)wt(1)=.225 ; wt(2)=.125939180544827 ; wt(3)=wt(2); wt(4)=wt(2)wt(5)=.132394152788506; wt(6)=wt(5) ; wt(7)=wt(5) ;wt = .5*wt case(12)s(1,1)=.873821971016996 ; s(1,2)=.063089014491502s(2,1)=s(1,2) ; s(2,2)=s(1,1); s(3,1)=s(1,2) ; s(3,2)=s(1,2)s(4,1)=.501426509658179 ; s(4,2)=.249286745170910s(5,1)=s(4,2); s(5,2)=s(4,1) ; s(6,1)=s(4,2) ; s(6,2)=s(4,2)s(7,1)=.636502499121399 ; s(7,2)=.310352451033785s(8,1)=s(7,1) ; s(8,2)=.053145049844816 ; s(9,1)=s(7,2) ; s(9,2)=s(7,1)s(10,1)=s(7,2) ; s(10,2)=s(8,2) ; s(11,1)=s(8,2); s(11,2)=s(7,1)s(12,1)=s(8,2) ; s(12,2)=s(7,2)wt(1)=.050844906370207 ; wt(2)=wt(1); wt(3)=wt(1)wt(4)=.116786275726379 ; wt(5)=wt(4); wt(6)=wt(4)wt(7)=.082851075618374 ; wt(8:12)=wt(7) ; wt = .5*wtcase(16)s(1,1)=1./3. ; s(1,2)=1./3. ; s(2,1)=.658861384496478s(2,2)=.170569307751761 ; s(3,1)=s(2,2) ; s(3,2)=s(2,1)s(4,1)=s(2,2) ; s(4,2)=s(2,2)s(5,1)=.898905543365938 ; s(5,2)=.050547228317031s(6,1)=s(5,2); s(6,2)=s(5,1) ; s(7,1)=s(5,2) ; s(7,2)=s(5,2)s(8,1)=.081414823414554; s(8,2)=.459292588292723s(9,1)=s(8,2) ; s(9,2)=s(8,1); s(10,1)=s(8,2) ; s(10,2)=s(8,2)s(11,1)=.008394777409958; s(11,2)=.263112829634638s(12,1)=s(11,1) ; s(12,2)=.728492392955404s(13,1)=s(11,2) ; s(13,2)=s(11,1) ; s(14,1)=s(11,2); s(14,2)=s(12,2)s(15,1)=s(12,2) ; s(15,2)=s(11,1) ; s(16,1)=s(12,2) ; s(16,2)=s(11,2)wt(1)=.144315607677787 ; wt(2)=.103217370534718 ; wt(3)=wt(2); wt(4)=wt(2) wt(5)=.032458497623198 ; wt(6)=wt(5) ; wt(7)=wt(5)wt(8)=.095091634267284 ; wt(9)=wt(8) ; wt(10)=wt(8)wt(11)=.027230314174435 ; wt(12:16) = wt(11) ; wt = .5*wtcase defaultprint*,"wrong number of integrating points for a triangle"end select3.2D quadrilateral element(p182 computation mechanics)case ('quadrilateral')select case (nip)case(1)s(1,1) = .0 ; wt(1) = 4.case(4)s(1,1)=-root3; s(1,2)= root3s(2,1)= root3; s(2,2)= root3s(3,1)=-root3; s(3,2)=-root3s(4,1)= root3; s(4,2)=-root3wt = 1.0case(9)s(1:7:3,1) = -r15; s(2:8:3,1) = .0s(3:9:3,1) = r15; s(1:3,2) = r15s(4:6,2) = .0 ; s(7:9,2) =-r15wt= vcase defaultprint*,"wrong number of integrating points for a quadrilateral"end select4.3D tetrahedron element(p231 computation mechanics)case('tetrahedron')select case(nip)case(1) ! for tetrahedra weights multiplied by 1/6s(1,1)=.25 ; s(1,2)=.25 ; s(1,3)=.25 ; wt(1)=1./6.case(4)s(1,1)=.58541020 ; s(1,2)=.13819660 ; s(1,3)=s(1,2)s(2,2)=s(1,1) ; s(2,3)=s(1,2) ; s(2,1)=s(1,2)s(3,3)=s(1,1) ; s(3,1)=s(1,2) ; s(3,2)=s(1,2)s(4,1)=s(1,2) ; s(4,2)=s(1,2) ; s(4,3)=s(1,2) ; wt(1:4)=.25/6.case(5)s(1,1)=.25 ; s(1,2)=.25 ; s(1,3)=.25 ; s(2,1)=.5s(2,2)=1./6. ; s(2,3)=s(2,2); s(3,2)=.5s(3,3)=1./6. ; s(3,1)=s(3,3) ; s(4,3)=.5s(4,1)=1./6. ; s(4,2)=s(4,1); s(5,1)=1./6.s(5,2)=s(5,1) ; s(5,3)=s(5,1)wt(1)=-.8 ; wt(2)=9./20. ; wt(3:5)=wt(2) ; wt =wt/6.case(6)wt = 4./3. ; s(6,3) = 1.s(1,1)=-1. ;s(2,1)=1. ; s(3,2)=-1. ; s(4,2)=1. ; s(5,3)=-1.case defaultprint*,"wrong number of integrating points for a tetrahedron"end select5.3D hexahedron element (p187 computation mechanics)case('hexahedron')select case ( nip )case(1)s(1,1) = .0 ; wt(1) = 8.case(8)s(1,1)= root3;s(1,2)= root3;s(1,3)= root3s(2,1)= root3;s(2,2)= root3;s(2,3)=-root3s(3,1)= root3;s(3,2)=-root3;s(3,3)= root3s(4,1)= root3;s(4,2)=-root3;s(4,3)=-root3s(5,1)=-root3;s(5,2)= root3;s(5,3)= root3s(6,1)=-root3;s(6,2)=-root3;s(6,3)= root3s(7,1)=-root3;s(7,2)= root3;s(7,3)=-root3s(8,1)=-root3;s(8,2)=-root3;s(8,3)=-root3wt = 1.0case(14)b=0.795822426 ; c=0.758786911wt(1:6)=0.886426593 ; wt(7:) = 0.335180055s(1,1)=-b ; s(2,1)=b ; s(3,2)=-b ; s(4,2)=bs(5,3)=-b ; s(6,3)=bs(7:,:) = cs(7,1)=-c ; s(7,2)=-c ; s(7,3)=-c ; s(8,2)=-c ; s(8,3)=-cs(9,1)=-c ; s(9,3)=-c ; s(10,3)=-c; s(11,1)=-cs(11,2)=-c ; s(12,2)=-c ; s(13,1)=-ccase(15)b=1. ; c=0.674199862wt(1)=1.564444444 ; wt(2:7)=0.355555556 ; wt(8:15)=0.537777778 s(2,1)=-b ; s(3,1)=b ; s(4,2)=-b ; s(5,2)=bs(6,3)=-b ; s(7,3)=b ; s(8:,:)=c ; s(8,1)=-cs(8,2)=-c ; s(8,3)=-c ; s(9,2)=-c ; s(9,3)=-cs(10,1)=-c ; s(10,3)=-c ; s(11,3)=-c ; s(12,1)=-cs(12,2)=-c ; s(13,2)=-c ; s(14,1)=-ccase(27)wt = (/5./9.*v,8./9.*v,5./9.*v/)s(1:7:3,1) = -r15; s(2:8:3,1) = .0s(3:9:3,1) = r15; s(1:3,3) = r15s(4:6,3) = .0 ; s(7:9,3) =-r15s(1:9,2) = -r15s(10:16:3,1) = -r15; s(11:17:3,1) = .0s(12:18:3,1) = r15; s(10:12,3) = r15s(13:15,3) = .0 ; s(16:18,3) =-r15s(10:18,2) = .0s(19:25:3,1) = -r15; s(20:26:3,1) = .0s(21:27:3,1) = r15; s(19:21,3) = r15s(22:24,3) = .0 ; s(25:27,3) =-r15s(19:27,2) = r15case defaultprint*,"wrong number of integrating points for a hexahedron"end select。
静电场高斯定理的积分形式
高斯定理是用于计算电场强度的重要定理,它可以用积分的形式表示。
通常,它表示为:
E = (1/4πε₀) ∫ρ(r')/|r-r'| dV'
其中,E 是电场强度,ρ(r') 是电荷密度,r 和r' 分别是电场点和电荷位置的矢量,ε₀是真空介电常数,dV' 是电荷所在体积单元的体积。
这个积分表示了电场点周围所有电荷对电场强度的贡献。
在计算电场强度时,可以将电荷分成若干个小体积单元,然后对每个单元分别求解上述积分,最后将所有单元的贡献相加起来,得到电场强度的总值。
注意,高斯定理仅适用于无电荷体积内的电场强度计算。
如果要计算电场强度在有电荷体积外的情况,则应使用莫尔定理。
高斯积分的计算方法在数学领域内,高斯积分是一类经典的数学积分,它不仅深受广大数学学者的喜爱,更在科学与工程领域内应用广泛。
高斯积分的计算方法在数学的发展史上也有着突出的地位。
高斯积分的概念及应用高斯积分是计算圆柱体体积的重要方法之一,它起源于高斯儿时曾在数学竞赛时受到圆柱体体积的启发,从而产生了求出圆柱体体积的积分方法,这就是高斯积分。
高斯积分包含两种类型,第一类和第二类。
第一类和第二类高斯积分分别用于计算复平面中的任意四边形及半平面上的积分问题,是极其有用的数学工具。
在物理学中,高斯积分也运用得非常广泛,可以用来求解电场、磁场、热力学等问题。
高斯积分的计算一般多使用复数表示,复数的实部和虚部对应于二维空间中的横坐标和纵坐标。
对于复平面上的第一类高斯积分,可以利用复变量的奇偶性质以及圆形映射将圆上的高斯积分转化为实轴上的积分问题,从进而求解高斯积分。
对于第二类高斯积分,通常采用变形的方式将积分式转化为反常积分,然后再利用数值解法或者级数展开法求解反常积分。
具体而言,我们将复平面的积分路径展开为两条道路,设积分函数为f(z),则当选取的路径使得沿路径的积分无穷大时,在道路由初始点z1到终止点z2的方向上分别分割成R和r两段,则有以下套路的计算方式:∫(z1,z2)f(z)dz = ∫R f(z)dz + ∫r f(z)dz其中∫R f(z)dz表示对有限的路径积分进行求解,而∫r f(z)dz则表示计算路径积分的一部分,因此在变形之后我们只需要将∫r f(z)dz 根据变形后的路径进行求解即可。
总结高斯积分作为经典数学积分,在物理、工程以及金融领域都有着广泛的应用。
高斯积分的计算也有着不同的方法,需要根据实际问题的需求不断灵活运用。
不过,绝大多数情况下我们都可以采用圆形映射的方法统一化计算,以及采用变形的方式将积分式转化为反常积分进行求解。
Gauss integrations and weights(Containing the program)高斯积分点以及权重目录1.1D bar element(p181 computation mechanics) (2)2.2D triangle element(p230 computation mechanics) (12)3.2D quadrilateral element(p182 computation mechanics) (15)4.3D tetrahedron element(p231 computation mechanics) (17)5.3D hexahedron element (p187 computation mechanics) (19)1.1D bar element(p181 computation mechanics)Order n Accuracy gradeLocation ξWeight w (2*n-1)1 1 1 0.0 2.02 3 1 1.02 1/√3 1.03 5 15/9-2 0.0 8/93 √0.6 5/94 7 1 0.861136311594053 0.3478548451374542 0.339981043584856 0.6521451548625463 -0.339981043584856 0.6521451548625464 -0.861136311594053 0.3478548451374545 9 1 0.906179845938664 0.2369268850561892 0.538469310105683 0.4786286704993663 0 0.5688888888888894 -0.538469********* 0.4786286704993665 -0.906179845938664 0.2369268850561896 11 1 0.932469514203152 0.1713244923791702 0.661209386466265 0.3607615730481393 0.238619186083197 0.4679139345726914 -0.238619186083197 0.4679139345726915 -0.661209386466265 0.3607615730481396 -0.932469514203152 0.171324492379170root3 = 1./sqrt(3.) ; r15 = .2*sqrt(15.)nip = ubound( s , 1 )w = (/5./9.,8./9.,5./9./); v=(/5./9.*w,8./9.*w,5./9.*w/) select case (element)case('line')select case(nip)case(1)s(1,1)=0. ; wt(1)=2.case(2)s(1,1)=root3 ; s(2,1)=-s(1,1) ; wt(1)=1. ; wt(2)=1.case(3)s(1,1)=r15 ; s(2,1)=.0 ; s(3,1)=-s(1,1)wt = wcase(4)s(1,1)=.861136311594053 ; s(2,1)=.339981043584856s(3,1)=-s(2,1) ; s(4,1)=-s(1,1)wt(1)=.347854845137454 ; wt(2)=.652145154862546wt(3)=wt(2) ; wt(4)=wt(1)case(5)s(1,1)=.906179845938664 ; s(2,1)=.538469*********s(3,1)=.0 ; s(4,1)=-s(2,1) ; s(5,1)=-s(1,1)wt(1)=.236926885056189 ; wt(2)=.478628670499366wt(3)=.568888888888889 ; wt(4)=wt(2) ; wt(5)=wt(1)case(6)s(1,1)=.932469514203152 ;s(2,1)=.661209386466265;s(3,1)=.238619186083197s(4,1)=-s(3,1) ; s(5,1)=-s(2,1) ; s(6,1)=-s(1,1)wt(1)=.171324492379170 ; wt(2)=.360761573048139;wt(3)=.467913934572691wt(4)=wt(3); wt(5)=wt(2) ; wt(6)=wt(1)case defaultprint*,"wrong number of integrating points for a line"end select% Copyright (c) 2010, Thomas-Peter Fries, RWTH Aachen Universityfunction [xxIntRef, wwIntRef] = IntPoints1DGauss(nQ)% Set Gauss points in 1D reference element from [-1, 1].if nQ == 1Data = [...0.0000000000000000e+000 2.0000000000000000e+000];elseif nQ == 2Data = [...-5.7735026918962573e-001 1.0000000000000000e+0005.7735026918962573e-001 1.0000000000000000e+000];elseif nQ == 3Data = [...-7.7459666924148340e-001 5.5555555555555558e-0010.0000000000000000e+000 8.8888888888888884e-0017.7459666924148340e-001 5.5555555555555558e-001];elseif nQ == 4Data = [...-8.6113631159405257e-001 3.4785484513745385e-001-3.3998104358485626e-001 6.5214515486254609e-0013.3998104358485626e-001 6.5214515486254609e-0018.6113631159405257e-001 3.4785484513745385e-001];elseif nQ == 5Data = [...-9.0617984593866396e-001 2.3692688505618908e-001-5.3846931010568311e-001 4.7862867049936647e-0010.0000000000000000e+000 5.6888888888888889e-0015.3846931010568311e-001 4.7862867049936647e-0019.0617984593866396e-001 2.3692688505618908e-001];elseif nQ == 6Data = [...-9.3246951420315205e-001 1.7132449237917036e-001-6.6120938646626448e-001 3.6076157304813861e-001-2.3861918608319688e-001 4.6791393457269104e-0012.3861918608319688e-001 4.6791393457269104e-0016.6120938646626448e-001 3.6076157304813861e-0019.3246951420315205e-001 1.7132449237917036e-001];elseif nQ == 7Data = [...-9.4910791234275849e-001 1.2948496616886970e-001-7.4153118559939446e-001 2.7970539148927664e-001-4.0584515137739718e-001 3.8183005050511892e-0010.0000000000000000e+000 4.1795918367346940e-0014.0584515137739718e-001 3.8183005050511892e-0017.4153118559939446e-001 2.7970539148927664e-0019.4910791234275849e-001 1.2948496616886970e-001];elseif nQ == 8Data = [...-9.6028985649753618e-001 1.0122853629037626e-001-7.9666647741362673e-001 2.2238103445337448e-001-5.2553240991632899e-001 3.1370664587788727e-001-1.8343464249564978e-001 3.6268378337836199e-0011.8343464249564978e-001 3.6268378337836199e-0015.2553240991632899e-001 3.1370664587788727e-0017.9666647741362673e-001 2.2238103445337448e-0019.6028985649753618e-001 1.0122853629037626e-001];elseif nQ == 9Data = [...-9.6816023950762609e-001 8.1274388361574412e-002-8.3603110732663577e-001 1.8064816069485740e-001-6.1337143270059036e-001 2.6061069640293544e-001-3.2425342340380892e-001 3.1234707704000286e-0010.0000000000000000e+000 3.3023935500125978e-0013.2425342340380892e-001 3.1234707704000286e-0016.1337143270059036e-001 2.6061069640293544e-0018.3603110732663577e-001 1.8064816069485740e-0019.6816023950762609e-001 8.1274388361574412e-002];elseif nQ == 10Data = [...-9.7390652851717174e-001 6.6671344308688138e-002-8.6506336668898454e-001 1.4945134915058059e-001-6.7940956829902444e-001 2.1908636251598204e-001-4.3339539412924721e-001 2.6926671930999635e-001-1.4887433898163116e-001 2.9552422471475287e-0011.4887433898163116e-0012.9552422471475287e-0014.3339539412924721e-001 2.6926671930999635e-0016.7940956829902444e-001 2.1908636251598204e-0018.6506336668898454e-001 1.4945134915058059e-0019.7390652851717174e-001 6.6671344308688138e-002];elseif nQ == 11Data = [...-9.7822865814605697e-001 5.5668567116173663e-002-8.8706259976809532e-001 1.2558036946490461e-001-7.3015200557404936e-001 1.8629021092773426e-001-5.1909612920681181e-001 2.3319376459199048e-001-2.6954315595234501e-001 2.6280454451024665e-0010.0000000000000000e+000 2.7292508677790062e-0012.6954315595234501e-001 2.6280454451024665e-0015.1909612920681181e-001 2.3319376459199048e-0017.3015200557404936e-001 1.8629021092773426e-0018.8706259976809532e-001 1.2558036946490461e-0019.7822865814605697e-001 5.5668567116173663e-002];elseif nQ == 12Data = [...-9.8156063424671924e-001 4.7175336386511828e-002-9.0411725637047491e-001 1.0693932599531843e-001-7.6990267419430469e-001 1.6007832854334622e-001-5.8731795428661737e-001 2.0316742672306592e-001-3.6783149899818024e-001 2.3349253653835481e-001-1.2523340851146891e-001 2.4914704581340277e-0011.2523340851146891e-0012.4914704581340277e-0013.6783149899818024e-001 2.3349253653835481e-0015.8731795428661737e-001 2.0316742672306592e-0017.6990267419430469e-001 1.6007832854334622e-0019.0411725637047491e-001 1.0693932599531843e-0019.8156063424671924e-001 4.7175336386511828e-002];elseif nQ == 13Data = [...-9.8418305471858814e-001 4.0484004765315877e-002-9.1759839922297792e-001 9.2121499837728452e-002-8.0157809073330988e-001 1.3887351021978725e-001-6.4234933944034023e-001 1.7814598076194574e-001-4.4849275103644681e-001 2.0781604753688851e-001-2.3045831595513477e-001 2.2628318026289723e-0010.0000000000000000e+000 2.3255155323087390e-0012.3045831595513477e-001 2.2628318026289723e-0014.4849275103644681e-001 2.0781604753688851e-0016.4234933944034023e-001 1.7814598076194574e-0018.0157809073330988e-001 1.3887351021978725e-0019.1759839922297792e-001 9.2121499837728452e-0029.8418305471858814e-001 4.0484004765315877e-002];elseif nQ == 14Data = [...-9.8628380869681231e-001 3.5119460331751860e-002-9.2843488366357352e-001 8.0158087159760208e-002-8.2720131506976502e-001 1.2151857068790319e-001-6.8729290481168548e-001 1.5720316715819355e-001-5.1524863635815410e-001 1.8553839747793782e-001-3.1911236892788974e-001 2.0519846372129560e-001-1.0805494870734367e-001 2.1526385346315779e-0011.0805494870734367e-0012.1526385346315779e-0013.1911236892788974e-001 2.0519846372129560e-0015.1524863635815410e-001 1.8553839747793782e-0016.8729290481168548e-001 1.5720316715819355e-0018.2720131506976502e-001 1.2151857068790319e-0019.2843488366357352e-001 8.0158087159760208e-0029.8628380869681231e-001 3.5119460331751860e-002];elseif nQ == 15Data = [...-9.8799251802048538e-001 3.0753241996117269e-002-9.3727339240070595e-001 7.0366047488108124e-002-8.4820658341042721e-001 1.0715922046717194e-001-7.2441773136017007e-001 1.3957067792615432e-001-5.7097217260853883e-001 1.6626920581699392e-001-3.9415134707756339e-001 1.8616100001556221e-001-2.0119409399743449e-001 1.9843148532711158e-0010.0000000000000000e+000 2.0257824192556129e-0012.0119409399743449e-001 1.9843148532711158e-0013.9415134707756339e-001 1.8616100001556221e-0015.7097217260853883e-001 1.6626920581699392e-0017.2441773136017007e-001 1.3957067792615432e-0018.4820658341042721e-001 1.0715922046717194e-0019.3727339240070595e-001 7.0366047488108124e-0029.8799251802048538e-001 3.0753241996117269e-002];elseif nQ == 16Data = [...-9.8940093499164994e-001 2.7152459411754096e-002-9.4457502307323260e-001 6.2253523938647894e-002-8.6563120238783176e-001 9.5158511682492786e-002-7.5540440835500300e-001 1.2462897125553388e-001-6.1787624440264377e-001 1.4959598881657674e-001-4.5801677765722737e-001 1.6915651939500254e-001-2.8160355077925892e-001 1.8260341504492358e-001-9.5012509837637427e-002 1.8945061045506850e-0019.5012509837637427e-002 1.8945061045506850e-0012.8160355077925892e-001 1.8260341504492358e-0014.5801677765722737e-001 1.6915651939500254e-0016.1787624440264377e-001 1.4959598881657674e-0017.5540440835500300e-001 1.2462897125553388e-0018.6563120238783176e-001 9.5158511682492786e-0029.4457502307323260e-001 6.2253523938647894e-0029.8940093499164994e-001 2.7152459411754096e-002];elseif nQ == 17Data = [...-9.9057547531441736e-001 2.4148302868547931e-002-9.5067552176876780e-001 5.5459529373987203e-002-8.8023915372698591e-001 8.5036148317179178e-002-7.8151400389680137e-001 1.1188384719340397e-001-6.5767115921669084e-001 1.3513636846852548e-001-5.1269053708647694e-001 1.5404576107681028e-001-3.5123176345387630e-001 1.6800410215645004e-001-1.7848418149584788e-001 1.7656270536699264e-0010.0000000000000000e+000 1.7944647035620653e-0011.7848418149584788e-001 1.7656270536699264e-0013.5123176345387630e-001 1.6800410215645004e-0015.1269053708647694e-001 1.5404576107681028e-0016.5767115921669084e-001 1.3513636846852548e-0017.8151400389680137e-001 1.1188384719340397e-0018.8023915372698591e-001 8.5036148317179178e-0029.5067552176876780e-001 5.5459529373987203e-0029.9057547531441736e-001 2.4148302868547931e-002];elseif nQ == 18Data = [...-9.9156516842093090e-001 2.1616013526483312e-002-9.5582394957139771e-001 4.9714548894969797e-002-8.9260246649755570e-001 7.6425730254889052e-002-8.0370495897252314e-001 1.0094204410628717e-001-6.9168704306035322e-001 1.2255520671147846e-001-5.5977083107394754e-001 1.4064291467065065e-001-4.1175116146284263e-001 1.5468467512626524e-001-2.5188622569150554e-001 1.6427648374583273e-001-8.4775013041735292e-002 1.6914238296314360e-0018.4775013041735292e-002 1.6914238296314360e-0012.5188622569150554e-001 1.6427648374583273e-0014.1175116146284263e-001 1.5468467512626524e-0015.5977083107394754e-001 1.4064291467065065e-0016.9168704306035322e-001 1.2255520671147846e-0018.0370495897252314e-001 1.0094204410628717e-0018.9260246649755570e-001 7.6425730254889052e-0029.5582394957139771e-001 4.9714548894969797e-0029.9156516842093090e-001 2.1616013526483312e-002];elseif nQ == 19Data = [...-9.9240684384358435e-001 1.9461788229726478e-002-9.6020815213483002e-001 4.4814226765699600e-002-9.0315590361481790e-001 6.9044542737641226e-002-8.2271465653714282e-001 9.1490021622449999e-002-7.2096617733522939e-001 1.1156664554733399e-001-6.0054530466168110e-001 1.2875396253933621e-001-4.6457074137596099e-001 1.4260670217360660e-001-3.1656409996362989e-001 1.5276604206585967e-001-1.6035864564022539e-001 1.5896884339395434e-0010.0000000000000000e+000 1.6105444984878370e-0011.6035864564022539e-001 1.5896884339395434e-0013.1656409996362989e-001 1.5276604206585967e-0014.6457074137596099e-001 1.4260670217360660e-0016.0054530466168110e-001 1.2875396253933621e-0017.2096617733522939e-001 1.1156664554733399e-0018.2271465653714282e-001 9.1490021622449999e-0029.0315590361481790e-001 6.9044542737641226e-0029.6020815213483002e-001 4.4814226765699600e-0029.9240684384358435e-001 1.9461788229726478e-002];elseif nQ == 20Data = [...-9.9312859918509488e-001 1.7614007139152118e-002-9.6397192727791381e-001 4.0601429800386939e-002-9.1223442825132595e-001 6.2672048334109068e-002-8.3911697182221878e-001 8.3276741576704755e-002-7.4633190646015080e-001 1.0193011981724044e-001-6.3605368072651502e-001 1.1819453196151841e-001-5.1086700195082702e-001 1.3168863844917664e-001-3.7370608871541955e-001 1.4209610931838204e-001-2.2778585114164507e-001 1.4917298647260374e-001-7.6526521133497338e-002 1.5275338713072584e-0017.6526521133497338e-002 1.5275338713072584e-0012.2778585114164507e-001 1.4917298647260374e-0013.7370608871541955e-001 1.4209610931838204e-0015.1086700195082702e-001 1.3168863844917664e-0016.3605368072651502e-001 1.1819453196151841e-0017.4633190646015080e-001 1.0193011981724044e-0018.3911697182221878e-001 8.3276741576704755e-0029.1223442825132595e-001 6.2672048334109068e-0029.6397192727791381e-001 4.0601429800386939e-0029.9312859918509488e-001 1.7614007139152118e-002];elseif nQ == 21Data = [...-9.9375217062038945e-001 1.6017228257774335e-002-9.6722683856630631e-001 3.6953789770852494e-002-9.2009933415040079e-001 5.7134425426857205e-002-8.5336336458331730e-001 7.6100113628379304e-002-7.6843996347567789e-001 9.3444423456033862e-002-6.6713880419741234e-001 1.0879729916714838e-001-5.5161883588721983e-001 1.2183141605372853e-001-4.2434212020743878e-001 1.3226893863333747e-001-2.8802131680240106e-001 1.3988739479107315e-001-1.4556185416089507e-001 1.4452440398997005e-0010.0000000000000000e+000 1.4608113364969041e-0011.4556185416089507e-001 1.4452440398997005e-0012.8802131680240106e-001 1.3988739479107315e-0014.2434212020743878e-001 1.3226893863333747e-0015.5161883588721983e-001 1.2183141605372853e-0016.6713880419741234e-001 1.0879729916714838e-0017.6843996347567789e-001 9.3444423456033862e-0028.5336336458331730e-001 7.6100113628379304e-0029.2009933415040079e-001 5.7134425426857205e-0029.6722683856630631e-001 3.6953789770852494e-0029.9375217062038945e-001 1.6017228257774335e-002];elseerror(['The number ' num2str(nQ) ' is not implemented.']) endxxIntRef = Data(:, 1)';wwIntRef = Data(:, 2)';% % Plot situation.% reset(cla), reset(clf), hold on% a = plot(xxIntRef, zeros(size(xxIntRef)), 'k*');% set(a, 'LineWidth', 2, 'MarkerSize', 15)% a = line([-1 1], [0 0]);% set(a, 'LineWidth', 2, 'Color', 'k')% box on, axis equal, axis([-1 1 -0.1 0.1])2.2D triangle element(p230 computation mechanics)Location ξLocation ηWeight w Ordern1(a) 1 1/3 1/3 1.03(c) 1 0.5 0.5 1/32 0.5 0.0 1/33 0.0 0.5 1/34(d) 1 1/3 1/3 -27/482 3/5 1/5 25/483 1/5 1/5 25/484 1/5 3/5 25/486 1 0.816847572980459 0.091576213509771 0.109951743655322*0.52 0.091576213509771 0.816847572980459 0.109951743655322*0.53 0.091576213509771 0.091576213509771 0.109951743655322*0.54 0.108103018168070 0.445948490915965 0.223381589678011*0.55 0.445948********* 0.108103018168070 0.223381589678011*0.56 0.445948********* 0.445948********* 0.223381589678011*0.5 12 1 .873821971016996 0.063089014491502 0.050844906370207*0.52 .063089014491502 0.873821971016996 0.050844906370207*0.53 .063089014491502 0.063089014491502 0.050844906370207*0.54 .501426509658179 0.249286745170910 0.116786275726379*0.5case('triangle')select case(nip)case(1) ! for triangles weights multiplied by .5s(1,1)=1./3. ; s(1,2)=1./3. ; wt(1)= .5case(3)s(1,1)=.5 ; s(1,2)=.5 ; s(2,1)=.5s(2,2)=0.; s(3,1)=0. ; s(3,2)=.5wt(1)=1./3. ; wt(2)=wt(1) ; wt(3)=wt(1) ; wt = .5*wtcase(6)s(1,1)=.816847572980459 ; s(1,2)=.091576213509771s(2,1)=s(1,2); s(2,2)=s(1,1) ; s(3,1)=s(1,2); s(3,2)=s(1,2)s(4,1)=.108103018168070 ; s(4,2)=.445948*********s(5,1)=s(4,2) ; s(5,2)=s(4,1) ; s(6,1)=s(4,2) ; s(6,2)=s(4,2)wt(1)=.109951743655322 ; wt(2)=wt(1) ; wt(3)=wt(1)wt(4)=.223381589678011 ; wt(5)=wt(4) ; wt(6)=wt(4) ; wt = .5*wt case(7)s(1,1)=1./3. ; s(1,2)=1./3.;s(2,1)=.797426985353087 ;s(2,2)=.101286507323456 s(3,1)=s(2,2) ; s(3,2)=s(2,1) ; s(4,1)=s(2,2) ; s(4,2)=s(2,2)s(5,1)=.470142064105115 ; s(5,2)=.059715871789770s(6,1)=s(5,2) ; s(6,2)=s(5,1); s(7,1)=s(5,1); s(7,2)=s(5,1)wt(1)=.225 ; wt(2)=.125939180544827 ; wt(3)=wt(2); wt(4)=wt(2)wt(5)=.132394152788506; wt(6)=wt(5) ; wt(7)=wt(5) ;wt = .5*wt case(12)s(1,1)=.873821971016996 ; s(1,2)=.063089014491502s(2,1)=s(1,2) ; s(2,2)=s(1,1); s(3,1)=s(1,2) ; s(3,2)=s(1,2)s(4,1)=.501426509658179 ; s(4,2)=.249286745170910s(5,1)=s(4,2); s(5,2)=s(4,1) ; s(6,1)=s(4,2) ; s(6,2)=s(4,2)s(7,1)=.636502499121399 ; s(7,2)=.310352451033785s(8,1)=s(7,1) ; s(8,2)=.053145049844816 ; s(9,1)=s(7,2) ; s(9,2)=s(7,1)s(10,1)=s(7,2) ; s(10,2)=s(8,2) ; s(11,1)=s(8,2); s(11,2)=s(7,1)s(12,1)=s(8,2) ; s(12,2)=s(7,2)wt(1)=.050844906370207 ; wt(2)=wt(1); wt(3)=wt(1)wt(4)=.116786275726379 ; wt(5)=wt(4); wt(6)=wt(4)wt(7)=.082851075618374 ; wt(8:12)=wt(7) ; wt = .5*wtcase(16)s(1,1)=1./3. ; s(1,2)=1./3. ; s(2,1)=.658861384496478s(2,2)=.170569307751761 ; s(3,1)=s(2,2) ; s(3,2)=s(2,1)s(4,1)=s(2,2) ; s(4,2)=s(2,2)s(5,1)=.898905543365938 ; s(5,2)=.050547228317031s(6,1)=s(5,2); s(6,2)=s(5,1) ; s(7,1)=s(5,2) ; s(7,2)=s(5,2)s(8,1)=.081414823414554; s(8,2)=.459292588292723s(9,1)=s(8,2) ; s(9,2)=s(8,1); s(10,1)=s(8,2) ; s(10,2)=s(8,2)s(11,1)=.008394777409958; s(11,2)=.263112829634638s(12,1)=s(11,1) ; s(12,2)=.728492392955404s(13,1)=s(11,2) ; s(13,2)=s(11,1) ; s(14,1)=s(11,2); s(14,2)=s(12,2)s(15,1)=s(12,2) ; s(15,2)=s(11,1) ; s(16,1)=s(12,2) ; s(16,2)=s(11,2)wt(1)=.144315607677787 ; wt(2)=.103217370534718 ; wt(3)=wt(2); wt(4)=wt(2) wt(5)=.032458497623198 ; wt(6)=wt(5) ; wt(7)=wt(5)wt(8)=.095091634267284 ; wt(9)=wt(8) ; wt(10)=wt(8)wt(11)=.027230314174435 ; wt(12:16) = wt(11) ; wt = .5*wtcase defaultprint*,"wrong number of integrating points for a triangle"end select3.2D quadrilateral element(p182 computation mechanics)Order n Location ξLocation ηWeight w1 1 0.0 0.0 4.04 1 1.02 1.03 1.04 1.09 1 -√0.6 -√0.6 25/812 -√0.6 0.0 40/813 -√0.6 √0.6 25/814 0.0 -√0.6 40/815 0.0 0.0 64/816 0.0 √0.6 40/81case ('quadrilateral')select case (nip)case(1)s(1,1) = .0 ; wt(1) = 4.case(4)s(1,1)=-root3; s(1,2)= root3s(2,1)= root3; s(2,2)= root3s(3,1)=-root3; s(3,2)=-root3s(4,1)= root3; s(4,2)=-root3wt = 1.0case(9)s(1:7:3,1) = -r15; s(2:8:3,1) = .0s(3:9:3,1) = r15; s(1:3,2) = r15s(4:6,2) = .0 ; s(7:9,2) =-r15wt= vcase defaultprint*,"wrong number of integrating points for a quadrilateral"end select4.3D tetrahedron element(p231 computation mechanics)case('tetrahedron')select case(nip)case(1) ! for tetrahedra weights multiplied by 1/6s(1,1)=.25 ; s(1,2)=.25 ; s(1,3)=.25 ; wt(1)=1./6.case(4)s(1,1)=.58541020 ; s(1,2)=.13819660 ; s(1,3)=s(1,2)s(2,2)=s(1,1) ; s(2,3)=s(1,2) ; s(2,1)=s(1,2)s(3,3)=s(1,1) ; s(3,1)=s(1,2) ; s(3,2)=s(1,2)s(4,1)=s(1,2) ; s(4,2)=s(1,2) ; s(4,3)=s(1,2) ; wt(1:4)=.25/6.case(5)s(1,1)=.25 ; s(1,2)=.25 ; s(1,3)=.25 ; s(2,1)=.5s(2,2)=1./6. ; s(2,3)=s(2,2); s(3,2)=.5s(3,3)=1./6. ; s(3,1)=s(3,3) ; s(4,3)=.5s(4,1)=1./6. ; s(4,2)=s(4,1); s(5,1)=1./6.s(5,2)=s(5,1) ; s(5,3)=s(5,1)wt(1)=-.8 ; wt(2)=9./20. ; wt(3:5)=wt(2) ; wt =wt/6.case(6)wt = 4./3. ; s(6,3) = 1.s(1,1)=-1. ;s(2,1)=1. ; s(3,2)=-1. ; s(4,2)=1. ; s(5,3)=-1.case defaultprint*,"wrong number of integrating points for a tetrahedron"end select5.3D hexahedron element (p187 computation mechanics)Location r Location s Location t Weight w Ordern1 1 0.0 0.0 0.0 8.08 1 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.0case('hexahedron')select case ( nip )case(1)s(1,1) = .0 ; wt(1) = 8.case(8)s(1,1)= root3;s(1,2)= root3;s(1,3)= root3s(2,1)= root3;s(2,2)= root3;s(2,3)=-root3s(3,1)= root3;s(3,2)=-root3;s(3,3)= root3s(4,1)= root3;s(4,2)=-root3;s(4,3)=-root3s(5,1)=-root3;s(5,2)= root3;s(5,3)= root3s(6,1)=-root3;s(6,2)=-root3;s(6,3)= root3s(7,1)=-root3;s(7,2)= root3;s(7,3)=-root3s(8,1)=-root3;s(8,2)=-root3;s(8,3)=-root3wt = 1.0case(14)b=0.795822426 ; c=0.758786911wt(1:6)=0.886426593 ; wt(7:) = 0.335180055s(1,1)=-b ; s(2,1)=b ; s(3,2)=-b ; s(4,2)=bs(5,3)=-b ; s(6,3)=bs(7:,:) = cs(7,1)=-c ; s(7,2)=-c ; s(7,3)=-c ; s(8,2)=-c ; s(8,3)=-cs(9,1)=-c ; s(9,3)=-c ; s(10,3)=-c; s(11,1)=-cs(11,2)=-c ; s(12,2)=-c ; s(13,1)=-ccase(15)b=1. ; c=0.674199862wt(1)=1.564444444 ; wt(2:7)=0.355555556 ; wt(8:15)=0.537777778 s(2,1)=-b ; s(3,1)=b ; s(4,2)=-b ; s(5,2)=bs(6,3)=-b ; s(7,3)=b ; s(8:,:)=c ; s(8,1)=-cs(8,2)=-c ; s(8,3)=-c ; s(9,2)=-c ; s(9,3)=-cs(10,1)=-c ; s(10,3)=-c ; s(11,3)=-c ; s(12,1)=-cs(12,2)=-c ; s(13,2)=-c ; s(14,1)=-ccase(27)wt = (/5./9.*v,8./9.*v,5./9.*v/)s(1:7:3,1) = -r15; s(2:8:3,1) = .0s(3:9:3,1) = r15; s(1:3,3) = r15s(4:6,3) = .0 ; s(7:9,3) =-r15s(1:9,2) = -r15s(10:16:3,1) = -r15; s(11:17:3,1) = .0s(12:18:3,1) = r15; s(10:12,3) = r15s(13:15,3) = .0 ; s(16:18,3) =-r15s(10:18,2) = .0s(19:25:3,1) = -r15; s(20:26:3,1) = .0s(21:27:3,1) = r15; s(19:21,3) = r15s(22:24,3) = .0 ; s(25:27,3) =-r15s(19:27,2) = r15case defaultprint*,"wrong number of integrating points for a hexahedron"end select。
Gauss integrations and weights(Containing the program)高斯积分点以及权重目录1.1D bar element(p181 computation mechanics) (2)2.2D triangle element(p230 computation mechanics) (12)3.2D quadrilateral element(p182 computation mechanics) (15)4.3D tetrahedron element(p231 computation mechanics) (17)5.3D hexahedron element (p187 computation mechanics) (19)1.1D bar element(p181 computation mechanics) Order n Accuracy gradeLocation ξWeight w (2*n-1)1 1 1 0.0 2.02 3 1 1.02 1/√3 1.03 5 15/9-2 0.0 8/93 √0.6 5/94 7 1 0.4053 0.74542 0.4856 0.25463 -0.4856 0.25464 -0.4053 0.74545 9 1 0.8664 0.61892 0.5683 0.93663 0 0.88894 -0.5683 0.93665 -0.8664 0.61896 11 1 0.3152 0.91702 0.6265 0.81393 0.3197 0.26914 -0.3197 0.26915 -0.6265 0.81396 -0.3152 0.9170root3 = 1./sqrt(3.) ; r15 = .2*sqrt(15.)nip = ubound( s , 1 )w = (/5./9.,8./9.,5./9./); v=(/5./9.*w,8./9.*w,5./9.*w/) select case (element)case('line')select case(nip)case(1)s(1,1)=0. ; wt(1)=2.case(2)s(1,1)=root3 ; s(2,1)=-s(1,1) ; wt(1)=1. ; wt(2)=1.case(3)s(1,1)=r15 ; s(2,1)=.0 ; s(3,1)=-s(1,1)wt = wcase(4)s(1,1)=.4053 ; s(2,1)=.4856s(3,1)=-s(2,1) ; s(4,1)=-s(1,1)wt(1)=.7454 ; wt(2)=.2546wt(3)=wt(2) ; wt(4)=wt(1)case(5)s(1,1)=.8664 ; s(2,1)=.5683s(3,1)=.0 ; s(4,1)=-s(2,1) ; s(5,1)=-s(1,1)wt(1)=.6189 ; wt(2)=.9366wt(3)=.8889 ; wt(4)=wt(2) ; wt(5)=wt(1)case(6)s(1,1)=.3152 ; s(2,1)=.6265;s(3,1)=.3197s(4,1)=-s(3,1) ; s(5,1)=-s(2,1) ; s(6,1)=-s(1,1)wt(1)=.9170 ; wt(2)=.8139;wt(3)=.2691wt(4)=wt(3); wt(5)=wt(2) ; wt(6)=wt(1)case defaultprint*,"wrong number of integrating points for a line"end select% Copyright (c) 2010, Thomas-Peter Fries, RWTH Aachen Universityfunction [xxIntRef, wwIntRef] = IntPoints1DGauss(nQ)% Set Gauss points in 1D reference element from [-1, 1].if nQ == 1Data = [...0.00000e+000 2.00000e+000];elseif nQ == 2Data = [...-5.62573e-001 1.00000e+0005.62573e-001 1.00000e+000];elseif nQ == 3Data = [...-7.48340e-001 5.55558e-0010.00000e+000 8.88884e-0017.48340e-001 5.55558e-001];elseif nQ == 4Data = [...-8.05257e-001 3.45385e-001-3.85626e-001 6.54609e-0013.85626e-001 6.54609e-0018.05257e-001 3.45385e-001];elseif nQ == 5Data = [...-9.66396e-001 2.18908e-001-5.68311e-001 4.36647e-0010.00000e+000 5.88889e-0015.68311e-001 4.36647e-0019.66396e-001 2.18908e-001];elseif nQ == 6Data = [...-9.15205e-001 1.17036e-001-6.26448e-001 3.13861e-001-2.19688e-001 4.69104e-0012.19688e-001 4.69104e-0016.26448e-001 3.13861e-0019.15205e-001 1.17036e-001];elseif nQ == 7Data = [...-9.75849e-001 1.86970e-001-7.39446e-001 2.27664e-001-4.39718e-001 3.11892e-0010.00000e+000 4.46940e-0014.39718e-001 3.11892e-0017.39446e-001 2.27664e-0019.75849e-001 1.86970e-001];elseif nQ == 8Data = [...-9.53618e-001 1.37626e-001-7.62673e-001 2.37448e-001-5.32899e-001 3.88727e-001-1.64978e-001 3.36199e-0011.64978e-001 3.36199e-0015.32899e-001 3.88727e-0017.62673e-001 2.37448e-0019.53618e-001 1.37626e-001];elseif nQ == 9Data = [...-9.62609e-001 8.74412e-002-8.63577e-001 1.85740e-001-6.59036e-001 2.93544e-001-3.80892e-001 3.00286e-0010.00000e+000 3.25978e-0013.80892e-001 3.00286e-0016.59036e-001 2.93544e-0018.63577e-001 1.85740e-0019.62609e-001 8.74412e-002];elseif nQ == 10Data = [...-8.98454e-001 1.58059e-001-6.02444e-001 2.98204e-001-4.24721e-001 2.99635e-001-1.63116e-001 2.75287e-0011.63116e-0012.75287e-0014.24721e-001 2.99635e-0016.02444e-001 2.98204e-0018.98454e-001 1.58059e-0019.17174e-001 6.88138e-002];elseif nQ == 11Data = [...-9.05697e-001 5.73663e-002-8.09532e-001 1.90461e-001-7.04936e-001 1.73426e-001-5.81181e-001 2.99048e-001-2.34501e-001 2.24665e-0010.00000e+000 2.90062e-0012.34501e-001 2.24665e-0015.81181e-001 2.99048e-0017.04936e-001 1.73426e-0018.09532e-001 1.90461e-0019.05697e-001 5.73663e-002];elseif nQ == 12Data = [...-9.71924e-001 4.11828e-002-9.47491e-001 1.31843e-001-7.30469e-001 1.34622e-001-5.61737e-001 2.06592e-001-3.18024e-001 2.35481e-001-1.46891e-001 2.40277e-0011.46891e-0012.40277e-0013.18024e-001 2.35481e-0015.61737e-001 2.06592e-0017.30469e-001 1.34622e-0019.47491e-001 1.31843e-0019.71924e-001 4.11828e-002];elseif nQ == 13Data = [...-9.58814e-001 4.15877e-002-9.97792e-001 9.28452e-002-6.34023e-001 1.94574e-001-4.44681e-001 2.88851e-001-2.13477e-001 2.89723e-0010.00000e+000 2.87390e-0012.13477e-001 2.89723e-0014.44681e-001 2.88851e-0016.34023e-001 1.94574e-0018.30988e-001 1.78725e-0019.97792e-001 9.28452e-0029.58814e-001 4.15877e-002];elseif nQ == 14Data = [...-9.81231e-001 3.51860e-002-9.57352e-001 8.60208e-002-8.76502e-001 1.90319e-001-6.68548e-001 1.19355e-001-5.15410e-001 1.93782e-001-3.88974e-001 2.29560e-001-1.34367e-001 2.15779e-0011.34367e-0012.15779e-0013.88974e-001 2.29560e-0015.15410e-001 1.93782e-0016.68548e-001 1.19355e-0018.76502e-001 1.90319e-0019.57352e-001 8.60208e-0029.81231e-001 3.51860e-002];elseif nQ == 15Data = [...-9.48538e-001 3.17269e-002-9.70595e-001 7.08124e-002-8.42721e-001 1.17194e-001-7.17007e-001 1.15432e-001-5.53883e-001 1.99392e-001-3.56339e-001 1.56221e-001-2.43449e-001 1.11158e-0010.00000e+000 2.56129e-0012.43449e-001 1.11158e-0013.56339e-001 1.56221e-0015.53883e-001 1.99392e-0017.17007e-001 1.15432e-0018.42721e-001 1.17194e-0019.48538e-001 3.17269e-002];elseif nQ == 16Data = [...-9.64994e-001 2.54096e-002-9.23260e-001 6.47894e-002-8.83176e-001 9.92786e-002-7.00300e-001 1.53388e-001-6.64377e-001 1.57674e-001-4.22737e-001 1.00254e-001-2.25892e-001 1.92358e-001-9.37427e-002 1.06850e-0019.37427e-002 1.06850e-0012.25892e-001 1.92358e-0014.22737e-001 1.00254e-0016.64377e-001 1.57674e-0017.00300e-001 1.53388e-0018.83176e-001 9.92786e-0029.23260e-001 6.47894e-0029.64994e-001 2.54096e-002];elseif nQ == 17Data = [...-9.41736e-001 2.47931e-002-9.76780e-001 5.87203e-002-8.98591e-001 8.79178e-002-7.80137e-001 1.40397e-001-6.69084e-001 1.52548e-001-5.47694e-001 1.81028e-001-3.87630e-001 1.45004e-001-1.84788e-001 1.99264e-0010.00000e+000 1.20653e-0011.84788e-001 1.99264e-0013.87630e-001 1.45004e-0015.47694e-001 1.81028e-0016.69084e-001 1.52548e-0017.80137e-001 1.40397e-0018.98591e-001 8.79178e-0029.76780e-001 5.87203e-0029.41736e-001 2.47931e-002];elseif nQ == 18Data = [...-9.39771e-001 4.69797e-002-8.55570e-001 7.89052e-002-8.52314e-001 1.28717e-001-6.35322e-001 1.47846e-001-5.94754e-001 1.65065e-001-4.84263e-001 1.26524e-001-2.50554e-001 1.83273e-001-8.35292e-002 1.14360e-0018.35292e-002 1.14360e-0012.50554e-001 1.83273e-0014.84263e-001 1.26524e-0015.94754e-001 1.65065e-0016.35322e-001 1.47846e-0018.52314e-001 1.28717e-0018.55570e-001 7.89052e-0029.39771e-001 4.69797e-0029.93090e-001 2.83312e-002];elseif nQ == 19Data = [...-9.58435e-001 1.26478e-002-9.83002e-001 4.99600e-002-9.81790e-001 6.41226e-002-8.14282e-001 9.49999e-002-7.22939e-001 1.33399e-001-6.68110e-001 1.33621e-001-4.96099e-001 1.60660e-001-3.62989e-001 1.85967e-001-1.22539e-001 1.95434e-0010.00000e+000 1.78370e-0011.22539e-001 1.95434e-0013.62989e-001 1.85967e-0014.96099e-001 1.60660e-0016.68110e-001 1.33621e-0017.22939e-001 1.33399e-0018.14282e-001 9.49999e-0029.81790e-001 6.41226e-0029.83002e-001 4.99600e-0029.58435e-001 1.26478e-002];elseif nQ == 20Data = [...-9.09488e-001 1.52118e-002-9.32595e-001 6.09068e-002-8.21878e-001 8.04755e-002-7.15080e-001 1.24044e-001-6.51502e-001 1.51841e-001-5.82702e-001 1.17664e-001-3.41955e-001 1.38204e-001-2.64507e-001 1.60374e-001-7.97338e-002 1.72584e-0017.97338e-002 1.72584e-0012.64507e-001 1.60374e-0013.41955e-001 1.38204e-0015.82702e-001 1.17664e-0016.51502e-001 1.51841e-0017.15080e-001 1.24044e-0018.21878e-001 8.04755e-0029.32595e-001 6.09068e-0029.91381e-001 4.86939e-0029.09488e-001 1.52118e-002];elseif nQ == 21Data = [...-9.38945e-001 1.74335e-002-9.30631e-001 3.52494e-002-9.40079e-001 5.57205e-002-8.31730e-001 7.79304e-002-7.67789e-001 9.33862e-002-6.41234e-001 1.14838e-001-5.21983e-001 1.72853e-001-4.43878e-001 1.33747e-001-2.40106e-001 1.07315e-001-1.89507e-001 1.97005e-0010.00000e+000 1.69041e-0011.89507e-001 1.97005e-0012.40106e-001 1.07315e-0014.43878e-001 1.33747e-0015.21983e-001 1.72853e-0016.41234e-001 1.14838e-0017.67789e-001 9.33862e-0028.31730e-001 7.79304e-0029.40079e-001 5.57205e-0029.30631e-001 3.52494e-0029.38945e-001 1.74335e-002];elseerror(['The number ' num2str(nQ) ' is not implemented.']) endxxIntRef = Data(:, 1)';wwIntRef = Data(:, 2)';% % Plot situation.% reset(cla), reset(clf), hold on% a = plot(xxIntRef, zeros(size(xxIntRef)), 'k*');% set(a, 'LineWidth', 2, 'MarkerSize', 15)% a = line([-1 1], [0 0]);% set(a, 'LineWidth', 2, 'Color', 'k')% box on, axis equal, axis([-1 1 -0.1 0.1])2.2D triangle element(p230 computation mechanics)Order n Location ξLocation ηWeight w 1(a) 1 1/3 1/3 1.03(c) 1 0.5 0.5 1/32 0.5 0.0 1/33 0.0 0.5 1/34(d) 1 1/3 1/3 -27/482 3/5 1/5 25/483 1/5 1/5 25/484 1/5 3/5 25/486 1 0.0459 0.9771 0.5322*0.52 0.9771 0.0459 0.5322*0.53 0.9771 0.9771 0.5322*0.54 0.8070 0.5965 0.8011*0.55 0.5965 0.8070 0.8011*0.56 0.5965 0.5965 0.8011*0.512 1 .6996 0.1502 0.0207*0.52 .1502 0.6996 0.0207*0.53 .1502 0.1502 0.0207*0.54 .8179 0.0910 0.6379*0.55 .0910 0.8179 0.6379*0.5case('triangle')select case(nip)case(1) ! for triangles weights multiplied by .5s(1,1)=1./3. ; s(1,2)=1./3. ; wt(1)= .5case(3)s(1,1)=.5 ; s(1,2)=.5 ; s(2,1)=.5s(2,2)=0.; s(3,1)=0. ; s(3,2)=.5wt(1)=1./3. ; wt(2)=wt(1) ; wt(3)=wt(1) ; wt = .5*wtcase(6)s(1,1)=.0459 ; s(1,2)=.9771s(2,1)=s(1,2); s(2,2)=s(1,1) ; s(3,1)=s(1,2); s(3,2)=s(1,2)s(4,1)=.8070 ; s(4,2)=.5965s(5,1)=s(4,2) ; s(5,2)=s(4,1) ; s(6,1)=s(4,2) ; s(6,2)=s(4,2)wt(1)=.5322 ; wt(2)=wt(1) ; wt(3)=wt(1)wt(4)=.8011 ; wt(5)=wt(4) ; wt(6)=wt(4) ; wt = .5*wtcase(7)s(1,1)=1./3. ; s(1,2)=1./3.;s(2,1)=.3087 ;s(2,2)=.3456s(3,1)=s(2,2) ; s(3,2)=s(2,1) ; s(4,1)=s(2,2) ; s(4,2)=s(2,2)s(5,1)=.5115 ; s(5,2)=.9770s(6,1)=s(5,2) ; s(6,2)=s(5,1); s(7,1)=s(5,1); s(7,2)=s(5,1)wt(1)=.225 ; wt(2)=.4827 ; wt(3)=wt(2); wt(4)=wt(2)wt(5)=.8506; wt(6)=wt(5) ; wt(7)=wt(5) ;wt = .5*wtcase(12)s(1,1)=.6996 ; s(1,2)=.1502s(2,1)=s(1,2) ; s(2,2)=s(1,1); s(3,1)=s(1,2) ; s(3,2)=s(1,2)s(4,1)=.8179 ; s(4,2)=.0910s(5,1)=s(4,2); s(5,2)=s(4,1) ; s(6,1)=s(4,2) ; s(6,2)=s(4,2)s(7,1)=.1399 ; s(7,2)=.3785s(8,1)=s(7,1) ; s(8,2)=.4816 ; s(9,1)=s(7,2) ; s(9,2)=s(7,1)s(10,1)=s(7,2) ; s(10,2)=s(8,2) ; s(11,1)=s(8,2); s(11,2)=s(7,1)s(12,1)=s(8,2) ; s(12,2)=s(7,2)wt(1)=.0207 ; wt(2)=wt(1); wt(3)=wt(1)wt(4)=.6379 ; wt(5)=wt(4); wt(6)=wt(4)wt(7)=.8374 ; wt(8:12)=wt(7) ; wt = .5*wtcase(16)s(1,1)=1./3. ; s(1,2)=1./3. ; s(2,1)=.6478s(2,2)=.1761 ; s(3,1)=s(2,2) ; s(3,2)=s(2,1)s(4,1)=s(2,2) ; s(4,2)=s(2,2)s(5,1)=.5938 ; s(5,2)=.7031s(6,1)=s(5,2); s(6,2)=s(5,1) ; s(7,1)=s(5,2) ; s(7,2)=s(5,2)s(8,1)=.4554; s(8,2)=.2723s(9,1)=s(8,2) ; s(9,2)=s(8,1); s(10,1)=s(8,2) ; s(10,2)=s(8,2)s(11,1)=.9958; s(11,2)=.4638s(12,1)=s(11,1) ; s(12,2)=.5404s(13,1)=s(11,2) ; s(13,2)=s(11,1) ; s(14,1)=s(11,2); s(14,2)=s(12,2)s(15,1)=s(12,2) ; s(15,2)=s(11,1) ; s(16,1)=s(12,2) ; s(16,2)=s(11,2)wt(1)=.7787 ; wt(2)=.4718 ; wt(3)=wt(2); wt(4)=wt(2)wt(5)=.3198 ; wt(6)=wt(5) ; wt(7)=wt(5)wt(8)=.7284 ; wt(9)=wt(8) ; wt(10)=wt(8)wt(11)=.4435 ; wt(12:16) = wt(11) ; wt = .5*wtcase defaultprint*,"wrong number of integrating points for a triangle"end select3.2D quadrilateral element(p182 computation mechanics)Order n Location ξLocation ηWeight w1 1 0.0 0.0 4.04 1 1.02 1.03 1.04 1.09 1 -√0.6 -√0.6 25/812 -√0.6 0.0 40/813 -√0.6 √0.6 25/814 0.0 -√0.6 40/815 0.0 0.0 64/816 0.0 √0.6 40/81case ('quadrilateral')select case (nip)case(1)s(1,1) = .0 ; wt(1) = 4.case(4)s(1,1)=-root3; s(1,2)= root3s(2,1)= root3; s(2,2)= root3s(3,1)=-root3; s(3,2)=-root3s(4,1)= root3; s(4,2)=-root3wt = 1.0case(9)s(1:7:3,1) = -r15; s(2:8:3,1) = .0s(3:9:3,1) = r15; s(1:3,2) = r15s(4:6,2) = .0 ; s(7:9,2) =-r15wt= vcase defaultprint*,"wrong number of integrating points for a quadrilateral"end select4.3D tetrahedron element(p231 computation mechanics)case('tetrahedron')select case(nip)case(1) ! for tetrahedra weights multiplied by 1/6s(1,1)=.25 ; s(1,2)=.25 ; s(1,3)=.25 ; wt(1)=1./6.case(4)s(1,1)=.58541020 ; s(1,2)=.13819660 ; s(1,3)=s(1,2)s(2,2)=s(1,1) ; s(2,3)=s(1,2) ; s(2,1)=s(1,2)s(3,3)=s(1,1) ; s(3,1)=s(1,2) ; s(3,2)=s(1,2)s(4,1)=s(1,2) ; s(4,2)=s(1,2) ; s(4,3)=s(1,2) ; wt(1:4)=.25/6.case(5)s(1,1)=.25 ; s(1,2)=.25 ; s(1,3)=.25 ; s(2,1)=.5s(2,2)=1./6. ; s(2,3)=s(2,2); s(3,2)=.5s(3,3)=1./6. ; s(3,1)=s(3,3) ; s(4,3)=.5s(4,1)=1./6. ; s(4,2)=s(4,1); s(5,1)=1./6.s(5,2)=s(5,1) ; s(5,3)=s(5,1)wt(1)=-.8 ; wt(2)=9./20. ; wt(3:5)=wt(2) ; wt =wt/6.case(6)wt = 4./3. ; s(6,3) = 1.s(1,1)=-1. ;s(2,1)=1. ; s(3,2)=-1. ; s(4,2)=1. ; s(5,3)=-1.case defaultprint*,"wrong number of integrating points for a tetrahedron"end select5.3D hexahedron element (p187 computation mechanics)Location r Location s Location t Weight w Ordern1 1 0.0 0.0 0.0 8.08 1 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.0case('hexahedron')select case ( nip )case(1)s(1,1) = .0 ; wt(1) = 8.case(8)s(1,1)= root3;s(1,2)= root3;s(1,3)= root3s(2,1)= root3;s(2,2)= root3;s(2,3)=-root3s(3,1)= root3;s(3,2)=-root3;s(3,3)= root3s(4,1)= root3;s(4,2)=-root3;s(4,3)=-root3s(5,1)=-root3;s(5,2)= root3;s(5,3)= root3s(6,1)=-root3;s(6,2)=-root3;s(6,3)= root3s(7,1)=-root3;s(7,2)= root3;s(7,3)=-root3s(8,1)=-root3;s(8,2)=-root3;s(8,3)=-root3wt = 1.0case(14)b=0.795822426 ; c=0.758786911wt(1:6)=0.886426593 ; wt(7:) = 0.335180055s(1,1)=-b ; s(2,1)=b ; s(3,2)=-b ; s(4,2)=bs(5,3)=-b ; s(6,3)=bs(7:,:) = cs(7,1)=-c ; s(7,2)=-c ; s(7,3)=-c ; s(8,2)=-c ; s(8,3)=-cs(9,1)=-c ; s(9,3)=-c ; s(10,3)=-c; s(11,1)=-cs(11,2)=-c ; s(12,2)=-c ; s(13,1)=-ccase(15)b=1. ; c=0.674199862wt(1)=1.564444444 ; wt(2:7)=0.355555556 ; wt(8:15)=0.537777778 s(2,1)=-b ; s(3,1)=b ; s(4,2)=-b ; s(5,2)=bs(6,3)=-b ; s(7,3)=b ; s(8:,:)=c ; s(8,1)=-cs(8,2)=-c ; s(8,3)=-c ; s(9,2)=-c ; s(9,3)=-cs(10,1)=-c ; s(10,3)=-c ; s(11,3)=-c ; s(12,1)=-cs(12,2)=-c ; s(13,2)=-c ; s(14,1)=-ccase(27)wt = (/5./9.*v,8./9.*v,5./9.*v/)s(1:7:3,1) = -r15; s(2:8:3,1) = .0s(3:9:3,1) = r15; s(1:3,3) = r15s(4:6,3) = .0 ; s(7:9,3) =-r15s(1:9,2) = -r15s(10:16:3,1) = -r15; s(11:17:3,1) = .0s(12:18:3,1) = r15; s(10:12,3) = r15s(13:15,3) = .0 ; s(16:18,3) =-r15s(10:18,2) = .0s(19:25:3,1) = -r15; s(20:26:3,1) = .0s(21:27:3,1) = r15; s(19:21,3) = r15s(22:24,3) = .0 ; s(25:27,3) =-r15s(19:27,2) = r15case defaultprint*,"wrong number of integrating points for a hexahedron"end select。
高斯求积公式
高斯求积公式,又称为高斯积分公式,是由18世纪德国数学家卡尔·高斯发现的重要的定积分计算公式。
它是用来计算一元函数定积分的有效方法,是数学计算中最重要的积分公式。
高斯求积公式包括两种不同的形式:一种叫做标准形式,另一种叫做拉格朗日形式。
两种形式的计算结果是一样的,所以可以任意使用其中一种形式来计算定积分。
标准形式的高斯求积公式为:
∫f(x)dx=Σwi*fi(xi) (i=1,2,3,…n)
其中,wi为积分权值,fi(xi)为积分点处函数值,xi为积分点,n 为积分点数。
拉格朗日形式的高斯求积公式为:
∫f(x)dx=Σwi*fi(xi)*fi'(xi) (i=1,2,3,…n)
其中,wi为积分权值,fi(xi)为积分点处函数值,fi'(xi)为积分点处函数一阶导数,xi为积分点,n为积分点数。
高斯求积公式的基本原理是:将函数拆分为多个函数,将定积分的计算拆分成多个简单的积分,然后再求和。
高斯求积公式可以计算
多项式、几何线性函数等积分,是一种十分有效的计算积分的方法。
高斯求积公式的优势在于它的公式简单,计算速度快,可以有效减少计算量,提高计算效率,使得复杂的积分可以轻松计算出来。
它也可以用来计算多元函数的积分,对于函数求积有着重要的意义。
总之,高斯求积公式是一种十分重要的定积分计算公式,可以用来计算一元函数的积分,也可以用来计算多元函数的积分,是数学计算中有效的方法。
高斯曲线积分一、概述高斯曲线积分,也称为高斯积分,是一种特殊的定积分。
它是由德国数学家高斯在研究电磁场时引入的。
高斯曲线积分在数学、物理、工程等领域都有广泛的应用。
二、基本概念1.曲线积分曲线积分是将一个向量函数沿着一条曲线进行积分,通常用于计算物理量在空间中的变化量。
2.高斯公式高斯公式是描述向量场与曲面之间关系的定理。
它将一个向量场通过曲面上的积分转化为该向量场在该曲面所包围区域内的散度值。
3.散度散度是描述向量场在某点处流出或流入该点的强度大小,通常用数值表示。
4.高斯积分高斯积分是对三维空间中一个标量函数或者一个向量函数沿着某个闭合曲面进行积分。
它可以通过高斯公式来计算。
三、计算方法1.标量函数的高斯积分设f(x,y,z)为定义在闭合曲面S上的连续可微函数,则S上f(x,y,z)的高斯积分为:∫∫S f(x,y,z)dS = ∫∫∫V (∇·f)dxdydz其中,V为曲面S所包围的空间体积,∇·f为f的散度。
2.向量函数的高斯积分设F(x,y,z)=(P(x,y,z),Q(x,y,z),R(x,y,z))为定义在闭合曲面S上的连续可微向量函数,则S上F(x,y,z)的高斯积分为:∫∫S F(x,y,z)·dS = ∫∫∫V (∇·F)dxdydz其中,V为曲面S所包围的空间体积,∇·F为F的散度。
四、应用领域1.电磁学高斯曲线积分在电磁学中有广泛应用。
通过对电场、磁场进行高斯曲线积分,可以计算出它们在某个区域内的总量和强度大小。
2.流体力学在流体力学中,通过对速度场进行高斯曲线积分,可以计算出流体在某个区域内的总质量和流量。
3.工程领域高斯曲线积分也被广泛应用于工程领域。
例如,在材料科学中,通过对应力场进行高斯曲线积分,可以计算出材料在某个区域内的总应力。
五、总结高斯曲线积分是一种特殊的定积分,主要用于计算物理量在空间中的变化量。
它可以通过高斯公式来计算。
高斯积分方法
1. 高斯积分方法是一种用于数值计算的积分方法,适用于计算一维或多维函数的积分。
2. 高斯积分方法使用一组选定的积分点和对应的权重来近似计算积分值。
3. 高斯积分方法的基本思想是在积分区间上选择适当的积分点,以使得使用这些积分点进行近似计算可以获得较高的精度。
4. 高斯积分方法的积分点和权重是通过解高斯-勒让德多项式的零点和系数来确定的。
5. 高斯-勒让德多项式是定义在[-1, 1]上的一组正交多项式,其零点称为高斯积分点。
6. 高斯积分方法的积分点和权重一般是通过预先计算和存储的,以便在实际计算中直接使用。
7. 高斯积分方法的精度通常与选取的积分点数有关,通常使用更多的积分点可以获得更高的精度。
8. 高斯积分方法适用于计算具有光滑函数特性的积分,特别适用于计算函数在较小区域上的积分值。
9. 在多维情况下,高斯积分方法可以通过将一维积分方法应用于各个维度来进行计算。
10. 高斯积分方法在科学计算、数值分析和工程等领域中被广泛应用,常用于求解数值积分、数值微分和求解偏微分方程等问题。
高斯型积分
高斯型积分是一种数学上的积分方法,也称为高斯积分。
它是用于求解连续函数的定积分的一种方法,可以用于求解不规则区域的定积分。
高斯型积分的基本思想是,将积分区域分割成许多小矩形,然后在每个小矩形上进行积分,最后将所有小矩形的积分结果相加得到定积分的近似值。
高斯型积分有许多优点,例如它能够求解不规则区域的定积分,能够处理高维积分等。
高斯型积分也被称为“数值积分”,它是一种广泛应用于数值计算和工程领域的方法。
高斯型积分的主要缺点是,它的计算结果可能存在误差,并且误差的大小与积分区域的形状、分割方式等因素有关。
因此,在实际应用中,需要对高斯型积分进行适当的调整和优化,以提高其精度和可靠性。
单元节点和积分点有什么区别
学过数值积分的应该知道,有限元中的积分点指高斯积分点,因为这些点的收敛性好,精度高。
1、节点
在单元内,采用形函数来表述单元内变量的分布规律。
而节点值是在节点处的对应物理量。
以简单矩形单元的温度为例:
四个节点i,j,m,n的温度分别为Ti,Tj,Tm,Tn.
则以单元内自然坐标(x,y),(-1,-1),(-1,1),(1,-1),(1,1)分别为四个节点,单元内温度分布为:
T={Si, Sj, Sm, Sn} {Ti, Tj, Tm, Tn}
Si=1/4(1-x)(1-y)
Sj=1/4(1+x)(1-y)
Sm=1/4(1+x)(1+y)
Sn=1/4(1-x)(1+y)
(单元的形函数我们可以从手册中查到)
从而我们知道了温度在单元内的分布。
2、积分节点
我们需要对温度在单元内的面积上进行积分时,因为节点的温度显然与x,y无关,我们只需要考虑对形函数积分。
采用Gauss_Legendre多项式计算积分时,我们只需要计算根据特定积分点的值(在自然坐标系下是固定的,可以查手册,这些点也叫高斯点、积分点)并加以权重就可以。
这就把复杂的积分问题变成了简单的代数问题。
因为形函数只有单元有关,所以积分点也只与单元形状有关。
3.应力一般采用多个积分点的相互插值或外延来计算节点应力。
这只是为了减少误差。
因为在积分点应力比节点具有更高阶的误差。
从理论上说,形函数已知后,用Maple或者Mathematic等软件进行符号积分的话,是可以精确计算出刚度矩阵和质量矩阵,但是这样做的话,对于工程实际应用来说并不合适(
原因:1,费时;2,Mindlin中厚板有剪力锁死问题,有时候需要采用缩聚积分),所以有些书上会把2节点梁单元的刚度阵直接写出来,但是再复杂点的单元,就使用数值积分(Newton-Cotes积分和高斯积分)
高斯积分的话,积分点不在节点上
牛顿-科斯的积分点就是节点,这样得到的质量矩阵是集中质量阵形式
个人理解:
1.节点作用构造形函数,节点的多少描述规则形状单元内的应力的近似分布情况,并获取节点上的位移值
2.积分点作用是构造规则形状单元与曲边(曲面)单元的转化的变换函数,积分点的选取多少和选取的位置直接关系到这种“映射”
的精确程度,刚度矩阵、边界条件的转化都用到了坐标变换的积分关系,一般取高斯积分点能使被积函数计算精度尽量高。
对于newton-cote积分点的选取,这种“映射”看起来,节点和积分点是同一个位置或说是同一点,而对于高斯积分点位置与节点是不同的。
故有如下结果:
1.由于高斯积分点的这种变换比较高,在方程求解结束,返回积分点上的应力解比较准确
2.至于Mindlin中厚板有剪力锁死问题,采用缩聚积分,也是应为这种坐标的变换关系(可见《有限单元法基本原理和数值方法》p345页10.4.11式可知),力的边界条件只有剪切,采用缩聚积分可以较大降低剪切力的影响,但是也可能引起刚度矩阵的奇异,所以对于中厚板的积分点选取不同一般的方案
1.ANSYS手册(Chapter 13)上列出各种单元的积分点位置。
2.王瑁成的《有限单元法》第五章,有解释为什么积分点应力更加精确。
3.因为积分点应力更精确,所以我们一般采用积分点的应力内插或外延确定节点应力。
特殊情况除外。
单元节点和积分点是不同的两个概念!
积分点是在进行函数积分的时候,为了增加精度,选取的积分点,也就是高斯积分
单元节点是你选取单元的时候就已经定下的点,
一定有单元节点,但不一定有积分点
在网格划分完了所有的节点就都给定了,就是你网格中的每个点,他是有限元模型中“真实存在”的点。
但是高斯点纯粹是因为高斯积分这种积分方式引入的。
数值分析告诉我们,数值积分有很多方法,比如辛普森积分,高斯积分等,比如说,如果你采用辛普森积分就不存在高斯点这个概念,只有当你采用高斯积分才会有高斯点,不过有限元大多都采用高斯积分。
看过高斯积分就知道高斯点是怎么一回事了。
有限元求解的结果是每个节点的位移,然后通过形函数插值得到单元任何一个点的位移,当然可以计算出高斯积分点的位移。
至于应力,一般是先求解出高斯点出的应力,然后通过平均化的技术平均到每个节点上,高斯点处的应力精度最高,节点最差。