声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 12357|回复: 15

[综合讨论] 求问:二维三角形单元的高斯积分点和权系数如何求?

[复制链接]
发表于 2012-9-4 10:19 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
我现在正在做一个电场计算的程序,在求边界电场刚度阵的时候,应用7个高斯节点精度不够~书中一般都是只给到7个积分点,哪位大神有求辐射单元高斯积分点的matlab程序或者积分表也成~高于7个积分点的~万分感谢!

本帖被以下淘专辑推荐:

回复
分享到:

使用道具 举报

发表于 2012-9-7 09:49 | 显示全部楼层
本帖最后由 犟牛 于 2012-9-7 09:50 编辑

高斯点

Gauss-Legendre Abscissae and Weights_01 .png

Gauss-Legendre Abscissae and Weights_02 .png

Gauss-Legendre Abscissae and Weights_03 .png


点评

赞成: 5.0
赞成: 5
这个哥们是好人,多谢  发表于 2015-12-10 17:57

评分

1

查看全部评分

发表于 2012-9-7 09:56 | 显示全部楼层
搞错了,上面发的一维的,重新发一个二维的

二维高斯积分点及其权函数.doc

27.5 KB, 下载次数: 97

点评

赞成: 0.0
赞成: 0
  发表于 2015-12-10 13:08

评分

1

查看全部评分

 楼主| 发表于 2012-9-9 21:27 | 显示全部楼层
回复 3 # 犟牛 的帖子

万分感谢~但是这个是对称结构的高斯点,就是适用于四边形单元,不适用于三角形单元啊~有木有三角形单元的高斯点啊?
发表于 2012-9-11 15:26 | 显示全部楼层
本帖最后由 犟牛 于 2012-9-11 15:26 编辑
  1. 1
  2. -0.333333333333333  -0.333333333333333  2.000000000000000
  3.   Gauss  quadrature  points  and  weights  on  the  reference  triangle  order  p=1

  4. 3
  5. -0.666666666666667  -0.666666666666667  0.666666666666667
  6. -0.666666666666667  0.333333333333333  0.666666666666667
  7. 0.333333333333333  -0.666666666666667  0.666666666666667
  8.   Gauss  quadrature  points  and  weights  on  the  reference  triangle  order  p=2

  9. 4
  10. -0.333333333333333  -0.333333333333333  -1.125000000000000
  11. -0.600000000000000  -0.600000000000000  1.041666666666667
  12. -0.600000000000000  0.200000000000000  1.041666666666667
  13. 0.200000000000000  -0.600000000000000  1.041666666666667
  14.   Gauss  quadrature  points  and  weights  on  the  reference  triangle  order  p=3

  15. 6
  16. -0.108103018168070  -0.108103018168070  0.446763179356022
  17. -0.108103018168070  -0.783793963663860  0.446763179356022
  18. -0.783793963663860  -0.108103018168070  0.446763179356022
  19. -0.816847572980458  -0.816847572980458  0.219903487310644
  20. -0.816847572980458  0.633695145960918  0.219903487310644
  21. 0.633695145960918  -0.816847572980458  0.219903487310644
  22.   Gauss  quadrature  points  and  weights  on  the  reference  triangle  order  p=4

  23. 7
  24. -0.333333333333333  -0.333333333333333  0.450000000000000
  25. -0.059715871789770  -0.059715871789770  0.264788305577012
  26. -0.059715871789770  -0.880568256420460  0.264788305577012
  27. -0.880568256420460  -0.059715871789770  0.264788305577012
  28. -0.797426985353088  -0.797426985353088  0.251878361089654
  29. -0.797426985353088  0.594853970706174  0.251878361089654
  30. 0.594853970706174  -0.797426985353088  0.251878361089654
  31.   Gauss  quadrature  points  and  weights  on  the  reference  triangle  order  p=5

  32. 12
  33. -0.501426509658180  -0.501426509658180  0.233572551452758
  34. -0.501426509658180  0.002853019316358  0.233572551452758
  35. 0.002853019316358  -0.501426509658180  0.233572551452758
  36. -0.873821971016996  -0.873821971016996  0.101689812740414
  37. -0.873821971016996  0.747643942033992  0.101689812740414
  38. 0.747643942033992  -0.873821971016996  0.101689812740414
  39. -0.379295097932432  0.273004998242798  0.165702151236748
  40. 0.273004998242798  -0.893709900310366  0.165702151236748
  41. -0.893709900310366  -0.379295097932432  0.165702151236748
  42. -0.379295097932432  -0.893709900310366  0.165702151236748
  43. 0.273004998242798  -0.379295097932432  0.165702151236748
  44. -0.893709900310366  0.273004998242798  0.165702151236748
  45.   Gauss  quadrature  points  and  weights  on  the  reference  triangle  order  p=6

  46. 13
  47. -0.333333333333333  -0.333333333333333  -0.299140088935364
  48. -0.479308067841920  -0.479308067841920  0.351230514866416
  49. -0.479308067841920  -0.041383864316160  0.351230514866416
  50. -0.041383864316160  -0.479308067841920  0.351230514866416
  51. -0.869739794195568  -0.869739794195568  0.106694471217676
  52. -0.869739794195568  0.739479588391136  0.106694471217676
  53. 0.739479588391136  -0.869739794195568  0.106694471217676
  54. -0.374269007990252  0.276888377139620  0.154227521780514
  55. 0.276888377139620  -0.902619369149368  0.154227521780514
  56. -0.902619369149368  -0.374269007990252  0.154227521780514
  57. -0.374269007990252  -0.902619369149368  0.154227521780514
  58. 0.276888377139620  -0.374269007990252  0.154227521780514
  59. -0.902619369149368  0.276888377139620  0.154227521780514
  60.   Gauss  quadrature  points  and  weights  on  the  reference  triangle  order  p=7

  61. 16
  62. -0.333333333333333  -0.333333333333333  0.288631215355574
  63. -0.081414823414554  -0.081414823414554  0.190183268534570
  64. -0.081414823414554  -0.837170353170892  0.190183268534570
  65. -0.837170353170892  -0.081414823414554  0.190183268534570
  66. -0.658861384496480  -0.658861384496480  0.206434741069436
  67. -0.658861384496480  0.317722768992960  0.206434741069436
  68. 0.317722768992960  -0.658861384496480  0.206434741069436
  69. -0.898905543365938  -0.898905543365938  0.064916995246396
  70. -0.898905543365938  0.797811086731876  0.064916995246395
  71. 0.797811086731876  -0.898905543365938  0.064916995246396
  72. -0.473774340730724  0.456984785910808  0.054460628348870
  73. 0.456984785910808  -0.983210445180084  0.054460628348870
  74. -0.983210445180084  -0.473774340730724  0.054460628348870
  75. -0.473774340730724  -0.983210445180084  0.054460628348870
  76. 0.456984785910808  -0.473774340730724  0.054460628348870
  77. -0.983210445180084  0.456984785910808  0.054460628348870
  78.   Gauss  quadrature  points  and  weights  on  the  reference  triangle  order  p=8
复制代码

评分

1

查看全部评分

发表于 2012-10-25 20:49 | 显示全部楼层
能不能把计算的程序发一下。楼主好人!!!
发表于 2012-10-25 21:00 | 显示全部楼层
请问你能不能发一个用面积坐标表示的二维高斯积分点的结果。多谢啦。
发表于 2012-11-19 04:06 | 显示全部楼层
现在也在做一个有限元的作业,需要二维的高斯积分点
发表于 2012-11-22 20:58 | 显示全部楼层
高斯积分点及其权重的计算程序,大家自己算去吧
  1. function [point c] = md_gauss(n,dimension,symbolic,type)
  2. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  3. %   Program:    Multi-dimensional gauss points calculator with weight
  4. %               functions
  5. %   Author:     Brent Lewis
  6. %               rocketlion@gmail.com
  7. %   History:    Originally written: 10/30/2006
  8. %               Revision for symbolic logic:  1/2/2007
  9. %   Purpose:    Program calculates the gauss points for 1-D,2-D,3-D along
  10. %               with their weights for use in numerical integration.  
  11. %               Originally written for a Finite Element Program so has the
  12. %               capability to give integration points for a 6-node Triangle
  13. %               element
  14. %   Input:      n:          Number of gauss points(Must be integer 0<n<22
  15. %               dimension:  Dimension of space for gauss points(optional)
  16. %               symbolic:   Logical statement for return values in symbolic
  17. %                           form(optional)
  18. %               type:       Type of finite element(optional)
  19. %   Output:     point:      Gauss points in either vector or matrix form
  20. %                           depeding on dimensions
  21. %               c:          Weighting values for Gaussian integration
  22. %   Example:    [point c] = md_gauss(2)
  23. %               Returns the point = +/-sqrt(1/3) and c = 1 1 which are the
  24. %               gauss points and integration weights for 2 Gauss point rule
  25. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  26. % Multiple Levels of Input with default values
  27. if nargin == 1
  28.     dimension = 1;
  29.     type = 'QUAD4';
  30.     symbolic = 0;
  31. elseif nargin == 2
  32.     type = 'QUAD4';
  33.     symbolic = 0;
  34. elseif nargin == 3
  35.     type = 'QUAD4';
  36. end

  37. if strcmp(upper(symbolic),'TRUE')
  38.     symbolic = 1;
  39. else
  40.     symbolic = 0;
  41. end

  42. % Error determination
  43. if n < 1 || n > 21
  44.     error('Number of gauss points must be 0<n<21.')     % Factorial only accurate to n = 21
  45. elseif mod(n,1) ~= 0
  46.     error('Points must be integer value')               % Check for non-integer points
  47. elseif dimension < 1 || dimension > 3
  48.     error('Dimension error:  0<Dimension<4')            % Dimension check
  49. end

  50. if strcmp(upper(type), 'QUAD4') || strcmp(upper(type), 'QUAD8') || strcmp(upper(type), 'QUAD9')
  51.     syms x
  52.     if n == 1
  53.         point_1D = 0;
  54.         c_1D = 2;
  55.     else
  56.         P = 1/(2^n*factorial(n))*diff((x^2-1)^n,n);  % Rodrigues' Formula
  57.         point_1D = double(solve(P));
  58.         % Weight Function described in Numerical Analysis book 8th edition-
  59.         % Richard Burden page 223
  60.         for i = 1 : length(point_1D)
  61.             prod = 1;
  62.             for j = 1 : length(point_1D)
  63.                 if i == j
  64.                     continue
  65.                 else
  66.                     prod = prod*(x-point_1D(j))/(point_1D(i)-point_1D(j));
  67.                 end
  68.             end
  69.             c_1D(i,1) = double(int(sym(prod),-1,1));
  70.         end
  71.     end

  72.     if dimension == 1
  73.         point = point_1D;
  74.         c = c_1D;
  75.     elseif dimension == 2
  76.         k = 1;
  77.         for i = 1:n
  78.             for j = 1:n
  79.                 point(k,:) = [point_1D(i),point_1D(j)];
  80.                 c(k,1) = c_1D(i)*c_1D(j);
  81.                 k = k+1;
  82.             end
  83.         end
  84.     elseif dimension == 3
  85.         m = 1;
  86.         for i = 1 : n
  87.             for j = 1 : n
  88.                 for k = 1 : n
  89.                     point(m,:) = [point_1D(i),point_1D(j),point_1D(k)];
  90.                     c(m,1) = c_1D(i)*c_1D(j)*c_1D(k);
  91.                     m = m+1;
  92.                 end
  93.             end
  94.         end
  95.     end
  96. elseif strcmp(upper(type), 'TRI6')
  97.     if n == 1
  98.         point = ones(3,1)/3;
  99.         c = 1;
  100.     elseif n == 3
  101.         point = ones(3)/3+eye(3)/3;
  102.         c = ones(3,1)/3;
  103.     elseif n == -3
  104.         point = ones(3)/2-eye(3)/2;
  105.         c = ones(3,1)/3;
  106.     elseif n == 6
  107.         g1 = (8-sqrt(10)+sqrt(38-44*sqrt(2/5)))/18;
  108.         g2 = (8-sqrt(10)-sqrt(38-44*sqrt(2/5)))/18;
  109.         point = [ones(3)*g1+eye(3)*(1-3*g1);ones(3)*g2+eye(3)*(1-3*g2)];
  110.         c = ones(6,1)*(213125-53320*sqrt(10))/3720;
  111.     elseif n == -6
  112.         point = [ones(3)/6+eye(3)/2;ones(3)/2-eye(3)/2];
  113.         c = [ones(3,1)*3/10;ones(3,1)/30];
  114.     elseif n == 7
  115.         g1 = (6-sqrt(15))/21;
  116.         g2 = (6+sqrt(15))/21;
  117.         point = [ones(3)*g1+eye(3)*(1-3*g1);ones(3)*g2+eye(3)*(1-3*g2);ones(1,3)/3];
  118.         c = [ones(3,1)*(155-sqrt(15))/1200;ones(3,1)*(155+sqrt(15))/1200;9/40];
  119.     end
  120. elseif strcmp(upper(type), 'TRI3')
  121.     point =[];
  122.     c = [];
  123. end

  124. if symbolic == 1
  125.     point = sym(point);
  126.     c = sym(c);
  127. end
复制代码


评分

2

查看全部评分

发表于 2015-11-2 19:24 | 显示全部楼层
刚好要用到,找了半天终于找到了,感谢分享!
发表于 2015-11-18 20:55 | 显示全部楼层
非常有用,感谢
发表于 2015-12-10 13:21 | 显示全部楼层
meifan2015 发表于 2015-11-2 19:24
刚好要用到,找了半天终于找到了,感谢分享!

这个程序四边形可以用吗?
发表于 2015-12-10 14:03 | 显示全部楼层
renren 发表于 2015-12-10 13:21
这个程序四边形可以用吗?

应该是可以的,程序中的type就是控制单元类型的,从程序上看有QUAD4等四边形单元
发表于 2017-4-5 14:47 | 显示全部楼层
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-4-24 22:26 , Processed in 0.146617 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表