How to calculate the average within a mesh element
조회 수: 14(최근 30일)
I am wondering about how to take the average value of all the nodes on the edges and corners of a 2-D quadratic element. I used PED tool box to build a model. Each one of the nodes has three categories of values as a_i, b_i, c_i. And I would like to get the average of the 6 nodes in one element for a, b, and c. Are there any ways to do it? And also. how can I output the area for each one of the element or use it for caluculations with a, b, and c?
Thank you very much!
KSSV 2018년 12월 12일
N = 10 ;
x = rand(N,1) ; y = rand(N,1) ;
dt = delaunayTriangulation(x(:),y(:)) ;
tri = dt.ConnectivityList ;
p = dt.Points ;
% some physical property/ get mean
V = rand(N,1) ;
V = V(tri) ;
Vm = mean(V,2) ;