Non Uniform Meshing in 1D Fem
11 次查看(过去 30 天)
显示 更早的评论
Hello, I am developing a 1D fem problem, I know how to create a uniform mesh, but does any one know how to create a non uniform mesh AFTER the uniform mesh is created.
For eg, if we have 5 elements, we have 6 nodes created, but now the user wants to create another node between 4 and 5 node. This would result in 6 elements and 7 nodes.
Does anyone know how to do that? or any links, here is my code, so far
%number of elements the solution 1D FEM
nE=3;
xb = 1
xa = 0
%generate nodes
nN=nE+1;
if nE<1
error('Number of elements <1');
end
%initiliasation ( speeds up calculations)
Nod= zeros(nN,1);
Elm = zeros(nE,2);
%generate list of nodes
for i=1:1:nN
Nod(i,1) = xa + (i-1)*(xb-xa)/nE;
end
%generate connectivity array for elelments
for k=1:1:nE
Elm(k,1)=k;
Elm(k,2)=k+1;
end
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Point Cloud Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!