Problems with Matlab Projects? You may face many Problems, but do not worry we are ready to solve your Problems. All you need to do is just leave your Comments. We will assure you that you will find a solution to your project along with future tips. On Request we will Mail you Matlab Codes for Registered Members of this site only, at free service...Follow Me.

Element Connectivity for the Hex Mesh : Mesh generation using MATLAB

how to creat a basic Hex mesh in Matlab. What though was missing from the Post was how to get the element connectivity which needs to be Fed to the function which calculates the face connectivity.

So here are few simple steps by which you can easily get the Element Connectivites for the Basic Hexahedral Mesh while using MATLAB.


function element=make_elem(node_pattern,num_u,num_v,num_w,inc_u,inc_v,inc_w,nnx)

%
% Synopsis: element = make_elem(node_pattern,num_u,num_v,num_w,inc_u,inc_v,inc_w,nnx)
%
% Input: node_pattern > Natural node ordering for elements
% node_pattern=[ 1 2 nnx+1 nnx+2 nny+1 nny+2 nny+nnx+1 nny+nnx+2 ]; % Node pattern 1 %2 3 4 5 6 7 8 % according to me notations

% num_u > Number of control volumes in X direction.
% num_v > Number of control volumes in Y direction.
% inc_u > Increment in cell numbers in X direction
% inc_v > Increment in cell numbers in Y direction
%
% Output: element > Element connectivity matrix.


inc=[zeros(1,size(node_pattern,2))];
e=1;
element=zeros(num_u*num_v*num_w,size(node_pattern,2));

for row=1:num_v*num_u
for col=1:num_u
element(e,:)=node_pattern+inc;
inc=inc+inc_u;
e=e+1;
end
inc = row*inc_v;
if mod(e-1,num_u*num_v)==0
node_pattern = node_pattern + nnx;
end
end



% These few simple Steps will help any one who wants to get a basic Hex mesh using MATLAB

0 comments:

Post a Comment

Recent Comments

Popular Matlab Topics

Share your knowledge - help others

Crazy over Matlab Projects ? - Join Now - Follow Me

Sites U Missed to Visit ?

Related Posts Plugin for WordPress, Blogger...

Latest Articles

Special Search For Matlab Projects

MATLAB PROJECTS

counter

Bharadwaj. Powered by Blogger.